리습내용중에 선색상 변경이랑 오스냅이 사중에 꺼지는데 어느 부분을 수정해야 할지
알려주세요 ㅠㅠ
(defun c:bh ()
(graphscr)
(reset)
(setvar “cmdecho” 0)
(setq bas (getpoint “n탭깊이 시작점선택 :”))
(if (= siz nil)
(setq siz (getreal “n도면 척도입력 :”))
)
(setq m (* (getreal “n탭 규격입력 :M”) siz))
(setq len (* (getdist bas “n탭 깊이입력 :”) siz))
(setq len1 (+ len (/ m 3)))
(setq p1 (polar bas (dtr 90) (/ m 2)))
(setq p2 (polar p1 (dtr 0) len))
(setq p3 (polar bas (dtr 90) (- (/ m 2)
(/ (/ m 2) 8))))
(setq p4 (polar p3 (dtr 0) len1))
(setq p5 (polar bas (dtr 0) len))
(setq p6 (polar bas (dtr 0) len1))
(setq p7 (polar p2 (dtr -30) (- len1 len)))
(setq p8 (polar p4 (dtr -60) m))
(setq cen1 (polar p5 (dtr 0) m))
(command “layer” “s” “0” “”)
(command “line” p3 p4 “”) (setq e1 (entlast))
(command “line” p4 p6 “”) (setq e2 (entlast))
(command “line” p4 p8 “”) (setq e3 (entlast))
(command “line” p2 p5 “”) (setq e4 (entlast))
(command “layer” “s” “0” “”)
(command “line” p1 p2 “”) (setq e5 (entlast))
(command “line” p2 p7 “”) (setq e6 (entlast))
(command “line” p5 cen1 “”) (setq e7 (entlast))
;——————————————————————————-
(command “trim” e1 e7 “”)
(command (list e6 p7))
(command (list e3 p8))
(command “”)
(command “erase” e7 “”)
(command “mirror” e1 e2 e3 e4 e5
e6 “” bas “@1<0” “n”)
(command “layer” “s” “0” “”) 레이어는 빠간색 0 이 이 해당 레이어 입니다.
osnap 은 첨부 코드에는 없습니다. (reset) 서브 루틴에 있을 가능성이 있습니다.
프로그램이 끝나면서 되돌리는 서브 루틴이 있겠죠….!