Model.createconnectionelements#
- Model.createconnectionelements(elem_type, nodes, tolerance, collection=Collection())#
Creates elements of a specified type between input nodes and nodes determined from the nearest elements within tolerance. To search nearest elements for a given node, provide either the component, element, or part collection. Options can be specified in any order.
- Parameters:
elem_type (hwString) – The type of 1D element to create. Must be set to “rbe3”.
nodes (Collection) – The collection containing the input node entities.
tolerance (double) – The tolerance used to search nearest elements. Must be greater than 0.0.
collection (Collection) – The collection containing the optional input entities. Valid entities are components, elements or parts
Example#
Create RBE3 elements between the nodes associated with component ID 20038 and all displayed components, using a tolerance of 10.0#import hm import hm.entities as ent model = hm.Model() components_collection = hm.Collection(model, ent.Component, [20038]) nodes_collection = hm.Collection( model, hm.FilterByCollection(ent.Node, ent.Component), components_collection ) model.createconnectionelements( elem_type="rbe3", nodes=nodes_collection, tolerance=10.0, collection=hm.CollectionByDisplayed(model, ent.Component), )