Model.rigidlinkinodecalandcreate#

Model.rigidlinkinodecalandcreate(node_collection1, set_id, attach_set_option, dof)#

Creates a rigidlink elem by calculating the independent node based on selection of dependent nodes. Location of independent nodes will be at the geometric center of dependent nodes.

Parameters:
  • node_collection1 (Collection) – The collection containing the dependent nodes.

  • set_id (unsigned int) – The ID of the set that contains dependent nodes. Set type should be of nodes.

  • attach_set_option (int) –

    Options for attaching a set to rigidlink:

    0 - Set entity will not be created when multiple dependent nodes are selected.

    1 - Set entity will be created when multiple dependent nodes are selected and then assigned to rigidlink.

  • dof (hwBoolList) – The degrees of freedom for which the element is active (list of six Boolean values representing the 1-6 DoFs).

Example#

Create a rigidlink element by select only dependent nodes ID 1 , 2 , 3 , and 4 without the attach set option#
import hm
import hm.entities as ent

model = hm.Model()

model.rigidlinkbycollector(
    node_collection1=hm.Collection(model,ent.Node,[1,2,3,4]),
    set_id=0,
    attach_set_option=0,
    dof=[True,True,True,True,True,True]
)
Create a rigidlink element by select only dependent nodes with the attach set option#
import hm
import hm.entities as ent

model = hm.Model()

model.rigidlinkbycollector(
    node_collection1=hm.Collection(model,ent.Node,[1,2,3,4]),
    set_id=0,
    attach_set_option=1,
    dof=[True,True,True,True,True,True]
)
Create a rigidlink element by select only dependent node set with ID 2 with the attach set option#
import hm
import hm.entities as ent

model = hm.Model()

model.rigidlinkbycollector(
    node_collection1=hm.Collection(model,ent.Node,populate=False),
    set_id=2,
    attach_set_option=1,
    dof=[True,True,True,True,True,True]
)