คำสั่งเสริม AutoLISP ช่วยเขียนลูกศร

คำสั่งเสริม AutoLISP ช่วยเขียนลูกศร

(defun C:ARROW ()
(setvar "osmode" 0)(setq oldcolor (getvar "cecolor"))
(setq AR1 (getpoint "\nClick on Start point of arrow line: ")
AR2 (getpoint ar1 "\nClick on Next point of arrow line: ")
AR3 (getpoint ar2 "\nClick on Next point of arrow line: ")
)
(setq ang (angle ar1 ar2) angl (+ ang (/ pi 2.)) angr (+ ang (* 3 (/ pi 2.)))
r (polar ar1 angr 0.15) l (polar ar1 angl 0.15) ur (polar r ang 0.26)
ul (polar l ang 0.26)
)
(command "color" "5" "pline" ar1 "w" "0" "" ur ul ar1 ar2 ar3 "")
(command "color" oldcolor)
)

(defun C:ARROW-R ()
(setvar "osmode" 0)(setq oldcolor (getvar "cecolor"))
(setq AR1 (getpoint "\nClick on Start point of arrow line: ")
AR2 (getpoint ar1 "\nClick on End point of arrow line: ")
)
(setq ang (angle ar2 ar1) angl (+ ang (/ pi 2.)) angr (+ ang (* 3 (/ pi 2.)))
r (polar ar2 angr 0.15) l (polar ar2 angl 0.15) ur (polar r ang 0.26)
ul (polar l ang 0.26)
)
(command "color" "5" "pline" ar1 "w" "0" "" ar2 ur ul ar2 "")
(command "color" oldcolor)
)

ผู้ติดตาม

Pageviews