trusty.shells¶
Thin-shell bodies.
MembraneModel
¶
BendingModel
¶
ShellConfig
¶
add_shell
¶
add_shell(
world: World,
V: ndarray[float64, (N, M)],
F: ndarray[int32, (N, 3)],
config: ShellConfig,
*,
friction_mu: float = 0.0,
initial_positions: ndarray[float64, (N, 3)]
| None = None,
) -> int
Add a triangle-mesh shell body to the world. friction_mu is the body's surface Coulomb coefficient (>= 0); 0 is frictionless. initial_positions (num_verts, 3) is where the vertices start (default: V); the rest shape is V, so a different start leaves the shell strained.
set_velocity
¶
Overwrite per-vertex velocities of a shell body. v must have shape (num_verts, 3). Applied at the next step(); only this body's history is rewritten.
set_project_positive_definite
¶
PSD-project this module's Hessians on every Newton iteration (default off). Call before the first step().