Model.morphupdateendbymvol#

Model.morphupdateendbymvol(acollection, bcollection, vec, sysid, mode)#

Updates the end conditions (free, fixed, main-secondary, or continuous) for edges on the morph volumes specified in the collections. Connecting edges from one group of morph volumes to another is supported as well as specifically dealing with radial and tangential edges for cylindrical morph volume matrices. The results depend on the selected mode.

Parameters:
  • acollection (Collection) – The collection containing the hypercube entities for end “a”.

  • bcollection (Collection) – The collection containing the hypercube entities for end “b”.

  • vec (hwTriple) – The hwTriple object defining the Temporary fixed end orientation vector.

  • sysid (int) – The ID of the origin system for radial and tangential connections (modes 8, 9, 10, and 11).

  • mode (int) –

    1 - Free all edges on mvols on acollection.

    2 - Free edges on mvols on acollection from those on mvols on bcollection.

    3 - Fix all edges on mvols on acollection to vector which are within 45 degrees.

    4 - Free all edges on mvols on acollection within 45 degrees of vector.

    5 - Create main-secondary connection between all edges on mvols on acollection to all on mvols on bcollection within 60 degrees of each other.

    6 - Create continuous connection for all edges on mvols on acollection within 60 degrees of each other.

    7 - Create continuous connection between all edges on mvols on acollection to all on mvols on bcollection within 60 degrees of each other.

    8 - Free all edges on mvols on acollection which run radially from the selected system.

    9 - Free all edges on mvols on acollection which run tangentially about the selected system.

    10 - Create continuous connection for all edges on mvols on acollection which run radially from the selected system within 60 degrees of each other.

    11 - Create continuous connection for all edges on mvols on acollection which run tangentially about the selected system within 60 degrees of each other.

    12 - Create a continuous connection for all edges on mvols on acollection within 30 degrees of vector.

Examples#

Create tangencies for all edges which connect roughly parallel end to end#
import hm
import hm.entities as ent

model = hm.Model()

model.morphupdateendbymvol(
    acollection=hm.Collection(model, ent.Morphvolume),
    bcollection=hm.Collection(model, ent.Morphvolume, 2),
    vec=[1.0, 0.0, 0.0],
    sysid=0,
    mode=6,
)
Free tangencies for all edges which run tangentially about a system#
import hm
import hm.entities as ent

model = hm.Model()

model.morphupdateendbymvol(
    acollection=hm.Collection(model, ent.Morphvolume),
    bcollection=hm.Collection(model, ent.Morphvolume, 2),
    vec=[1.0, 0.0, 0.0],
    sysid=1,
    mode=9,
)
Create a main-secondary tangency for the edges on one morph volume to the edges on another morph volume#
import hm
import hm.entities as ent

model = hm.Model()

model.morphupdateendbymvol(
    acollection=hm.Collection(model, ent.Morphvolume, 14),
    bcollection=hm.Collection(model, ent.Morphvolume, 15),
    vec=[1.0, 0.0, 0.0],
    sysid=0,
    mode=5,
)