Model.morphmapdifferencesurf#

Model.morphmapdifferencesurf(m_collection, f_collection, i_collection, t_collection, r_plane_normal, r_plane_base, rotate, axial, sym, con, blend, mbias, fbias)#

Maps selected nodes from one surface or element collection to the other surface or element collection optionally following the curvature differences (rotate) between the surfaces or element marks and/or mapping about an axis (axis and plane) or using a number of linear mapping options. Note that you can map from a mesh to a surface or surface to a mesh as well as mapping from a mesh to a mesh or a surface to a surface.

Note

This function does not do “True” mapping, that is nodes will not be “fitted” from one surface or element collection to another. Instead, a vector (the plane normal in r_plane) is used to find the target point on the target surface or element collection given a reference point on the initial surface or element collection.

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.

If blend=2, the blending will only be applied to nodes whichlie along the mesh between the fixed nodes and the mapped nodes.

Parameters:
  • m_collection (Collection) – The collection containing the mapped node entities.

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

  • i_collection (Collection) – The collection containing the initial surface entities or element entities.

  • t_collection (Collection) – The collection containing the target surface entities or elements entities.

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

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

  • rotate (int) –

    0 - Linear point to point mapping between lines.

    1 - Rotate nodes along with curvature difference between lines

  • axial (int) –

    0 - Apply mapping in x, y, z coordinates

    1 - Apply mapping about axis defined by r_plane

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

  • con (int) –

    0 - Do not use constraints.

    1 - Use constraints

  • blend (int) –

    0 - Do not blend unselected nodes.

    1 - Blend all nodes other than mapped and fixed nodes

    2 - Blend only nodes on mesh between mapped and fixed nodes

  • mbias (double) – Bias factor of mapped nodes.

  • fbias (double) – Bias factor of fixed nodes.

Examples#

Map nodes from one surface collection to another using rotation#
import hm
import hm.entities as ent

model = hm.Model()

model.morphmapdifferencesurf(
    m_collection=hm.Collection(model, ent.Node, [1, 2, 3]),
    f_collection=hm.Collection(model, ent.Node, [11, 12, 13]),
    i_collection=hm.Collection(model, ent.Surface, [22, 23]),
    t_collection=hm.Collection(model, ent.Element, [32, 33, 34, 45, 36]),
    r_plane_normal=[1.0, 0.0, 0.0],
    r_plane_base=[1.0, 0.0, 0.0],
    rotate=1,
    axial=1,
    sym=0,
    con=1,
    blend=0,
    mbias=1.0,
    fbias=1.0,
)
Map nodes from one surface collection to an element collection about an axis with no rotation, blending through the mesh, and biasing factors of 2.0#
import hm
import hm.entities as ent

model = hm.Model()

model.morphmapdifferencesurf(
    m_collection=hm.Collection(model, ent.Node, [1, 2, 3]),
    f_collection=hm.Collection(model, ent.Node, [11, 12, 13]),
    i_collection=hm.Collection(model, ent.Surface, [22, 23]),
    t_collection=hm.Collection(model, ent.Element, [32, 33, 34, 45, 36]),
    r_plane_normal=[1.0, 0.0, 0.0],
    r_plane_base=[1.0, 0.0, 0.0],
    rotate=1,
    axial=0,
    sym=1,
    con=1,
    blend=2,
    mbias=2.0,
    fbias=2.0,
)