找回密码
 注册
搜索
查看: 17062|回复: 1

[在线求助] CurveClosestPoint求助

[复制链接]
发表于 2010-12-30 18:53:38 | 显示全部楼层 |阅读模式
Rhino.CurveClosestPoint (strObject, arrPoint [, intIndex])
这个命令得到的是什么?感觉得到的是曲线上的点的位置参数,不是曲线上和曲线外某个点的距离最近的点。

Dim strObject, arrPoint, dblParam
strObject = Rhino.GetObject("Select a curve")
If Rhino.IsCurve(strObject) Then
arrPoint = Rhino.GetPointOnCurve(strObject, "Pick a test point")
    '为什么testPoint在曲线上?
if IsArray(arrPoint) Then
dblParam = Rhino.CurveClosestPoint(strObject, arrPoint)
Rhino.Print "Curve parameter: " & CStr(dblParam)
End If
End If
发表于 2010-12-31 07:02:31 | 显示全部楼层
本帖最后由 aufalpen 于 2010-12-31 07:05 编辑

1# licml

离test point最近的且在所选曲线上的点。test point若在curve上,那最近点就是它自己。可以试试在曲线外找个test point,用GetObject之类的。
得到的数据类型跟你说的一样。然后如ls所说,用EvaluateCurve得到点的坐标值。
回复

使用道具 举报

NCFZ微信公众号

手机版|小黑屋|NCF参数化建筑论坛 ( 浙ICP备2020044100号-2 ) 辽公网安备21021102000973号

GMT+8, 2026-11-23 19:21 , Processed in 0.038801 second(s), 19 queries , Gzip On.

Powered by Discuz! X5.0 Licensed

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表