Grasshopper

algorithmic modeling for Rhino

Why is MeshClosestPoint returning none when using python, but not when using gh components?

Attached is a .gh file that demonstrates my problem

The python script is supposed to accept a mesh, define a box, and then find the closest point on the mesh to the center of that box. When i try to do this using python scripting component, the MeshClosestPoint returns "none." [This is demonstrated in the yellow panels]

Alternatively, when I do this using the given grasshopper components I get the right result [demonstrated in the green panel].

I have a feeling this has something to do with my lack of understanding of what is actually being returned when I try to access the box / center point. Never programmed in python or rhino scripting. Hopefully this is a stupid mistake. Thanks for the help!

-mike

Views: 249

Attachments:

Replies to This Discussion

Try setting the type hint on the "mesh" input.....

wow!

it worked.

Did not know that was necessary. I think of "hint" as optional! 

Thank you, Chris.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service