meshing.dual_contouring.sharp_qef_vertices
meshing.dual_contouring.sharp_qef_vertices(
hermite,
incidence,
grid,
*,
rcond=0.05,
)Place vertices with a rank-revealing QEF that lands exactly on features.
The truncated pseudo-inverse keeps only the constraint directions the cell’s Hermite planes actually determine: planar cells project the mass point onto their face, crease cells land on the crease line, and corner cells reproduce the corner — with none of the mass-point bias the Tikhonov solve trades for smooth gradients. On a uniform grid that bias differs per cell (it depends on how the grid slices the surface), which is exactly the wiggle visible along feature curves.
Concrete forward placement only: singular-value truncation has no usable derivative, so optimization losses should keep differentiating :func:qef_vertices. The two solutions differ by the regularization bias, of order regularization × cell size. Vertices always stay in their cell: candidate solutions at every truncation rank are clamped to the cell and the one with the smallest QEF error wins, so a marginal singular direction that flings the full-rank minimizer outside cannot park the vertex off the surface.