How to use formulas to construct geometry in CATIA

July 16, 2020 Iouri Apanovitch

CATIA offers unparalleled capabilities for knowledge-based engineering. Parameters, formulas, design tables, etc. lie at the very foundation of CATIA, enabling capturing the design intent by creating relations among a model’s dimensions and features.

In this blog post, I will explain how to use formulas not just to link parameter values, but to create actual geometry in CATIA.

The Engineering Knowledge Language (EKL) used in CATIA’s formulas have a variety of constructor functions that enable building geometry using formulas or other types of relations such as Rules and Reactions. For example, there is a set of Circle Constructors for creating circles, Line Constructors for creating lines, Plane Constructors for creating planes, and so on. A snapshot of the Operations Constructors functions is shown below. As you can see, one can perform surfacing operations such as assemble, split, trim, and many others using those functions.

FormConstruct-1

The function signatures as shown in the Members of list follow the same convention that is easy to learn. For example, consider the split function:

 split (tosplit:Surface, splitting:Surface, orientation: Boolean): Surface

The first word (split) is the name of the function. In the parentheses, you find the function’s input parameters. In this example, the first input parameter says tosplit:Surface, which means the function requires a surface as the first input, and the word tosplit implies that that would be the surface to split. The second input parameter says splitting:Surface, which means the function requires another surface as the input, and the word splitting implies that that would be the splitting element. The third input parameter says orientation:Boolean, which means the function requires either true or false as the third input, and the word orientation means that that would determine the side of the split to keep. Lastly, after the colon symbol you find the type of the value that the function returns. In this example, it says Surface, which means that the function’s result is a surface.

If you want to avoid guessing, look up the detailed descriptions for the functions in the CATIA’s Help system, in the Product Synthesis > Knowledge Advisor > Engineering Knowledge Language section.

FormConstruct-2

As an example, I will use a formula to create an intersection curve between a plane and a surface shown below.

FormConstruct-3

We start by creating a user parameter of type Curve. In the Knowledge toolbar, select the Formula icon. In the New Parameter of type pull-down list, select Curve, then click the New Parameter of type button.

Ensure that the created parameter Curve.1 is highlighted in the list of parameters and click the Add Formula button. 

FormConstruct-4

In the Formula Editor dialog box that opens, select the Wireframe Constructors section in the Dictionary and double-click the intersect(Surface, Surface):Curve function in the Members of list, so it populates the right-hand side in the formula as shown below. Note that the space between the parentheses only contains a comma, which means we still need to select the two inputs to pass into the function.

FormConstruct-5

To complete the formula, 1st put the mouse cursor before the comma in the parentheses and double-click the plane in the tree, then, 2nd, put the mouse cursor after the comma in the parentheses and double click the surface in the tree. The plane and the surface names now populate the space between the parentheses in the intersect function, as shown below.

FormConstruct-6

Click OK twice to close the Formula Editor and the Formulas dialog boxes. The intersection curve displays in the model and in the tree as shown below.

FormConstruct-7

The constructor functions in EKL could also be used to create geometry “on-the-fly”, without adding the created geometry to the tree and visualizing it in the model. For example, let’s say I only want to measure the area within the intersection curve, without actually adding the curve to the model.

Start by creating a new parameter, now of type Area. I will name it AreaIntersect. Then click the Add Formula button to open the Formula Editor.

In the Formula Editor dialog box, select the Measures section in the Dictionary, double-click the area(Curve,…):Area function in the Members of list, so it populates the right-hand side in the formula as shown below.

FormConstruct-8

Select the Wireframe Constructors section in the Dictionary and double-click the intersect(Surface, Surface):Curve function in the Members of list. Now the formula should look as shown below.

FormConstruct-9

Complete the formula by providing the two inputs for the intersect function, as I did in my previous example. The result should look as shown below. Note that due to the precedence rules (i.e. the expression in the parentheses is evaluated first), the intersect function is executed first, then its result is used as the input for the area function.

FormConstruct-10

Close the Formula Editor and the Formulas dialog boxes. Note that the area parameter and its value are displayed in the tree, while the actual intersection curve is not. I.e. the intersection curve was computed “on-the-fly”, behind the scenes, and only used to calculate the area.

FormConstruct-11

The use of parameters and formulas in CATIA is covered in the following Rand 3D classes:

About the Author

Iouri Apanovitch

Senior Technical Training Engineer<br><br>His primary area of expertise is product analysis and simulation with FEA tools such as SIMULIA/Abaqus, Autodesk Simulation, Mechanica, including linear and non-linear simulations, dynamics, fatigue, and analysis of laminated composites.

Follow on Linkedin More Content by Iouri Apanovitch
Previous Article
Executing a Manikin Hand Grasp in CATIA V5
Executing a Manikin Hand Grasp in CATIA V5

By Trisha West In this video, Technical Trainer Trisha West steps you through placing an object near the ma...

Next Article
How to use formulas to measure in CATIA
How to use formulas to measure in CATIA

By Iouri Apanovitch Any CATIA designer worth one's salt knows how to use Measure Item and Measure Between t...

×

Sign up for email updates

First Name
Last Name
Country
Thank you!
Error - something went wrong!