Model.geom_repair#
- Model.geom_repair(surf_collection=Collection(), method='', width=0.0, optimize_geom=True)#
Performs various repair operations on selected surfaces.
- Parameters:
surf_collection (Collection) – The collection containing the surface entities to repair.
method (hwString) –
The geometry repair method. Valid values are:
sew_gaps - The gaps between input surfaces that are narrower than the value given in width are stitched.
width (double) – The maximum width of the gap that will be stitched. If no valid value is given, the model geometry cleanup tolerance is used as default value.
optimize_geom (bool) –
Enable geometry optimization after the basic repair operation to match the new topology.
0 - Optimization disabled
1 - Optimization enabled (default)
Example#
Stitch the gaps smaller than 0.2 between surfaces with IDs 51 , 53 and 58 and optimize the geometry afterwards#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the surfaces surface_collection = hm.Collection(model, ent.Surface, [51, 53, 58]) model.geom_repair( surf_collection=surface_collection, method="sew_gaps", width=0.2, optimize_geom=1 )