In the first part of the tutorial, you defined input parameters that link to ACP objects. This section is dedicated to the parametrization of the existing design when reinforcement is required. You will create an unbound input parameter, a custom parameter that is not directly associated with a model property. Then, you will use ACP's Script feature to import the parameter value and modify the reinforcing strips.
Open ACP (Pre). Follow steps 2 to 4 in the earlier tutorial, Defining Parallel Selection Rules, to define two Parallel Selection Rules with the specifications below.
Follow the instructions in Defining a Boolean Selection Rule to create a Boolean Selection Rule with the properties shown below.
Right-click PlyGroup.1 under Modeling Groups in the Tree View, then select Create Ply to define a modeling ply with the specifications below.
Switch to the Rules tab and select BooleanSelectionRule.1 from the Selection rule drop-down menu. Define the other properties as shown, then click Apply and close the dialog.
In the Tree View, right-click Parameters and select Create Parameter (A). In the Parameter Properties dialog, define its Name as
ReinforcementWidth.1
(B). Change the Category to Unbound Input and the Type to Float (C). Click Apply, then close the dialog.Close ACP and go back to Workbench. Double-click the Parameters cell in the ACP (Pre) system (A). In the Parameters tab, edit the value of P11 ReinforcementWidth.1 to
20
(B).Close the Parameters tab. Right-click the Setup cell of the ACP (Pre) system and select Update. Then double-click the cell to open ACP.
In the Tree View, right-click Scripts, then select Create Script.
Note: Scripts enable more complex parametrization than is possible with input parameters alone. You can use scripts to execute Python code as part of updating the model. Scripts are marked for execution whenever a parameter or the script itself changes.
In the Input Script dialog, clear the Source field and paste the script below in the field. Click Apply and close the dialog.
# Get the Unbound Input parameter value model = db.active_model reinforcement_width = model.parameters['ReinforcementWidth.1'].value half_width = reinforcement_width / 2 # Modify the Boolean Selection Rule to get the desired width boolean_selection_rule = model.selection_rules['BooleanSelectionRule.1'] boolean_selection_rule.selection_rules = [ (model.selection_rules['ParallelSelectionRule.1'], 'intersect', True, (-half_width, half_width)), (model.selection_rules['ParallelSelectionRule.2'], 'add', True, (-half_width, half_width)) ]
Update the model to view the reinforcing strips, then close ACP.
Note: In this example, an Unbound Parameter is created and used to parameterize a Boolean Selection Rule. As a result, a Modeling Ply is generated, which consists of unconnected ply domains. Using unconnected plies is not recommended since several downstream features do not support disconnected modeling plies - such as draping, flat wrap, and solid model extrusion. However, this tutorial's example is well suited for demonstrating the usage of Unbound Parameters.
In Workbench, update the project, then double-click Parameter Set.
In the Parameter Set tab, examine the ACP (Post)'s Output Parameters values, and compare the results with the earlier section, Defining Output Parameters in ACP (Post).