Visual Edges Smoothing

Coming from the idea of 3D printing, the solids created with trCAD inherently are meshes build of triangular elements. This implies that their surfaces don't contain any "real" curvatures. However under certain circumstances, it may be of interest to show visually smooth surfaces, especially since some renderes exaggerate the "edginess" of such meshes significantly.

An easy way for doing this is to apply the "visual smoothing mechanism" of trCAD. This uses the technique of normal interpolation to (visually) smooth out edges along a surface.

The visual smoothing mechanism can be turned on with the document variable render_vis_smooth:

Example

document.render_vis_smooth = true

Of course, not all edges of a solid should be smoothed out. A cylinder e.g. contains three surfaces that should be smoothed out in themselves (top and bottom lid and side face) but the edges connecting them must stay sharp:

Two identical cylinders, one without (left) and one with visual smoothing (right).

By default, many solids created with trCAD already "know" correctly which of their subsurfaces need be smoothed and which edges should stay unsmoothed. However, this is not always the case (e.g. when the solid was imported from a mesh file). Then, the vis_smoothfunction can be applied to smooth out either the whole solid or certain surfaces on it.

It should be emphasized again that the procedure described in this section only affects the visual appearance of the respective solids. It does not change the real tesselation of the surfaces. For more information about changing the tesselation precision see section 'Tesselation'.

See also