Model.detach_entities#
- Model.detach_entities(detachCollection, fromCollection=Collection(), offset=0.0)#
Detaches entities like constraints as a unit from selected elements or nodes, using the specified offset value.
- Parameters:
detachCollection (Collection) – The collection containing the entities like constraints to be detached.
fromCollection (Collection) – The collection containing the entities from which the entities like constraints will be detached.
offset (double) – The offset value of the newly detached nodes.
Example#
Detach constraint named “constraint1” and “constraint2” from nodes#import hm import hm.entities as ent model = hm.Model() constraint_col = hm.Collection( model, ent.Constraint, "names=constraint1,constraint2" ) model.detach_entities( detachCollection=constraint_col, fromCollection=hm.Collection(model, ent.Node, False), offset=0.1 )