Model.createweldsbetweenelemsusingnodes#

Model.createweldsbetweenelemsusingnodes(elem1_collection, elem2_collection, single_col, node_collection, tol, syst, configval, property, remesh)#

Creates weld element(s) between pre-existing elements at the given node(s).

Parameters:
  • elem1_collection (Collection) – The collection containing the element entities for the first element collector.

  • elem2_collection (Collection) – The collection containing the element entities for the second element collector, if given.for the second comp collector, if given.

  • single_col (int) –

    Flag for the number of element collectors used:

    1 - One element collector.

    0 - Two element collectors.

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

  • tol (double) – The maximum distance allowed between the node (from the node collection) and the element (from the element collection) to weld this element.

  • syst (int) –

    Systems flag:

    1 - Build systems.

    0 - Do NOT build systems.

  • configval (int) –

    Type of weld element created:

    2 - plot

    3 - weld

    5 - rigid

    21 - spring

    60 - bar

    61 - rod

    70 - gap

  • property (hwString) – Name of the property collector. Used to retrieve the property ID.

  • remesh (int) – Remesh flag (always 0).

Example#

Each of the three nodes on the collection with IDs (16, 17, and 18) try to project normally onto as many elements as they can that are within a tolerance of 1.0. All of the non-adjacent elements found for each node’s projections are then welded together at their projection points#
import hm
import hm.entities as ent

model = hm.Model()

elems1 = hm.Collection(model, ent.Element, populate=True)
elems2 = hm.Collection(model, ent.Element, populate=False)
nodes = hm.Collection(model, ent.Node, [16, 17, 18])

model.createweldsbetweenelemsusingnodes(
    elem1_collection=elems1,
    elem2_collection=elems2,
    single_col=1,
    node_collection=nodes,
    tol=1.0,
    syst=1,
    configval=3,
    property="myprop",
    remesh=0,
)