Cleaning a Mesh

task target This task will show you how to clean a mesh.

Imported STL files or generated meshes may present some irregularities such as:

  • Corrupted triangles, i.e. triangles that have the same vertex twice,
  • Duplicated triangles, i.e. triangles that share the same three vertices,
  • Inconsistent Orientation, i.e. triangles that can not be oriented consistently with respect to each other,
  • Non-manifold edges, i.e. edges shared by more than two triangles,
  • Non-manifold vertices, i.e. vertices shared by two or more connected shells.

A mesh may also present some structural problems such as:

  • Orientation problems, i.e. all the triangles are not oriented in the same direction,
  • Isolated triangles, i.e. triangles belonging to small connected areas of the mesh,
  • Disconnected zones, i.e. the mesh is made of several disconnected zones,
  • Triangles with long edges.

Mesh cleaner proposes two families of treatments on such meshes:

  • Deletion, i.e. visualization and deletion of corrupted or duplicated triangles,
    of triangles with an inconsistent orientation, of non-manifold edges, or non-manifold vertices,
    of isolated triangles and triangles with long edges.

  • Structure, i.e. re-orientation or split.
You can process simultaneously several types of problems in the Deletion tab.
Structure problems must be processed separately.
aprereq.gif (1231 bytes) Open MeshCleaner1.CATPart the from the samples directory.
  1. Click Mesh Cleaner and select the mesh to process.
    The dialog box is displayed.

  2. Go to the tab of the treatment you want to apply.

  3. In the Deletion tab, click Analyze.

    Once the analysis is completed, the line(s) corresponding to the problem(s) found become active.
    The Statistics column is updated with the number of cases found for the four first lines.
    Here, only non-manifold vertices have been found, and there are 5 such vertices.

  4. You can visualize the problems found:

    Select the check boxes of the problems you want to visualize. By default, they are displayed in white.
    You can choose another color from the Preview colors list.
  5. For Isolated Triangles, use the slider to define the maximum number of triangles that a disconnected area may contain.
    If you set the slider to n, all the areas containing between 1 and n triangles will be visualized, then deleted.
    The limit values of the slider are defined according to the mesh.

  6. For Long Edges, use the spinner to define the maximum allowed length edge of triangles.
    All triangles with edges longer than this value will be deleted.

  7. Click Apply to delete the unwanted elements and OK to exit the action and save the processed part.

  8. In the Structure tab,

    • Select the Orientation check box and click Apply to re-orient triangles, if that is possible.
      You can also display Direct and Indirect Triangles in the color of your choice.
    • or select the Split in Connected Zones check box. The text box below is updated with the number of connected zones found.
      You can then choose to split them in Distinct zones or in one Grouped zone by checking the appropriate option
      and clicking Apply. SubMesh.x elements are then created in the specification tree.

  9. Click OK to save the processed part and exit the action.

end of task