# Performing a Deviation Analysis

This task will show you how to perform a deviation analysis between reference data and data to measure.
• Texture mode limitations:
• it is available on meshes only,
• the Render Style must be set to Shading with Material,
• Texture mode is always available but note that only triangles with values on their three vertices are displayed: in the example below, the triangles on the top and on the left are not displayed in Texture mode.
• there must be a color for each value. The no color and the hide dimmed points option apply on spikes and points visualizations only. They have no effect on Texture mode.
• Datum mode is not available for this command.
• The result feature can then be used as input in Realistic Shape Optimizer.
1. Click Deviation Analysis in the Cloud Analysis toolbar.
The Deviation Analysis dialog box is displayed.

2. Select the Reference and the data To measure:

 Reference data can be a volume, a surface, a plane, a point, a curve or a cloud of points. Data To measure can be clouds of points, points, curves, surfaces or volumes. When the data to measure are curves, surfaces or volumes, they are discretized.

We have selected Surface.17 as the Reference and Tessellation.1 as the data To measure.
 Multi-selection is available: click to display the list of elements selected. Click an element in the graphic area or in the specification tree to add it to the selection list,Select an element in the list, and click Remove to modify the selection list, or Replace to replace it. Click Close to end the selection and revert to the main dialog box. The number of elements selected is displayed in the Reference or To measure fields. is available to hide or show the Reference and the To measure data.

3. Set the computation parameters:
 Accuracy: computation accuracy, available only when at least one volume or surface is selected as Reference. Only Orthogonal: select this check box to eliminate points that are not projected orthogonally on the Reference: Only Orthogonal is not selected: Only Orthogonal is selected: Absolute: select this check box to perform the analysis with absolute values only: Absolute is not selected: Absolute is selected: Direction: select this check box to define a projection direction by picking a plane or a line. A contextual menu is available to help you define this direction: You can also set that direction by setting the compass to Lock Privileged Plane Orientation Parallel to Screen and then selecting Compass Direction in the contextual menu. If you change the direction, do not forget to update the deviation analysis feature.

4. Set the Visualization parameters:

Spikes: select this check box to activate the visualization of the spikes.
• Spikes is not selected:
• Spikes is selected:

Points: Select this check box to change the points display symbol.

Options: This button is related to the Spikes and Points check boxes.

Spike scale lets you change the length of the spikes.
Point symbol lets you change the display symbol of points.

Texture: Select this check box to display the deviations as textures:

 Texture is applied to the data To measure. The data To measure must be a mesh, a surface or a volume. The Render Style must be set to Shading with Material. If this is not the case, a message asks you to switch to this Render Style.

Max values: Select this check box to display the maximum deviation values (positive and negative) and their locations on the data To measure.

5. Click More>> to set Advanced Parameters and the Display Format.
 Homogeneous filtering: select this check box to reduce the number of points of the data To measure to take into account. A sphere filtering is applied, the parameter represents the radius of this sphere. Homogeneous filtering is not selected: Homogeneous filtering is selected, with a value set to 50: Threshold: select this check box to remove points with a deviation higher than this threshold. Threshold is not selected: Threshold is selected, with a value set to 600: Step: this parameter is used to discretize the data To measure when they are curves, surfaces or volumes. It controls the length of the discretization triangles for surfaces or volumes, or of the segments for curves. If you do not check this check box and enter a value, the command computes the step, but in some cases it is better that you define your own step value. Style: three styles are available: Number of significant digits: lets you define the number of significant digits, between 1 and 15.

6. Click Apply to take any modification into account.
When you move the pointer over the element To measure you can see the deviation value between the point below the pointer and the Reference data.
 Only available with Points or Spikes visualization

7. Click OK to create the Deviation Analysis and exit the dialog box.
A Deviation Analysis.x feature is created in the specification tree.
It is editable.

In addition to the Display Format proposed in the dialog box, you can customize the color map as follows.

Note that the following color map values are modal:

• Number of positive colors,
• Number of negative colors,
• Display (Results, Statistics, Tolerance, Histogram),
• Positive Tolerance,
• Negative Tolerance,
• Colors.

### Colors

Double-click a color patch. The following dialog box is displayed.

You can choose to apply no color to this patch, or select another color from the combo list.

### Values

Double-click a value. The following dialog box is displayed.

You can change the value and recompute intermediate values.
Note that the Recompute intermadiate values check box is proposed once a value has been changed.

• initial analysis:
• the top value has been modified:
• the top value has been modified and the intermediate values have been recomputed:
 A warning message is displayed if you enter an inconsistent value.

Right-click the color map to display its contextual menu:

Edit number of colors: displays the following dialog box that lets you select the number of colors to display:

Smooth mode switches to a smooth mode display:

 You cannot modify the colors in Smooth mode.

Equalization mode: values are distributed in such a way that each interval contains the same number of points:

• Initial mode:
• Equalization mode:
 You cannot modify the values in Equalization mode. This mode is not always possible (e.g. concentration of points on one value). There is one distribution for the positive values and one for the negative values.

Display: Starts the following menu. Select the required item.

All:
Selects all the items below (Results, Statistics, Tolerances, Histogram).

None:
None of the items below (Results, Statistics, Tolerances, Histogram) is selected.

Tolerances:
 Double-click the tolerance to edit it:

You can combine all these options:

Hide dimmed points: hides dimmed points:

• Hide dimmed points is not selected:
• Hide dimmed points is selected:
• Points can be dimmed for two reasons:
• They are out of the color map: the max. values are [0,10], you change them to [0,5]. The points inside [5,10] are dimmed.
• They are inside the tolerance and the option Dim points inside the tolerance is selected.
• is available only if the Tolerances option is selected.
• dims the points that are within the tolerance.
• those points can then be hidden with the option Hide dimmed points.
• is available only if the Tolerances option is selected.
• dims the points that are not within the tolerance.
• those points can then be hidden with the option Hide dimmed points.

Reset
Restores the default values.