fixmesh.self_intersections package

fixmesh.self_intersections.local

fixmesh.self_intersections.local_remesh.fix_with_localRemesh(mesh, detail=2.4)[source]

Fix self-intersections and remesh joint sections.

Parameters:
  • mesh (pymesh.Mesh) – The input mesh with self-intersections.

  • detail (float, optional) – The value controls the finess of the remesh. Defaults to 2.4.

Returns:

The repaired mesh with no self-intersections.

Return type:

pymesh.Mesh

fixmesh.self_intersections.meshlib

fixmesh.self_intersections.meshlib.fix_with_meshlib(file_path, voxel_size=0.01)[source]

Fix self-intersections using MeshLib.

Parameters:
  • mesh (pymesh.Mesh) – The input mesh with self-intersections.

  • voxel_size (float, optional) – The voxel size. Defaults to 0.01.

Returns:

The repaired mesh with no self-intersections.

Return type:

pymesh.Mesh

fixmesh.self_intersections.pymesh

fixmesh.self_intersections.pymesh.fix_with_pymesh(mesh)[source]

Fix self-intersections using PyMesh.

This function calls pymesh.compute_outerhull().

Parameters:

mesh (pymesh.Mesh) – The input mesh with self-intersections.

Returns:

The repaired mesh with no self-intersections.

Return type:

pymesh.Mesh

fixmesh.self_intersections.pymeshfix

fixmesh.self_intersections.pymeshfix.fix_with_pymeshfix(mesh)[source]

Fix self-intersections using PyMeshFix.

Parameters:

mesh (pymesh.Mesh) – The input mesh with self-intersections.

Returns:

The repaired mesh with no self-intersections.

Return type:

pymesh.Mesh

fixmesh.self_intersections.surfacenet

fixmesh.self_intersections.surfacenet.fix_with_surfaceNet(mesh, voxel_size=0.01)[source]

Fix self-intersections using the 3D SurfaceNet.

This function voxelizes each watertight component of the mesh, assigns unique labels to components, and reconstructs the mesh surface using 3D SurfaceNet. (Original Work: Sarah F. Frisken, SurfaceNets for Multi-Label Segmentations with Preservation of Sharp Boundaries, Journal of Computer Graphics Techniques (JCGT), vol. 11, no. 1, 34-54, 2022.)

Parameters:
  • mesh (pymesh.Mesh) – The input mesh with self-intersections.

  • voxel_size (float, optional) – The voxel size. Defaults to 0.01.

Returns:

The repaired mesh with labels.

Return type:

pyvista.PolyData