空间三点画三维圆弧和三维圆
;;;空间三点画三维圆弧和三维圆(defun c:3Darc (/ p1 p2 p3)
(command "_ucs" "_w")
(setq p1(getpoint "Arc point #1: "))
(setq p2(getpoint "Arc point #2: "))
(setq p3(getpoint "Arc point #3: "))
(command "_ucs" "_3p" p1 p2 p3)
(command "_arc" (trans p1 0 1)(trans p2 0 1)(trans p3 0 1))
(command "_ucs" "_p")
)
(defun c:3Dcircle (/ p1 p2 p3)
(command "_ucs" "_w")
(setq p1(getpoint "Circle point #1: "))
(setq p2(getpoint "Circle point #2: "))
(setq p3(getpoint "Circle point #3: "))
(command "_ucs" "_3p" p1 p2 p3)
(command "_circle" "_3p"(trans p1 0 1)(trans p2 0 1)(trans p3 0 1))
(command "_ucs" "_p")
)
沙发支持一下:handshake 向量叉积定法向,向量与法向叉积定径向,中点、径向定中垂线,中垂线交点定圆心,全都是代数运算,比用command 要好。
页:
[1]