Grasshopper

algorithmic modeling for Rhino

Hi,

I'm having issues with a seemingly simple example where I would like to subtract some objects in a list from a single bigger ball.

This is a simplified version of what I am actually trying to do. In my original example I have used the GH Solid Difference component.

However, the objects in my list are overlapping so I would need to subtract each one of the remaining brep until everything is taken away.

Could you please help me fixing my little code?

Thanks!

H

Views: 642

Attachments:

Replies to This Discussion

Hi H,

this is the code that you can use in this case:

Sub RunScript(Pos As Brep, NegList As List(Of Brep), ByRef A As Object)
  Dim PositiveArray As Brep() = { Pos }
  A = Brep.CreateBooleanDifference(PositiveArray, NegList, 0.01)
End Sub

List(Of Smth) and array of something, Smth(), are both IEnumerable(Of Smth), so you can write the code above.

I hope this helps,

- Giulio
________________
giulio@mcneel.com

Attachments:

This works.

Thanks a lot!

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