Model.projectsystem#

Model.projectsystem(collection, vectorptr, onlyorient, normal_size, color)#

References a vector that is projected on the element plane. Re-orients and visualizes the element (material) coordinate system for selected elements.

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

  • vectorptr (hwTriple) – Determines the vector to be projected on the element plane to define the element orientation.

  • onlyorient (int) –

    0 - The new x-element directions are shown as continuous gradient lines starting and ending on free edges.

    1 - The new x-element directions are shown as vectors starting from the element center.

  • normal_size (double) – If onlyorient = 1, it determines the size of the vectors to be shown.

  • color (int) – Determines the color of the vector or line. The color ID numbers range from 1 to 64.

Example#

Project the created vector on the element plane of four selected elements and show the projection as blue vectors ( color = 7 ) with size = 3.0#
import hm
import hm.entities as ent

model = hm.Model()

model.projectsystem(
    collection=hm.Collection(model, ent.Element, [376, 377, 389, 418]),
    vectorptr=[2.448, -0.7894, 0.9774],
    onlyorient=1,
    normal_size=3.0,
    color=7,
)

model.vectorsoff()

Note

The function vectorsoff() is required.