Model.morphconstraintcreatearcrad#
- Model.morphconstraintcreatearcrad(scollection, acollection, type, name, plane_normal, plane_base, dptr, radius, bound, arc, color)#
Creates a model type constraint based on the radius or arc length of an edge domain.
- Parameters:
scollection (Collection) – The collection containing the input shape entities.
acollection (Collection) – The collection containing the entities used for radius measurement. Valid entities are nodes and lines.
type (int) –
0 - Measure radius or arc angle using domain
1 - Measure radius or arc angle using axis
2 - Measure radius or arc angle using line
3 - Measure radius or arc angle using node
name (hwString) – Name of morph constraint.
plane_normal (hwTriple) – The hwTriple object defining the plane normal components for axis. User can also supply a Python list of three doubles.
plane_base (hwTriple) – The hwTriple object defining the base point components of the plane for axis. User can also supply a Python list of three doubles.
dptr (Entity) – The domain entity of the edge.
radius (double) – Constrained radius or arc angle.
bound (int) –
-1 - Greater than specified angle
0 - Equal to specified angle
1 - Less than specified angle
arc (int) –
0 - Radius
1 - Arc angle
color (int) – The color of the constraint. Valid values are 1 through 64.
Example#
Create a model type constraint for the domain with ID 21 with the option of have the radius or arc angle measured in the plane of the domain , about an axis , about a line or about a node , and the option of have the radius or arc angle forced to be greater than , less than , or equal to the specified value .#import hm import hm.entities as ent model = hm.Model() model.morphconstraintcreatearcrad( scollection=hm.CollectionByInteractiveSelection(model, ent.Shape), acollection=hm.CollectionByInteractiveSelection(model, ent.Node), type=0, name="radius", plane_normal=[1.0, 0.0, 0.0], plane_base=[0.0, 0.0, 0.0], dptr=ent.Domain(model, 21), radius=5.0, bound=0, arc=0, color=32, )
Note
If
arc=0, the radius will be constrained. Ifarc=1the arc angle will be constrained.The shapes on the collection will be used to force the model into compliance with the specified constraint if possible