-
|
Hi MeshLib team @Fedr @Grantim , I have two questions about using mrmeshpy for selective subdivision: When converting a Trimesh mesh to MeshLib using mn.meshFromFacesVerts(), is there a way to maintain a correspondence between Trimesh face indices and MeshLib face indices? Currently, it seems there is no direct mapping. What is the recommended approach to detect “big faces” directly in MeshLib (e.g., faces above a certain area threshold) so that they can be selectively subdivided with SubdivideSettings.region? Thank you for your guidance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hello!
You can use code like this to fill region for subdivide settings: largeAreaRegion = mm.FaceBitSet(mesh.topology.faceSize())
for f in mesh.topology.getValidFaces():
largeAreaRegion.set(f,mesh.area(f) > 10.0)
ss = mm.SubdivideSettings()
ss.region = largeAreaRegion |
Beta Was this translation helpful? Give feedback.
Hello!
mn.meshFromFacesVerts()should save input faces and vertices indices, could you please share an example where it does not work?You can use code like this to fill region for subdivide settings: