powered by CADENAS

Manual

Manual

7.8.10.2. Using mathematical function in Sketch or Attribute algorithm?

Often you have the option to create a sketch with or without using an Attribute algorithm. A calculation can be processed directly in the sketch or be assigned to a specific variable via attribute algorithm.

[Note] Note
  • You can use mathematical functions in the sketch. This functionality is saved in the 3db file. An overview on all possible functions can be found under Section 15.1, “PARTdesigner-Expressions ”.

    Just as well you can use mathematical functions in attribute algorithms. This functionality is saved in the tab/tac file. An overview on all possible functions can be found under Section 7.8.11.1, “Mathematical functions (Attribute algorithm) ”.

    The functional range of both options is similar, but not quite identical.

  • The result in the 3D model is identical.

  • Functions used in the sketch remain invisible to the outside.

  • Functions used in attribute algorithms can be controlled via table.

  • Mathematical function in sketch [83]

    When using only variables without attribute algorithms you can create a sketch using Save location "Only in geometry". The color code shows, that the variables H and L2 have been saved in the 3db file.

    The circle radius shall have the double height as the rectangle. The calculation is directly processed in the sketch.

    Radius: 2*H

    Mathematical function in sketch

    Mathematical function in sketch

    Later you will possibly save with Save location "In geometry and table". With Save location "In geometry and table" you can use Value range variables and Attribute algorithms in addition and create a table.

    Variables saved with Save location "In geometry and table"

    Variables saved with Save location "In geometry and table"

    [Note] Note

    Conclusion: With Save location "Only in geometry" you can get the 3D object very easy. For simple parts or for testing purposes this may be the adequate approach.

  • Mathematical function in attribute algorithm [84]

    Using variables with an Attribute algorithm requires a different approach. In the following the same part is used as above, but now with the use of an attribute algorithm.

    Start with the creation of the variables with Save location Only in table or In geometry and table.

    When creating the variables, under Save location, select the option "Only in table" or "In geometry and table". Fill out the fields and finally click on "Commit".

    When creating the variables, under Save location, select the option "Only in table" or "In geometry and table". Fill out the fields and finally click on "Commit".

    You can recognize at the color code where the variables L2, H and R are saved. For the creation of the table, using the option Save location "Only in table" (color code ) is sufficient. Data is saved in the tab/tac file.

    However, if variables shall also be used in the 3D model, they have to be saved both in the 3db file and in the tab/tac file. You can ensure saving in both by selecting a variable, choosing Save location "In geometry and table" and clicking on Commit.

    You can recognize at the color code , that the variables have been saved with Save location "In geometry and table".

    To process the mathematical operation R = 2*H (circle radius is 2x height of rectangle) the variable R is created with Status "Attribute algorithm".

    Under Equation the algorithm is entered, under Status the option Attribute algorithm.

    Now the variable R can be used in the sketch for the parameter entry of the circle radius.

    Variable "R" with Attribute algorithm

    Variable "R" with Attribute algorithm

    Optionally, the Variable R with Attribute algorithm can be displayed in PARTdataManager.

    1. In PARTproject, under Edit project -> tabbed page General -> section Variables -> Order/Groups of Variables, click on the browse button ....

      -> The same named dialog box opens.

    2. On the left side, select the group Secondary variables and then move the variable R into the middle field. Details on this can be found under Section 5.9.2.3.2, “ Order/Groups of Variables - Hide columns (variables) ”.

    3. Finally confirm with OK.

    4. Open PARTdataManager.

      The variable R is displayed in the table.

      [Note] Note

      Conclusion: When using Attribute algorithms you have to work with Save location "Only in table" or "In geometry and table". Then you have the possibility to control the model via table.

      Regarding the 3D model itself the mathematical calculation could have been processed in the sketch just as well (compare above).



[83] The adequate example on this can be found in the "Training" catalog under \v11_news\expression_in_sketch_or_algorithm\expression_in_sketch.prj.

[84] The adequate example on this can be found in the "Training" catalog under \v11_news\expression_in_sketch_or_algorithm\expression_in_algorithm.prj.