Model.gap_sealing#
- Model.gap_sealing(collection1, collection2, controls, database=0)#
Creates patches to close the gap between components.
- Parameters:
collection1 (Collection) – The first collection containing the input entities. Valid entity classes are elements and components.
collection2 (Collection) – The second collection containing the input entities. Valid entity classes are elements and components.
controls (hwString) – The string defining the command parameters. Valid options are leakMode, leakSize, maxSize, proximity, patchOrganization, maxSnapAnglem, seed, and target.
database (int) –
The flag defining which database is used as the input.
0 - HyperMesh database
2 - Display representation
Example#
Create patches such that the selected input does not leak with leak size equal to 5.0 and the seed being a point indicating the “inside” of the input#import hm import hm.entities as ent model = hm.Model() comps = hm.CollectionByDisplayed(model, ent.Component) empty = hm.Collection(model, ent.Component, False) model.gap_sealing( collection1=comps, collection2=empty, controls="leakSize:5.0, maxsize:0.0, seed: 4000.0 0.0 1500.0, target: ()", database=2 )
Create patches to close the gap between components within distance of 10.0#import hm import hm.entities as ent model = hm.Model() comps = hm.CollectionByDisplayed(model, ent.Component) empty = hm.Collection(model, ent.Component, False) model.gap_sealing( collection1=comps, collection2=empty, controls="proximity:10.0", database=2 )
Create patches to close the gap between components within distance of 10.0#import hm import hm.entities as ent model = hm.Model() comps1 = hm.Collection(model, ent.Component, [1,2,3]) comps2 = hm.Collection(model, ent.Component, [4,5,6]) model.gap_sealing( collection1=comps1, collection2=comps2, controls="proximity:10.0, patchOrganization:0", database=0 )