Model.createbead#
- Model.createbead(elements=Collection(), centerpoints=hwDoubleList(), centerline=Entity(), opposite_mesh_normal=0, topwidth=DBL_MAX, bottomwidth=0.0, height=0.0, captype='', caplength=0.0, trapezoidcapendwidth=0.0, num_centerpoints=0, count=0, centerlinetype='')#
Creates beads on selected shell elements.
- Parameters:
elements (Collection) – The collection containing the 2D element entities on which bead is to be created.
centerpoints (hwDoubleList) – The list of x, y, z coordinates defining the points along which centerline of the bead passes on the mesh. The format of the list is \(x_{1}\,y_{1}\,z_{1}\,x_{2}\,y_{2}\,z_{2}\) … \(x_{n}\,y_{n}\,z_{n}\).
centerline (Entity) – The line entity defining the bead centerline.
opposite_mesh_normal (int) –
The bead orientation with respect to the mesh normal.
0 - The top face will align with the opposite of the mesh normal direction
1 - The top face will align with the mesh normal direction
topwidth (double) – The width of the bead at the top region. This value should be less than or equal to
bottomwidth.bottomwidth (double) – The width of the bead at the bottom region. This value should be greater than or equal to
topwidth.height (double) – The distance from the bottom of the bead to the top.
captype (hwString) – The type of the cap. Valid values are “trapezoid” and “ellipse”.
caplength (double) – The length of the cap region.
trapezoidcapendwidth (double) – The width of the trapezoid cap. By default, this option is set equal to
topwidth.num_centerpoints (int) – The number of center points defined in centerpoints.
count (int) – The number of beads that will be created if the arguments define more than one bead.
centerlinetype (hwString) – The type of the centerline definition. Valid values are “points” or “line”.
Examples#
Create a single bead with elliptic cap using points#import hm import hm.entities as ent model = hm.Model() model.createbead( elements=hm.CollectionByInteractiveSelection(model, ent.Element), caplength=20.00, bottomwidth=50.00, captype="ellipse", centerlinetype="points", centerpoints=[ -2176.680000, -160.373000, 1546.769000, -2343.010000, -282.762000, 1558.544000, ], height=5.00, num_centerpoints=2, opposite_mesh_normal=0, topwidth=25.00, )
Create a single bead with trapezoid cap using a line#import hm import hm.entities as ent model = hm.Model model.createbead( caplength=20.00, bottomwidth=50.00, captype="trapezoid", centerlinetype="line", centerline=ent.Line(model, 254), opposite_mesh_normal=1, topwidth=25.00, trapezoidcapendwidth=10.0, )