Model.positionmark#

Model.positionmark(collection, node1, node2, node3, node4, node5, node6)#

Positions a selection of entities in space.

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

  • node1 (Entity) – The object describing the first node entity.

  • node2 (Entity) – The object describing the second node entity.

  • node3 (Entity) – The object describing the third node entity.

  • node4 (Entity) – The object describing the forth node entity.

  • node5 (Entity) – The object describing the fifth node entity.

  • node6 (Entity) – The object describing the sixth node entity.

Note

The positioning attempts to align the first three nodes (node1, node2, node3) to the second three nodes (node4, node5, node6)

Example#

Position the component named “wheel” use nodes with IDs 10 - 15#
import hm
import hm.entities as ent

model = hm.Model()

model.positionmark(
    collection=hm.Collection(model, ent.Component, "name=wheel"),
    node1=ent.Node(model, 10),
    node2=ent.Node(model, 11),
    node3=ent.Node(model, 12),
    node4=ent.Node(model, 13),
    node5=ent.Node(model, 14),
    node6=ent.Node(model, 15),
)