Model.findbetween#

Model.findbetween(between_collection, function, numbers, output_collection)#

Finds entities that are between/connect other entities.

Parameters:
  • between_collection (Collection) – The collection containing the entities to find. Valid values are nodes and connectors.

  • function (unsigned int) – Currently only a value of 0 is supported. This finds connectors between surfaces, elements, tags, assemblies or components.

  • numbers (int) –

    A flag that determines if the numbers of the found entities will be turned on after they are found.

    0 - Off

    1 - On

  • output_collection (Collection) – The collection containing the found entities.

Examples#

Find connectors between components with IDs 1 and 2#
import hm
import hm.entities as ent

model = hm.Model()

input = hm.Collection(model, ent.Component, [1, 2])
output = hm.Collection(model, ent.Connector, populate=False)

model.findbetween(
  between_collection=input,
  function=0,
  numbers=1,
  output_collection=output
)
Find nodes between components with IDs 1 and 2#
import hm
import hm.entities as ent

model = hm.Model()

input = hm.Collection(model, ent.Component, [1, 2])
output = hm.Collection(model, ent.Node, populate=False)

model.findbetween(
  between_collection=input,
  function=0,
  numbers=1,
  output_collection=output
)