Model.detach_fromwall#
- Model.detach_fromwall(elements, from_collection, offset, detach_ends)#
Detaches elements from the nodes of wall elements. The elements surrounding the wall can be classified as belonging to different clusters based on which side of the wall elements they appear. For each cluster of elements attached to the wall, the shared nodes are duplicated after detachment.
The elements surrounding the wall must be one dimension higher than the wall elements.
Use a non-zero offset distance to separate the duplicated nodes from the nodes on wall. If
detach_endsis set to 1, the function will also detach at the boundaries of the wall elements lying on the exterior of attached surrounding elements. Note that whether one setsdetach_endsto 0 or not, the wall boundary nodes in the interior of elements attached to wall are not detached.- Parameters:
elements (Collection) – The collection containing the element entities to be detached from the wall. These elements must be one dimension higher than the wall elements.
from_collection (Collection) – The collection containing the wall elements entities that descibe the wall that the elements will be detached from. These elements must be one dimension lower than the surrounding elements.
offset (double) – The distance by which the surrounding elements should be offset from the wall.
detach_ends (int) –
0 - The surrounding elements are not detached from the wall end, but the interior nodes are still detached.
1 - Detaches the surrounding elements also at any free ends of the wall.
Example#
Detach shell elements with IDs 1 - 100 from 1D elements with 1000 - 1010 , offset by 5.0 and not detach any free ends#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the elements to be detached filter_elements = hm.FilterByEnumeration(ent.Element, list(range(1, 101))) element_collection = hm.Collection(model, filter_elements) # Creating a collection that contains the wall elements filter_wall_elements = hm.FilterByEnumeration(ent.Element, list(range(1000, 1011))) wall_element_collection = hm.Collection(model, filter_wall_elements) model.detach_fromwall( elements=element_collection, from_collection=wall_element_collection, offset=5.0, detach_ends=0, )