> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# FineRigidTransformation Class Reference

Part of [Mesh mapper](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__meshmapper)

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.

## Public Types

| Type | Name |
| - | - |
| enum | [Type](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a1d1cfd8ffb84e947f82999c682b666a7) \{  [eNEUTRAL\_TRANS](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a1d1cfd8ffb84e947f82999c682b666a7a2d5c3933900d9305ee3ab4eaf1c8eb41) =0, [eCOARSE\_TRANS](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a1d1cfd8ffb84e947f82999c682b666a7a8ac858363c69f6aa4f5c8c53707e59d9), [eCOARSE\_ROT](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a1d1cfd8ffb84e947f82999c682b666a7aea911dad52b010b8282c411af58e6539), [eCOARSE\_ROT\_TRANS](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a1d1cfd8ffb84e947f82999c682b666a7a4f10521c7d01709e9fe29913bc74dc47),  [eFINE\_ROT\_TRANS](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a1d1cfd8ffb84e947f82999c682b666a7a8f71931fda1acc6fdf8e362cbb879ebb), [eFINE\_ROT\_TRANS\_PREALIGNED](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a1d1cfd8ffb84e947f82999c682b666a7a639264569cf302a509a30ecd4f9742f3)  } an enum type defining the type of the derived class |

## Public Member Functions

