Model.add_remove_distance_manipulator#
- Model.add_remove_distance_manipulator(mode, point_entity1, point_entity2, lock_turnover, reserved)#
Adds or removes distance (dimension) manipulators between two surface vertices.
- Parameters:
mode (int) –
The mode to use:
0 - Remove the distance manipulator between the two points.
1 - Add a distance manipulator between the two points.
2 - Remove all distance manipulators.
point_entity1 (Entity) – The object describing the first vertex point entity.
point_entity2 (Entity) – The object describing the second vertex point entity.
lock_turnover (int) –
Specifies the end point lock controls which determine which manipulator side surfaces are selected automatically and what end(s) are movable. The value specified overwrites the area_selection_ratio constraint but cannot overwrite the max_pick_angle constraint. If the latter constraint does not allow the sides (
point_entity1andpoint_entity2) to move, or allows only one side to move, only the allowed side will move, regardless of this parameter.Bit values are used and the value is calculated as (Bit0 + 2*Bit1 + 4*Bit2). Valid Bit options are:
Bit0
The movement of the point with the smaller ID during offset. Valid values are:
0 - The point with the smaller ID cannot move during offset. Only valid when Bit2 is set to 1.
1 - The point with the smaller ID can move during offset. Only valid when Bit2 is set to 1.
Bit1
The movement of the point with the larger ID during offset. Valid values are:
0 - The point with the larger ID cannot move during offset. Only valid when Bit2 is set to 1.
1 - The point with the larger ID can move during offset. Only valid when Bit2 is set to 1.
Bit2
Edit the lock controls. Valid values are:
0 - Do not edit the lock controls and ignore Bit0 and Bit1.
1 - Edit the lock controls based on Bit0 and Bit1 values.
Show Bit value calculator
Radio Button Table Option Name Value The movement of the point with the smaller ID during offset (Bit0) The movement of the point with the larger ID during offset (Bit1) Edit the lock controls (Bit2) Calculated argument value: 0 reserved (int) – Reserved for future use. Must be specified as 0.
Example#
Add a distance manipulator between vertices ( points ) with ID 100 and 101#import hm import hm.entities as ent model = hm.Model() model.add_remove_distance_manipulator( mode=1, point_entity1=ent.Point(model, 100), point_entity2=ent.Point(model, 101), lock_turnover=7, reserved=0, )
Remove a distance manipulator between vertices with ID 100 and#import hm import hm.entities as ent model = hm.Model() model.add_remove_distance_manipulator( mode=0, point_entity1=ent.Point(model, 100), point_entity2=ent.Point(model, 101), lock_turnover=0, reserved=0, )
Remove all distance manipulators#import hm import hm.entities as ent model = hm.Model() model.add_remove_distance_manipulator( mode=2, point_entity1=None, point_entity2=None, lock_turnover=0, reserved=0, )