Curved Clip Plane … How To

In analyzing internal flow through ducts, pipes, or passages, it is quite often useful to take a sectional cut through based on the centerline of the duct.

The section definition (shown at left by the red line) is used to look at values on the typical path of interest, or within a passage.

This document briefly demonstrates both the manual method to create a clip driven by this curve, as well as describe a GUI driven tool which is meant to automate the process.


The basic mechanisms used here is to first use a point part to describe the curved clip. The point part is then converted to a 1D line, and then extruded into the fluid domain. Once extruded, an EnSight function (DistToPartElem) is used to create a scalar field within the domain corresponding to the distance from the fluid domain to this extruded part. An isosurface of 0.0 DistToPartElem is then created, resulting in a new derived part corresponding to this curved clip.


The GUI driven python script automates this process, along with a few constraints/assumptions for ease of use. The GUI allows the user to specify the point part either from a file or created from the current available point parts. The GUI then prompts for direction and distance to extrude the part, and then proceeds through the same process used during the manual generation. Either method returns the same part. The resulting curved clip (shown the right) can then be used, colored, or interrogated just like any other created part.

A video tutorial, along with the python script and example dataset can be found on our website tutorial section.

A video tutorial of this exercise can be viewed from this location:

The example dataset (including python script) can be obtained from :


An example manifold was used for this short tutorial. To work through the method manually, the following steps are used:

  1. Create a point part which will describe the path of the clip. This point part can be created by either reading in from an external file, or via interactive mouse clicks. The amount of points used will determine the level of curvature used to describe the curved clip (more points will result in a smoother curve).
  2. Once the point part has been created, use the Feature Detail Editor to change the point representation from “input dataset” to “mesh the points to create a line mesh”.
  3. With this new 1D line selected, go to the extrude function. Extrude this 1D line via the vector and distance desired into the domain. This distance could be further than the model, but should be large enough to extrude through the whole model.
  4. With the extruded part selected, use the predefined function “Normal” to create a normal vector field for this extruded part. This will allow EnSight to calculate a signed distance from the fluid field to this extruded part.
  5. With this newly created extruded part, and the main fluid part(s) selected, use the predefined function called “DistToPartElem”. Follow the instructions given for its creation. You should enter the part id for the extruded part as the “source”, and the Normal Vector variable as the signed vector. The result of this will be a scalar field in the fluid part(s) which corresponds to the minimum distance from all parts in the fluid part(s) to the extruded part.
  6. With the fluid part(s) selected, create an isosurface of this “DistToPartElem” variable, with a value of 0.0. The resulting isosurface describes the clip through the domain at zero distance to the previous extruded part. You could use another value besides zero, and you will obtain a surface at some distance away from the extruded part.

The above method fairly generic, but also laborious if done over and over, or some time has elapsed since you last did it, and you have forgotten. Therefore, a GUI driven python routine was developed to help automate the process and allow the user to use this process periodically. The python routine should provide an easier tool to use.

The Python script is contained within the Example dataset download. You can place both the .py file and the .png file into your UserDefinedTool area, and thus access this capability directly from the UserDefinedTool. You will have an icon:

When double clicked, the user will be prompted with two separate GUI windows. Window #1 asks where the point part should come from (read in from a file, or already generated):

Once the user answers, the following GUI is opened. This GUI will differ slightly if the user has chosen to read the part in from a file (the “Select Point Part Defining Section” will read “Point part file” and file browser available.

The parent part selection will be through which the DistToPartElem calculation and isosurface will be created. The direction vector and distance input describes the direction and distance to extrude the 1d line.

The process of “DistToPartElem” is an n^2 function, and as such is a somewhat lengthy process. In this small example model, this portion of the routine takes 15-20 seconds to complete, which is 5-10x longer than the remaining steps in the process.

You will note that there were two “intermediate” parts created during the process. The point part and extruded part were used within the calculation, but not explicitly useful at the end of the process. The process relies on a ‘extruded’ 1D part. You cannot therefore easily describe this curved clip with two curves, or curves in more than 2 directions.

The resulting curved clip can be quite useful:


Note: Spring 2011, I modified the routine to allow a rotational extrusion rather than Cartesian one. This will allow turbo type customers to generate their curved clip planes in a cylindrical sense.

Leave a Reply