Model.linemesh_savedata_bar1#
- Model.linemesh_savedata_bar1(entity_type, create_flag, config, property_id, vector, offset_x_a, offset_y_a, offset_z_a, offset_x_b, offset_y_b, offset_z_b, auto_flag, organize)#
Creates 1D elements, with options for bar2 elements, and cleans up memory.
Each call to this function must be paired with a previous call to
Model.linemesh_preparedata1()orModel.linemesh_preparenodeslist1().- Parameters:
entity_type (EntityFullType) – The type of entity to 1D mesh. Valid values are lines and nodes.
create_flag (int) –
Flag for generating elements:
0 - Do not generate elements.
1 - Generate elements.
config (int) – The 1D element config ID of the elements to create. For bar2 elements, this should be set to 60.
property_id (int) – The ID of the property to assign to the 1D elements.
vector (hwTriple) – The hwTriple object defining the y-axis vector components. User can also supply a Python list of three doubles. This argument is only used if
auto_flag=0andconfig=60.offset_x_a (double) – The offset in the x-direction at end a. This argument is only used if
config=60.offset_y_a (double) – The offset in the y-direction at end a. This argument is only used if
config=60.offset_z_a (double) – The offset in the z-direction at end a. This argument is only used if
config=60.offset_x_b (double) – The offset in the x-direction at end b. This argument is only used if
config=60.offset_y_b (double) – The offset in the y-direction at end b. This argument is only used if
config=60.offset_z_b (double) – The offset in the z-direction at end b. This argument is only used if
config=60.auto_flag (int) – If set to 0,
vectoris used. Otherwise, vector type is set to auto. This argument is only used ifconfig=60.organize (int) –
Organizing new 1D elements:
0 - Organize new 1D elements to current component.
1 - Organize new 1D elements to input lines component(s).
Examples#
Mesh lines with IDs 15 and 18 with a 30 degree break angle, creating bar2 elements with no property or offset and using the auto vector#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=60) # 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 (bar2) elements with no property or offset # and using the auto vector model.linemesh_savedata_bar1( entity_type=ent.Line, config=60, property_id=0, vector=None, offset_x_a=0.0, offset_x_b=0.0, offset_y_a=0.0, offset_y_b=0.0, offset_z_a=0.0, offset_z_b=0.0, auto_flag=1, organize=0, )
Mesh between nodes with IDs 16 , 17 , and 2 with 3 rigid elements between nodes with IDs 16 and 17 and with 2 rigid elements between nodes with IDs 17 and 2 , with no property assignment , organize to the input line component(s )#import hm import hm.entities as ent model = hm.Model() # Creating a collection of node entities which we will # prepare for 1D meshing. node_list = [ent.Node(model, 16), ent.Node(model, 17), ent.Node(model, 2)] model.linemesh_preparenodeslist1(list=node_list, 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 with no property # and using the auto vector, organizing to the input line component(s) model.linemesh_savedata_bar1( entity_type=ent.Node, config=5, property_id=0, vector=None, offset_x_a=0.0, offset_x_b=0.0, offset_y_a=0.0, offset_y_b=0.0, offset_z_a=0.0, offset_z_b=0.0, auto_flag=1, organize=1, )