gustaf.create.faces.to_simplex#

gustaf.create.faces.to_simplex(quad, alternate=False)[source]#

Given quad faces, diagonalize them to turn them into triangles.

If quad is counterclockwise (CCW), triangle will also be CCW and vice versa. Will return a tri-mesh, if input is triangular. Default diagonalization looks like this:

(3) *---* (2)
    |  /|
    | / |
    |/  |
(0) *---* (1)

resembling ‘slash’.

(3) *---* (2)
    |\  |
    | \ |
    |  \|
(0) *---* (1)

resembling ‘backslash’.

If you want to alternate the slash-direction, set alternate-variable.

Parameters:
  • quad (Faces) – Faces representation which is to be converted from a cubic mesh into a simplex mesh.

  • alternate (bool) – Alternate between forward and back-slash to avoid “favored” meshing direction (important in some analysis problem).

Returns:

tri – Simplexifyed mesh.

Return type:

Faces