Conditionals really are one of the great aspects of the Subassembly Composer and really I think that you are going to end up with a conditional of some sort in every subassembly you make once you realize their functionality (unless of course you are doing a super simple subassembly that is one-size-fits all). But before we dive in, lets make sure that you read Part 1 about putting together the flowchart and Part 2 about setting up and using variables.
With either one of these if you click on it, in the properties pane you can change the display name. I highly recommend this, especially when you have a bunch of conditionals that you are working with. It helps you figure out which one is which at a glance in your flowchart. For the “Cut or Fill” conditionals, I like to just add the point name at the end (ex. “Cut or Fill P20”) and for the “General Condition” I tend to put a simplified version of the VB expression that the general condition is analyzing.
Decisions always directly follow conditionals. The true (or cut) always comes out the left side and false (or fill) always comes out the right side. And speaking of renaming, you can also rename these by clicking on the decision and making the change in the properties pane. This little bit of user customization can really help you work out how your program is (or isn’t as the case can sometimes be) working.
“Cut or Fill” Conditional Properties pane:
Decision Properties pane (connected to a “Cut or Fill” conditional):
Lets talk about some scenarios where you might want to use a conditional:
EXAMPLE WITH CUT OR FILL CONDITIONAL
You need to slope up from point P1 to the surface if point P1 is in cut and slope down from point P1 to the surface if point P1 is in fill. To do this you would make sure you have already defined point P1 and then you put use a “Cut or Fill” conditional comparing point P1 to the surface (you define the target surface variable under the “Target Parameters” tab). Then you place a “Decision”. For the cut side of the decision you put point P2 and assign it a positive slope (use a variable for end user customization!) and a link connecting point P1 to point P2. Then for the fill side of the conditional you put point P2 (it’s going to default to point P3 but I like using the same point number for the same “type” of point, this is going to be your daylight point for both cases). To make things convenient to discern in the preview pane, I like to make the display name for the two P2 points different. Since I lack creativity I would probably name them P2CUT and P2FILL or something equally as informative yet simple. While we are talking about the preview pane go ahead and change the preview value of the Surface on the “Target Parameters” tab, a positive value should result in P2CUT showing and a negative value should result in P2FILL showing, assuming point P1 was at 0,0.
EXAMPLE WITH GENERAL CONDITIONAL
You want to the end user to decide whether you want the subassembly to include a shoulder component before using the daylight slope component. So you can set a boolean input variable called UseShoulder. Then you use a General Conditional and as a VB expression you just type UseShoulder. Put the subassembly components under the true decision arrow and then the daylight components under the false decision arrow. This is a good time to realize that components have multiple connection in points. So instead of redefining the daylight components to use after the shoulder is combined, you can connect back into the same components after defining the shoulder. Here is the preview with a target surface = -1 and UseShoulder = True: Here is the preview with a target surface = -1 and UseShoulder =False:
And if you change the target surface to = 1 here are the same two images:
Stay tuned for some tips on actually using all of these subassembly files you have been making!