Model.morphshapeapplynodes#

Model.morphshapeapplynodes(shcollection, ncollection, mult)#

Applies the shapes on the collection to only the selected nodes.

Parameters:
  • shcollection (Collection) – The collection containing the shape entities to apply.

  • ncollection (Collection) – The collection containing the node entities that the shapes will be applied to.

  • mult (double) – Multiplier to applied shapes.

Example#

All the shapes are applied to the model consecutively and scaled up or down by the multiplier. Shapes will only be applied to the nodes with IDs 2,3,4.#
import hm
import hm.entities as ent

model = hm.Model()

model.morphshapeapplynodes(
    shcollection=hm.Collection(model, ent.Shape),
    ncollection=hm.Collection(model, ent.Node, [2, 3, 4]),
    mult=2.0,
)