ynhh 发表于 2024-4-1 23:12:56

空间三点画三维圆弧和三维圆

;;;空间三点画三维圆弧和三维圆
(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")

)

shirker 发表于 2024-4-2 10:17:58

沙发支持一下:handshake

vormittag 发表于 2024-4-3 09:24:18

向量叉积定法向,向量与法向叉积定径向,中点、径向定中垂线,中垂线交点定圆心,全都是代数运算,比用command 要好。

页: [1]
查看完整版本: 空间三点画三维圆弧和三维圆