Grasshopper

algorithmic modeling for Rhino

Hi everyone,

I'm trying to write a simple code for LineSurface Intersection.

I need the output as list of intersection points (and if the intersection doesn't occur I should have 'Null' value in list)

I tried with rhinoscriptsyntax and it works. However if Intersection Event is Null it returns a None value.

So I used rhino Library to have access to the Boolean Event and then try something else, but the command cannot accept Line as type for CurveSurface Intersection.

any suggestions?

Views: 947

Attachments:

Replies to This Discussion

Hi GM,

Unlike rhinoscriptsyntax functions, RhinoCommon methods work with objects. So you can either change the input type hint, or use the coerce to extract the geometry from document.
"None" is python's version of "Null", so do not worry about that.

Check the attached file.

Attachments:

Hi djordje,

Thanks for your reply. For Null value I mean the 'Null' string that appear as output in some grasshopper components. I'm searching for something like that:

if IntersectionEvent is None: a.append('Null')

else: a.append(inter.PointA)

I tried, but it doesn't work.

Can you help me?

Hi GM,

Check the attached file.

Attachments:
Great! thank you very much!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service