novaphy.Mesh¶
Triangle mesh wrapper used by ModelBuilder.add_shape_mesh /
add_shape_convex_hull. When constructed with compute_inertia=True
(default, Newton parity), the mesh's inertia is precomputed at unit density;
the deferred-mass path then uses these values instead of bounding-box
approximation.
Constructor¶
| Parameter | Description |
|---|---|
vertices |
(N, 3) array-like vertex positions [m]. |
indices |
Flat length = 3 * T int32 array (Newton-style) or (T, 3) triplets. |
compute_inertia |
If True, run compute_inertia_mesh() at construction. |
is_solid |
If True, treat as a closed solid for inertia integration. |
Properties¶
| Property | Description |
|---|---|
vertices |
(N, 3) numpy array of vertex positions. |
indices |
Flat int32 array of length 3 * num_triangles. |
triangles |
(T, 3) numpy array of triangle vertex indices. |
num_triangles |
Number of triangles. |
has_inertia |
True if mass / com / inertia were precomputed. |
is_solid |
True when treated as a closed solid. |
mass |
Mesh mass at unit density [kg]. |
com |
Center of mass [m] in mesh-local frame. |
inertia |
3x3 inertia tensor about com at unit density. |
volume |
Signed mesh volume [m^3]. |
Compatibility Notes¶
Newton's Mesh provides factory methods (Mesh.create_capsule,
Mesh.create_sphere, Mesh.create_cone, Mesh.create_cylinder) for
creating SDF-friendly geometry. NovaPhy does not yet provide these factories.