Garis Sejajar Merenggang

;Membuat garis sejajar yang makin merapat atau makin merenggang

(defun co(F)(if(="ok"A)(- x2(*(pp 1(cos(*(/ F 180.0)pi)))di))(pm MA F) ))
(defun li(F)
(if(= AN cadr)(setq po1(list(co F)S) po2(list(co F)U) )
(setq po1(list S(co F)) po2(list U(co F)) ))
(command"line""non"po1"non"po2""))

(defun aarray(A / A F AN D I KU S U MA di rr c2)
(setq rr *error* *error* merr)
(setq I(getpoint" First point to radial: "))
(if I(setq KU(getcorner I" End corner: ")))
(if(and I KU)(progn
(setq lay(getvar"clayer"))(command"layer""m""arbang""")
(if(<(cadr I)(cadr KU))(setq AN cadr c2 car pp *)(progn (if(<(car I)(car KU))(setq pp *)(setq pp -)) (setq AN car c2 cadr) )) (setq S(AN I) U(AN KU) MA(c2 I) x2(c2 KU) di(- x2 MA) D 0) (if(="ok"A)(progn(li 15)(li 30)(li 45)(li 60)(li 75)(li 90))(progn (if(> x2 MA)(setq pm +)(setq pm -))(setq F 0.5)
(if(and(= AN car)(= pp -))(setq pm + MA x2))
(while(>(abs di)F)(li F)(setq D(+ 1 D) F(+ D F)) )))
))(setvar"clayer"lay)(setq *error* rr)(princ))

(defun c:ry()(PROMPT" View Circle")(aarray"ok"))
(defun c:yr()(PROMPT" array View")(aarray 0.5))

0 Komentar::

Posting Komentar

Pesan Anda: