Download presentation
Presentation is loading. Please wait.
Published byCaren Gray Modified over 8 years ago
1
Volumize3d Volumize3d Training Lesson 8 - Expressions
2
Volumize3d The Problem Start with an idea of dimensions Build it to given dimensions A small change is requested Major rework required
3
Volumize3d Lifecycle Build, Tweak, Rebuild Avoid undo, undo, redo, redo Solution Set up variables Use variables in expressions Change variables values and rebuild
4
Volumize3d Declare Variables Variables at any level Visible to nodes below Highest level is Module (global visibility)
5
Volumize3d Use Variables Reference variables in Expressions Expression form: ${ variable }
6
Volumize3d Change, Rebuild Change a value, rebuild to see effect Expression variables are resolved by scanning up the tree for a declared variable value, and stop at first found.
7
Volumize3d Expressions Support mathematical operators ${ variable + sin(0.7) + 5 }
8
Volumize3d Planner Expressions can be used in 2D Enter in the inspector Move something: hard number is used
9
Volumize3d Parameters So far we have seen how we can set and use “global” (module) variables. Global variables are convenient but we would need to make individual assemblies and name many global variables to get variations of our assemblies. Using parameters in an assembly we can make one assembly, and call (“use”) it twice or more, passing different values to get different results. Instead of setting the variables globally in the module, we can add parameters to the assembly and give them some defaults. The defaults help visualize the assembly at design time in the absence of real values. Then we can “use” the assembly in another assembly. The calling assembly will pass values into the parameters of the target assembly.
10
Volumize3d Assembly – “Params” An assembly can expose parameters They have defaults
11
Volumize3d Use – “Args” Use an assembly: an arguments table is shown where you can enter parameter values
12
Volumize3d Twice A simple plate used twice in an assembly, each with different args
13
Volumize3d Excercises 1 Create a new project called lesson8 Create a new module Add variables to the module for the dimensions in the diagram Create a simple plate assembly (a cube without rounded corners) matching the dimensions in the earlier diagram by using expressions instead of hard numbers
14
Volumize3d Excercises 2 Create a new assembly and add four long vertical cylinders. Use expressions to set their position and radius. Make a new assembly which is the plate subtracting the cylinders. Build to see a plate with holes. Change some variable values in the module and rebuild to see the change. HoleXYRadius Lower Left${radius_corner} ${radius_hole} Lower Right${plate_length- radius_corner} ${radius_corner}${radius_hole} Upper Left${radius_corner}${plate_width- radius_corner} ${radius_hole} Upper Right${plate_length- radius_corner} ${plate_width- radius_corner} ${radius_hole}
15
Volumize3d Excercises 3 Create a new plan. Use lines, curves and circles to build the plate as per the diagram. Replace the hard numbers with expressions Create a new assembly to extrude the plate. Build. Change variable values in the module and rebuild to see the changes.
16
Volumize3d Excercises 4 Create a new assembly assem_sub. Add a cube to the assembly. Set the assembly to have the following parameters and defaults – plate_length 50 – plate_width 50 – radius_corner 2 Change the cube from hard number to use the parameters Create another assembly assem_main In assem_main use the assem_sub twice passing different arguments.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.