CAD surface traceability
CAD surface types and organization
When geometry has been imported from a CAD model, the resulting objects are represented using B-Spline and Trimmed Parametric surfaces. B-Spline surfaces are flexible polynomial functions used by CAD packages to describe arbitrary surface shapes, where "control points" floating in space push and pull on the surface profile to bend it to the desired shape. Trimmed Parametric surfaces are an extension of B-Splines, where curves are projected onto the B-Spline surface and trim away unwanted portions of the B-Spline.
The image below shows the object tree after a CAD import, where surfaces of type B-Spline and TrimSurf can be seen.
Right mouse clicking on TrimSurf 17 and choosing the option, "Trimmed Parametric Surface Set Expanded View (recursive)" will result in the following object tree view.
Recall from above that the Trimmed Parametric surface is the result of a B-Spline surface having been trimmed by boundary curves. In the expanded tree view above there is a collection of curve nodes and a B-Spline surface sitting above the TrimSurf node that was expanded. The two Composite Curve nodes represent the inner and outer boundaries of the final Trimmed Parametric surface and the B-Spline node is the base surface that gets trimmed. Note that the B-Spline surface is marked as Never Traceable (greyed out, with a red X icon and a pair of scissors next to it). To be clear, the surface that gets raytraced is the TrimSurf node, which is the object that results from trimming the B-Spline surface with the Composite Curve nodes. Consequently, the B-Spline surface associated with each TrimSurf should be Never Traceable.
By default, FRED will keep the tree view in its Compact state, hiding the curve and B-Spline nodes associated with each TrimSurf from view.
Toggling Never Traceable (oops...)
The figure below shows (again) the initial state of the object tree and model 3D view after importing a CAD model. So far, so good.
If, however, you were to mark the top-level subassembly node LS50_Telescope as Never Traceable and then come back later and remove the Never Traceable flag, your object tree and model 3D view would look like that shown below.
Although the object tree itself show no sign of changes, the model 3D view has clearly changed; the open apertures along the length of the telescope tube are now obscured by surfaces which were not previously visible.
The new surfaces in the 3D view are the B-Spline surfaces associated with each Trimmed Parametric surface on the object tree. From above, these B-Spline surfaces are normally flagged as Never Traceable and are therefore not observed in the 3D view or included in the raytrace. However, as a consequence of toggling the Never Traceable flag (twice) on our object tree for this structure, we inadvertently activated those B-Spline surfaces. This can bee seen in the image below, where we have re-expanded the object tree view for TrimSurf 17.
Although we could repair this mistake by visiting each TrimSurf node, expanding the view, and marking the accompanying B-Spline surface as Never Traceable, this would be too laborious and error prone in practice.
The attached example file contains the imported CAD geometry shown in the graphics above, where the TrimSurf nodes have inadvertently had their associated B-Spline surface partners activated for raytracing. Included in the file is an embedded script called, "Repair Trimmed Parametric", which loops over all surface in the model and sets each of B-Spline surfaces associated with a Trimmed Parametric to be Never Traceable. This restores the CAD geometry to the same state it was when imported.
Example FRED file: RepairTrimSurfs.frd