Model.detachelements#

Model.detachelements(collection, offset)#

Detaches elements as a unit from the attached structure, using the specified offset value.

Parameters:
  • collection (Collection) – The collection containing the entities to detach.

  • offset (double) – The distance by which the elements should be offset from the attached structure.

Example#

Detach element with ID 10 and one layer of adjacent elements from the remainder of the structure#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection of adjacent elements to the element with ID=10

elem_col_10=hm.Collection(model, ent.Element, [10])
elem_col=hm.CollectionByAdjacent(model, elem_col_10)

model.detachallelements(collection=elem_col, offset=0.0)