Solid union of a huge amount of BREPs using Anemone

Hi everyone,

I would like to make a question related with a recurrent problem, solid union (boolean) of huge amounts of BREPs.

Lately I was trying to solve this problem using Anemone, until now I got to this point (attachment). I was able to join about 1000 spheres, but when I try to transfer this logic to join the pipes those shape a kind of lattice, I do not get the expected result. Changing the number of repeats it is possible to see that in some moment the solid union crash for no apparent reason.

Does anybody know how this is possible?

Thanks!

TEST SOLID UNION ANEMONE.gh (25.6 KB)

Mysterious, Can’t help you, but I tried it manually in Rhino. That’s what I could achieve:

The problem was mostly in the front part, where it was for me really random, which pipes could be joined and which not.

May this helps someone:
Brep_join.3dm (2.8 MB)

Edit:
Tried it again, with streched curves. Thought maybe it’s about the angles between the pipes.

It was one more time really random.
For example, I couldn’t join Group A with Group B, But after joining Group A with Group C I could join Group AC with Group B.

Thanks Tim,

I also tried to do it manually, but the intention is to apply that to huge lattice that sometimes have a few thousand of elements.

I also know plug-ins like Intralattice and Crystallon but I cannot reach the same kind of result that we are searching for.

In the last time they were a few discussion with the similar topic(joining pipes).
I had a similar case and tried to join it in Rhino. It was impossible,frustrating and time consuming.May I ask why you want to join them?

Hi Baris,

The goal of all this process is to generate models that are going to be 3D printed, so I need to have just one solid to prepare it before the print process.

My question is more related about why anemone works fine when it is working with the spheres and why it crash working with the pipes, I could try it with another kind of geometry but I’m afraid that it will happen the same.

Thanks!

Solid Boolean Union fails when there are such overlapping of solids when it is not possible for sw to calculate what to keep and what to cut-out. Most easy way to solve this problem is to move one object by very small vector of displacement (lest say v=(0.001,0,0) or any other combination) and then try to union objects again. And do it all over again until you get one solid.
This is how we do it when we need to get one solid for 3d printing. It is very frustrating to do it manually especially if you have hundreds of solids to union so we have small plugin that is doing brute-force job for us.
Here is your solid as result of that solid-union-operation:
SolidUnion_1.3dm (3.3 MB)

For my last 3D print, also with a lot of pipes I used mesh pipe and joined them extern. Meshmixer, netfabb, or makeprintable.com did a very good job.

I think I’m the end, I exported everthing in stl, repaired / reduced the meshes in autodesk‘s nettfab and checked them a last time on makeprintable.com
Was very solid and had no problems printing in the end. In a local printshop and on shapeways.com

No solution to your problem, but maybe this can help

The problem is SUnion, not Anemone. It’s very fragile, as @RadovanG explained.

you can try symvol for rhino. for me the best boolian operations I have seen
https://uformia.com/consumer/symvol-for-rhino/

HI @RadovanG,
that plugin thing sounds interesting!
I assume you are not allowed to share it, but maybe some hints?

Would be great.

By the way, the c# stuff you post here is really nice, and I like triyng to understand it.
Its a good ressource for me. Thanks for sharing them.

Hi Baris
Here is printscreen of UI of plugin that is doing described solid union operation.


Plugin allows to select (fixed) solids that are not be transform and solids that will be transformed in order to achieve successful boolean union operation.
Two possible type of transformation are Move and Scale. Fore each transformation X-Y-Z-range can be set up with start and end of range/interval and number of steps inside interval. For example if X range is from -1 to +1 with 3 steps, then there are three values that X can have, 0,-1, and 1. The same is for other coordinates. Plugin iterates through all possible combinations of X-Y-Z until it finds one which succeed in boolean union and it iterates in one-by-one basis (one solid at a time try to union with already accumulated result). In case of attached printscreen you can see that just for Move transformation there will be total 333 = 27 possible combinations so whole process can take long time if there is many solids to be merged.
So that is basic principle how plugin works.
Code for this plugin is written not to be nice but to work so maybe some time in the future I will clean it up and post it.
Another way is, as some members suggested, to find some good mesh tool/plugin that is able to foolproof union meshes, so you would first convert your solids into meshes and then boolean union meshes.
R

If you plan to print this kind of stuff a lot why even deal with solid nurbs pipes and booleans? Invest in a good mesher (in my case zbrush which meshes that almost instantly) or even go the free option like @tim.stark mentioned with mesh mixer.

Hi @RadovanG, thanks a lot for the detailed explanation! Personally I used meshmixer in case I needed to bool a big amount of geometry, but sometimes the joints are getting dirty. Also I would like to do something like your plugin just for the fun and practice. Thanks again !

Besides what already was said. Boolean operations are shortcuts, which requires you to create conditions to be solvable. Usually these kind of operations fail, when your surfaces fully or even partially overlap and thus a clear intersection cannot be calculated within desired tolerance. So you can a) as proposed by @RadovanG move out of the area of tolerance or b.) you scale each element to prevent surface overlapping situations. Even better: Don’t leave these situations like this and prevent them beforehand, by creating a custom trim and join process, clearly defining the intersection.Its hard, its unique but its the only true solution in comparison to all the “cheating”.
I don’t believe other surface/solid software do handle these situations much better. I have even seen Catia failing at those situations, its very hard to find a general answer to these kind of problems…

this is very bad:

in this case it could be solved by plane intersecting like this:

Hi everybody,

Thanks for your help, I thought that maybe using anemone and joining the solids one by one I could avoid those problems of boolean operations that you are mentioning.

Anyway I will follow your advice and see what I am able to achieve.

Thanks again!