# class NormalRepairer

Repairs normals on a processed geometry.

# Properties

Property Description
FlipFacesAndNormals Set/Get setting for whether and how to flip the faces and or normals in the scene. None - Don't flip Automatic - Automatically detect and fix backfaces per part MakeDoubleSided - Append inverted winded triangles with inverted normals to the geometry InvertFaces - Invert the winding of the triangles InvertNormals - Invert the vertex normals InvertFacesAndNormals - Invert winding of all triangles and vertex normals.
Geometry The Geometry object.
HardEdgeAngle The edge angle in degrees above which an edge is considered "hard".
ProcessSelectionSetID The ID of the SelectionSet containing the meshes to process If the ID is -1, all meshes are selected.
ProcessSelectionSetName Which selection set should be processed. If SetName is not found, all geometries in the scene will be processed. If both selection set name and ID are set, the name will be used.
RecalculateNormals Set/Get whether to recalculate new normals.
RepairOnlyInvalidNormals The RepairOnlyInvalidNormals flag If set, then only those normals that are invalid (backfacing, zero length etc) will be fixed.
ScaleByAngle The ScaleByAngle flag. If set, the influence of a triangle normal upon the vertex normals is scaled by the angle of the corner at the vertex.
ScaleByArea The ScaleByArea flag. If set, the influence of a triangle normal upon the vertex normals is scaled by the area of the triangle.
Scene The scene.
SnapNormalsToFlatSurfaces The SnapNormalsToFlatSurfaces flag. If set, perfectly flat shaded surfaces will be created, where possible. Normals adjacent to perfectly geometrically flat surfaces will be recalculated to have the same direction as for those of the adjacent flat surface.

# Methods

Method Description
Clear Clear all internal states of the object. This will NOT clear the parameters set in the object.
GetClass Get the name of the NormalRepairer class.
GetPercentDone Returns the current progress of the processing as a value between 0 and 100.
IsA Returns true if NormalRepairer is a or is a descendant of the class named as the type parameter.
IsNull Returns true if the NormalRepairer object is invalid.
RunProcessing Runs the processing the object is designed for.
SetAutoCorrectionAllowsDoubleSided Set true to allow for double sided triangles.
SetAutoCorrectionRatioThreshold The threshold ratio for auto correction.
SetAutoCorrectionSingleSidedThreshold The threshold ratio for auto correction to treat triangle as single sided.
ToJSON Get settings as JSON for debugging purposes.

# Static methods

Method Description
IsClassA Returns true if the class is a or is a descendant of the class named as the type parameter.
SafeCast SafeCast makes sure the input object is of a class that can be cast into spNormalRepairer, and if this is the case, returns the object cast into spNormalRepairer.

# Properties details

# FlipFacesAndNormals

Set/Get setting for whether and how to flip the faces and or normals in the scene. None - Don't flip Automatic - Automatically detect and fix backfaces per part MakeDoubleSided - Append inverted winded triangles with inverted normals to the geometry InvertFaces - Invert the winding of the triangles InvertNormals - Invert the vertex normals InvertFacesAndNormals - Invert winding of all triangles and vertex normals.

    # Geometry

    The Geometry object.

      # HardEdgeAngle

      The edge angle in degrees above which an edge is considered "hard".

        # ProcessSelectionSetID

        The ID of the SelectionSet containing the meshes to process If the ID is -1, all meshes are selected.

          # ProcessSelectionSetName

          Which selection set should be processed. If SetName is not found, all geometries in the scene will be processed. If both selection set name and ID are set, the name will be used.

            # RecalculateNormals

            Set/Get whether to recalculate new normals.

              # RepairOnlyInvalidNormals

              The RepairOnlyInvalidNormals flag If set, then only those normals that are invalid (backfacing, zero length etc) will be fixed.

                # ScaleByAngle

                The ScaleByAngle flag. If set, the influence of a triangle normal upon the vertex normals is scaled by the angle of the corner at the vertex.

                  # ScaleByArea

                  The ScaleByArea flag. If set, the influence of a triangle normal upon the vertex normals is scaled by the area of the triangle.

                    # Scene

                    The scene.

                      # SnapNormalsToFlatSurfaces

                      The SnapNormalsToFlatSurfaces flag. If set, perfectly flat shaded surfaces will be created, where possible. Normals adjacent to perfectly geometrically flat surfaces will be recalculated to have the same direction as for those of the adjacent flat surface.

                        # Methods details

                        # Clear

                        Clear all internal states of the object. This will NOT clear the parameters set in the object.

                          # GetClass

                          Get the name of the NormalRepairer class.

                            # GetPercentDone

                            Returns the current progress of the processing as a value between 0 and 100.

                              # IsA

                              Returns true if NormalRepairer is a or is a descendant of the class named as the type parameter.

                                # IsNull

                                Returns true if the NormalRepairer object is invalid.

                                  # RunProcessing

                                  Runs the processing the object is designed for.

                                    # SetAutoCorrectionAllowsDoubleSided

                                    Set true to allow for double sided triangles.

                                      # SetAutoCorrectionRatioThreshold

                                      The threshold ratio for auto correction.

                                        # SetAutoCorrectionSingleSidedThreshold

                                        The threshold ratio for auto correction to treat triangle as single sided.

                                          # ToJSON

                                          Get settings as JSON for debugging purposes.

                                            # Static methods details

                                            # IsClassA

                                            Returns true if the class is a or is a descendant of the class named as the type parameter.

                                              # SafeCast

                                              SafeCast makes sure the input object is of a class that can be cast into spNormalRepairer, and if this is the case, returns the object cast into spNormalRepairer.