# How can I renumber curves? I want to renumber the curves according to Z-axis

**URL:** <https://discourse.mcneel.com/t/how-can-i-renumber-curves-i-want-to-renumber-the-curves-according-to-z-axis/86003>\
**Category:** Grasshopper\
**Created:** [July 10, 2019, 9:53pm UTC](https://discourse.mcneel.com/t/how-can-i-renumber-curves-i-want-to-renumber-the-curves-according-to-z-axis/86003 "2019-07-10T21:53:49Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![Joseph\_Oster](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/joseph_oster/32/549124_2.png) [@Joseph\_Oster](https://discourse.mcneel.com/u/Joseph_Oster)\
**Post date:** [July 10, 2019, 11:23pm UTC](https://discourse.mcneel.com/t/how-can-i-renumber-curves-i-want-to-renumber-the-curves-according-to-z-axis/86003/9 "2019-07-10T23:23:05Z")

</div>

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**](https://www.food4rhino.com/app/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.

 ![sort_curves_2019Jul10c](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/8/9/89f5153c053304abeffe2fc14d54d9a834d657a4.png)  
[sort\_curves\_2019Jul10c.gh](https://discourse.mcneel.com/uploads/short-url/25jHQyQFG5rJKUjZuyWSvDLzEjK.gh) (131.8 KB)

P.S. This is what Loft produces at three stages of the model. Left to right, below:

1. raw curves, unsorted
2. curves sorted by Z value of Avr points
3. sorted curves after Anemone with matching directions and seams

 ![sort_curves_2019Jul10c2](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/4/6/460f6219da0ab24f9c645238c1110b1f33b7937f.png)

---

_[View the full topic](https://discourse.mcneel.com/t/how-can-i-renumber-curves-i-want-to-renumber-the-curves-according-to-z-axis/86003)._
