Is there any way to detect closed solid Breps that intersect their volume? the “Shape in Brep” node do not differentiate between intersecting, or only touching. How to add this feature to my algorithm? In the end I would like to turn red all the objects that intersect volumes (touching excluded, entirely englobed included). I attach the algorithm I’ve prepared so far.
I thought I could perform a boolean operation for all those pairs of solids that are tested positive for intersection (output equal to 1) by the “Shape in Brep” node, calculate the volume and select only the pairs that have an intersection volume greater than zero, however, this would take a lot of time and I’m planning to use this algorithm on entire buildings made of hundreds of solids, so it would take maybe to much time. any more efficient idea?
I implemented the approach with the boolean operation that I mentioned in my previous comment and it works, but it is very slow for high amount of elements.
This is a classic flat hard Clustering task (where a Cluster is a collection of items satisfying a given set of criteria - in this case a single one [ the ccx thing]).
A classic way to speed things (other than a thread safe // approach) is to use a precheck: get the BoundingBoxes and then test their Interval intersections (in x/y/z). If there’s none the items are isolated (meaning: go to the next pair). If there’s intersection then a final 2nd check is required (in this case the real Ccx test).
Obviously if all items are Boxes … that makes things way faster
I could provide a simple entry level demo … but using solely code (C#).
In fact I’m a zillion miles far and away from base (summer windsurfing period … blah. blah) but I’ll see - later on - what I can do using an ancient laptop (used solely for F1/MotoGP/WSB stuff - but this is a very simple case anyway).
BTW: Found some stuff (but is strictly internal: using RTrees). 1400 Boxes in 15 milliseconds (expect 5 ms max via a proper I9).
No. It’s just that the captured is a strictly internal thingy (meaning using Methods that would never see the lights of publicity).
So I wrote from scratch a simple take on that matter: skipped the Intervals precheck but using instead a Brep > Mesh approach (if obviously the GeometryBase object is Brep) that yields more or less fast results [Note: 3 options available]).