作者ctchang34 (张庆堂)
看板Cad_Cae
标题Re: [问题] 参考某一未知长度画圆或画弧
时间Thu Nov 11 18:21:04 2010
※ 引述《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