Model.linemesh_preparedata1#
- Model.linemesh_preparedata1(collection, break_angle, config)#
Prepares the selected entities for 1D meshing.
Each call to this function must be paired with a call to
Model.linemesh_savedata1()orModel.linemesh_savedata_bar1()to clean up memory.- Parameters:
collection (Collection) – The collection containing the entities to 1D mesh. Valid entity types are lines and nodes. If
collectionof nodes is provided, then only two nodes can be provided.break_angle (double) – If the angle between the lines’ tangents at a joint is greater than this value, the line is split to force a node at that location. If set to
break_angle=0.0, no split will occur.config (int) – The configuration of the element to create. Only 1D configs are valid.
Example#
Meshing lines with IDs 15 and 18 with a 30 degree break angle, creating rigid elements with no property#import hm import hm.entities as ent model = hm.Model() # Creating a collection of line entities which we will # prepare for 1D meshing. line_collection = hm.Collection(model, ent.Line, [15, 18]) model.linemesh_preparedata1(collection=line_collection, break_angle=30.0, config=5) # Assing meshing parameters to line segments for 1D meshing. model.linemesh_saveparameters(segment=0, density=3, bias=0, bias_style=0) model.linemesh_saveparameters(segment=1, density=2, bias=0, bias_style=0) # Creating 1D elements and cleans up memory. model.linemesh_savedata1(create_flag=1, config=5, property_id=0, organize=0)