    

 ## On this page

  

 

 # 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...](class_fine_rigid_transformation.xhtml#details)

## <a name="pub-types"></a>Public Types

enum [Type](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7) {   
 [eNEUTRAL\_TRANS](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7a2d5c3933900d9305ee3ab4eaf1c8eb41) =0, [eCOARSE\_TRANS](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7a8ac858363c69f6aa4f5c8c53707e59d9), [eCOARSE\_ROT](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7aea911dad52b010b8282c411af58e6539), [eCOARSE\_ROT\_TRANS](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7a4f10521c7d01709e9fe29913bc74dc47),   
 [eFINE\_ROT\_TRANS](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7a8f71931fda1acc6fdf8e362cbb879ebb), [eFINE\_ROT\_TRANS\_PREALIGNED](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7a639264569cf302a509a30ecd4f9742f3)  
 } an enum type defining the type of the derived class [More...](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7)  
 ## <a name="pub-methods"></a>Public Member Functions

 [applyTransformation](class_coor_transformation_base.xhtml#afdd491598da35029e3a478c72526fe8c) ([MeshMapperBase](class_mesh_mapper_base.xhtml) mapper, [Structure](class_structure.xhtml) ref\_structure, [Structure](class_structure.xhtml) other\_structure) Applies the coordinate transformation to the other\_structure. [More...](#afdd491598da35029e3a478c72526fe8c)  
 virtual bool [doesNonRigid](class_coor_transformation_base.xhtml#ac87710c0a9a888274234344ca0aae257) ()=0 virtual bool [doesRotate](class_coor_transformation_base.xhtml#ae1841e85a58acb38cc648818485e265f) ()=0 virtual bool [doesTranslate](class_coor_transformation_base.xhtml#a0c6d1696bb7fa057700433a238ac628b) ()=0  [FineRigidTransformation](class_fine_rigid_transformation.xhtml#a1f74664c157c5b2dd7037dcb0f7f305a) ([Structure](class_structure.xhtml) ref\_structure, [MeshMapperBase](class_mesh_mapper_base.xhtml) mesh\_mapper) Sets some defaults to the subsequent ICP call executed in applyTransformation. [More...](#a1f74664c157c5b2dd7037dcb0f7f305a)  
 virtual string [generateScriptOfSettingsDefinition](class_coor_transformation_base.xhtml#a5f5fbbea63d66795a7350e53e99d5c59) (string variable\_ident)=0 generates a script string (Lua) that is used to build up this object. [More...](#a5f5fbbea63d66795a7350e53e99d5c59)  
 virtual [Type](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7) [trafoType](class_coor_transformation_base.xhtml#a6f3bf49f542989a2d568060325588a3f) ()=0 ## <a name="pub-attribs"></a>Public Attributes

<a id="a9517cdee6afc51d01e7eb1d194ab4ab5"></a>unsigned short [max\_num\_iteration](class_fine_rigid_transformation.xhtml#a9517cdee6afc51d01e7eb1d194ab4ab5) The maximum number of iterations used in the ICP algorithm.   
 bool [pre\_aligned](class_fine_rigid_transformation.xhtml#a299314f27c4f20ede4424ec31429a6d5) If set to false, the default, a coarse transformation step will be performed to pre-adjust the point clouds. [More...](#a299314f27c4f20ede4424ec31429a6d5)  
 <a id="a29c920e8d9caac392af34838529b3de9"></a>number [seed](class_fine_rigid_transformation.xhtml#a29c920e8d9caac392af34838529b3de9) The seed for the randomly choosen restart design of the coarse rotation.   
 <a id="a556e5d948774f33218d27d9ea289efea"></a>number [tolerance\_delta\_rot](class_fine_rigid_transformation.xhtml#a556e5d948774f33218d27d9ea289efea) Maximum increment for the rotation to be assumed to be converged, default: 1e-5.   
 <a id="abb4779bd03857a43335b4f249e5bb183"></a>number [tolerance\_delta\_trans](class_fine_rigid_transformation.xhtml#abb4779bd03857a43335b4f249e5bb183) The maximum increment for the translation to be assumed to be converged, default: 1e-7 of the largest dimension.   
 std::pair&lt; string, string &gt; [trafo\_ref\_node\_set](class_coor_transformation_base.xhtml#a82e5d668866e3c7af7831eb0463db6f1) The ident of the reference node set the transformation algorithms will be limited to set up their optimization criterion. [More...](#a82e5d668866e3c7af7831eb0463db6f1)  
 <a id="details" name="details"></a>## 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

<a id="a1d1cfd8ffb84e947f82999c682b666a7"></a>## [◆ ](#a1d1cfd8ffb84e947f82999c682b666a7)Type

 enum [Type](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7)  inherited 

an enum type defining the type of the derived class

Enumerator<a id="a1d1cfd8ffb84e947f82999c682b666a7a2d5c3933900d9305ee3ab4eaf1c8eb41"></a>eNEUTRAL\_TRANS Neutral transformation.

<a id="a1d1cfd8ffb84e947f82999c682b666a7a8ac858363c69f6aa4f5c8c53707e59d9"></a>eCOARSE\_TRANS [CoarseTranslation](class_coarse_translation.xhtml "This algorithms automatically translates one structure to the center of origin of the other...").

<a id="a1d1cfd8ffb84e947f82999c682b666a7aea911dad52b010b8282c411af58e6539"></a>eCOARSE\_ROT [CoarseRotation](class_coarse_rotation.xhtml "This algorithms automatically rotates one structure to the center of origin of the other...").

<a id="a1d1cfd8ffb84e947f82999c682b666a7a4f10521c7d01709e9fe29913bc74dc47"></a>eCOARSE\_ROT\_TRANS [CoarseRigidTransformation](class_coarse_rigid_transformation.xhtml "This algorithms automatically transformates one structure to the center of origin of the other...").

<a id="a1d1cfd8ffb84e947f82999c682b666a7a8f71931fda1acc6fdf8e362cbb879ebb"></a>eFINE\_ROT\_TRANS [FineRigidTransformation](class_fine_rigid_transformation.xhtml "Tries to match a source point cloud with a reference point cloud using the coarse transformation (see...").

<a id="a1d1cfd8ffb84e947f82999c682b666a7a639264569cf302a509a30ecd4f9742f3"></a>eFINE\_ROT\_TRANS\_PREALIGNED [FineRigidTransformation](class_fine_rigid_transformation.xhtml "Tries to match a source point cloud with a reference point cloud using the coarse transformation (see...") of pre-aligned point clouds.





## Constructor &amp; Destructor Documentation

<a id="a1f74664c157c5b2dd7037dcb0f7f305a"></a>## [◆ ](#a1f74664c157c5b2dd7037dcb0f7f305a)FineRigidTransformation()

 [FineRigidTransformation](class_fine_rigid_transformation.xhtml)  ( [Structure](class_structure.xhtml)  *ref\_structure*,    [MeshMapperBase](class_mesh_mapper_base.xhtml)  *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}$](/sites/default/files/migrate-content/optislang_3d_postprocessing_script_api_2025_r1_1/form_0.png)
- A fixed rotation delta value set to ![$1^{-5}$](/sites/default/files/migrate-content/optislang_3d_postprocessing_script_api_2025_r1_1/form_1.png)
- 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

<a id="afdd491598da35029e3a478c72526fe8c"></a>## [◆ ](#afdd491598da35029e3a478c72526fe8c)applyTransformation()

 applyTransformation  ( [MeshMapperBase](class_mesh_mapper_base.xhtml)  *mapper*,    [Structure](class_structure.xhtml)  *ref\_structure*,    [Structure](class_structure.xhtml)  *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. 



<a id="ac87710c0a9a888274234344ca0aae257"></a>## [◆ ](#ac87710c0a9a888274234344ca0aae257)doesNonRigid()

 virtual bool doesNonRigid  ( )   pure virtualinherited 

Returnstrue if this transformation applies a non-rigid operation Implemented in [NeutralCoorTransformation](class_neutral_coor_transformation.xhtml#a6e9fff1a6c26387078d83c1609c2edc0), and [CoarseRotation](class_coarse_rotation.xhtml#a6e9fff1a6c26387078d83c1609c2edc0).





<a id="ae1841e85a58acb38cc648818485e265f"></a>## [◆ ](#ae1841e85a58acb38cc648818485e265f)doesRotate()

 virtual bool doesRotate  ( )   pure virtualinherited 

Returnstrue if this transformation applies a rigid rotation Implemented in [NeutralCoorTransformation](class_neutral_coor_transformation.xhtml#a2db558b5b102b9a6effd23683effa336), and [CoarseRotation](class_coarse_rotation.xhtml#a2db558b5b102b9a6effd23683effa336).





<a id="a0c6d1696bb7fa057700433a238ac628b"></a>## [◆ ](#a0c6d1696bb7fa057700433a238ac628b)doesTranslate()

 virtual bool doesTranslate  ( )   pure virtualinherited 

Returnstrue if this transformation applies a rigid translation Implemented in [NeutralCoorTransformation](class_neutral_coor_transformation.xhtml#a9dfae9c4461dc2b2e4ccb32245c94dcb), and [CoarseRotation](class_coarse_rotation.xhtml#a9dfae9c4461dc2b2e4ccb32245c94dcb).





<a id="a5f5fbbea63d66795a7350e53e99d5c59"></a>## [◆ ](#a5f5fbbea63d66795a7350e53e99d5c59)generateScriptOfSettingsDefinition()

 virtual string generateScriptOfSettingsDefinition  ( string  *variable\_ident*)   pure virtualinherited 

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

Returnsthe script code, ends with newline. Parameters variable\_identthe ident of the Lua variable that contains the MeshMapper object Implemented in [NeutralCoorTransformation](class_neutral_coor_transformation.xhtml#ac225d733c7c2cc84e76682c9f5b4c7d2), [CoarseRotation](class_coarse_rotation.xhtml#ac225d733c7c2cc84e76682c9f5b4c7d2), [CoarseRigidTransformation](class_coarse_rigid_transformation.xhtml#ac225d733c7c2cc84e76682c9f5b4c7d2), and [CoarseTranslation](class_coarse_translation.xhtml#ac225d733c7c2cc84e76682c9f5b4c7d2).





<a id="a6f3bf49f542989a2d568060325588a3f"></a>## [◆ ](#a6f3bf49f542989a2d568060325588a3f)trafoType()

 virtual [Type](class_coor_transformation_base.xhtml#a1d1cfd8ffb84e947f82999c682b666a7) trafoType  ( )   pure virtualinherited 

Returnsthe type of the transformation Implemented in [NeutralCoorTransformation](class_neutral_coor_transformation.xhtml#a54b19d55d0fc1d118b49c425a6b71d12), [CoarseRotation](class_coarse_rotation.xhtml#a54b19d55d0fc1d118b49c425a6b71d12), [CoarseRigidTransformation](class_coarse_rigid_transformation.xhtml#a54b19d55d0fc1d118b49c425a6b71d12), and [CoarseTranslation](class_coarse_translation.xhtml#a54b19d55d0fc1d118b49c425a6b71d12).





## Member Data Documentation

<a id="a299314f27c4f20ede4424ec31429a6d5"></a>## [◆ ](#a299314f27c4f20ede4424ec31429a6d5)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.

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



<a id="a82e5d668866e3c7af7831eb0463db6f1"></a>## [◆ ](#a82e5d668866e3c7af7831eb0463db6f1)trafo\_ref\_node\_set

 std::pair&lt; string, string &gt; 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.