'peel-like' point-sorting sequence advice

Hello,

I have a question related to sorting points in a certain way.

In summary, I have this faceted Brep:

Its faces have been intentionally sorted this way:


Bottom and top faces are kept as first and last, while the in-between brep faces are sorted counterclockwise in ascending order:
2024-01-02_13-26-19

My goal now is to sort the Brep edge midpoints of this Brep so that they follow the previously established order of the faces as shown above.

Currently, the order of edge midpoints is a bit wacky as a result of their location per-face:
2024-01-02_13-37-42

Something more or less like this is what I’m after:
image
2024-01-02_13-45-52

My take on it was sorting points at each face based on polar coordinates:


This obviously produces ‘duplicates’ on shared edges after exploding the Brep - culling these duplicates results in this:

It’s ‘close’ but not there yet - this then brought me back to the trick shown in a custom C# component shared here.
I am trying to understand the process there, though the result, shown below, is also different from what I want, so I’m not sure that’s the method to apply here:


image

Any advice? I feel like there’s an ‘in-between’ step I’m missing when I sort the points at each face?

Thank you.

Here’s a sample file:
buckypuzzle_peel-sorting.gh (19.4 KB)

P.S.:
@inno, @kev.r - both of you have helped me in previous stages of this project - 'thought I’d tag you just in case you have insights to share.

Best to all and happy 2024!

René

1 Like

Not quite what you asked for but an interesting way to change the result from Sort Pt by swapping X, Y and Z values.


buckypuzzle_peel-sorting_2024Jan2a.gh (17.4 KB)

P.S. Oh, wait



buckypuzzle_peel-sorting_2024Jan2b.gh (18.8 KB)

Nah, still not there. Forget about this post.

1 Like

Thanks Joseph - head-scratcher for now - knowing so I almost didn’t post the question, but did it just in case ideas emerge - I mean, ‘drawing’ the connectivity manually in Rhino, as done for this image,

is still an ‘arbitrary’ process.

When you do it manually, you can go down sometimes instead of always up, as this failed effort does, following a spiral:


buckypuzzle_peel-sorting_2024Jan2c.gh (26.7 KB)

2 Likes

man, you come up with beautiful interesting impossible problems :heart:

the best -spoiler: not working- idea I had was to sort the mid-edge points along a spiral pulled on the original brep (bad idea
)

buckypuzzle_peel-sorting_Re.gh (27.4 KB)

the other thing I was wondering is, given that your brep has a particular face-topology because you wanted its faces to be sorted in a particular way, does that thing help in any way in finding the sorting logic for the edge mid-points?

the index of the faces touched by each point is the very same of the Brep’s EF topology


[edit @Joseph_Oster I swear your post wasn’t there when I started typing mine :rofl: ]

2 Likes

(sighing + crying + laughing) tell me (and my boss) about it!

Thanks Inno.

Seems like we all need a ‘best fit spiral-like curve through points’ component :rofl:

Your solution, similar to what Joseph proposed, does provide insight - I’m trying to adapt these suggestions using a ‘spiral’ as well, but I was intuiting it would be useful to vary such spiral so that it’s somewhat compressed/tighter at bottom and the top.

As of now, if I use your current example with some ‘simple’ tweaks like these:


the result isn’t terrible:
image

There might be something doable based on this, if I understand your question correctly
or
if I even understand what I’ve done LoL!

Prior to the current order of things, the Brep faces were ordered the way they are following three ‘central’ rings:

That data/script where Kevin helped me is here:

1 Like

I tried the same idea but instead of pulling, I created a lofted spiral and got the intersection. Result was the same as sort along curve using the spiral (version ‘c’ above). :cry:


1 Like

I’m glad the problem is ‘stimulating’, and I thank you sincerely for the help, as much as I don’t mean to make you sweat!

For simplicity’s sake I omit a ton of detail - I’m almost there
what you’re ultimately helping me with is finalizing the pre-fab of a crazy coronavirus interpretative model that’s going from ‘molecule-mesh-protein’ form to flat metal parts - hence the silly unsolvable problems.

Don’t ask me why I’m working on this - the geometric underpinnings are both a fascination and a curse!

NOTE:
@Joseph_Oster, you were an early part of this virulent exploration in its humble beginnings:

Shit.
It’s been 4 years


Thank you.

2 Likes

I think you might need a spherical spiral to sort the points along:

I also think the Edge|Face topology would not help at all :slight_smile:

1 Like

I’m still getting very close to the same results: :cry: Time for a break!

A vague memory from a long time ago


1 Like

Thank you Joseph, no pressure

I don’t know if it helps I have multiple spirals in Nautilus


buckypuzzle_peel-sorting_LD.gh (21.1 KB)

1 Like

find the normals and centers of each face,

Group or cluster the point Z values into buckets (you decide how many “rounds” a peel spiral should take, I suggest 3), and then within each bucket you sort or polar coordinates of the XY part of the normals.

Without installing your plugin, I don’t know if it helps either. Does it?
Can you internalize the results so we can see them without the plugin?

Just talk, where is the code? :wink:

Some curves internalized,
buckypuzzle_peel-sorting_LD.gh (432.0 KB)

Heres an example with no code.

Peeling.gh (33.6 KB)

1 Like

Thank you. To compare them, I added a white group to rotate your spiral so it starts at approximately the same place as my version ‘c’ from yesterday. Also added numbering of the point list. To make the file smaller, I internalized the single spiral you used and discarded all others.

Comparing the two (yours and mine), results are remarkably similar. Some points have the same index numbers and both have similar flaws.

@laurent_delrieu version:


buckypuzzle_peel-sorting_LD_2024Jan3a.gh (48.4 KB)

@Joseph_Oster version:


buckypuzzle_peel-sorting_JO_2024Jan3a.gh (34.9 KB)

1 Like

this is awesome :clap: :clap:
is it correct to say we could extracts the BFS of the connectivity graph of the 3D voronoi of the mid-edge points, and then clusters the point based BFS distance from base ones? sort of striping based on BFS depth?

1 Like

I meant GH code, which you have now posted, thank you. However, you created a different polyhedron instead of using the one @René_Corella posted so comparison is difficult. :frowning:

I went to the trouble of using the original polyhedron because your method looks similar (identical?) to an idea I had about this problem. Unfortunately, your method uses face center points instead of edge center points, Looks interesting though.

Peeling_2024Jan3a
Peeling_2024Jan3a.gh (32.7 KB)

1 Like