Model.create_bead_elements#

Model.create_bead_elements(collection, radius, height, make_sharp, feature_angle)#

This function is used to generate beads on 2D elements.

Parameters:
  • collection (Collection) – The collection containing the two node entities defining the centers of two circular bead ends.

  • radius (double) – The radius of the circular bead ends.

  • height (double) – The height of the beads.

  • make_sharp (int) –

    This flag indicates the bead shape when the element density on bead cross profiles is less than or equal to 3.

    0 - A flat bead (profile element density is 3).

    1 - A sharp bead (profile element density is 2).

  • feature_angle (double) – Defines the feature lines of the mesh on which the beads lie. Range is between 0 and 180.

Example#

Generate a flat bead with the end centers at nodes with ID 81 and 119 , radius 10 , height 10 and feature angle 30#
import hm
import hm.entities as ent

model = hm.Model()

# Generating a flat bead with the end centers at nodes with ID 81 and 119

nodes_collection = hm.Collection(model, ent.Node, [81, 119])

model.create_bead_elements(
    collection=nodes_collection,
    radius=10.0,
    height=10.0,
    make_sharp=0,
    feature_angle=30.0,
)