Breps merging after solid difference

Hi,

I’m struggling to make a solid difference with two sweep.

So the green are supposed to cut the red :

If I plug directly the sweeps into the SDiff, it gives me a sort of merging with no cutting. Just one and it grabbed one of the red ones. I can see that lists have no index :

If I flatten the lists, they get their indexes back, it cut the pieces very well, but when I bake the two pieces are merged. And I should have only one set as a result, but looks like it is doing something.

Hope I’m clear. I’ve been trying to do this cut all day…

hi,

try and check if the crosscurves producing the breps/polysurfaces are going in the same direction. It seems like one of your surfaces is reversed in grasshopper. very easy check would be to use the ‘reverse surface’ node and check which one of the volumes is inverted.

Basically if you make a boolean union (addition) between a positive and a negative volume, you’ll end up with a substraction. I’m pretty sure that’s what happens with your model.

I hope this helps a bit. If you need further help, it would be good to attach the file.

EDIT:
In the meanwhile you can check out this simple c# script flip the direction outward if necessary. You should put it right after the sweep nodes:
xFlip.gh (2.3 KB)

As said, I don’t have your example and don’t know if this is going to work, but I’m pretty positive.

Ben

1 Like

Hi ben,
thanks for your answer. Unfortunately I don’t get it : ))) Your inverted thing makes sense as I’ve had once intersection result instead of difference, but I don’t really remember as I have tried so many things.

Here are the files if you want to check. Sorry for the mess… What you’re looking for is on the upper right of the canvas :
HullDesign.gh (202.1 KB)
hull design.3dm (2.8 MB)

Coque = hull
traverses = sections
nacelle = bridge

Fabien.

As @benedict suggested, the orientation of your breps is inconsistent.

You can correct this by adding a Flip Curve component before the Sections (S) input to the lower Sweep1 component. You also need to flatten the inputs to the Sold Difference component (or provide DataTrees that match up properly).

I think this produces the output you’re looking for.

HullDesign_re.gh (201.9 KB)

-Kevin

1 Like

Indeed it does : )
Thank you very much, and Ben too.