Apply Transformation

From CloudCompareWiki
Jump to navigation Jump to search


Menu / icon

This tool is accessible via the 'Edit > Apply transformation' menu.

Description

This tool allows the user to transform (i.e. rotate and/or translate) the selected entities. The transformation to apply can be input in various ways.

'Apply transformation' dialog

Start

The user must select one or several entities before launching this tool. The entities can be about any 3D geometry (clouds, meshes, polylines, primitives, etc.).

Note: locked entities (sub-meshes, etc.) can't be moved this way.

Procedure

The user has multiple choices to set the transformation to apply (see below for more details):

  • as a transformation matrix
  • the combination of a rotation axis, a rotation angle and a translation vector
  • the combination of Euler angles and a translation vector

A checkbox let the user specify if he wishes to apply the currently defined transformation or it's inverse (Apply inverse transformation).

Once defined the transformation can be applied by clicking on the OK button (or the process can be canceled by clicking on the Cancel button).

The transformation is applied to all selected entities and to their children (recursively). The transformation is added to each entity's Transformation history.

Input a transformation

Transformation matrix

A rigid transformation matrix is a composition of a rotation (a 3x3 matrix) and a translation (a 3D vector). For convenience, it can be written as a 4x4 matrix (the rotation matrix corresponds to the upper part of the 3 first columns, the translation vector corresponds to the upper part of the 4th column, and the bottom line is always filled with 3 'zeros' and a 'one').

In he first tab ("Matrix 4x4") the user can input the matrix values directly; or load them from a text file (each row of the matrix on a single line, i.e. 4 values separated by a space character); or eventually paste it from the clipboard. For instance, most of the registration tools in CloudCompare will output the final transformation as a 4x4 matrix in the Console. The user can copy it (with CTRL+C on Windows) and paste it here so as to apply the same transformation to another entity.

Rotation axis and angle + translation

The rotation part of the transformation can be input as a single rotation angle about a 3D axis. The second tab ("Axis, Angle") let the user input those values (the angle is in degrees). It's the fastest way to apply simple rotations about X, Y or Z for instance.

Euler angles + translation

The third tab ("Euler angles") let the user define the rotation as Euler angles angles (phi, theta and psi).