newton.utils.solidify_mesh#

newton.utils.solidify_mesh(faces, vertices, thickness)[source]#

Convert a surface mesh into a solid mesh by extruding along face normals.

Takes a triangle mesh representing a surface and creates a closed solid mesh by extruding each triangle into a triangular prism (wedge). Each input triangle produces 8 output triangles forming the top, bottom, and sides of the prism.

Parameters:
  • faces (ndarray) – Triangle indices of shape (N, 3), where N is the number of triangles.

  • vertices (ndarray) – Vertex positions of shape (M, 3), where M is the number of vertices.

  • thickness (float | list | ndarray) – Extrusion distance from the surface. Can be a single float (uniform thickness), a list, or an array of shape (M,) for per-vertex thickness.

Returns:

  • faces: Output triangle indices of shape (N * 8, 3).

  • vertices: Output vertex positions of shape (M * 2, 3).

Return type:

A tuple containing