warp.geometry#

Geometry processing operations.

This module provides functions to process 2D and 3D geometry and their associated topological data structures (e.g., meshes), and GPU-accelerated isosurface extraction.

Dense-grid isosurface backends take a 3-D warp.float32 field sampled at grid nodes and share the IsoSurfaceBase interface, so they can be swapped without changing calling code: IsoSurfaceMarchingCubes produces triangles.

Sparse extraction skips the dense grid entirely. sparse_marching_cubes() takes an implicit function and builds a Lipschitz octree around the level set, so cost scales with surface area rather than volume. lipschitz_octree() and sparse_marching_cubes_from_cells() expose its two stages separately.

Array-level functions such as swept_volume_mesh() launch kernels over a whole mesh or grid. Device functions such as swept_volume_sdf() evaluate a single point and may be called from within your own warp.kernel() definitions.

Usage:

This module must be explicitly imported:

import warp.geometry

API#

IsoSurfaceBase

Abstract base class for isosurface extraction from dense 3D scalar fields.

IsoSurfaceMarchingCubes

A reusable context for marching cubes surface extraction.

SweptVolumeSignMode

Method used to classify inside/outside when evaluating the per-mesh SDF.

delaunay_edge_flip

Flip non-Delaunay interior edges in place until all are Delaunay or max passes is reached.

find_triangle_neighbor_edge_index

Return the local edge of triangle shared with neighbor.

lipschitz_octree

Return max-depth octree cells that may intersect a level set of a Lipschitz-bounded implicit field.

sparse_marching_cubes

Extract an isosurface from an implicit function using a Lipschitz octree.

sparse_marching_cubes_from_cells

Extract an isosurface from an explicit set of occupied cells and corner values.

swept_volume_bounds

Return the world-space axis-aligned bounds of every mesh over every pose.

swept_volume_field

Compute a dense regular-grid discretization of the swept-volume pseudo signed-distance function.

swept_volume_mesh

Extract the swept volume (motion envelope) of animated rigid meshes.

swept_volume_sdf

Evaluate the swept-volume pseudo signed distance at a single point.

tri_tri_adjacency

Build triangle-triangle adjacency for a triangle mesh.