Skip to content

trusty.shells

BAC + Koiter thin-shell bodies.

MembraneModel

Bases: Enum

Koiter class-attribute instance-attribute

Koiter = 0

NeoHookean class-attribute instance-attribute

NeoHookean = 1

BendingModel

Bases: Enum

Bac class-attribute instance-attribute

Bac = 0

QuadraticLagrange class-attribute instance-attribute

QuadraticLagrange = 1

ShellConfig

youngs_modulus property writable

youngs_modulus: float

poisson_ratio property writable

poisson_ratio: float

thickness property writable

thickness: float

density property writable

density: float

membrane_model property writable

membrane_model: MembraneModel

bending_model property writable

bending_model: BendingModel

strain_limit property writable

strain_limit: bool

strain_limit_ratio property writable

strain_limit_ratio: float

add_shell

add_shell(
    world: World,
    V: ndarray[float64, (N, M)],
    F: ndarray[int32, (N, 3)],
    config: ShellConfig,
    *,
    friction_mu: float = 0.0,
) -> int

Add a triangle-mesh shell body to the world. friction_mu is the body's surface Coulomb coefficient (>= 0); 0 is frictionless.

set_initial_positions

set_initial_positions(
    world: World, body: int, X: ndarray[float64, (N, M)]
) -> None

Set the initial PLACED positions (dynamic start state) of a shell body without changing its rest configuration. X must be (num_verts, 3).

pin_vertices

pin_vertices(
    world: World, body: int, indices: Sequence[int]
) -> None

pin_face

pin_face(
    world: World,
    body: int,
    axis: int,
    coord: float,
    tol: float = 1e-06,
) -> None

read_positions

read_positions(
    world: World, body: int
) -> ndarray[float64, (N, 3)]

read_triangles

read_triangles(
    world: World, body: int
) -> ndarray[int32, (N, 3)]