Skip to main content

optiSLang 3D Postprocessing Script API 2025 R1

FineRigidTransformation Class Reference

Last update: 16.07.2025

Tries to match a source point cloud with a reference point cloud using the coarse transformation (see Coarse) as pre-alignment step and the Iterative Closes Point Algorithm (see ICP) afterwards as fine adjustment. More...

Public Types

enum  Type {
  eNEUTRAL_TRANS =0, eCOARSE_TRANS, eCOARSE_ROT, eCOARSE_ROT_TRANS,
  eFINE_ROT_TRANS, eFINE_ROT_TRANS_PREALIGNED
}
 an enum type defining the type of the derived class More...
 

Public Member Functions

 applyTransformation (MeshMapperBase mapper, Structure ref_structure, Structure other_structure)
 Applies the coordinate transformation to the other_structure. More...
 
virtual bool doesNonRigid ()=0
 
virtual bool doesRotate ()=0
 
virtual bool doesTranslate ()=0
 
 FineRigidTransformation (Structure ref_structure, MeshMapperBase mesh_mapper)
 Sets some defaults to the subsequent ICP call executed in applyTransformation. More...
 
virtual string generateScriptOfSettingsDefinition (string variable_ident)=0
 generates a script string (Lua) that is used to build up this object. More...
 
virtual Type trafoType ()=0
 

Public Attributes

unsigned short max_num_iteration
 The maximum number of iterations used in the ICP algorithm.
 
bool pre_aligned
 If set to false, the default, a coarse transformation step will be performed to pre-adjust the point clouds. More...
 
number seed
 The seed for the randomly choosen restart design of the coarse rotation.
 
number tolerance_delta_rot
 Maximum increment for the rotation to be assumed to be converged, default: 1e-5.
 
number tolerance_delta_trans
 The maximum increment for the translation to be assumed to be converged, default: 1e-7 of the largest dimension.
 
std::pair< string, string > trafo_ref_node_set
 The ident of the reference node set the transformation algorithms will be limited to set up their optimization criterion. More...
 

Detailed Description

Tries to match a source point cloud with a reference point cloud using the coarse transformation (see Coarse) as pre-alignment step and the Iterative Closes Point Algorithm (see ICP) afterwards as fine adjustment.

Vocabulary:

  • Other coordinates/source points: The point cloud to be moved to match the reference point cloud
  • reference coordinates/destination points: The reference point cloud
  • normals: The normal vectors from the reference point cloud to the other point cloud

Member Enumeration Documentation

◆ Type

enum Type
inherited

an enum type defining the type of the derived class

Enumerator
eNEUTRAL_TRANS 

Neutral transformation.

eCOARSE_TRANS 

CoarseTranslation.

eCOARSE_ROT 

CoarseRotation.

eCOARSE_ROT_TRANS 

CoarseRigidTransformation.

eFINE_ROT_TRANS 

FineRigidTransformation.

eFINE_ROT_TRANS_PREALIGNED 

FineRigidTransformation of pre-aligned point clouds.

Constructor & Destructor Documentation

◆ FineRigidTransformation()

FineRigidTransformation ( Structure  ref_structure,
MeshMapperBase  mesh_mapper 
)

Sets some defaults to the subsequent ICP call executed in applyTransformation.

The following defaults will be set:

  • A delta value for the translation difference between 2 consecutive exectued ICP iteration steps. Default: $1^{-7}*\rm{largest structure dimension}$
  • A fixed rotation delta value set to $1^{-5}$
  • The maximum number of iterations defaults to the default of the ICP class
Parameters
ref_structureThe reference structure needed to get a reasonable hint for the maximum search distance used by the mesh_mapper algorithm
mesh_mapperThe mesh mapper type used within the ICP algorithm to determine the error estimator (the volume difference between the reference structure and the other structure)

Member Function Documentation

◆ applyTransformation()

applyTransformation ( MeshMapperBase  mapper,
Structure  ref_structure,
Structure  other_structure 
)
inherited

Applies the coordinate transformation to the other_structure.

If a transformation reference node set has been defined, only those nodes included in the sets will be used to determine the transformation matrix. Otherwise all nodes of both structures will be used for the determination algorithm. Nevertheless, the transformation itself will be applied to all nodes of the other_structure. It might also occur, that the reference node set cannot be found in the other_structure. In such a case, the reference node set will be projected onto the segments of the other_structure and used as virtual node set.

Parameters
[in]mapperA back reference to the current mesh mapper. This one might be needed if a defined reference node set cannot be found in the other_structure
[in]ref_structureThe reference mesh
[in,out]other_structureOn input the imported mesh. On output the mesh with modified coordinates.

◆ doesNonRigid()

virtual bool doesNonRigid ( )
pure virtualinherited
Returns
true if this transformation applies a non-rigid operation

Implemented in NeutralCoorTransformation, and CoarseRotation.

◆ doesRotate()

virtual bool doesRotate ( )
pure virtualinherited
Returns
true if this transformation applies a rigid rotation

Implemented in NeutralCoorTransformation, and CoarseRotation.

◆ doesTranslate()

virtual bool doesTranslate ( )
pure virtualinherited
Returns
true if this transformation applies a rigid translation

Implemented in NeutralCoorTransformation, and CoarseRotation.

◆ generateScriptOfSettingsDefinition()

virtual string generateScriptOfSettingsDefinition ( string  variable_ident)
pure virtualinherited

generates a script string (Lua) that is used to build up this object.

Returns
the script code, ends with newline.
Parameters
variable_identthe ident of the Lua variable that contains the MeshMapper object

Implemented in NeutralCoorTransformation, CoarseRotation, CoarseRigidTransformation, and CoarseTranslation.

◆ trafoType()

virtual Type trafoType ( )
pure virtualinherited
Returns
the type of the transformation

Implemented in NeutralCoorTransformation, CoarseRotation, CoarseRigidTransformation, and CoarseTranslation.

Member Data Documentation

◆ pre_aligned

bool pre_aligned

If set to false, the default, a coarse transformation step will be performed to pre-adjust the point clouds.

Its recommended to change this option to true if source and target point clouds are already pre-aligned, whether internally or externally. Pre-aligned in terms of small distances - in terms of contact algorithms - between the point clouds in question.

Warning
Pre-alignment must be skipped for symmetric point clouds. Otherwise the randomly choosen start rotation might erroneously misalign the point clouds significantly

◆ trafo_ref_node_set

std::pair< string, string > trafo_ref_node_set
inherited

The ident of the reference node set the transformation algorithms will be limited to set up their optimization criterion.

A pair consisting of the part ident as first and the set ident as second member.

Connect with Ansys