| Type | Name |
| - | - |
| | [applyTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#afdd491598da35029e3a478c72526fe8c) ([MeshMapperBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_mesh_mapper_base.md) mapper, [Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) ref\_structure, [Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) other\_structure) Applies the coordinate transformation to the other\_structure. |
| virtual bool | [doesNonRigid](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#ac87710c0a9a888274234344ca0aae257) ()=0 |
| virtual bool | [doesRotate](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#ae1841e85a58acb38cc648818485e265f) ()=0 |
| virtual bool | [doesTranslate](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a0c6d1696bb7fa057700433a238ac628b) ()=0 |
| | [FineRigidTransformation](#a1f74664c157c5b2dd7037dcb0f7f305a) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) ref\_structure, [MeshMapperBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_mesh_mapper_base.md) mesh\_mapper) Sets some defaults to the subsequent ICP call executed in applyTransformation. |
| virtual string | [generateScriptOfSettingsDefinition](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a5f5fbbea63d66795a7350e53e99d5c59) (string variable\_ident)=0 generates a script string (Lua) that is used to build up this object. |
| virtual [Type](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a1d1cfd8ffb84e947f82999c682b666a7) | [trafoType](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a6f3bf49f542989a2d568060325588a3f) ()=0 |

## Public Attributes

| Type | Name |
| - | - |
|  unsigned short | [max\_num\_iteration](#a9517cdee6afc51d01e7eb1d194ab4ab5) The maximum number of iterations used in the ICP algorithm. |
| bool | [pre\_aligned](#a299314f27c4f20ede4424ec31429a6d5) If set to false, the default, a coarse transformation step will be performed to pre-adjust the point clouds. |
|  number | [seed](#a29c920e8d9caac392af34838529b3de9) The seed for the randomly choosen restart design of the coarse rotation. |
|  number | [tolerance\_delta\_rot](#a556e5d948774f33218d27d9ea289efea) Maximum increment for the rotation to be assumed to be converged, default: 1e-5. |
|  number | [tolerance\_delta\_trans](#abb4779bd03857a43335b4f249e5bb183) 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](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a82e5d668866e3c7af7831eb0463db6f1) The ident of the reference node set the transformation algorithms will be limited to set up their optimization criterion. |

## 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

```cpp theme={null}
enum Type
```

`inherited`

an enum type defining the type of the derived class

| Enumerator | |
| - | - |
| eNEUTRAL\_TRANS | Neutral transformation. |
| eCOARSE\_TRANS | [CoarseTranslation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_translation.md). |
| eCOARSE\_ROT | [CoarseRotation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_rotation.md). |
| eCOARSE\_ROT\_TRANS | [CoarseRigidTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_rigid_transformation.md). |
| eFINE\_ROT\_TRANS | [FineRigidTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_fine_rigid_transformation.md). |
| eFINE\_ROT\_TRANS\_PREALIGNED | [FineRigidTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_fine_rigid_transformation.md) of pre-aligned point clouds. |

## Constructor & Destructor Documentation

### FineRigidTransformation()

```cpp theme={null}
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}](https://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/optislang/optislang-3d-postprocessing-script-api/form_0.png?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=4e5012fe9a29cd1088da07554b1ba9df)
* A fixed rotation delta value set to ![1^\{-5}](https://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/optislang/optislang-3d-postprocessing-script-api/form_1.png?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=a17c51981b5f99ba34852c06cd4531c4)
* The maximum number of iterations defaults to the default of the ICP class

**Parameters**

| Name | Description |
| - | - |
| ref\_structure | The reference structure needed to get a reasonable hint for the maximum search distance used by the mesh\_mapper algorithm |
| mesh\_mapper | The 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()

```cpp theme={null}
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**

| Direction | Name | Description |
| - | - | - |
| \[in] | mapper | A 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\_structure | The reference mesh |
| \[in,out] | other\_structure | On input the imported mesh. On output the mesh with modified coordinates. |

### doesNonRigid()

```cpp theme={null}
virtual bool doesNonRigid()
```

`pure virtual` `inherited`

**Returns**

true if this transformation applies a non-rigid operation

Implemented in [NeutralCoorTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_neutral_coor_transformation.md#a6e9fff1a6c26387078d83c1609c2edc0), and [CoarseRotation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_rotation.md#a6e9fff1a6c26387078d83c1609c2edc0).

### doesRotate()

```cpp theme={null}
virtual bool doesRotate()
```

`pure virtual` `inherited`

**Returns**

true if this transformation applies a rigid rotation

Implemented in [NeutralCoorTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_neutral_coor_transformation.md#a2db558b5b102b9a6effd23683effa336), and [CoarseRotation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_rotation.md#a2db558b5b102b9a6effd23683effa336).

### doesTranslate()

```cpp theme={null}
virtual bool doesTranslate()
```

`pure virtual` `inherited`

**Returns**

true if this transformation applies a rigid translation

Implemented in [NeutralCoorTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_neutral_coor_transformation.md#a9dfae9c4461dc2b2e4ccb32245c94dcb), and [CoarseRotation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_rotation.md#a9dfae9c4461dc2b2e4ccb32245c94dcb).

### generateScriptOfSettingsDefinition()

```cpp theme={null}
virtual string generateScriptOfSettingsDefinition(string variable_ident)
```

`pure virtual` `inherited`

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

**Returns**

the script code, ends with newline.

**Parameters**

| Name | Description |
| - | - |
| variable\_ident | the ident of the Lua variable that contains the MeshMapper object |

Implemented in [NeutralCoorTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_neutral_coor_transformation.md#ac225d733c7c2cc84e76682c9f5b4c7d2), [CoarseRotation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_rotation.md#ac225d733c7c2cc84e76682c9f5b4c7d2), [CoarseRigidTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_rigid_transformation.md#ac225d733c7c2cc84e76682c9f5b4c7d2), and [CoarseTranslation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_translation.md#ac225d733c7c2cc84e76682c9f5b4c7d2).

### trafoType()

```cpp theme={null}
virtual Type trafoType()
```

`pure virtual` `inherited`

**Returns**

the type of the transformation

Implemented in [NeutralCoorTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_neutral_coor_transformation.md#a54b19d55d0fc1d118b49c425a6b71d12), [CoarseRotation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_rotation.md#a54b19d55d0fc1d118b49c425a6b71d12), [CoarseRigidTransformation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_rigid_transformation.md#a54b19d55d0fc1d118b49c425a6b71d12), and [CoarseTranslation](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coarse_translation.md#a54b19d55d0fc1d118b49c425a6b71d12).

## Member Data Documentation

### pre\_aligned

```cpp theme={null}
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

```cpp theme={null}
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.
