석축및 옹벽 표시 리습
컨텐츠 정보
- 282 조회
- 0 추천
- 0 비추천
-
목록
본문
현재 사용중인 옹벽, 석축 표시 리습입니다. line 일때만 적용이 되구요
폴리선으로 했을떄 리습이 적용 되는지 부탁드립니다.
(defun c:ss ()
(setq os-mode (getvar "osmode"))
(setvar "osmode" 0)
(sub-sug)
(command "pline" xpol3 xpol2 xpol1 po1 xpor1 xpor2 xpor3 "")
(setvar "osmode" os-mode)
(prin1)
)
(defun c:oo ()
(setq os-mode (getvar "osmode"))
(setvar "osmode" 0)
(sub-sug)
(command "pline" xpol2 xpol1 po1 xpor1 xpor2 "")
(sub-ong)
(command "pline" ypol2 ypol1 po2 ypor1 ypor2 "")
(setvar "osmode" os-mode)
(prin1)
)
(defun c:hz ()
(setq os-mode (getvar "osmode"))
(setvar "osmode" 512)
(hz-sub)
(setvar "osmode" os-mode)
(prin1)
)
(defun hz-sub ()
(setq a_0 (entsel "n Select Object Pick *1*"))
(setq a_a (car a_0))
(setq x_po (car (cdr a_0)))
(setq a_b (entget a_a))
(setq a_c10 (cdr (assoc 10 a_b)))
(setq a_c11 (cdr (assoc 11 a_b)))
(setq 10_x (car a_c10))
(setq 10_y (car (cdr a_c10)))
(setq 10_z (car (reverse a_c10)))
(setq 11_x (car a_c11))
(setq 11_y (car (cdr a_c11)))
(setq 11_z (car (reverse a_c11)))
(setq n-ac10 (list 10_x 10_y 0.0))
(setq n-ac11 (list 11_x 11_y 0.0))
(setq a_an (angle n-ac10 n-ac11))
(setq g-po (polar x_po (+ a_an (* pi 0.5)) 100))
(setq po1 (inters g-po x_po n-ac10 n-ac11 nil))
(setq di1 (distance n-ac10 po1))
(setq di2 (distance n-ac11 po1))
(setq di (distance n-ac10 n-ac11))
(if (> 10_z 11_z)
(progn
(setq z (- 10_z 11_z))
(setq new_z (rtos (+ (* (/ di2 di) z) 11_z) 2 2))
)
(progn
(setq z (- 11_z 10_z))
(setq new_z (rtos (+ (* (/ di1 di) z) 10_z) 2 2))
)
)
(command "text" po1 1.205 0 new_z "")
)
(DEFUN sub-sug ()
(setq a_0 (entsel "n Select Object Pick *1*"))
(setq a_a (car a_0))
(setq x_po (car (cdr a_0)))
(setq a_b (entget a_a))
(setq a_c10 (cdr (assoc 10 a_b)))
(setq a_c11 (cdr (assoc 11 a_b)))
(setq a_an (angle a_c10 a_c11))
(setq g-po (polar x_po (+ a_an (* pi 0.5)) 100))
(setq po1 (inters g-po x_po a_c10 a_c11 nil))
(setq b_a (car (entsel "n Select Object Pick *2*")))
(setq b_b (entget b_a))
(setq b_c10 (cdr (assoc 10 b_b)))
(setq b_c11 (cdr (assoc 11 b_b)))
(setq po2 (inters x_po g-po b_c10 b_c11 nil))
(setq an (angle po1 po2))
(setq di (distance po1 po2))
(setq xpol (polar po1 (+ an (* pi 0.25)) 10))
(setq xpor (polar po1 (- an (* pi 0.25)) 10))
(setq xpol1 (inters po1 xpol b_c10 b_c11 nil))
(setq xpor1 (inters po1 xpor b_c10 b_c11 nil))
(setq xpol (polar xpol1 (+ an (* pi 0.75)) 10))
(setq xpor (polar xpor1 (- an (* pi 0.75)) 10))
(setq xpol2 (inters xpol1 xpol a_c10 a_c11 nil))
(setq xpor2 (inters xpor1 xpor a_c10 a_c11 nil))
(setq xpol (polar xpol2 (+ an (* pi 0.25)) 10))
(setq xpor (polar xpor2 (- an (* pi 0.25)) 10))
(setq xpol3 (inters xpol2 xpol b_c10 b_c11 nil))
(setq xpor3 (inters xpor2 xpor b_c10 b_c11 nil))
)
(defun sub-ong ()
(setq xpol (polar xpol3 (+ an pi) 10))
(setq ypol3 (inters xpol3 xpol a_c10 a_c11 nil))
(setq xpol (polar xpol2 an 10))
(setq ypol2 (inters xpol2 xpol b_c10 b_c11 nil))
(setq xpol (polar xpol1 (+ an pi) 10))
(setq ypol1 (inters xpol1 xpol a_c10 a_c11 nil))
(setq xpor (polar xpor1 (+ an pi) 10))
(setq ypor1 (inters xpor1 xpor a_c10 a_c11 nil))
(setq xpor (polar xpor2 an 10))
(setq ypor2 (inters xpor2 xpor b_c10 b_c11 nil))
(setq xpor (polar xpor3 (+ an pi) 10))
(setq ypor3 (inters xpor3 xpor a_c10 a_c11 nil))