Model.createnodesandspotweldelems#
- Model.createnodesandspotweldelems(surf1_collection, surf2_collection, tol, createplot, configval, syst, code, num_nodes, collection, biasstyle, biasingintensity, spacing, offset_type, endoffset, property)#
Creates nodes and spotweld elements between two surfaces on the selected lines at a specified spacing or density 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.
tol (double) – Search tolerance to identify the surfaces.
createplot (int) – Creates a plot.
configval (int) – Element type configuration value.
syst (int) –
Local coordinate system switch.
0 - Do not build systems.
1 - Build systems.
code (int) –
Code for one or all surface options.
0 - All surfaces.
1 - One surface.
num_nodes (int) – Number of nodes on the line (for Density option only).
collection (Collection) – The collection containing the line entities.
biasstyle (int) – 1 - Linear.
biasingintensity (double) – 0.0 - Equal spacing.
spacing (double) –
Spacing between weld elements.
0.00 for Density option.
offset_type (int) –
0 - End offset.
1 - Half spacing.
endoffset (double) – End offset from the edge (= value).
property (hwString) – Name of property collector. Used to retrieve property.
Examples#
Create five spotwelds ( bar2 elements ) between surfaces with IDs 1 and 2 , use the all surfaces option , within a tolerance of 0.01 along four marked lines at equal spacing . Elements are created without a coordinate system and with a property collector named “ name_prop “#import hm import hm.entities as ent model = hm.Model() model.createnodesandspotweldelems( surf1_collection=hm.Collection(model,ent.Surface,[1]), surf2_collection=hm.Collection(model,ent.Surface,[2]), tol=0.01, createplot=1, configval=60, syst=0, code=0, num_nodes=5, collection=hm.Collection(model,ent.Line,[1,2,3,4]), biasstyle=1, biasingintensity=0.0, spacing=0.0, offset_type=0, endoffset=0.0, property="name_prop", )
Creatingreate the same as the first example with an end offset value of 2.0#import hm import hm.entities as ent model = hm.Model() model.createnodesandspotweldelems( surf1_collection=hm.Collection(model,ent.Surface,[1]), surf2_collection=hm.Collection(model,ent.Surface,[2]), tol=0.01, createplot=1, configval=60, syst=0, code=0, num_nodes=5, collection=hm.Collection(model,ent.Line,[1,2,3,4]), biasstyle=1, biasingintensity=0.0, spacing=0.0, offset_type=0, endoffset=2.0, property="name_prop", )