Model.morphconstraintupdateedge#

Model.morphconstraintupdateedge(mcon, dptr1, dptr2, end, type, vec, color)#

Updates a tangency type constraint either between two edge domains or 2D domains or at the end of one edge domain. When type="main", dptr1 is the main and dptr2 is the secondary. When type="secondary", dptr2 is the main and dptr1 is the secondary. When type="attached", dptr1 follows dptr2.

Parameters:
  • mcon (Entity) – The entity morph constraint to update.

  • dptr1 (Entity) – The line entity of the edge or 2D domain.

  • dptr2 (Entity) – The line entity of the edge or 2D domain.

  • end (Entity) – The node entity at fixed end (for fixed type).

  • type (int) –

    1 - Fixed (edge domains only)

    2 - Main (edge domains only)

    3 - Secondary (edge domains only)

    4 - Continuous

    5 - Attached (edge domains only)

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

  • color (int) – The color of the constraint. Valid values are 1 through 64.

Examples#

Update a continuous tangency constraint with ID 5 between domains with IDs 12 and 14#
import hm
import hm.entities as ent

model = hm.Model()

model.morphconstraintupdateedge(
    mcon=ent.Morphconstraint(model, 5),
    dptr1=ent.Line(model, 12),
    dptr2=ent.Line(model, 14),
    end=ent.Node(model, 1),
    type=4,
    vec=[1.0, 0.0, 0.0],
    color=44,
)
Update a secondary tangency constraint with ID 12 where domain with ID 14 is forced tangent to domain with ID 12#
import hm
import hm.entities as ent

model = hm.Model()

model.morphconstraintupdateedge(
    mcon=ent.Morphconstraint(model, 12),
    dptr1=ent.Line(model, 12),
    dptr2=ent.Line(model, 14),
    end=ent.Node(model, 1),
    type=2,
    vec=[1.0, 0.0, 0.0],
    color=44,
)