Wed, 11/13/2019 - 19:00
Forums:
When using BRepMesh_IncrementalMesh on a shape it gladly meshes the shape according to the parameters specified. Now, when I want to 're-mesh' that same shape the meshing only happens when the parameters given request a smaller deflection. I understand that this is the expected behavior. Is there a way to tell BRepMesh_IncrementalMesh to mesh a shape that has been previously meshed with the parameters given, regardless if these request a smaller deflection or not? In other words how can this behavior be switched off? Thanks.
Fri, 11/15/2019 - 12:54
I don't know if BRepMesh_IncrementalMesh is supposed to ignore new parameters even if they are courser...
Maybe a workaround would be to use BRepTools::Clean first?
Fri, 11/15/2019 - 13:07
No re-meshing in this case is a current design of BRepMesh_IncrementalMesh and expected behavior.
Thus, BRepTools::Clean() is not a workaround, but expected interface in case if user really needs re-meshing shape.
Mon, 11/18/2019 - 17:23
Thank you. This is exactly what I was looking for.
Mon, 05/13/2024 - 15:43
Does this work if the mesh is input from .obj using RWObj_TriangulationReader? If not, is it possible to remesh a mesh from .obj?
Mon, 05/13/2024 - 16:41
Hello, no. Generated mesh based on BRep(geometry). If something has no related geometry you can't regenerate mesh with pure mesh objects with OCC tools. When cleaning model, please check that any of cleaned shapes has geometry to re-generate mesh.
Best regards, Dmitrii.
Mon, 05/13/2024 - 16:59
Justin wrote:
BRepMesh
works only on analytical geometry - B-Spline, conical surfaces and others, whileOBJ
file defines nothing but triangulation.There are remeshing and mesh refining algorithms that could be found in the wild, but OCCT doesn't offer any of them right now (as it is focused to work with analytical B-Rep geometry).
Thu, 05/16/2024 - 13:54
When working with BRepMesh_IncrementalMesh and needing to remesh a shape with specific parameters regardless of deflection, consider these steps:
1 Clear Mesh Data: Before calling BRepMesh_IncrementalMesh again, ensure that any existing mesh data for the shape is cleared or reset. This can be done by using appropriate functions or methods provided by the library or toolkit you are using.
2 Check Mesh Quality: Evaluate the quality of the existing mesh to determine if remeshing is necessary. If the current mesh meets your requirements, you may choose to skip remeshing to save computational resources.
3 Custom Remeshing Logic: Implement custom logic to control the remeshing process based on your specific needs. This may involve creating wrapper functions or classes to encapsulate the meshing operations with desired parameters and remeshing conditions.
By combining these strategies, you can achieve more control over the meshing process and ensure that shapes are remeshed according to your specified parameters when needed.