明经通道 Visual LISP 函数  
vlax-curve-getDistAtPoint
 

返回曲线从开始点到指定点的曲线段的长度

(vlax-curve-getDistAtPoint curve-obj point)

参数

curve-obj

要测量的 VLA 对象。

point

curve-obj 上的三维点表(在 WCS 中)。

返回值

如果成功则返回实数,否则返回 nil。

示例

在下例中,假定 splineObj 指向 vlax-curve-getDistAtParam 样例中的样条曲线。

设置 OSNAP 为“切点”并选择直线与曲线相切的点:

_$ (setq selPt (getpoint))
(4.91438 6.04738 0.0)

确定从曲线开始点到选定点的距离:

_$ (vlax-curve-getDistAtPoint splineObj selpt)
5.17769

明经通道 版权所有 未经许可 不得传播

 评论