Shape Healing Functions

Before you begin, activate the Shape Healing package:

  1. In Me > Preferences > App Preferences > 3D Modeling > Multi Discipline Automated Engineering , select Basics > Library.
  2. From the list of available packages, select ShapeHealingKWEPackage and click the down arrow to load this package.
  3. Click OK to validate.

This page discusses:

CheckAndRepair

You can use this function in an Action to check a surface body for geometric anomalies and, optionally, repair them.

Signature

CheckAndRepair(inputFeat: Surface, targetDistance:
					Real, smallEdgeLength:
					Real, smallFaceLength:
					Real, bMaxDeform: Boolean, maxDeformLength:
					Real, bIsRepairOn: Boolean, keepCanonics: Boolean, oListOfAnomalies:
					List): Surface

Arguments

Name Input/Output Required? Type Comment
inputFeat In Surface Check the surface for geometric issues.
targetDistance In Real The command considers only edges with gaps greater than this distance as holes or gaps.
smallEdgeLength In Real The command treats edges shorter than this length as small edges.
smallFaceLength In Real Tolerance used to decide whether faces are small faces.
bMaxDeform In Boolean Controls whether repair deforms the geometry beyond the maximum value.
maxDeformLength In Real Maximum deformation while repairing the geometry.
bIsRepairOn In Boolean false: The function does not repair the input body; it reports anomalies on the input geometry. true: The command repairs the geometry first, and reports anomalies after repair on the input body; the output includes what the command could not repair.
keepCanonics In Boolean Freezes (or not) canonic surfaces and planes during repair.
oListOfAnomalies Out List Integer list of anomaly counts by category (see Anomaly list indices (oListOfAnomalies and ReturnType).

Behavior of bIsRepairOn

  • false: Does not change the input body for repair; oListOfAnomalies reflects anomalies on the original input body. You can add a datum without correction (per product behavior).
  • true: Repairs first; oListOfAnomalies reflects anomalies after repair on the input body; output includes what is not repairable. The command provides the repaired body as a datum in the tree.

Anomaly List Indices (oListOfAnomalies)

  • oListOfAnomalies[1]: Number of gap edges found.
  • oListOfAnomalies[2]: Number of small edges found.
  • oListOfAnomalies[3]: Number of small faces found.
  • oListOfAnomalies[4]: Number of duplicate faces found.
  • oListOfAnomalies[5]: Number of embedded faces found.
  • oListOfAnomalies[6]: Number of self-intersection faces found.

ReturnType

Surface

This is the returned surface associated with the check/repair result (typically a datum in the tree, for example CheckAndRepairDatum under a geometrical set).

  • If bIsRepairOn is true, the datum corresponds to the repaired body (subject to technical repair limits).
  • If bIsRepairOn is false, the datum corresponds to the body without correction, while anomaly counts describe the input geometry.
Note: Even when bIsRepairOn is true, some anomalies are not repairable.