Model.morphmapsections#

Model.morphmapsections(collectionelem, collectionnode, collectionline, collectionfix, plane_normal, plane_base, rotate, blend, axis, sym, con)#

Maps elements on collection to section lines.

Parameters:
  • collectionelem (Collection) – The collection containing the element entities to map.

  • collectionnode (Collection) – The collection containing the follower node entities.

  • collectionline (Collection) – The collection containing the section line entities.

  • collectionfix (Collection) – The collection containing the fixed node entities.

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

  • rotate (int) –

    0 - L point to point mapping between lines

    1 - Rotate nodes along with curvature difference between lines

  • blend (int) –

    0 - Do no blend unselected nodes

    1 - Blend nodes between mapped and fixed nodes

  • axis (int) –

    0 - Apply mapping in x, y, z coordinates

    1 - Apply mapping about axis defined by plane

  • sym (int) – 0 - Do not use symmetry (only option)

  • con (int) –

    0 - Do not use constraints

    1 - Use constraints

Example#

Map the selected selected elements to an interpolated cross section given the section lines optionally follow the curvature differences ( rotate ) or mapping about an axis ( axis and plane ) . interpolate a number of Model.morphmapdifference() calls between line pairs. The initial lines are found by intersect a plane normal to each section line with the selected elements. Thus, the selected elements should match up closely with the selected lines.#
import hm
import hm.entities as ent

model = hm.Model()

model.morphmapsections(
  collectionelem=hm.CollectionByInteractiveSelection(model, ent.Element),
  collectionnode=hm.CollectionByInteractiveSelection(model, ent.Node),
  collectionline=hm.CollectionByInteractiveSelection(model, ent.Line),
  collectionfix=hm.CollectionByInteractiveSelection(model, ent.Node),
  plane_normal=[1.0, 0.0, 0.0],
  plane_normal_base=[1.0, 0.0, 0.0],
  rotate=0,
  blend=0,
  axis=0,
  sym=0,
  con=1,
)

Note

If blend=1, no fixed nodes have been selected, and no mapped nodes are a part of any domain, this function will automatically assign all non-mapped nodes as fixed nodes.