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

rs.MeshClosestPoint

$
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:

  File "C:\Users\stinson\.rhinocode\py39-rh8\site-rhinopython\rhinoscript\mesh.py", line 603, in MeshClosestPoint
    if face<0: return scriptcontext.errorhandler()
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

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 5938

Trending Articles