 |
Display Tolerances |
|
Contents
[back to top]
50.1 Introduction
The rendering functions PK_GEOM_render_line and PK_TOPOL_render_line allow tolerances to be specified, to be used when rendering curves in a part. These approximation tolerances control the accuracy of the
polyline representation of the curves.
The curve approximation tolerances chosen for the rendering functions have an effect on:
-
quality of output
-
performance
[back to top]
50.2 Curve approximation tolerances
The quality and performance of rendering within PK_GEOM_render_line and PK_TOPOL_render_line are controlled by these options:
Field |
Value |
Description |
curve_chord_tol
|
chordal tolerance for curves
|
This is the most important value affecting the quality of the image. It gives an upper bound on the distance from each chord to the curve it is approximating. It also gives an upper bound on the maximum deviation in the image of approximated silhouettes from the true accurate silhouette. Silhouettes are approximated on complex geometry, including B-surfaces, offset surfaces and blends.
|
curve_chord_max
|
maximum length of chord
|
This is an upper bound on the length of a chord used in the approximation of a curve.
|
curve_chord_ang
|
maximum angle between adjacent chords
|
This limits the angular error between a curve and a chord in its approximation. It is an upper bound on the sum of the two angles formed between the chord and the curve tangent at each chord end.
|
These options control the representation of curves as polylines, both as output through the GO and internally in the rendering functions. They also control the accuracy of silhouettes on general surfaces.
Note: The values of these tolerances, in particular the chordal tolerance, may significantly affect the performance of the rendering functions, particularly on parts containing complex geometry. An application may well decide to use more accurate rendering for hardcopy output than it would for dynamical display purposes.
Because the algorithms use the polyline approximations to general curves internally, apparent inconsistencies in the image of size equal to or less than the chordal tolerance may appear. These are eradicated by reducing the chordal tolerance.
|
[back to top]
50.2.1 Default settings
If these options are not specified a default angular tolerance is used, and a default chord tolerance chosen if necessary. The defaults chosen by Parasolid are designed to optimize performance and memory usage for normal display purposes.
Default setting |
Corresponding field |
is_curve_chord_tol = PK_LOGICAL_false
|
curve_chord_tol
|
is_curve_chord_max = PK_LOGICAL_false
|
curve_chord_max
|
is_curve_chord_ang = PK_LOGICAL_false
|
curve_chord_ang
|
One or more of these fields can be set to the value PK_LOGICAL_true, with the corresponding fields set to a non-zero positive value.
[back to top]
50.3 Rendering and picking
The picking function PK_BODY_pick_topols can be used to simulate face, edge and vertex picking from the viewing screen:
-
Entities which have been rendered by PK_TOPOL_render_line can be checked for intersection or proximity to a ray, which passes through the current view point and in the current viewing direction.
-
PK_BODY_pick_topols should be supplied with
the same tolerance values as used by PK_TOPOL_render_line.
See Chapter 51, "Picking Topology", for further information on selecting entities in this way.
[back to top]