I looked through the forum threads to see if anyone had an answer before posting.
Working on Grasshopper and trying to use Solid Union on two sets of BREP’s. Works in Rhino if I bake them, but not inside Grasshopper.
Somehow I’m having an issue where I have two closed BREP halves of a model that I want to boolean union to another set of BREPs. The union works just fine on the first operation, but on the second Solid Union, the BREPs get subtracted instead of united. Any ideas? Left half is correct, right half isn’t.
I’m guessing this has something to do with the fact that I had to flip one of these two surfaces when turning them into Voronoi using Surface Morph. However, if the end result is a closed BREP, I wouldn’t really understand why the surface normals would point towards the inside of the BREP.
I’m attaching my GH file. Maybe someone that actually knows what they’re doing in GH can help me figure this out.
Side note: I’m aware there are other methods of creating voronoi patterns on surfaces. I’m attempting to tackle that next, but for simplicity’s sake right now, I’ll stick to my current method here.
20200204- 3d cast - solidunion.gh (397.6 KB)
Just from looking at your scrip with deconstruct brep and evaluate surface.
The bottom brep is flipped compared to the top, ie, the bottom one faces inwards while the top one faces outwards.
True, but when I try to flip the Brep back, I can’t use the Flip Polysurface command because it won’t let you do it for closed Breps. Shouldn’t closed Breps, in theory, always have their normals pointing outward anyway?
You would deconstruct brep, flip all the faces and then join the surfaces to form a closed brep.
I had this problem in Rhino when I was scripting in python where the brep surface was flipped and the boolean’s didn’t work properly because of this.
There might be something in the booleanUnion that checks for surface direction. But Grasshopper doesn’t seem to check it.
I have no idea why this happens:
- Disconnect All inputs to SUnion
- Remove Flatten from SUnion input
- Graft output of Velcro Bead
- Connect Velcor Bead to SUnion
- Add Voronoi to SUnion. SUnion result looks good but SUnion shows an error.
- Flatten SUnion input. Result is bad (beads are now subtracted) but SUnion error goes away.
- Remove SUnion Flatten and this puts you back at step 5.
I don’t have the Pufferfish or Bifocal add-ons but I don’t see how this would impact the above steps.
Mysteriouser and mysteriouser…
Aha - I just saw the other posts about which direction the surfaces face. That makes sense since it seems GH is getting confused about what is “inside” and what is “outside”. I’m not sure how one controls that.
That does it. You were totally right.
Man, I was wondering whether the normals were flipped. I even exported the model to Fusion360 to check in addition to checking in Rhino. Guess the problem was literally within GH itself.
Yo! It’s you again. Yeah, it’s like @christopher.ho mentioned. Grasshopper doesn’t check for which direction is outward/inward.
As far as it goes with controling a surface, hopefully someone with more experience than me (maybe future me) will figure out how to work this script without having to arbitrarily flip surfaces and whatnot. Man, I’m hoping this script doesn’t break with every single scan my team does…
Here is the usual fix, deconstruct the faces and re-join so Rhino can re-calculate faces. I think it is an issue with tolerances and not so great trim geometry, however this always fixes it when it happens.
Fixed already! Thanks to @christopher.ho. But you doing it confirms it as well. Thanks!
Yes I saw, but flipping the faces is not necessary like was mentioned by @christopher.ho and I saw it is something you were concerned about. When Rhino makes a new closed brep from joining it will automatically face the face normals outward in this case
Didn’t know that it would automatically face when rebuilt.
The more you learn.
Ohhh… I see what you were trying to say now. Learning something totally new today. Thanks!