Skip to content

Module QualityModule

Georg Muntingh edited this page Aug 24, 2017 · 2 revisions

The GoTools module QualityModule consists of a set of tools for checking the quality of CAD models.

Tolerances

The tests make use of the tolerances associated with a surface model. The two tolerances gap and neighbour refer to distances and should satisfy gap < neighbour. The two angular tolerances bend and kink are given in radians and should satify kink < bend. In each case a factor 10 makes sense if no additional details are known. However, if the gap tolerance is really small, a larger factor should be used.

approxtol: This tolerance is only required by SurfaceModel. The tolerance restricts the approximation error in functions where an approximation is performed. However, the current version of SurfaceModel does not perform pproximation. Thus, the tolerance is superflous and not used. In principle, any value could be given. More appropriate would be to give values in the range $[10^{-4}, 10^{−1}]$ depending on the geometric size of the surface model.

gap: CAD models are seen as continuous if they are continuous within this tolerance. If the distance between two points is less than this tolerance, they are viewed as identical. A reasonable tolerance is in the range $[10^{-6}, 10^{-2}]$, but it depends on the expected quality of a model.

neighbour: This tolerance is used in adjacency analysis and it represents the maximum distance between neighbouring surfaces or curves. If two curves or surfaces have larger distance than this tolerance, the entities are found not to be adjacent. Surfaces that lie closer to each other than the neighbour tolerance are found to be adjacent, but if the distance between the surfaces somewhere is larger than the gap tolerance, the surface set contains gaps. This is then considered an error in the model.

bend: If two surfaces meet along a common boundary and corresponding surface normals form an angle that is larger than the bend tolerance, it is assumed that there is an intended sharp edge between the surfaces. Similarly, if two curves in a composite curve meet with an angle larger than this tolerance, there is an intentional corner.

kink: If two adjacent curves or surfaces meet with an angle less than the kink tolerance, they are considered to be $G^1$ continuous. It the angle is larger than this tolerance, but smaller than the bend tolerance, the intended $G^1$ continuity is broken and it is considered an error in the model. The tolerance depends on the continuity requirements of the application. One suggestion is $10^{-2}$.

Tests

The available quality tests are localized in the class FaceSetQuality, and they can be classified as follows:

Face continuity

Checks for continuity between faces in a surface model. Positional and tangential discontinuities with respect to the gap and the kink tolerance, respectively, are returned. Discontinuities larger than the neighbour tolerance or bend tolerance are assumed to be intentional, and thus no error is reported.

Edge continuity

Checks for positional and tangential discontinuity between edges in the model. The same tolerances are used as for face continuity.

Accuracy of bounding entities

Whether or not the distance between an edge and its associated face, a vertex and its associated edges, and a vertex and its associated faces is less than the gap tolerance.

Acute angles

Check for acute angles between adjacent faces or edges. The kink tolerance is applied here.

Degeneracies

Identify surfaces with boundary curves degenerating to a point and surfaces with degenerate corners. Identify vanishing surface normals and curve tangents, intersections between boundary loops belonging to a trimmed surface and self-intersections of boundary loops. The gap tolerance is used in the intersection and self-intersection tests, while the neighbour and kink tolerances are used in degeneracy tests. The gap tolerance is used in tests for vanishing tangents and normals.

Small entities

Identify small edges, small faces, sliver surfaces, and narrow regions in faces. The narrow region test relates to the neighbour tolerance, while the other tests use specific tolerances.

Consistency of orientation

Check for consistency in loops, i.e., whether the curves defining the loop are oriented from head to tail, or in surface models. For closed face sets, surface normals should either all point out of the model or all point into the model, preferable out. Also open face sets should have consistent surface normal directions at face boundaries.

N.B.: Unfortunately the face orientation test is currently not up-to-date, so that the result cannot be trusted.

Identical entities

Check for identity of vertices, and identical or embedded faces or edges. The neighbour tolerance is used.

Spline entity testing

Check spline curves and surfaces for $G^1$ and $C^1$ discontinuities. The test is localized to knots of high multiplicity. The gap and the kink tolerances are used for these tests. Check also for spline entities with close (but not identical) knots. Such entities can create problems for certain operations. A specific tolerance is used in this test.

Compute curvature information with respect to single entities

The minimum curvature radius and curvature radii less than a given threshold can be obtained. The test is applied to all curve or surface entities in a model.

Clone this wiki locally