Sort parts based on intersection size

Hello,
I am struggling to organize some parts based on ‘how much’ they intersect with other geometry.

Summary for simplicity:
I have these ‘grapple’-like gussets (triangles marked yellow) near the the corners of a 3D puzzle:

Sometimes the triangles intersect more than one facet at a time, as in ‘grabbing’ the corner, marked here:

Given the case, the intersection ‘amount’ per triangle is larger relative to a facet versus the others - as I now mark below, where a single triangle meets two facets but with the area marked green intersecting a facet more than the area marked red intersecting the adjacent facet:

What this means is that this triangle would be ‘matched’ to the facet it intersects the most:

And same goes for the other triangles that also intersect that same facet the most:


(pardon the ugly sketch)

Hoping that explains it well enough - where I need your help is on how to sort said triangles according to the facet they intersect with the most. How would you go about it?
*One thought is going ‘by plane’ (facet plane) using an endpoint at one edge of each triangle gusset.

I’m attaching a simplified part of the file:
buckypuzzle.gh (227.0 KB)

Thank you in advance for taking a look.

not sure I have understood the problem correctly… what I got is to identify which triangle belongs to which facet, considering that for a triangle to belong to a facet its longest bottom-edge should lie on the facet itself (so we can just plainly ignore its shortest in case a triangle has more than one bottom edge)

if that is right, I would do something like this, I believe the only external component is create tree from elefront… but anything that creates branches based on a list of integers to indicate which branch the items should be assigned to should work?


buckypuzzle_Re.gh (235.0 KB)

it measures the closest distance-point between the center point of the longest bottom-edge of each triangle, and each facet, so for each triangle you get a list of distances among which only ones says 0 (well… it says “very little” :smiley: )
then with item index you retrieve the index of that distance (which is equal to the index of the facet it belongs to) and assign each triangle to that branch

1 Like

Thank you @inno ! I will check this asap - visually I think you did exactly what I am after. Very grateful - I’ll let you know soon.

1 Like

Ok @inno, thank you once more - you’ve taught me some tricks lately and I’m grateful! I have checked what you’ve done and it is what I was after.

Right, I couldn’t have worded it like you did, thank you :slight_smile: - I’m curious about this and now I must go through the {new} challenge of figuring it out without elefront (nothing against the plug-in, just need to make sure I achieve it natively as well). A quick first look into things points at using ReplacePaths, smilar to what’s discussed here I think?

1 Like

yes, 100% on spot :+1:


buckypuzzle_Re_ReplacePaths.gh (232.8 KB)

1 Like

You beat me to it!

Let me know where I can send you money for a beer or a coffee! :pray::sweat_smile:

Especially for making you work as I’ve taken another approach! I wish I could give you multiple ‘solution’ checkmarks still for your work and teachings.

Long story short:

Studying the system made me realize a more effective way to order these parts based on which direction they face as opposed to how much they intersect – this means that if the triangle “faces” the facet, then it belongs to that facet; and to solve that I use Plane Coordinates.

Example:

While the previous goal sounded smarter relative to intersections, I believe this new goal will facilitate the assembly process in the shop relative to labels and perception versus human error.

We end up with similar structure with the difference that number of items within each branch changes based on the new plane coordinate goal:

Now I can use both methods for different tasks.

Cheers!

1 Like

@Inno, sorry to bug you again with this unfinishable zombie project but I’m confused - can you give me some pointers with a new issue? I could have asked on the other related thread but I would have annoyed more people with the notifications.

Long-story short, now I have two parts (triangles) per brep edge:

Each part has a number (label) based on the order of these brep edges - if the edge number is “1”, then the two parts adjacent to it are labeled “1”, for edge “2”, parts are labeled “2”, and so on:

The issue is that now I need to re-associate these labeled parts to the brep face they are on so that the brep faces can also have the corresponding label on them - this means that on each brep face you would see number labels next to the face edges, but each number label is also on the other brep face adjacent to the edge. LoL, it’s a tongue-breaker and my brain is equally broken. I feel like I have it but I don’t, it’s a brep topology issue which I know you’re good at. Let me know if I need to explain this better, though I’m not sure I can - just grabbing screenshots is difficult because everything else gets in the way…

The association of labels on each face, per edge, would look something like this:
labels

Does this make any sense? :joy:

There are only 18 faces, so I should end up with 18 groups of labels, but these labels correspond to the adjacent brep edge, not to the face index.

Here’s the file:
bucky-topo-label.gh (20.5 KB)

Many thanks :pray:t5:

1 Like

I’m very sorry but I’m super busy at the moment :rofl:

the main thing was that the planes were not actually touching any Brep Face :slight_smile: but it was easily solved by a ghost Pull Point :+1:

something like this should work:

pull each point to each face, with faces grafted, in such a way you can use the Distance list to filter what’s actually on that face (Distance < 0.001) and what is not

you get a list of True / False where True are items actually lying on the Brep Face, and use Member index to retrieve their index from the original list :+1:

final result:

I put new text tag just to cross-check the points numbers were correct despite the new sorting, and all looks right :+1:
the stupid polyline thing also helps a lot to visually see what is in each branch (each polyline should hover on one Brep Face)

as things are now, the Path of each list of points indicates the index of the Brep Face on which the points are, like:

that can be included in the tag for triple checking, like:

:heart: bucky-topo-label_inno.gh (39.9 KB)


maybe it’s a bit more readable with text tag 3D instead…

bucky-topo-label_inno_TT3D.gh (36.4 KB)

2 Likes

Holy @$%# man, makes a lot of sense - I wonder what level of help you’d provide if you weren’t busy with that - cracking up at the image :joy:

I thank you for real Inno - can’t wait for this project to be completed and fully fabricated so I can show you the fruits of your labor 🫶🏾🤝🏾

1 Like

lol man :rofl:

@inno
:smiling_face_with_tear:
:heart_hands:


2 Likes

that thing looks beautiful! …and complex, and beautiful!!! :heart_eyes:

1 Like

It is!! 'Bears all the weight (literally) and all instructions to assemble the rest of the sculpture - I look forward to sharing that when it’s completed, so crazy!

1 Like