Procedural Concepts of User Defined Functions in a Machining Process

During the definition of a Machining Process, you can associate Knowledge expressions to Machining Operations. These expressions have the form of Formulas, Checks and Tool Queries.

See Also
Using Knowledge in Machining Processes
Using User Defined Functions

Preparation:

  • Open the Generic Part.
  • Identify and define the User Feature on generic shape.
  • Associate a type with User Feature to ensure the oneness.

Creation of Machining Process:

  • Select NC Machine Programming application.
  • Create Machining Process.
  • Define the Machining Operation,
    • For each operation define Tool query, associate Formula, and Check (the definition of knowledge expressions remains unchanged).
    • Define Geometrical expressions inside the panel of Machining Operation. For each geometric parameter of the geometry, Strategy or Macro tab, select one of the input or output parameters of the User Features defined in the product.
  • Save the PPR and send the Machining Process to a library class.

Use of Machining Process:

  • Open the Product or Part to machine.
  • Instantiate all the User Features useful for machining the part.
  • Select NC Machine Programming app, and create or load a machine.
  • Apply Machining Process to selected User Features.

By default, each feature or User Feature from the selected list is applied to each eligible operation (depending on defined checks).

Example:

Note: the example is not a best practice but aims to illustrate the behavior of the function.

Machining process including:

  • Drilling.1 geometrical expression defined on UDF2.
  • Pocketing.1 none geometrical expression.
  • ProfileContouring.1 geometrical expression defined on UDF3 and UDF4.

Applied to selected feature:

  • Prismatic Area1 (PMA1)
  • UDF2
  • UDF3
  • UDF4

Results in following Operation list:

  • Drilling.1 (created, but no geometrical link because not compatible with PMA1)
  • Pocketing.1 on PMA1
  • ProfileContouring.1 (created, but no geometrical link because not compatible with PMA1)
  • Drilling.2 on UDF2
  • Pocketing.2 (created, but no geometrical link because not compatible with UDF2)
  • ProfileContouring.2 (created, but no geometrical link because not compatible with UDF2)
  • Drilling.3 (created, but no geometrical link because not compatible with UDF3)
  • Pocketing.3 (created, but no geometrical link because not compatible with UDF3)
  • ProfileContouring.3 on UDF3 only (the link to UDF4 is not defined)
  • Drilling.4 (created, but no geometrical link because not compatible with UDF4)
  • Pocketing.4 (created, but no geometrical link because not compatible with UDF4)
  • ProfileContouring.4 on UDF4 only (the link to UDF3 is not defined)

Note: there is no check defined in this example, therefore all operations are eligible.

It is possible to group User Features as input of each eligible operation if links have been set to several User Defined Features from the same operation of the machining process.

Example 2: Machining Process including:

  • Drilling.1 geometrical expression defined on UDF2.
  • Pocketing.1 none geometrical expression.
  • ProfileContouring.1 geometrical expression defined on UDF3 and UDF4.

Applied to selected feature:

  • PMA1.
  • UDF2.
  • Group (UDF3,UDF4).

Results in following operation list:

  • Drilling.1 (created, but no geometrical link because not compatible with PMA1)
  • Pocketing.1 on PMA1
  • ProfileContouring.1 (created, but no geometrical link because not compatible with PMA1)
  • Drilling.2 on UDF2
  • Pocketing.2 (created, but no geometrical link because not compatible with UDF2)
  • ProfileContouring.3 (created, but no geometrical link because not compatible with UDF2)
  • Drilling.3 (created, but no geometrical link because not compatible with UDF3 and UDF4)
  • Pocketing.3 (created, but no geometrical link because not compatible with UDF3 and UDF4)
  • ProfileContouring.3 on UDF3 and UDF4

Note: there is no check defined in this example, therefore all operations are eligible.

A group can contain several UDF (same type or different types) but a group cannot mix UDF with other machining features. If the Machining Operation in the machining process references several User Features of the same type, the link is applied according to the selection order.

If the Machining Operation in the Machining Process expects less User Features than selected in the group, the Machining Operation references the first User Feature of the same type in the group (and ignores the remaining one in the group).

Example: Machining Process including:

  • Drilling.1 geometrical expression defined on UDF2.
  • Pocketing.1 none geometrical expression.
  • ProfileContouring.1 geometrical expression defined on UDF3 and UDF4.

Applied to selected feature:

  • PMA1.
  • Group (UDF2, UDF3,UDF4).

Results in following operation list:

  • Drilling.1 (created, but no geometrical link because not compatible with PMA1)
  • Pocketing.1 on PMA1
  • ProfileContouring.1 (created, but no geometrical link because not compatible with PMA1)
  • Drilling.2 on UDF2
  • Pocketing.2 (created, but no geometrical link because not compatible with UDF2,UDF3 and UDF4)
  • ProfileContouring.3 on UDF3 and UDF4

Note: There is no check defined in this example, therefore all operations are eligible.