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
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.
Syntax
SetFlipFacesAndNormals parameters
GetFlipFacesAndNormals return value
Type: EFlipFacesAndNormals
Default: NoFlip
Key | Value | Comment |
NoFlip | 0 | Don't flip. |
Automatic | 1 | Automatically detect and fix backfaces per part. |
MakeDoubleSided | 2 | Append inverted winded triangles with inverted normals to the geometry. |
InvertFaces | 3 | Invert the winding of the triangles. |
InvertNormals | 4 | Invert the vertex normals. |
InvertFacesAndNormals | 5 | Invert winding of all triangles and vertex normals. |
Syntax
SetFlipFacesAndNormals parameters
GetFlipFacesAndNormals return value
Type: ``````
Default: NoFlip
Key | Value | Comment |
NoFlip | 0 | Don't flip. |
Automatic | 1 | Automatically detect and fix backfaces per part. |
MakeDoubleSided | 2 | Append inverted winded triangles with inverted normals to the geometry. |
InvertFaces | 3 | Invert the winding of the triangles. |
InvertNormals | 4 | Invert the vertex normals. |
InvertFacesAndNormals | 5 | Invert winding of all triangles and vertex normals. |
Syntax
SetFlipFacesAndNormals parameters
GetFlipFacesAndNormals return value
Type: EFlipFacesAndNormals
Default: NoFlip
Key | Value | Comment |
EFlipFacesAndNormals_NoFlip | 0 | Don't flip. |
EFlipFacesAndNormals_Automatic | 1 | Automatically detect and fix backfaces per part. |
EFlipFacesAndNormals_MakeDoubleSided | 2 | Append inverted winded triangles with inverted normals to the geometry. |
EFlipFacesAndNormals_InvertFaces | 3 | Invert the winding of the triangles. |
EFlipFacesAndNormals_InvertNormals | 4 | Invert the vertex normals. |
EFlipFacesAndNormals_InvertFacesAndNormals | 5 | Invert winding of all triangles and vertex normals. |
Geometry
The Geometry object.
Syntax
SetGeometry parameters
Type | Name | Min | Max | Description |
GeometryData | value | | | The geometry that is to be repaired. |
GetGeometry return value
Type: GeometryData
Syntax
SetGeometry parameters
Type | Name | Min | Max | Description |
GeometryData | value | | | The geometry that is to be repaired. |
GetGeometry return value
Type: GeometryData
Syntax
SetGeometry parameters
Name | Type | Min | Max | Description |
value | GeometryData | | | The geometry that is to be repaired. |
GetGeometry return value
Type: GeometryData
HardEdgeAngle
The edge angle in degrees above which an edge is considered "hard".
Syntax
SetHardEdgeAngle parameters
Type | Name | Min | Max | Description |
real | value | 0 | 180 | The value to which HardEdgeAngle is to be set. |
GetHardEdgeAngle return value
Type: real
Default: 60.0
Syntax
SetHardEdgeAngle parameters
Type | Name | Min | Max | Description |
float | value | 0 | 180 | The value to which HardEdgeAngle is to be set. |
GetHardEdgeAngle return value
Type: float
Default: 60.0
Syntax
SetHardEdgeAngle parameters
Name | Type | Min | Max | Description |
value | float | 0 | 180 | The value to which HardEdgeAngle is to be set. |
GetHardEdgeAngle return value
Type: float
Default: 60.0
ProcessSelectionSetID
The ID of the SelectionSet containing the meshes to process If the ID is -1, all meshes are selected.
Syntax
SetProcessSelectionSetID parameters
Type | Name | Min | Max | Description |
rid | value | | | The selection set id to use. |
GetProcessSelectionSetID return value
Type: rid
Default: -1
Syntax
SetProcessSelectionSetID parameters
Type | Name | Min | Max | Description |
rid | value | | | The selection set id to use. |
GetProcessSelectionSetID return value
Type: rid
Default: -1
Syntax
SetProcessSelectionSetID parameters
Name | Type | Min | Max | Description |
value | int | | | The selection set id to use. |
GetProcessSelectionSetID return value
Type: int
Default: -1
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.
Syntax
SetProcessSelectionSetName parameters
Type | Name | Min | Max | Description |
const char * | value | | | The desired SelectionSet name. |
GetProcessSelectionSetName return value
Type: spString
Syntax
SetProcessSelectionSetName parameters
Type | Name | Min | Max | Description |
string | value | | | The desired SelectionSet name. |
GetProcessSelectionSetName return value
Type: string
Syntax
SetProcessSelectionSetName parameters
Name | Type | Min | Max | Description |
value | str | | | The desired SelectionSet name. |
GetProcessSelectionSetName return value
Type: str
RecalculateNormals
Set/Get whether to recalculate new normals.
Syntax
SetRecalculateNormals parameters
Type | Name | Min | Max | Description |
bool | value | | | The new value of RecalculateNormals. |
GetRecalculateNormals return value
Type: bool
Default: true
Syntax
SetRecalculateNormals parameters
Type | Name | Min | Max | Description |
bool | value | | | The new value of RecalculateNormals. |
GetRecalculateNormals return value
Type: bool
Default: true
Syntax
SetRecalculateNormals parameters
Name | Type | Min | Max | Description |
value | bool | | | The new value of RecalculateNormals. |
GetRecalculateNormals return value
Type: bool
Default: true
RepairOnlyInvalidNormals
The RepairOnlyInvalidNormals flag If set, then only those normals that are invalid (backfacing, zero length etc) will be fixed.
Syntax
SetRepairOnlyInvalidNormals parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the RepairOnlyInvalidNormals bool is to be set. |
GetRepairOnlyInvalidNormals return value
Type: bool
Default: false
Syntax
SetRepairOnlyInvalidNormals parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the RepairOnlyInvalidNormals bool is to be set. |
GetRepairOnlyInvalidNormals return value
Type: bool
Default: false
Syntax
SetRepairOnlyInvalidNormals parameters
Name | Type | Min | Max | Description |
value | bool | | | The value to which the RepairOnlyInvalidNormals bool is to be set. |
GetRepairOnlyInvalidNormals return value
Type: bool
Default: false
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.
Syntax
SetScaleByAngle parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ScaleByAngle bool is to be set. |
GetScaleByAngle return value
Type: bool
Default: true
Syntax
SetScaleByAngle parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ScaleByAngle bool is to be set. |
GetScaleByAngle return value
Type: bool
Default: true
Syntax
SetScaleByAngle parameters
Name | Type | Min | Max | Description |
value | bool | | | The value to which the ScaleByAngle bool is to be set. |
GetScaleByAngle return value
Type: bool
Default: true
ScaleByArea
The ScaleByArea flag. If set, the influence of a triangle normal upon the vertex normals is scaled by the area of the triangle.
Syntax
SetScaleByArea parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ScaleByArea bool is to be set. |
GetScaleByArea return value
Type: bool
Default: true
Syntax
SetScaleByArea parameters
Type | Name | Min | Max | Description |
bool | value | | | The value to which the ScaleByArea bool is to be set. |
GetScaleByArea return value
Type: bool
Default: true
Syntax
SetScaleByArea parameters
Name | Type | Min | Max | Description |
value | bool | | | The value to which the ScaleByArea bool is to be set. |
GetScaleByArea return value
Type: bool
Default: true
Scene
The scene.
Syntax
SetScene parameters
Type | Name | Min | Max | Description |
Scene | value | | | The scene object to use. |
GetScene return value
Type: Scene
Syntax
SetScene parameters
Type | Name | Min | Max | Description |
Scene | value | | | The scene object to use. |
GetScene return value
Type: Scene
Syntax
SetScene parameters
Name | Type | Min | Max | Description |
value | Scene | | | The scene object to use. |
GetScene return value
Type: 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.
Syntax
SetSnapNormalsToFlatSurfaces parameters
Type | Name | Min | Max | Description |
bool | value | | | To use for SnapNormalsToFlatSurfaces. |
GetSnapNormalsToFlatSurfaces return value
Type: bool
Default: false
Syntax
SetSnapNormalsToFlatSurfaces parameters
Type | Name | Min | Max | Description |
bool | value | | | To use for SnapNormalsToFlatSurfaces. |
GetSnapNormalsToFlatSurfaces return value
Type: bool
Default: false
Syntax
SetSnapNormalsToFlatSurfaces parameters
Name | Type | Min | Max | Description |
value | bool | | | To use for SnapNormalsToFlatSurfaces. |
GetSnapNormalsToFlatSurfaces return value
Type: bool
Default: false
Methods details
Clear
Clear all internal states of the object. This will NOT clear the parameters set in the object.
Syntax
Parameters
Clear takes no parameters.
Syntax
Parameters
Clear takes no parameters.
Syntax
Parameters
Clear takes no parameters.
GetClass
Get the name of the NormalRepairer class.
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: spString
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: string
Syntax
Parameters
GetClass takes no parameters.
Return value
Type: str
GetPercentDone
Returns the current progress of the processing as a value between 0 and 100.
Syntax
Parameters
GetPercentDone takes no parameters.
Return value
Type: real
Syntax
Parameters
GetPercentDone takes no parameters.
Return value
Type: float
Syntax
Parameters
GetPercentDone takes no parameters.
Return value
Type: float
IsA
Returns true if NormalRepairer is a or is a descendant of the class named as the type parameter.
Syntax
Parameters
Type | Name | Min | Max | Description |
const char * | type | | | Name of the class to check if NormalRepairer is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
string | type | | | Name of the class to check if NormalRepairer is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
type | str | | | Name of the class to check if NormalRepairer is, or is a descendant of. |
Return value
Type: bool
IsNull
Returns true if the NormalRepairer object is invalid.
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
IsNull takes no parameters.
Return value
Type: bool
RunProcessing
Runs the processing the object is designed for.
Syntax
Parameters
RunProcessing takes no parameters.
Syntax
Parameters
RunProcessing takes no parameters.
Syntax
Parameters
RunProcessing takes no parameters.
SetAutoCorrectionAllowsDoubleSided
Set true to allow for double sided triangles.
Syntax
Parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired value of the flag. |
Syntax
Parameters
Type | Name | Min | Max | Description |
bool | value | | | The desired value of the flag. |
Syntax
Parameters
Name | Type | Min | Max | Description |
value | bool | | | The desired value of the flag. |
SetAutoCorrectionRatioThreshold
The threshold ratio for auto correction.
Syntax
Parameters
Type | Name | Min | Max | Description |
real | value | | | The desired threshold ratio. |
Syntax
Parameters
Type | Name | Min | Max | Description |
float | value | | | The desired threshold ratio. |
Syntax
Parameters
Name | Type | Min | Max | Description |
value | float | | | The desired threshold ratio. |
SetAutoCorrectionSingleSidedThreshold
The threshold ratio for auto correction to treat triangle as single sided.
Syntax
Parameters
Type | Name | Min | Max | Description |
real | value | | | The desired threshold. |
Syntax
Parameters
Type | Name | Min | Max | Description |
float | value | | | The desired threshold. |
Syntax
Parameters
Name | Type | Min | Max | Description |
value | float | | | The desired threshold. |
Static methods details
IsClassA
Returns true if the class is a or is a descendant of the class named as the type parameter.
Syntax
Parameters
Type | Name | Min | Max | Description |
const char * | type | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
string | type | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
type | str | | | Name of the class to check if the class is, or is a descendant of. |
Return value
Type: bool
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.
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to cast. |
Return value
Type: NormalRepairer
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to cast. |
Return value
Type: NormalRepairer
Syntax
Parameters
Name | Type | Min | Max | Description |
object | Object | | | Object to cast. |
Return value
Type: NormalRepairer