# BrepDeviationMeasure class

Namespace: [Rhino.Geometry](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.geometry.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
public sealed class BrepDeviationMeasure
```

The deviation from one Brep to another, measured at points sampled on the first. The deviation at a sample is its distance to the closest point of the other Brep. When the sample is past a naked edge of the other Brep by no more than the tolerance, it is the distance along the normal of the edge's face, and the sample's line ends on that face's tangent plane at the edge, off the other Brep by no more than the tolerance. A sample has no counterpart when that closest point is on a naked edge of the other Brep and the sample is past the edge by more than the tolerance, measured in the tangent plane of the edge's face. These samples are where the Breps do not overlap. They are counted, but are not part of [BrepDeviationMeasure.Maximum](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/maximum.md) or [BrepDeviationMeasure.MeanDeviation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/meandeviation.md).

## Properties

- [Maximum](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/maximum.md): The sample with a counterpart with the largest deviation, refined to a local maximum. Its [BrepDeviationSample.Component](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationsample/component.md) is an edge when it is within the tolerance of an edge of the measured Brep, other than a seam, and a face otherwise. An empty sample when no sample has a counterpart.
- [MaximumOutside](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/maximumoutside.md): The sample without a counterpart with the largest deviation. Not refined. An empty sample when there are none.
- [MeanDeviation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/meandeviation.md): The mean deviation of the face samples with a counterpart, weighted by area. NaN when there are none.
- [Mesh](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/mesh.md): When [BrepDeviationOptions.SampleMesh](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationoptions/samplemesh.md) was true, the face samples as a mesh. Each face's samples are a grid, joined into quads. Points on the sides of the grid, and where the face's trims cross the grid lines, are added so the mesh reaches the sides and the trims, with straight segments between those points. They are evaluated and refined from like samples, also when SampleMesh is false, but are not samples. A trim feature smaller than a grid cell can be covered by the mesh or missed by it. Edge samples are not in the mesh. The point of [BrepDeviationMeasure.Maximum](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/maximum.md) is a vertex when its face has mesh faces, and no vertex deviation is larger than its. Otherwise, or when the mesh has no faces, null.
- [OutsideCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/outsidecount.md): The number of samples without a counterpart.
- [OverlapCount](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/overlapcount.md): The number of samples with a counterpart.
- [Samples](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/samples.md): When [BrepDeviationOptions.KeepSamples](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationoptions/keepsamples.md) was true, every sample. Otherwise empty. The mesh's extra vertices are not samples.
- [VertexDeviations](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/vertexdeviations.md): The deviation at each vertex of [BrepDeviationMeasure.Mesh](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepdeviationmeasure/mesh.md), NaN where the vertex has no counterpart or its closest point on the other Brep was not found. Empty when there is no mesh.
