Hello everyone!
I am trying to sort a list of curves (for laser cutting) by height.
Every slice is 9.1m distant from the other, and I am trying to alternate them for putting one slice in group A, the next 9.1 upper slice in group B, and so on.
I tried to look for answers on the forum but didn’t find a way to resolve that without coding.
Can someone get a look to my script and maybe tell me their opinion please ? SortingTopo.gh (444.4 KB)
First, avoid passing values through text panels. I use temporary text panels extensively while coding but they can be deleted easily without affecting results. Like this:
I don’t understand that part, or your GH code. So I compute an average Z value (purple group) and sort the curves by it. ColorJa colors the sorted contour curves; red for the lowest and hot pink for the highest.
The ‘Precision’ slider sets the distance between points; 1 is highest precision, 100 the lowest.
The ‘Z factor’ slider “magnifys” the elevation of each colored contour curve. Setting it to zero shows the original curve elevations.
Hello,
first of all, thank you very much! It took me several hours to understand the logic behind the scripts but I think I learned a lot. I haven’t dived in the cluster yet but I wanted to say thanks.
I don’t know if I should close the subject as solved already but now I have a final goal, evaluate if a curve is closed, and if it is, move it in the next branch containing an open curve. That should fix my issue where little mountains on the topography appears in the wrong color! I think. Thank you I’m trying to solve it by myself but if you want to give me the cheat I promise to watch it only after many efforts ;p Thank you again for your time, have a nice day!