Model.morphconstraintupdatearcrad#

Model.morphconstraintupdatearcrad(scollection, acollection, type, mcon, plane_normal, plane_base, dptr, radius, bound, arc, color)#

Updates 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 node or line entities.

  • 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

  • mcon (Entity) – The morph constraint entity

  • plane_normal (hwTriple) – The hwTriple object defining the plane normal components. User can also supply a Python list of three doubles.

  • plane_base (hwTriple) – The hwTriple object defining the base point components of the plane. User can also supply a Python list of three doubles.

  • dptr (Entity) – The line entity of the edge domain

  • 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-64.

Example#

Update a model type constraint for the selected domain with the option of update the radius to be measured in the plane of the domain and the option of have the radius angle forced to be equal to the specified value .#
import hm
import hm.entities as ent

model = hm.Model()

model.morphconstraintupdatearcrad(
    scollection=hm.CollectionByInteractiveSelection(model, ent.Shape),
    acollection=hm.CollectionByInteractiveSelection(model, ent.Node),
    type=0,
    mcon=ent.Morphconstraint(model, 5),
    plane_normal=[1.0, 0.0, 0.0],
    plane_normal_base=[1.0, 0.0, 0.0],
    dptr=ent.Line(model, 21),
    radius=5.0,
    bound=0,
    arc=0,
    color=32,
)

Note

If arc=0, the radius will be constrained. If arc=1, the arc angle will be constrained.

The shapes on the scollection will be used to force the model into compliance with the specified constraint if possible.