Model.hm_linegetorderelems#

Model.hm_linegetorderelems(lineCollection, tolerance=-1)#

Returns a list of lists for the input free edges. The first element of each list is the ID of the free edge and subsequent elements of that list are the IDs of the associated 1D elements.

Parameters:
  • lineCollection (Collection) – The collection containing the line entities. Only free lines are considered.

  • tolerance (double) – The tolerance to compare association of 1D elements with respect to a free line. In the absence of this argument, best associated 1D elements will be returned.

Returns:

Example#

Find elements for all free lines use a tolerance of 0.5#
import hm
import hm.entities as ent

model = hm.Model()

lines = hm.Collection(model, ent.Line, populate=True)

_,resultlist = model.hm_linegetorderelems(lineCollection=lines,tolerance=0.5)

for result in resultlist:
    print("line", result.line)
    print("elements", result.elements)