class
PartRemover
The PartRemover tool can identify unconnected sub-meshes, and remove meshes that fall below a set size threshold. This size threshold can be set globally for the entire geometry, or per-material to be able to remove things like decals effectively.
Properties
Property | Description |
Geometry | The geometry data object to run the part removal on. If a scene is set, this parameter is ignored by the reducer. |
Name | The name of the PartRemover object. (Inherited from Object) |
Scene | The scene object to run the part removal on. |
SizeThreshold | The size threshold to be used when removing parts. If SizeThreshold is equal to, or greater than, the boundingbox radius of a part, then that part is removed. If UsePerMaterialSizeThresholds is true, this value will be ignored and the per-material values will be used instead. |
UsePerMaterialSizeThresholds | The UsePerMaterialSizeThresholds flag. If true, the global SizeThreshold value will be ignored and the per-material values in the PerMaterialSizeThresholds will be used instead. |
Methods
Method | Description |
AddObserver | Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object) |
GetClass | Get the name of the PartRemover class. (Inherited from Object) |
GetPerMaterialSizeThresholds | The per-material threshold array. These thresholds are mapped per material ID in the geometrydata object if UsePerMaterialSizeThresholds is true. The size and values in this array needs to be set up by the user, and material IDs that fall outside the set array will be ignored. |
IsA | Returns true if PartRemover is a or is a descendant of the class named as the type parameter. (Inherited from Object) |
IsNull | Returns true if the PartRemover object is invalid. (Inherited from Object) |
IsSameObjectAs | Returns true if the PartRemover object is valid. (Inherited from Object) |
NonNull | Returns true if the PartRemover object is valid. (Inherited from Object) |
PrintInfo | Prints the content/info of the PartRemover object to the log. (Inherited from Object) |
RemoveObserver | Removes a previously added observer object. (Inherited from Object) |
RunPartRemoval | Runs the part removal processing. |
Static methods
Method | Description |
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 spPartRemover, and if this is the case, returns the object cast into spPartRemover. (Inherited from Object) |
Properties details
Geometry
The geometry data object to run the part removal on. If a scene is set, this parameter is ignored by the reducer.
Syntax
SetGeometry parameters
Type | Name | Min | Max | Description |
GeometryData | value | | | The geometry data to be used for processing. |
GetGeometry return value
Type: GeometryData
Syntax
SetGeometry parameters
Type | Name | Min | Max | Description |
GeometryData | value | | | The geometry data to be used for processing. |
GetGeometry return value
Type: GeometryData
Syntax
SetGeometry parameters
Name | Type | Min | Max | Description |
value | GeometryData | | | The geometry data to be used for processing. |
GetGeometry return value
Type: GeometryData
Name
The name of the PartRemover object. (Inherited from Object)
Syntax
SetName parameters
Type | Name | Min | Max | Description |
const char * | name | | | New name of the object. |
GetName return value
Type: spString
Syntax
SetName parameters
Type | Name | Min | Max | Description |
string | name | | | New name of the object. |
GetName return value
Type: string
Syntax
SetName parameters
Name | Type | Min | Max | Description |
name | str | | | New name of the object. |
GetName return value
Type: str
Scene
The scene object to run the part removal on.
Syntax
SetScene parameters
Type | Name | Min | Max | Description |
Scene | value | | | The scene data to be used for processing. |
GetScene return value
Type: Scene
Syntax
SetScene parameters
Type | Name | Min | Max | Description |
Scene | value | | | The scene data to be used for processing. |
GetScene return value
Type: Scene
Syntax
SetScene parameters
Name | Type | Min | Max | Description |
value | Scene | | | The scene data to be used for processing. |
GetScene return value
Type: Scene
SizeThreshold
The size threshold to be used when removing parts. If SizeThreshold is equal to, or greater than, the boundingbox radius of a part, then that part is removed. If UsePerMaterialSizeThresholds is true, this value will be ignored and the per-material values will be used instead.
Syntax
SetSizeThreshold parameters
Type | Name | Min | Max | Description |
real | value | | | The new value of SizeThreshold. |
GetSizeThreshold return value
Type: real
Syntax
SetSizeThreshold parameters
Type | Name | Min | Max | Description |
float | value | | | The new value of SizeThreshold. |
GetSizeThreshold return value
Type: float
Syntax
SetSizeThreshold parameters
Name | Type | Min | Max | Description |
value | float | | | The new value of SizeThreshold. |
GetSizeThreshold return value
Type: float
UsePerMaterialSizeThresholds
The UsePerMaterialSizeThresholds flag. If true, the global SizeThreshold value will be ignored and the per-material values in the PerMaterialSizeThresholds will be used instead.
Syntax
SetUsePerMaterialSizeThresholds parameters
Type | Name | Min | Max | Description |
bool | value | | | The new value of UsePerMaterialSizeThresholds. |
GetUsePerMaterialSizeThresholds return value
Type: bool
Syntax
SetUsePerMaterialSizeThresholds parameters
Type | Name | Min | Max | Description |
bool | value | | | The new value of UsePerMaterialSizeThresholds. |
GetUsePerMaterialSizeThresholds return value
Type: bool
Syntax
SetUsePerMaterialSizeThresholds parameters
Name | Type | Min | Max | Description |
value | bool | | | The new value of UsePerMaterialSizeThresholds. |
GetUsePerMaterialSizeThresholds return value
Type: bool
Methods details
AddObserver
Adds a user-defined observer object to the interface, that will receive events from the interface. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
Observer | observer | | | Observer is the object that will receive events. |
Return value
Type: rid
Syntax
Parameters
Type | Name | Min | Max | Description |
Observer | observer | | | Observer is the object that will receive events. |
Return value
Type: int
Syntax
Parameters
Name | Type | Min | Max | Description |
observer | Observer | | | Observer is the object that will receive events. |
Return value
Type: int
GetClass
Get the name of the PartRemover class. (Inherited from Object)
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
GetPerMaterialSizeThresholds
The per-material threshold array. These thresholds are mapped per material ID in the geometrydata object if UsePerMaterialSizeThresholds is true. The size and values in this array needs to be set up by the user, and material IDs that fall outside the set array will be ignored.
Syntax
Parameters
GetPerMaterialSizeThresholds takes no parameters.
Return value
Type: RealArray
Syntax
Parameters
GetPerMaterialSizeThresholds takes no parameters.
Return value
Type: RealArray
Syntax
Parameters
GetPerMaterialSizeThresholds takes no parameters.
Return value
Type: RealArray
IsA
Returns true if PartRemover is a or is a descendant of the class named as the type parameter. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
const char * | type | | | Name of the class to check if PartRemover 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 PartRemover 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 PartRemover is, or is a descendant of. |
Return value
Type: bool
IsNull
Returns true if the PartRemover object is invalid. (Inherited from Object)
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
IsSameObjectAs
Returns true if the PartRemover object is valid. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to compare with. |
Return value
Type: bool
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to compare with. |
Return value
Type: bool
Syntax
Parameters
Name | Type | Min | Max | Description |
object | Object | | | Object to compare with. |
Return value
Type: bool
NonNull
Returns true if the PartRemover object is valid. (Inherited from Object)
Syntax
Parameters
NonNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
NonNull takes no parameters.
Return value
Type: bool
Syntax
Parameters
NonNull takes no parameters.
Return value
Type: bool
PrintInfo
Prints the content/info of the PartRemover object to the log. (Inherited from Object)
Syntax
Parameters
PrintInfo takes no parameters.
Syntax
Parameters
PrintInfo takes no parameters.
Syntax
Parameters
PrintInfo takes no parameters.
RemoveObserver
Removes a previously added observer object. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
rid | observerId | | | ObserverId is the id returned by AddObserver when the observer was added. |
Syntax
Parameters
Type | Name | Min | Max | Description |
int | observerId | | | ObserverId is the id returned by AddObserver when the observer was added. |
Syntax
Parameters
Name | Type | Min | Max | Description |
observerId | int | | | ObserverId is the id returned by AddObserver when the observer was added. |
RunPartRemoval
Runs the part removal processing.
Syntax
Parameters
RunPartRemoval takes no parameters.
Syntax
Parameters
RunPartRemoval takes no parameters.
Syntax
Parameters
RunPartRemoval takes no parameters.
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)
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 spPartRemover, and if this is the case, returns the object cast into spPartRemover. (Inherited from Object)
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to cast. |
Return value
Type: PartRemover
Syntax
Parameters
Type | Name | Min | Max | Description |
Object | object | | | Object to cast. |
Return value
Type: PartRemover
Syntax
Parameters
Name | Type | Min | Max | Description |
object | Object | | | Object to cast. |
Return value
Type: PartRemover