Model.morphrecalculateconstraints#
- Model.morphrecalculateconstraints(type)#
Recalculates out-of-date morph constraints.
This may be necessary either because they have been edited or because the entities they reference have been changed. Once recalculated, the morph constraints will be applied to the model with respect to the current state of the model rather than a previous state.
HyperForm keeps track of which morph constraints need to be recalculated and recalculates them at the appropriate times. However, HyperMorph may call this function as part of internal calculations and so it may get written out to the command file. Thus, scripts which emulate steps taken from the command file should contain this function in order to ensure proper execution.
- Parameters:
type (int) –
0 - Recalculate all morph constraints
1 - Recalculate only pinned type constraints
2 - Recalculate only tacit type constraints
3 - Recalculate only pinned and tacit type constraints
4 - Recalculate only CFD type constraints
5 - Recalculate only CFD and pinned type constraints
6 - Recalculate only CFD and tacit type constraints
7 - Recalculate only CFD, pinned, and tacit type constraints
8 - Recalculate only match type constraints
9 - Recalculate only match and pinned type constraints
10 - Recalculate only match and tacit type constraints
11 - Recalculate only match, pinned, and tacit type constraints
12 - Recalculate only match and CFD type constraints
13 - Recalculate only match, CFD, and pinned type constraints
14 - Recalculate only match, CFD, and tacit type constraints
15 - Recalculate only match, CFD, pinned, and tacit type constraints
Example#
Recalculate all morph constraints in the model#import hm import hm.entities as ent model = hm.Model() model.morphrecalculateconstraints(type=0)