Model.solid_cavity_detect_fill#
- Model.solid_cavity_detect_fill(collection, merge_flag)#
Creates solids from detected cavities and optionally merges the created solids with the parent.
The function
Model.solid_cavity_detect_start()must be called before calling this function to generate the cavities as region entities.- Parameters:
collection (Collection) – The collection containing the region entities with the cavities to fill.
merge_flag (int) –
0 - Do not merge new solids with parent.
1 - Merge new solids with parent.
Examples#
Create a solid represent the cavity attached to a region with ID 10#import hm import hm.entities as ent model = hm.Model() model.solid_cavity_detect_start( collection=hm.Collection(model, ent.Surface), all_cavities=1, get_n_cavities=0, max_radius=-1, max_length=-1, min_concavity=0.5, ) model.solid_cavity_detect_fill( collection=hm.Collection(model, ent.Region, [10]), merge_flag=0 ) model.solid_cavity_detect_end()
Merge all identified cavities with the parent body#import hm import hm.entities as ent model = hm.Model() model.solid_cavity_detect_start( collection=hm.Collection(model, ent.Surface), all_cavities=1, get_n_cavities=0, max_radius=-1, max_length=-1, min_concavity=0.5, ) model.solid_cavity_detect_fill( collection=hm.Collection(model, ent.Region), merge_flag=1 ) model.solid_cavity_detect_end()