Skip to content

Polyline creation #235

Closed Answered by jmespadero
danwbean asked this question in Ideas
Jul 21, 2022 · 3 comments · 2 replies
Discussion options

You must be logged in to vote

I see... m.edge_matrix() return a list of (unsorted) edges that sometimes are in reverse order.
I would file a bug for this behaviour, but in the meanwhile you can sort the edges manually

import pymeshlab as ml
import numpy

ms = ml.MeshSet()
ms.apply_filter("create_sphere")
m = ms.current_mesh()
print(m.vertex_number(), "vertices in sphere " )

ms.generate_polyline_from_planar_section(planeaxis = 'Z Axis', planeoffset = 0)
m = ms.current_mesh()
m.compact()
print(m.vertex_number(), "vertices", m.edge_number(), "edges in polyline " )
print(m.vertex_matrix())

print("Unsorted edges: ", m.edge_matrix().tolist())

#manually sort the list of edges
edges=m.edge_matrix().tolist()
sortedEdges=[]
f…

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jmespadero
Comment options

Answer selected by danwbean
@jmespadero
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
2 participants