Model.set_meshedgeparams#
- Model.set_meshedgeparams(edge_index, elem_density, alg_type, bias_style, bias, min_size, max_size, chordal_dev, max_angle)#
Sets the edge-specific parameters for the automeshing module. It controls both standard and chordal mesh algorithm parameters.
- Parameters:
edge_index (unsigned int) – The index of the edge in the particular surface under consideration. This is a 0-based index that operates on the edges in the order they are returned from
Model.hm_getsurfaceedges(). One can query the edges for a surface usingModel.hm_getsurfaceedges(), and then the index of each edge in the returned list (starting from 0) are the possible indices.elem_density (unsigned int) – The density of elements to use along the given edge.
alg_type (int) –
1 - Use size and biasing algorithm.
2 - Use chordal deviation algorithm. When the function is being called for the first time for an edge, or when any of the chordal deviation parameters have been changed, the
elem_densityparameter is ignored and the edgeelement densityis set to the value required by the chordal deviation parameters. Subsequent calls of the function with the same chordal deviation parameters reset the edge element density to the specified value with the same along edge density distribution. Calling the function withelem_density = 0results in the resetting of the edge element density to the value required by the chordal deviation parameters.bias_style (int) –
The style of biasing to use. Valid values are:
0 - linear
1 - exponential
2 - bell curve
bias (double) – The biasing value of the element length to use along the given edge.
min_size (double) – The minimum element size for the edge for chordal deviation meshing.
max_size (double) – The maximum element size for the edge for all
alg_typevalues.chordal_dev (double) – The maximum chordal deviation distance for the element for the edge.
max_angle (double) – The maximum turn angle value (in degrees) between adjacent element links for the edge for chordal deviation meshing.
Examples#
Create specific deviation based node seeding for edge with ID 29 with minimum element size 0.5 , maximum element size 15.0 , maximum chordal deviation 0.2 , and maximum element links turn angle 25 degrees with the element density required by the chordal deviation parameters#import hm import hm.entities as ent model = hm.Model() # Automeshing for edge with ID 29 model.set_meshedgeparams( edge_index=29, elem_density=0, alg_type=0, bias_style=0, bias=0.0, min_size=0.5, max_size=15.0, chordal_dev=0.2, max_angle=25.0, )
Same example as above, but with element density 4 (requiring that the function is called twice)#import hm import hm.entities as ent model = hm.Model() model.set_meshedgeparams( edge_index=29, elem_density=4, alg_type=0, bias_style=0, bias=0.0, min_size=0.5, max_size=15.0, chordal_dev=0.2, max_angle=25.0, ) model.set_meshedgeparams( edge_index=29, elem_density=4, alg_type=0, bias_style=0, bias=0.0, min_size=0.5, max_size=15.0, chordal_dev=0.2, max_angle=25.0, )