Closed r03ert0 closed 2 years ago
Hello, I'm generating a mesh from a polygon like this:
mesh = pygalmesh.generate_2d( contour, eds, max_edge_size=100, num_lloyd_steps=20, )
I can get the vertices and triangles of the mesh using
verts, tris = mesh.points, mesh.cells[0][1]
How should I format the data to be able to use optimesh? I though I could just feed the points and cells objects:
optimesh
points
cells
result = optimesh.optimize_points_cells(mesh.points, mesh.cells, "CVT (block-diagonal)", 1.0e-5, 100)
...but that throws an error:
IndexError: arrays used as indices must be of integer (or boolean) type
No idea what exactly is going wrong without an MWE.
Closing for lack of response.
Hello, I'm generating a mesh from a polygon like this:
I can get the vertices and triangles of the mesh using
How should I format the data to be able to use
optimesh
? I though I could just feed thepoints
andcells
objects:...but that throws an error: