Skip to content
On this page

class NormalRepairer

Repairs normals on a processed geometry.

Properties

PropertyDescription
FlipFacesAndNormalsSet/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.
GeometryThe Geometry object.
HardEdgeAngleThe edge angle in degrees above which an edge is considered "hard".
NameThe name of the NormalRepairer object. (Inherited from Object)
ProcessSelectionSetIDThe ID of the SelectionSet containing the meshes to process If the ID is -1, all meshes are selected.
ProcessSelectionSetNameWhich 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.
RecalculateNormalsSet/Get whether to recalculate new normals.
RepairOnlyInvalidNormalsThe RepairOnlyInvalidNormals flag If set, then only those normals that are invalid (backfacing, zero length etc) will be fixed.
ScaleByAngleThe 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.
ScaleByAreaThe ScaleByArea flag. If set, the influence of a triangle normal upon the vertex normals is scaled by the area of the triangle.
SceneThe scene.
SnapNormalsToFlatSurfacesThe 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

MethodDescription
AddObserverAdds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
ClearClear all internal states of the object. This will NOT clear the parameters set in the object. (Inherited from ProcessingObject)
GetClassGet the name of the NormalRepairer class. (Inherited from Object)
GetPercentDoneReturns the current progress of the processing as a value between 0 and 100. (Inherited from ProcessingObject)
IsAReturns true if NormalRepairer is a or is a descendant of the class named as the type parameter. (Inherited from Object)
IsNullReturns true if the NormalRepairer object is invalid. (Inherited from Object)
IsSameObjectAsReturns true if the NormalRepairer object is valid. (Inherited from Object)
NonNullReturns true if the NormalRepairer object is valid. (Inherited from Object)
PrintInfoPrints the content/info of the NormalRepairer object to the log. (Inherited from Object)
RemoveObserverRemoves a previously added observer object. (Inherited from Object)
RunProcessingRuns the processing the object is designed for. If the process succeeds, the return value is NoError. If the process fails, and the error is recoverable, an error code is returned. (Inherited from ProcessingObject)
SetAutoCorrectionAllowsDoubleSidedSet true to allow for double sided triangles.
SetAutoCorrectionRatioThresholdThe threshold ratio for auto correction.
SetAutoCorrectionSingleSidedThresholdThe threshold ratio for auto correction to treat triangle as single sided.
ToJSONGet settings as JSON for debugging purposes. (Inherited from ProcessingObject)

Static methods

MethodDescription
IsClassAReturns true if the class is a or is a descendant of the class named as the type parameter. (Inherited from Object)
SafeCastSafeCast 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. (Inherited from Object)

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".

Name

The name of the NormalRepairer object. (Inherited from Object)

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

AddObserver

Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)

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. (Inherited from Object)

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. (Inherited from Object)

IsNull

Returns true if the NormalRepairer object is invalid. (Inherited from Object)

IsSameObjectAs

Returns true if the NormalRepairer object is valid. (Inherited from Object)

NonNull

Returns true if the NormalRepairer object is valid. (Inherited from Object)

PrintInfo

Prints the content/info of the NormalRepairer object to the log. (Inherited from Object)

RemoveObserver

Removes a previously added observer object. (Inherited from Object)

RunProcessing

Runs the processing the object is designed for. If the process succeeds, the return value is NoError. If the process fails, and the error is recoverable, an error code is returned.

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. (Inherited from Object)

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. (Inherited from Object)