# Sorting points

**URL:** https://discourse.paraview.org/t/sorting-points/15254
**Category:** ParaView Support
**Tags:** python
**Created:** [August 19, 2024, 3:05pm UTC](https://discourse.paraview.org/t/sorting-points/15254 "2024-08-19T15:05:41Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Mateus\_Facanha](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mateus_facanha/32/15048_2.png) [@Mateus\_Facanha](https://discourse.paraview.org/u/Mateus_Facanha)
#### Post date: [August 19, 2024, 3:05pm UTC](https://discourse.paraview.org/t/sorting-points/15254/1 "2024-08-19T15:05:41Z")

</div>

Hello!

I´m trying to order the points to insert into a polyline, but when i extract the points they go out of order of my selection. So the polyline gets the wrong shape.  
How can i solve this problem?

 ![PolyLine](https://discourse.paraview.org/uploads/default/original/2X/5/573e857c4346b72470bbcac4a58420f36a2d168f.png)  
 ![Pontos_Selecionados](https://discourse.paraview.org/uploads/default/original/2X/3/3aae1f8b7dd22ee77ffb60291ec2e42094049647.png)  
The images show the points that i selected and how i formed the polyline.

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [August 21, 2024, 10:00am UTC](https://discourse.paraview.org/t/sorting-points/15254/2 "2024-08-21T10:00:31Z")

</div>

Are you simply looking to extract all the points along the edge and preserve the egde? If so, there are better ways. Try using the `Extract Edges` filter. It’ll extract the polyline wrapping around the dataset you show.

---

<div class="post-metadata">

### Author: ![Mateus\_Facanha](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mateus_facanha/32/15048_2.png) [@Mateus\_Facanha](https://discourse.paraview.org/u/Mateus_Facanha)
#### Post date: [September 5, 2024, 3:40pm UTC](https://discourse.paraview.org/t/sorting-points/15254/3 "2024-09-05T15:40:48Z")

</div>

Actually I am trying to do it with the points I’ve previously selected, that group of points can be changed, so is there another solution?
