Model.hm_findconnectedpatches#

Model.hm_findconnectedpatches(collection)#

Finds connected patches of elements and returns the elements in each connected patch as a list.

Parameters:

collection (Collection) – The collection containing the element entities to query.

Returns:

Example#

Get the connected element patches for the displayed elements#
import hm
import hm.entities as ent

model = hm.Model()

_ , resultlist = model.hm_findconnectedpatches(collection=hm.CollectionByDisplayed(model,ent.Element))

for result in resultlist:
    print("elem_list", result.elem_list)