Hi everyone,
I have a series curves, one up one according to Z-axis. However, the number of the curves is not continuous in Z-axis. How can I renumber the curves?
How I show curve number:
Thanks!
renumber.3dm (229.2 KB)
Hi everyone,
I have a series curves, one up one according to Z-axis. However, the number of the curves is not continuous in Z-axis. How can I renumber the curves?
Thanks!
renumber.3dm (229.2 KB)
if youâre bringing the curves from rhino in the first place, why not simply select them âin orderâ (bottom to top or vice versa)?
I canât open your R6 file in R5. What it looks like is that you want to sort the curves in Z-order? There are several ways to do that, easier done than explained.
Thank you Joseph!
renumber_v5.3dm (239.4 KB) Here I uploaded the v5 file.
Hereâs the general idea using planar curves I created: (internalized)
Your curves, however, look more complicated⊠not planar and not all starting at the same place, so that could mix things up⊠standby.
OK, I divided each curve into ten points and used their Average (roughly center) for the sorting. The âTree/List Viewerâ is just a trace tool for examining trees of geometry in a visual way.
All curves internalized, no need for Rhino file.
P.S. To explain further, Sort is sorting Z values and the Avr points (âAâ input) and curves (âBâ input) get sorted in the same sequence as the âKâ (Keys) input.
Thatâs a great job, Joseph!!
Thank you so much for your kind and prompt help!
Well, this isnât infallible. Irregular curves could mix it up, requiring more effort to determine valid Z values to sort by. But this is the general idea.
The more I use it, the more I like it. Thanks again!
They Loft better when sorted, eh? But I see two areas that look ugly (twisted), even with âAlign sectionsâ enabled. Still needs work?
To get a clean Loft, I added an Anemone loop (white group) after sorting them in sequence. It flips each curve and adjusts its Seam (start/end point) to match its predecessor. No Loft options required.
P.S. This is what Loft produces at three stages of the model. Left to right, below:
WowâŠJoseph, your work is fantastic!! And thank you so much for your kindness! I really need some time to fully understand your code :).
Hi Joseph,
Here is a new problem. As you see the pic, this kind of curves still has the problem of sorting. Coul you please help me have a look?
Thank you again!
There is no magical best solution that leaps to mind⊠Maybe sort the rings by the highest point on each ring? Seems to work, didnât check all possible cases.
Hi Joseph, thank you so much!!
Actually I had the same idea (find the higest point) of you⊠However, I canât realize it in GH :).
I think your method can be suitable for most my cases.
Nice job!