Model.updatefeatures#
- Model.updatefeatures(flag)#
This function specifies for element remesh with feature edged when 1D elements selected as features are also refined. This function implies a function that performs re-meshing/meshing by elements with redo option selected is to follow.
- Parameters:
flag (int) –
0 - 1D elements selected as feature edges are not refined.
1 - 1D elements selected as feature edges are refined. New 1D elements connected to a new mesh are created.
Example#
Remeshe elements 1 - 40 with element size 10 , use 1D elements with IDs 100 - 110 as feature edges , and create along these feature edges new 1D elements with the same properties connected to created mesh#import hm import hm.entities as ent model = hm.Model() # Creating the collection that contains the elements with IDs 1-100 that will be used as feature edges. filter_remesh_elements = hm.FilterByEnumeration(ent.Element, list(range(1, 101))) collection_remesh_elements = hm.Collection(model, filter_remesh_elements) # Defining the collection of elements as fearure edges before remeshing. model.elementsaddelemsfixed(collection=collection_remesh_elements) # The elements with IDs 1-100 selected as feature edges are refined. New 1D elements connected to a new mesh will be created. model.updatefeatures(flag=1) # Specifying the mode for defining and using feature edges for element-based re-meshing. model.setusefeatures(mode=1) # Creating the collection of the remeshing elements with IDs 1-40. filter_remeshing_elements = hm.FilterByEnumeration(ent.Element, list(range(1, 41))) collection_remeshing_elements = hm.Collection(model, filter_remeshing_elements) # Remeshing the elements with IDs 1-40. model.defaultremeshelems( collection=collection_remeshing_elements, elem_size=10, elem_type=2, elem_type_2=2, comp_mode=1, 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=2, vertex_angle=30.0, ) # Specifying the mode for defining and using feature edges for element-based re-meshing. model.setusefeatures(mode=0)