Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 4171

rs.MeshClosestPoint doesn't work

$
0
0

when i use the example code of MeshClosestPoitn :

#! python 3
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select mesh", rs.filter.mesh)
point = rs.GetPoint("Pick test point")
intersect = rs.MeshClosestPoint(obj, point)
if intersect: rs.AddPoint(intersect)

I got those error message:

  Traceback (most recent call last):
  File "file:///C:/Users/stinson/.rhinocode/stage/v13jcwul.mvn", line 36, in <module>
  File "C:\Users\stinson\.rhinocode\py39-rh8\site-rhinopython\rhinoscript\mesh.py", line 603, in MeshClosestPoint
    face, closest_point = mesh.ClosestPoint(point, tolerance)
TypeError: No method matches given arguments for Mesh.ClosestPoint: (<class 'Rhino.Geometry.Point3d'>, <class 'float'>)

For i know, those code works in rhino 5 and rhino 7, but not works in rhino 8,
Is there any solution ?
My environment is : Rhino 8.4.24044.15001

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4171

Latest Images

Trending Articles



Latest Images