Grasshopper

algorithmic modeling for Rhino

Hi everybody, I'm getting a solution exception from the Python component when using the rhinoscript function IsPointOnSurface. The exception is thrown only when the point lies on the surface, otherwise it works.

I've tested this script in the Python interpreter in Rhino and it's ok:

import rhinoscriptsyntax as rs

surf = rs.GetObject("Select a surface")

if rs.IsSurface(surf):

point = rs.GetPoint("Pick a test point")

if point:

if rs.IsPointOnSurface(surf, point):

print "The point is on the surface."

else:

print "The point is not on the surface."

I'm new to scripting so I'm probably missing something obvious

Views: 652

Attachments:

Replies to This Discussion

Hi Samule

object_id

Required. String or Guid.

Attachments:

Hi Samule

object_id

Required. String or Guid.

Attachments:

Hi Naruto, thank you for the reply, I thought Grasshopper would automatically convert the input srf into a GUID, however I found switching Type hint to GHDOC worked

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