How to use formulas to measure in CATIA

July 7, 2020 Iouri Apanovitch

 

Any CATIA designer worth one's salt knows how to use Measure Item  FormMeasureICON-1 

and Measure Between FormMeasureICON-2tools to make measurements. What is less known is that you can do the same using parameters and formulas, and this is what I will explain in this post.
 

The Engineering Knowledge Language (EKL) used in CATIA’s formulas has a rich set of measurement functions, located in the Measure and the Part Measures sections of the formula editor’s Dictionary, as shown below. For example, there is a distance function that lets you measure distance between any two objects, a length function for measuring length of a curve, an area function for measuring area of a surface or a closed curve, etc.

FormMeasure-1

Although the function signatures as shown in the Members of list may initially seem cryptic, they all follow the same convention that is easy to learn. For example, consider this function:

                                                length (Curve, …): Length

The first word (length) is the name of the function. In the parentheses, you find the function’s input parameters. In this example, it says Curve, which means the function requires a curve as the input parameter. The “three dots” ellipsis symbol () means that the function can take any number of input parameters, i.e. that it could be used to measure the total length of several curves at once. Lastly, after the colon symbol you find the type of the value that the function returns. In this example, it says Length, which means that the function returns a value in length units.

You can look up the detailed descriptions for the functions in the CATIA’s Help system, in the Product Synthesis > Knowledge Advisor > Engineering Knowledge Language section.

FormMeasure-2

 

Now let’s consider a couple of examples. In the first example, I will use a formula to measure the length of the spline shown below.

FormMeasure-3

First, we create a user parameter that will hold the value of the measurement. In the Knowledge toolbar, select the Formula icon. In the New Parameter of type pull-down lists, select Length and Single Value, then click the New Parameter of type button.

FormMeasure-4

Rename the created parameter from Length.1 to a meaningful name, such as SplineLength. To assign the measure value to the parameter, click the Add Formula button to open the Formula Editor dialog box.

FormMeasure-5

In the Formula Editor dialog box, select the Measures section in the Dictionary list and double-click the length(Curve,…):Length function in the Members of list, so it populates the right-hand side in the formula. Note that the space between the parentheses is empty, which means we still need to select an input parameter to pass into the function.

FormMeasure-6

To complete the formula, double-click in the tree the curve you want to measure, so it populates the space between the parentheses in the length function, as shown below.

FormMeasure-7

Click OK twice to close the Formula Editor and the Formulas dialog boxes. The measurement and the formula are displayed in the tree as shown below.

FormMeasure-8

In the second example, I will use a formula to measure the mass of the part shown below.

FormMeasure-9

Similarly to the previous example, we start by creating a new parameter, now of type Mass. I will name it TotalMass. Then I click the Add Formula button to open the Formula Editor.

FormMeasure-10

In the Formula Editor dialog box, select the PartMeasures section in the Dictionary, double-click the smartVolume(elem:Solid,…):Volume function in the Members of list, and double-click the PartBody in the tree to use it as the input parameter for the function.

FormMeasure-11

Since mass is volume times the density of the material, we now need to add the material density to the formula. Add the multiplication operator “star” (*), click the material object in the tree, and double click the material density parameter in the Members of list. The completed formula looks as shown below.

FormMeasure-12

Click OK twice to close the Formula Editor and the Formulas dialog boxes. The parameter and the formula are now displayed in the tree.

FormMeasure-13

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
How to use formulas to construct geometry in CATIA
How to use formulas to construct geometry in CATIA

By Iouri Apanovitch CATIA offers unparalleled capabilities for knowledge-based engineering. Parameters, for...

Next Article
Using Multiple-Value Parameters to control CATIA dimensions
Using Multiple-Value Parameters to control CATIA dimensions

By Iouri Apanovitch In this post, I will explain how to control a CATIA dimension using a multiple-value pa...

×

Sign up for email updates

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