Attached is a Grasshopper expression of pipes based on a network of curves. I’ve spent a fair amount of time joining and deleting duplicates, but I do have control of how these curves are listed.
The real question is: how do I join all of these pipe base breps together? I’m going to use them to trim a surface.
Then after some cleaing up, I’d go for Solid Union - you may need to check your pipes orientation outwards before doing so.
EDIT : which I’ve tried on a small group and doesn’t work, even in Rhino.
I’d search for a possibility to cut your surface by the curves directly.
You may also want to use Simplify Curve because your arcs have a lot of control points.
@Macuso : closed brep can usually not be flipped and it’s not necessary as long as your brep is really closed. else if really you want to flip a closed brep, you just explode it, flip all surfaces and join it back together. However, if your brep was correctly closed in the first time, then while joining the surfaces, they will be flipped back. I am pretty sure the problem has nothing to do with direction. If you make a boolean union with reversed geometry, you get the same result as boolean difference with a non reversed geometry. if really you want that famous element, just type
x.Flip();
A=x;
in a c# element and define x as Brep on the element. However, as I mentionned before, flipping closed breps is not possible. it would be much more intelligent to make all other selfintersection checks, open edges checks etc…
If you bake the geometry, you’ll see that the problem is not flipped surfaces, but overlapping curves that result in a selfoverlapping surface:
. When you happen to come across seemingly closed breps that are flipped, you’d probably check the brep with _-showedges rather than force it to flip. usually its some selfintersection or weird borders.
@kenzen: boolean unions are pretty tricky when they have perfect overlaps (like the round endings of your pipes) AND if some of the elements fail to create a closed brep. you can _-explode all curves and try _-selDup to sort out perfect copies and delete them.
if really you want to use the element instead of making it in rhino, usually just move every element by 0.01mm in different directions and the union will work fine.
you are right indeed. Sorry my false explanation. I was not aware of this. In grasshopper you can flip closed breps using code and rhino fixes this strange construct when baking. Though for open breps I can see the use, but absolutely not for closed breps.