Model.detach_solids#
- Model.detach_solids(collection, options)#
Separates solids that have shared boundary surfaces by duplicating the common surfaces and breaking, when possible, the connectivity between the edges and vertices of shared surfaces.
- Parameters:
collection (Collection) – The collection containing the solid entities to be separated.
options (int) –
Defines the separation method. Valid values are:
0 - Selected solids are separated from those not selected. Shared boundary between selected solids is preserved.
1 - Selected solids are separated from each other. Shared boundary between selected solid and those not selected is preserved.
2 - Each selected solid is separated from all solids it has a shared boundary with.
3 - Same as
options=0.
Examples#
Separate solids with IDs 1 and 2 between each other , but keep solid with ID 3 connected to both solid with ID 1 and solid with ID 2#import hm import hm.entities as ent model = hm.Model() model.detach_solids(collection=hm.Collection(model, ent.Solid, [1, 2]), options=1)
Separate solids with IDs 1 and 2 from solid with ID 3 and keep shared boundary between solids with IDs 1 and 2#import hm import hm.entities as ent model = hm.Model() model.detach_solids(collection=hm.Collection(model, ent.Solid, [1, 2]), options=0)