Model.linemesh_savedata1#

Model.linemesh_savedata1(create_flag, config, property_id, organize)#

Creates 1D elements and cleans up memory.

Each call to this function must be paired with a previous call to Model.linemesh_preparedata1() or Model.linemesh_preparenodeslist1().

Parameters:
  • 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. If creating bar2 elements (config=60) the function Model.linemesh_savedata_bar1() should be used.

  • property_id (int) – The ID of the property to assign to the 1D elements.

  • 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 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)
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_savedata1(create_flag=1, config=5, property_id=0, organize=1)
Mesh between nodes with IDs 16 , 17 , and 2 without create elements#
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)

# Creating 1D elements and cleans up memory.
model.linemesh_savedata1(create_flag=0, config=5, property_id=0, organize=0)