Model.linestoelementsaddelemsfixed#
- Model.linestoelementsaddelemsfixed(collection, elem_size)#
Generates plot elements along selected lines with a given density. These plot elements are then used as feature edges for element remeshing. The use of this function implies that it will be followed by a function that performs meshing/remeshing of elements.
- Parameters:
collection (Collection) – The collection containing the line entities that should be considered to form feature edges in subsequent element remesh operations.
elem_size (double) – The default element edge size used to calculate element densities along the constructed feature edges.
Example#
Remeshe the displayed elements and create feature edges with element size 10.0 along lines with IDs 1600 and 1601#import hm import hm.entities as ent model = hm.Model() remesh_elems_col = hm.CollectionByDisplayed(model, ent.Element) model.setusefeatures(mode=1) # Creating feauture edges plot elements lines_col = hm.Collection(model, ent.Line, [1600, 1601]) model.linestoelementsaddelemsfixed(collection=lines_col, elem_size=10.0) # Remeshing model.defaultremeshelems( collection=remesh_elems_col, elem_size=3.0, elem_type=2, elem_type_2=2, comp_mode=0, size_control=1, skew_control=1, edge_mesh_type=1, min_size=0.0, max_size=0.0, max_deviation=0.0, max_angle=0.0, previous_settings=0, vertex_angle=30, )