Closed drperpen closed 2 months ago
Hello!
You can operate with distances.vec
like as list()
source_points = update_mesh(mesh_current_frame, mask)
meshlib_mesh = meshlib.mrmeshnumpy.meshFromFacesVerts(mesh_current_frame.face_indices.reshape(-1,3), mesh_current_frame.positions)
meshlib_source_points = meshlib.mrmeshnumpy.pointCloudFromPoints(seed_points.positions)
meshlib_targets = meshlib.mrmeshnumpy.pointCloudFromPoints(mesh_current_frame.positions)
distances = meshlib.mrmeshpy.computeSurfaceDistances(meshlib_mesh, meshlib_seeds.validPoints, meshlib_targets.validPoints)
npArrayDistances = numpy.array(distances.vec)
Hi, I am trying to get geodesic approx distances on my mesh. My problem is that the returned
distances
is ameshlib.mrmeshpy.VectorFloatByVert
and I cannot seem to be able to convert it to a numpy array. I tried with ctypes as well with no luck because the iterator does not have adata()
or similar. Is there a way to convert it to numpy that I am missing? Thanks!