Model.triangle_clean_up#
- Model.triangle_clean_up(collection, criteria_string, graphicsDB=0)#
Fixes sliver/bad quality elements which fail the user-defined aspect ratio.
- Parameters:
collection (Collection) – The collection containing the element entities.
criteria_string (hwString) –
There are two possible criteria that can be included in the string:
aspect=<value>
The elements failing this given aspect ratio value will be fixed. The aspect ratio is defined as the minimum height/longest edge.
height=<value>
The elements failing this given element height value will be fixed. The minimum height is defined as shortest distance from a node to opposite edge.
graphicsDB (int) – Reserved for future development.
Example#
Correct all elements fail aspect ratio of 8 or height of 3#import hm import hm.entities as ent model = hm.Model() # Creating collection containing all the components input_collection = hm.Collection(model, ent.Component) model.triangle_clean_up( collection=input_collection, criteria_string="aspect=8 height=3" )