작업시 BA(명령어) 를 치고 확인을누르면 스냅들이 전부다 꺼저벼려서 그리는대 힘듬니다. ㅜㅜ
제가 알지도못하는 지식으로 리습 함수들을 그냥 수정하면서 방법을찾으려했으나 도저히모르겠네요.. .. 도와주실 고수님들 계신가요…?
그리고 염치없지만.. 계단난간대 그리는리습이나.. 다른 난간대리습 있으시면 부탁드립니다.
;;난간그리기
;;난간길이2200mm이상입력test
;;난간높이300mm이상입력test
(defun dtr (a) (* pi (/ a 180.0)))
(defun c:ba (/ ar ay bsp di di1 dis dis1 en hp1 hp2 hp3 hp4 hp5 hp6 loc
oldos p1 p2 ro)
(setvar “cmdecho” 0)
(setvar “blipmode” 1)
(setq oldos (getvar “osmode”))
(setvar “osmode” 0)
(setq bsp (getpoint “n>> baluster start point :”))
(setq dis (getdist bsp “n>> baluster distance :”));난간길이2200mm이상입력
(setq loc (getdist bsp “n>> baluster location :”));난간높이300mm이상입력
(setq p1 (polar bsp (dtr 0) 100.0)
p2 (polar bsp (dtr 0) (- dis 100.0))
dis1 (distance p1 p2)
di (fix (/ (/ dis1 100.0) 10.0))
di1 (/ dis1 di)
ro (/ dis1 di)
ay (fix (* di 10.0))
hp1 (polar bsp (dtr 90) 100.0)
hp2 (polar hp1 (dtr 90) 30.0)
hp3 (polar bsp (dtr 90) loc)
hp4 (polar hp3 (dtr -90) 50.0)
hp5 (polar hp4 (dtr -90) 100.0)
hp6 (polar hp5 (dtr -90) 30.0)
)
(command “layer” “s” “0” “”)
(command “line”
hp1
(polar hp1 (dtr 0) dis)
“”
“line”
hp2
(polar hp2 (dtr 0) dis)
“”
“line”
hp3
(polar hp3 (dtr 0) dis)
“”
“line”
hp4
(polar hp4 (dtr 0) dis)
“”
“line”
hp5
(polar hp5 (dtr 0) dis)
“”
“line”
hp6
(polar hp6 (dtr 0) dis)
“”
) ; horigental bar
(command “line”
(polar bsp (dtr 0) 90.0)
(polar hp1 (dtr 0) 90.0)
“”
)
(setq en (ssadd (entlast)))
(command “line”
(polar bsp (dtr 0) 110.0)
(polar hp1 (dtr 0) 110.0)
“”
)
(Setq en (ssadd (entlast) en))
(command “line”
(polar hp2 (dtr 0) 90.0)
(polar hp6 (dtr 0) 90.0)
“”
)
(setq ar (ssadd (entlast)))
(command “line”
(polar hp2 (dtr 0) 110.0)
(polar hp6 (dtr 0) 110.0)
“”
)
(setq ar (ssadd (entlast) ar))
(command “line”
(polar hp5 (dtr 0) 90.0)
(polar hp4 (dtr 0) 90.0)
“”
)
(setq en (ssadd (entlast) en))
(command “line”
(polar hp5 (dtr 0) 110.0)
(polar hp4 (dtr 0) 110.0)
“”
)
(setq en (ssadd (entlast) en))
(command “array” en “” “r” “” di di1)
(command “array” ar “” “r” “” ay (/ di1 10.0))
(command “copy”
en
ar
“”
hp1
(polar hp1 (dtr 0) (- dis 200.0))
)
(setvar “osmode” oldos)
(princ)
)
)
사용