Model.createelementsbetweennodes#
- Model.createelementsbetweennodes(surf1_collection, surf2_collection, collection, tol, createplot, configval, syst, code, property)#
Creates a spotweld element between two surfaces at the selected nodes with an element type, coordinate system, and property ID.
- Parameters:
surf1_collection (Collection) – The collection containing the first surface entities.
surf2_collection (Collection) – The collection containing the second surface entities.
collection (Collection) – The collection containing the node entities.
tol (double) – Search tolerance to identify surfaces.
createplot (int) – Creates a plot.
configval (int) – Element type configuration value.
syst (int) –
Local coordinate system switch.
0 - Without coordinate system.
1 - With coordinate system.
code (int) –
Code for one or all surface options.
0 - All surfaces.
1 - One surface.
property (hwString) – Name of property collector.
Example#
Create spotweld ( spring elements ) between surfaces with IDs 1 and 2 , use the option individual surface and within a tolerance of 0.01 at the nodes with IDs 1 and 2 . Elements are created with the coordinate system and property collector “ name_prop “#import hm import hm.entities as ent model = hm.Model() surf1 = hm.Collection(model, ent.Surface, [1]) surf2 = hm.Collection(model, ent.Surface, [2]) nodes = hm.Collection(model, ent.Node, [1,2]) model.createelementsbetweennodes( surf1_collection=surf1, surf2_collection=surf2, collection=nodes, tol=0.01, createplot=1, configval=21, syst=1, code=1, property="name_prop", )