Grasshopper

algorithmic modeling for Rhino

Hi,

I have kinda weird problem which probably will have a simple answer:

I'm trying to create a freeform gridshell structure and for the data handling I've created two classes in ghpython object:

Risteyspiste: In this class i'll save all the lines connected to a grid point.

Sauva: In this class i'll save all the points (Risteyspiste) connected to a grid line and also all the geometry i'll derive from the line (brep)

I have done all the data management coding and everything seems to be nice and tidy in their own class instances. The next step I'm doing is cutting the ends of the beams with the crossing beams. I'm doing this with rhinocommon.surface.booleandifference method. Everything works nicely if i pick one beam and the crossing beams. (btw i've done some scaling for the crossing beams (picture below) so that I can create a clean cut).

In below is my code for this:

So what the code does it goes through all the instances in Sauva class. first it saves the extrusion related to that line to a variable extrusionList1 after that it checks that does the beam have two cutting objects (jatkuvaSauva1 and jatkuvaSauva2) if it does it gets the cutting extrusions from those instances and saves them to the extrusionList2 after that the code does the booleandifference and saves the new brep to a designated variable in Sauva instance.

So the problem is that the booleandifference fails after three loops and it fails for perfectly fine geometry (in below: the cutting objects are in green and the object to be cut in red). I've tried to add these objects to another component and do the boolean difference and it still fails. I can do the boolean difference with grasshopper component and if i bake these objects and the bring them back to grasshopper as reference I can do the boolean difference to them with the rhinocommon method. Any ideas whats wrong?

Views: 466

Replies to This Discussion

a quick update:

I ignored all the failing booleanDifferences and for the total 528 beams I got 333 successful booleandifferences and 195 failing.

You could debug this by getting and outputting the brep cases that fail:

1) Make an empty debug list in the global scope of your script component.
2) Check the result of the boolean operation as it occurs in your class, if this fails:
3) Add the brep inputs from inside the class directly to the this global debug list.
4) Output the debug list of failing breps to the GH canvas and inspect them.

Also, it might be an issue of setting a too high/low tolerance in the boolean method you're using.

Thanks for the input

Unfortunately it didnt get me any further. I visually examined all the failed cases and the situation is same as with the pictures i posted above. I also experimented with different tolerances from 0.001 to 1 and it didnt make any difference. :(

In that case you'll probably need to post a file with a minimal case that fails. Could be the breps are not valid or a something else that's hard to diagnose from an image.

I got an answer from Giulio Piacentino in the rhino forums. It is an bug in the booleanIntersect method.. This one drove me crazy. Did like 8 hours of debugging without success. Thanks for your help too! This pavilion should be build to Burning man in august so no time to waste :).

Brilliant, glad you it figured out. That does sound like a hard bug to track down! Best of luck with the pavilion, looking forward to seeing the results :)

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