Model.elementtestconnectivity#

Model.elementtestconnectivity(collection, outputcollection, dimension)#

Tests elements for whether or not they are connected in any one of a number of common but invalid ways and puts those that are on the specified outputcollection.

Parameters:
  • collection (Collection) – The collection containing the element entities to be checked.

  • outputcollection (Collection) – The collection containing the entities to test.

  • dimension (int) –

    A code telling to measure the dimension of:

    1 - Measure 1D elements.

    2 - Measure 2D elements.

    4 - Measure 3D elements.

Example#

Test all displayed elements by measure 1D elements#
import hm
import hm.entities as ent

model = hm.Model()

elems1 = model.CreateCollectionByDisplayed(ent.Element)
elems2 = hm.Collection(model, hm.FilterByEnumeration(ent.Element, ids=hm.hwUIntList([])))

model.elementtestconnectivity(collection=elems1, outputcollection=elems2, dimension=1)