Surface height profiler

This knowledge base article describes a utility which calculates the surface sag for each pixel in a 2D grid placed over the entity’s outer trimming volume. 

The script calculates the sag data for all entities selected on the object tree at the time of execution if the selected entity is a surface. The resulting data grid for each surface is stored in an Analysis Results Node (ARN), displayed in FRED’s chart view as well as in the 3D visualization view for context.

The pseudocode for the script is the following:

  1. User specifies A and B grid sampling
  2. Loop over all entities on the object tree to see if any surfaces are highlighted
  3. For each selected surface:
    a. Retrieve the outer trimming volume dimensions and shape
    b. Create the ARN which will store the resultant data
    c. Print to the output window relevant information for the calculation
    d. Loop over each pixel in the analysis grid and determine if the position lies within the trimming volume boundary for each specific shape (Box, Zcylinder, Ellipsoid)
    e. Compute sag for x,y grid position or fill with a hole value
    f. Send the 2D data grid into the ARN
    g. Set the ARN’s origin position, orientation and descriptors
    h. Display the ARN in the chart view and the visualization view
  4. Re-set the “loop flag” so that the error catching loop is not re-entered
  5. Print status to the output window

The script is designed to operate on each surface currently selected in the object tree at the time of the script’s execution.

For convenience, a quick-launch toolbar button for executing embedded scripts ( ) can be added to the toolbar by going to Menu > View > Toolbars and then checking the Embedded Scripts option.

A screen capture of the 3D visualization view with sag data displayed for one of the surfaces from the provided example file is shown below.

Pixels outside of the trimming volume bounds are populated with “hole” values while pixels inside of the trimming volume bounds are populated with the z-sag for the corresponding (x,y) position on the grid. Positions on the grid for which the surface does not exist are also populated with hole values.


Still need help? Contact Us Contact Us