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

# CoarseRotation Class Reference

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

This algorithms automatically rotates one structure to the center of origin of the other.

## 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. |
| | [CoarseRotation](#abf303770049c59d3e8ce7c5e900fe6a3) () Default constructor initializing a seed for the coarse rotation algorithm only. |
| virtual bool | [doesNonRigid](#a6e9fff1a6c26387078d83c1609c2edc0) () |
| virtual bool | [doesRotate](#a2db558b5b102b9a6effd23683effa336) () |
| virtual bool | [doesTranslate](#a9dfae9c4461dc2b2e4ccb32245c94dcb) () |
| virtual string | [generateScriptOfSettingsDefinition](#ac225d733c7c2cc84e76682c9f5b4c7d2) (string variable\_ident) 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](#a54b19d55d0fc1d118b49c425a6b71d12) () |

## Public Attributes

| Type | Name |
| - | - |
|  number | [seed](#a29c920e8d9caac392af34838529b3de9) The seed for the randomly choosen restart design of the coarse rotation. |
| 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

This algorithms automatically rotates one structure to the center of origin of the other.

The center of origin is defined by the boundary surface of both structures.

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

## 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()
```

`virtual`

**Returns**

true if this transformation applies a non-rigid operation

Implements [CoorTransformationBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#ac87710c0a9a888274234344ca0aae257).

### doesRotate()

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

`virtual`

**Returns**

true if this transformation applies a rigid rotation

Implements [CoorTransformationBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#ae1841e85a58acb38cc648818485e265f).

### doesTranslate()

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

`virtual`

**Returns**

true if this transformation applies a rigid translation

Implements [CoorTransformationBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a0c6d1696bb7fa057700433a238ac628b).

### generateScriptOfSettingsDefinition()

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

`virtual`

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 |

Implements [CoorTransformationBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a5f5fbbea63d66795a7350e53e99d5c59).

### trafoType()

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

`virtual`

**Returns**

the type of the transformation

Implements [CoorTransformationBase](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_coor_transformation_base.md#a6f3bf49f542989a2d568060325588a3f).

## Member Data Documentation

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