Model.createweldsbetweenelemsusingpoints#
- Model.createweldsbetweenelemsusingpoints(elem1_collection, elem2_collection, single_col, point_collection, tol, syst, configval, property, remesh)#
Creates weld element(s) between pre-existing elements at the given point(s).
- Parameters:
elem1_collection (Collection) – The collection containing the element entities for the first element collector.
elem2_collection (Collection) – The collection containing the element entities for the second element collector, if given.
single_col (int) –
Flag for the number of element collectors used:
1 - One elem collector.
0 - Two elem collectors.
point_collection (Collection) – The collection containing the point entities.
tol (double) – The maximum distance allowed between the point (from the point collection) and the element (from the elem collections) to weld this element.
syst (int) –
Systems flag:
1 - Build systems.
0 - Do NOT build systems.
configval (int) –
Weld element type created:
2 - plot
3 - weld
5 - rigid
21 - spring
60 - bar
61 - rod
70 - gap
property (hwString) – Name of the property collector. Used to retrieve the property ID.
remesh (int) – Remesh flag (always zero).
Example#
Each of the three points on the mark (16, 17, and 18) try to project normally onto as many elements as they can that are within a tolerance of 1.0. All of the non-adjacent elements found for each point’s projections are then welded together at their projection points#import hm import hm.entities as ent model = hm.Model() elems1 = hm.Collection(model, ent.Element, populate=True) elems2 = hm.Collection(model, ent.Element, populate=False) points = hm.Collection(model, ent.Point, populate=True) model.createweldsbetweenelemsusingnodes( elem1_collection=elems1, elem2_collection=elems2, single_col=1, point_collection=points, tol=1.0, syst=1, configval=3, property="myprop", remesh=0, )