※ 引述《sjgau (sjgau)》之銘言:
: (defun dtor(d1 / )
: (* (/ d1 180.0) pi)
: ); end of dtor()
: ; draw a arc by CDR, C:圓心,D:方向, R:半徑
: (defun c:arc-cdr( / pc p1 t1 t2 t3 p2 p3)
: (setq pc (getpoint "\n 弧的圓心: "))
: (setq p1 (getpoint "\n 大概的方向: "))
: (setq t1 (angle pc p1))
: (setq r1 (getdist "\n 輸入兩點 決定半徑: "))
: (setq t2 (+ t1 (dtor 15.0)))
: (setq t3 (- t1 (dtor 15.0)))
: (setq p2 (polar pc t3 r1))
: (setq p3 (polar pc t2 r1))
: (setq p1 (polar pc t1 r1))
: (command "arc" p2 p1 p3)
: (princ)
: ); end of c:arc-cdr
(defun c:ac()(command "arc" "c"))
此程式與上述相同功能.而且比較簡單明瞭!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.160.194.140