Model.createweldelemsfromalinelist#
- Model.createweldelemsfromalinelist(surf1_collection, surf2_collection, tol, createplot, configval, syst, code, num_nodes, linelist1, nodelist1, biasstyle, biasingintensity, spacing, offset_type, endoffset, property)#
Creates weld elements between surfaces using a line list to determine the weld points.
- Parameters:
surf1_collection (Collection) – The collection containing the surface entities containing the first or multiple surfaces.
surf2_collection (Collection) – The collection containing the surface entities containing the second surface, if given.
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).
linelist1 (EntityList) – A list containing the line entities.
nodelist1 (EntityList) – A list containing the node 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 the property.
Example#
Create five equally spaced spotwelds on different lines : Lines with IDs 95 , 96 , and 97 are joined together into a single line . Each of these nodes is projected normally on the two surfaces ( IDs 237 and 253 ) within a tolerance of 1.0 . Then the two surfaces are welded together at the projection points#import hm import hm.entities as ent model = hm.Model() Lines = [ent.Line(model,95), ent.Line(model,96), ent.Line(model,97)] Filter = hm.FilterByCollection(ent.Node, ent.Line) Line_col = hm.Collection(Lines) Nodes = [n for n in hm.Collection(model, Filter, Line_col)] model.createweldelemsfromalinelist( surf1_collection=hm.Collection(model,ent.Surface,[237]), surf2_collection=hm.Collection(model,ent.Surface,[253]), tol=1.0, createplot=1, configval=3, syst=0, code=0, num_nodes=5, linelist1=Lines, nodelist1=Nodes, biasstyle=1, biasingintensity=0.0, spacing=0.0, offset_type=0, endoffset=0.0, property="myprop", )
Create the same with spacing value of 2.0 and half spacing option#import hm import hm.entities as ent model = hm.Model() Lines = [ent.Line(model,95), ent.Line(model,96), ent.Line(model,97)] Filter = hm.FilterByCollection(ent.Node, ent.Line) Line_col = hm.Collection(Lines) Nodes = [n for n in hm.Collection(model, Filter, Line_col)] model.createweldelemsfromalinelist( surf1_collection=hm.Collection(model,ent.Surface,[237]), surf2_collection=hm.Collection(model,ent.Surface,[253]), tol=1.0, createplot=1, configval=3, syst=0, code=0, num_nodes=5, linelist1=Lines, nodelist1=Nodes, biasstyle=1, biasingintensity=0.0, spacing=2.0, offset_type=1, endoffset=0.0, property="myprop", )