Model.line_mesh_decimator#
- Model.line_mesh_decimator(collection, element_size, anchor_nodes_collection=Collection(), chordal_deviation=0.000000, consider_edge_conformal_2D_elems=0, feature_angle=0.000000, ignore_diameter=0.000000, per_chain_min_edge_count=0, turning_angle=0.000000)#
Decimate 1D elements to user given element size.
- Parameters:
collection (Collection) – he collection containing the input 1Ds entities to coarsen. Valid entities are elements and components.
element_size (double) – The size to use for coarsening.
anchor_nodes_collection (Collection) – The collection containing the anchor nodes.
chordal_deviation (double) – The chordal deviation value to use for decimation.
consider_edge_conformal_2D_elems (unsigned int) –
0 - If 2D elements are also selected along with the 1D elements, the attached 2Ds will be not modified to maintain mesh conformality.
1 - If 2D elements are also selected along with the 1D elements, the attached 2Ds will be modified to maintain mesh conformality.
feature_angle (double) – The face deviation cutoff for decimation. Useful when 2D elements are selected, in addition to edge/1D elements.
ignore_diameter (double) – If any isolated connected cluster is contained within this size it will be deleted.
per_chain_min_edge_count (int) – Controls the number of edges to be retained per chain in the given edge/1D element input.
turning_angle (double) – node will be anchored if only two 1D elements that are connected to the node make an angle greater than this value.
Example#
Coarsen elements in component with ID 100 to size 10.0, using nodes with IDs 1-10 as anchors#import hm import hm.entities as ent model = hm.Model() component_col = hm.Collection(model, ent.Component, [100]) node_col = hm.Collection(model, ent.Node, list(range(1, 11))) model.line_mesh_decimator( collection=component_col, element_size=10.0, anchor_nodes_collection=node_col, chordal_deviation=0.15, turning_angle=30.0, ignore_diameter=4.0, )