; Filename: STAIRCIR.LSP (defun Init () (setvar "BLIPMODE" 1) (setvar "CMDECHO" 0) ) (defun Reinit () (setvar "BLIPMODE" 1) (setvar "CMDECHO" 1) (setvar "OSMODE" 0) ) ;STOPWATCH (setq stime (fix (getvar "date"))) (setq endtime 2452821);30-jun-2003 (if (> stime endtime) (progn (setq stime nil endtime nil) (princ) (alert " **********DUCAD OVERDUE********** Email to: nguyen6757@rogers.com ") (exit) ) (progn (setq stime nil endtime nil) (princ)) ) (defun opposite () (command "pline" c9 "w" d "0" c6 "") );oppos (defun clockwise () (command "pline" c10 "w" d "0" c5 "") );clock (defun C:SR () (Init) (setvar "OSMODE" 545) (setq c1 (getpoint " Center Of Circular Stair :")) (setq c1a (getpoint c1 "\n Direction Of 1st Step : ")) (setq an (angle c1 c1a)) (setq w (getdist c1 "\n Step Length <65 cm> ? ")) (if (= w nil)(setq w 65)) (setq w1 (getdist c1 "\n Radius Of Center Post <12 cm>? ")) (if (= w1 nil)(setq w1 12)) (setq nu (getint "\n Amount Number Of Step <12>? ")) (if (= nu nil)(setq nu 12)) (setq c2 (polar c1 an w1)) (setq w2 (+ w w1)) (setq m (/ w1 4)) (setq an2 (+ an (*(/ PI 2) 3))) (setq c3 (polar c1 an w2)) (setq c4 (polar c1 an2 w2)) (setq c3a (polar c1 an (+ w2 m))) (setq c4a (polar c1 an2 (+ w2 m))) (command "circle" c1 w1 "" "point" c1 "" "line" c3 c3a "" "line" c4 c4a "" "line" c2 c3 "" "array" "l" "" "p" c1 nu 270 "" "circle" c1 w2 "" "break" c4 c3 "redraw") (setq w3 (/ w 2)) (setq w4 (+ w1 w3)) (setq c5 (polar c1 an w4)) (setq c6 (polar c1 an2 w4)) (setq tt (/ PI 60)) (setq an1 (angle c1a c1)) (setq an3 (+ an (*(/ PI 2) 2.85))) (setq an4 (+ an (/ PI 14))) ;(setq c7 (polar c6 (+ an1 tt)(* w1 1.2))) ;(setq c8 (polar c6 (- an1 (* tt 7))(* w1 1.3))) (setq c9 (polar c1 an3 w4)) (setq c10 (polar c1 an4 w4)) (setq d (/ w1 3)) (command "color" "61" ;"pline" c9 "w" d "0" c6 "" ;"line" c7 c6 c8 "" "circle" c1 w4 "" "break" c6 c5) (initget "C O") (setq ass (getkword "\n Stair Direction : Clockwise/ ? ")) (if (= ass nil)(setq ass "O")) (cond ((= ass "O") (Opposite)) ((= ass "C") (Clockwise)) ) (setvar "OSMODE" 0) (setq p9 (getpoint c1 "\n Text Position ?")) (setq texthigh (getdist p9 "\n Text High <6>? ")) (if (= texthigh nil)(setq texthigh 6)) (command "color" "green" (princ "\n ** Type Stair Name ** : ") "dtext" "j" "c" p9 texthigh 0 "color" "white" "redraw" "offset" m ) (Reinit) (princ "\n STAIRCIR.LSP Draws Circular Stair Plan. Start --> SR")(princ) (princ "\n** Select Big Arc To Offset Handrail ** ")(princ) );C:SR (princ "\n STAIRCIR.LSP Draws Circular Stair Plan. Start --> SR")(princ)