Model.equivalence2#

Model.equivalence2(collection, tolerance, location, numbering)#

Equivalences duplicate nodes on the “exposed” faces of 2D/3D elements in selected components to all other nodes in the model within a tolerance.

Parameters:
  • collection (Collection) – The collection containing the input component entities. Only nodes on the “exposed” faces of the 2D/3D elements in the selected component entites are considered.

  • tolerance (double) – The tolerance used to find neighboring nodes, not in the specified components, to equivalence with.

  • location (int) –

    Location of equivalenced nodes:

    0 - Equivalence at the location of the node in the component.

    1 - Equivalence at the location of the node not in the component.

    2 - Equivalence at the midpoint of the two nodes.

  • numbering (int) –

    The numbering of the retained node:

    0 - Retain the number of the node in the component.

    1 - Retain the number of the node not in the component.

Example#

Equivalence the nodes on the exposed faces of components with IDs 1 - 5 , use a tolerance of 0.1 and keep the location and number of the component nodes#
import hm
import hm.entities as ent

model = hm.Model()

comps =  hm.Collection(model, ent.Component, list(range(1, 6)))

model.equivalence(
    collection=comps,
    tolerance=0.1,
    location=0,
    numbering=0,
)