Variables and Expressions 


SolidCAM enables you to use variables and expressions in your operation templates.

Variables

All variables can be divided into two groups depending on the way values are given to the variable.

  • Part parameters 

SolidCAM enables you to use a set of the standard built-in variables. All these variables get their values from the SolidCAM CAM-Part when you insert the Machining Process.

  • clearance_plane - the Z-value of the Clearance Level.
  • safety - the Z-value of the Safety Distance.
  • tool_start_plane - the Z-value of the Tool Start Level.
  • work_upper_plane - the Z-value of the CAM-Part Upper Level.
  • work_lower_plane - the Z-value of the CAM-Part Lower Level.
  • zero_plane - the Z-value of the Zero Level.
  • User-defined parameters 

You can define your own variables and use it in Operation Templates definition.

SolidCAM supports the following types of variables:

 Profile Geometry variables are available for Profile Operation Templates.

 Slot Geometry variables are available for Slot Operation Templates.

 Limit Geometry variables are available for the Working Area definition in 3D Milling operation templates.

 3D Model Geometry variables are available for 3D Milling operation templates.

 Section Geometry variables are available for Section geometry in Slot operation templates.

 Drill Geometry variables are available for Drilling operation templates.

 Pocket Geometry variables are available for Pocket operation templates.

  Z-Value variables enable you to store the Z-coordinates. The value of a variable of this type can be defined by picking on the solid model; the Z-coordinate of the picked position is used as the variable value.

 Distance Value variables enable you to store the distance. The distance can be defined by picking two positions on the solid model.

  String variables are used to store strings of symbols.

   Float variables are used to store positive and negative floating point numbers.

   Integer variables are used to store positive and negative whole numbers.

Tool Number variables are used to store the positive whole numbers used for the tool number definition.

Diameter variables enable you to store the diameters. The diameter value can be defined by picking a circular edge on the model.

Enter the names for variables according to the following rules:

  • Use a letter as the first character;
  • Only capital and lowercase English letters, numbers and the underscore symbol (_) are acceptable;
  • Names cannot exceed 255 characters in length.

Expressions

SolidCAM enables you to use expressions for parameters definition.

You can use the following symbols in expressions:

  • Addition (+)
  • Subtraction (-)
  • Multiplication (*)
  • Division (/)

Parentheses are acceptable.

When multiplication and division occur together in an expression, each operation is evaluated as it occurs from left to right. When addition and subtraction occur together in an expression, each operation is evaluated in the order of appearance from left to right. Parentheses can be used to override the order of precedence and force some parts of an expression to be evaluated before others. Operations within parentheses are always performed before those outside. Within parentheses, however, operator precedence is maintained.

SolidCAM enables you to use the set of standard mathematical functions such as sine, cosine, etc. in your formulas.

Functions list

  1. Standard functions

 

Example:

For the H_center variable in the following formula you can write the following expression:

 

H_center=(D_chamfer/2)/(tan(Alpha/2))