The visualization module of Analysis Situs is based on VTK (Visualization Toolkit) [Schroeder, 2006], which is a widely-used and industrially proven open-source library. Analysis Situs adds the CAD-oriented data processing pipelines to specialize the generic VTK engine for Computer-Aided Design use cases. The main contribution of Analysis Situs in this regard is adding a set of data sources that convert precise B-rep geometries to the polygonal format of VTK. In this chapter, we give an overview of the visualization techniques available in Analysis Situs.
By default, Analysis Situs comes up with a shaded display mode having edges rendering enabled.
The display mode of the active CAD part can be tuned in the Parameter Editor.
One important setting that is related to both visualization and interactive selection is the "Use scalars" flag. If disabled, the per-element colors are not rendered. Since the highlighting mechanism is also based on scalars, it will not show up as well. The following image illustrates the rendering view without scalars. As you can see, shape anomalies are not accented anymore with the red color.
To enable the visualization of the B-rep facets backing the precise geometry, press "W" ("wireframe") key whenever the focus is set to the viewer. To get back to the shaded view, press "S" ("shading").
The "W"/"S" toggle is applied only to the actors that are currently visible on the scene. If you want to keep the visualization of facets enabled for a dedicated object while keeping others shaded, temporarily hide them from the scene and use the toggle.
Hidden line removal (HLR)
To render the current Part's hidden line view, press the "H" ("hidden") key. The "Alt + H" combination is reserved for a discrete HLR that is intended to perform faster at the cost of precision loss. Pressing the "H" button starts HLR in two threads: one for the "precise" mode and one for the discrete mode. The application sets up a timeout for both threads. You may configure this timeout (in milliseconds) in the root "Analysis Situs" Node. Often, the precise HLR exceeds the timeout, while the discrete mode does not. In this case, the discrete HLR view will be displayed. If you wish to enforce the precise mode, consider increasing the default timeout (0.5 seconds).
To preserve the HLR projection of a part with all hidden edges shown, navigate to the root Node ("Analysis Situs" in the project tree) and enable the "Project hidden edges" flag:
For example, a planar part with normal HLR is projeced as follows:
Enabling the extraction option for the hidden edges allows you to view certain potentially unexpected features in the part's thickness:
To disable vertice visualization for the projection, pick the "HLR" Node in the project tree and set the display mode to "Pure wireframe":
The visualization results become cleaner, i.e., the vertices of the projected edges are no longer rendered.
"Black box" HLR
Press "B" (precise) or "Alt + B" (discrete) to view all HLR projections in "black box" mode. All six projection views are created and placed on the sides of the active part's bounding box. It should be noted that box projection uses the configured timeout for each of 6 HLR invocations.