本帖最后由 筑梦NARUTO 于 2017-6-13 18:56 编辑
提取出了SubCrv再测量一下长度就可以了嘛
这补充一个简单的pythonscript
[AppleScript] 纯文本查看 复制代码 #coding=utf-8
import rhinoscriptsyntax as rs
getresult = rs.GetCurveObject("选择要测量长度的曲线")
if getresult:
curve_id = getresult[0]
point0 = rs.GetPointOnCurve( curve_id )
if point0:
point1 = rs.GetPointOnCurve( curve_id )
if point1:
t0 = rs.CurveClosestPoint( curve_id, point0)
t1 = rs.CurveClosestPoint( curve_id, point1)
curve = rs.AddSubCrv( curve_id, t0, t1 )
distance = rs.CurveLength(curve)
rs.DeleteObject(curve)
if distance:
print ("曲线的长度为" + str(distance))
|