Attaching Entities to CAD Surfaces

Introduction 

FRED’s CAD import feature transfers geometry from STEP or IGES files in the form of parametric curves and surfaces. These curves and surfaces are based upon the NURBs representation common to all CAD software. During import, FRED makes no attempt to identify surface types and substitute native geometry. All CAD objects retain their original representation as NURBs.  As a result, imported objects all share a common coordinate system; namely the Global Coordinate System. The fact that there are no local coordinate systems associated with CAD geometry undermines the ability to “attach” Analysis Surfaces or position other entities at the location of a CAD object. The purpose of the article is to provide a method for properly locating and orienting an entity with respect to CAD geometry.

Explanation

Imported CAD geometry is added to FRED’s Geometry folder as either Trimmed Parametric or B-spline surface types. These surface types are defined in terms of parametric coordinates U & V which often have no obvious connection to Cartesian coordinates X,Y & Z or surface normal. So the task is to determine X,Y & Z coordinates and surface normal vector direction at the point of interest on the CAD surface. Luckily, FRED’s script language provides access to this information. The script included with this article is designed to prompt the user for the CAD surface name, the name of the source, surface or Analysis Surface to be re-positioned and values for U & V. Some experimentation may be required to determine the appropriate U & V values. For plane-symmetric surfaces, U=0.5 & V=0.5 will correspond to the center. 
As an example, consider the pipe shown in Figure 1 which was imported from a STEP file. The problem is then to position an Analysis Surface on the pipe end cap opposite the cube "Geometry.pipe.Document: brep_1 1.TrimSurf 12". Simply dragging-and-dropping the Analysis Surface from the Analysis Surface(s) folder onto the TrimSurf12 entry in the Geometry folder results in the Analysis Surface remaining at the global origin.  

The script UV_2_XYZ.frs which accompanies this article queries a CAD surface using the command ExplicitSurfEval. When run, the script prompts the user to specify the CAD surface to “attach to”and the entity to “attach” as shown in Figure 2. A second dialog (Figure 3) displays the UV coordinate limits and allows values to be entered. Selection of UV coordinates is largely trial-and-error, however, mid-range values are a good starting point. In this example, U=0.5 & V=0.5 conveniently locates the Analysis Surface at the center of the end cap as shown in Figure 4. 

Closing Remarks

The functionality offered by this script greatly simplifies positioning and orienting entities with respect to imported CAD surfaces. At some point, this will become a permanent feature in FRED’s GUI. 

Download the FRED Script:   UV_2_XYZ3.frs

Still need help? Contact Us Contact Us