Model.hm_formnodelistsfrommark#

Model.hm_formnodelistsfrommark(collection, error_collection=s_defaultCollection, use_edge_topo=1)#

Forms ordered node lists from a collection of nodes.

The return consists of a list-of-lists, with each sub-list being an ordered node list.

Parameters:
  • collection (Collection) – The collection containing the entities.

  • error_collection (Collection) – The collection containing the entities.

  • use_edge_topo (unsigned int) –

    0 - Do not use the edge selection from the last call to Model.createmarkpanel() for nodes.

    1 - Use the edge selection from the last call to Model.createmarkpanel() for nodes (default).

Returns:

Example#

Form node lists from nodes selected by the user#
import hm
import hm.entities as ent

model = hm.Model()

model.hm_formnodelistsfrommark(
  collection=hm.CollectionByInteractiveSelection(model, ent.Node, message= "Select nodes to form lists" ),
  error_collection=s_defaultCollection,
  use_edge_topo=1
)