Model.linemesh_saveparameters#
- Model.linemesh_saveparameters(segment, density, bias, bias_style)#
Assigns meshing parameters to line or node list segments for 1D meshing.
Each call to this function must be paired with a previous call to
Model.linemesh_preparedata1()orModel.linemesh_preparenodeslist1().- Parameters:
segment (int) – The ID of the segment within the line or node list selection. This index is 0 based.
density (int) – The element density to use for that segment.
bias (double) – The biasing value of the element length to use along the given segment.
bias_style (int) –
The style of biasing to use. Valid values are:
0 - Linear.
1 - Exponential.
2 - Bell curve.
Example#
Mesh lines with ID 15 and 18 with a 30 degree break angle, with 3 elements in the first segment, and 2 elements in the second segment, 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)