Clash detection with only one input?

I want to detect if I do have clash between all the parts of a furniture assembly and I need to pass all the objects into the same input to do that. As I see, the Clash component takes two inputs, A & B. How I can pass all the objects as only one input in this component?

You need to create two lists with all possible combinations. It can be done like this: (32.7 KB)


Not at all: that’s just a classic Clustering task where the sole criterion is CCX Events (using Meshes is way faster than Breps (notably Blobs)). See for instance ~900 objects solved in ~20ms. Clustering means the paramount connectivity Tree as well (what is related to what - see the int Tree below).

The bad news is that you can’t do it with components.

Given the opportunity: Clustering is used in too many Engineering tasks: Say for instance that you have N 3D objects and you want to CCX all against all … so the first step is to Cluster the related stuff and then do the Bool diff/intersections etc etc.

Is there a problem with my definition?

For few Breps is OK - but it can’t take into account events that happened already (this is a standard policy in classic Clustering [done in 2 nested Loops]) . Try it with 1000 objects to see my point: either using a Brep/Brep - Mesh/Mesh Proximity criterion or a classic CCX (Note: R is a surface modeller meaning that Breps containing/enclosing Breps … well … that’s another animal).

BTW: Let’s say that we have 900 objects meaning for a double Loop: ~810000 checks. Eliminating (by index) already sampled (i.e. Clustered) indices can have a very big impact on the Elapsed time (converting Breps to Meshes speeds things as well - plus various other “tricks/pre-checks” like Boxes Intervals Bool ops checks and the likes). Obviously the less “sparse” a collection is … the bigger the gain. See the calls done (for a rather sparse [i.e. worst case] test collection).

1 Like

Please can you share your definition. Thank you.

In the last project I had ~480 different pieces. I used a script to select similar objects based on volume and the script checked the selected part against 480 other parts to find similar ones.

Can you post your file with these 480 parts?

Sorry I cannot extract 7z

I need to zipp-it because the 3dm file it is bigger than 20MB.

Yes I’m sorry this most probably won’t work with the Clash component the way I suggested above.

Also with so many parts especially small ones like the hinges I’m not sure if it even makes sense to run any kind of collision / clash analysis. I think I would first filter just the parts which shouldn’t overlap.

Any high perf Clustering (Flat/HAC - Soft/Hard etc etc) is strictly internal to the practice, since that type of stuff plays a very important role in real-life.

I could strip out a CCX Clustering C# … but the performance could be far and away from what the real McCoy can do (say 30++ times slower than the test captured below).

Anyway … for ~ 500 objects (Breps converted to Meshes OR Meshes) of an “average” - whatever this means - complexity one can expect/hope Elapsed times around 40-60 ms (using some slow I5).

But as Martin correctly said this kind of reverse Engineering has a highly questionable meaning: any - even elementary - assembly/component design approach can deal with stuff like that at creation time (unless this is outsourced to you).

1 Like