Model.setsystem#

Model.setsystem(collection, setangle, onlyorient, normal_size, color)#

Sets the element (material) orientation by setting the angle. This angle is measured from the I-J (1-2) edge of the element around the normal of the element. Re-orients and visualizes the element (material) coordinate systems for selected elements.

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

  • setangle (double) – Determines the constant angle offset.

  • 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, this determines the size of the vectors to be displayed.

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

Example#

Set a constant 45.0 degree offset for the I - J edge rotation in the element plane of four selected elements and display the projection as blue vectors ( color 7 ) with size = 3.0#
import hm
import hm.entities as ent

model = hm.Model()

model.setsystem(
    collection=hm.Collection(model, ent.Element, [376, 377, 389, 418]),
    setangle=45.0,
    onlyorient=1,
    normal_size=3.0,
    color=7,
)
model.vectorsoff()

Note

The function Model.vectorsoff() is required