plane_sdf — 3D sdf_csg op

• Data kinds: coordgrid → sdf

• Call: import fullseye as fs; fs.ledger.plane_sdf(grid, point, normal) (to call the implementation directly, import sdf_ops; sdf_ops.plane_sdf(grid, point, normal); from the registry, ops3d.get("plane_sdf"))

Usage

Exact signed distance field of a half-space (the side cut off by a plane) (negative inside, positive outside).

sdf(p) = (p - point) · n̂. The side the normal n̂ points to is outside (positive), and the opposite side is inside. Used for operations that keep only one side, such as chamfer, cutting, or "only what lies above the board". Stacking sdf_intersect builds any convex polyhedron. However, intersection by max is not exact outside the corners: building a cuboid from 6 planes gives occupancy (<= 0) and inside values that match box_sdf exactly, but outside, near the corners, it underestimates by up to 2.1 (measured on a box of half-side 2 with grid 0.25) -- a standard property of CSG; if you need the distance itself, use box_sdf.

Exactness: a plane has gradient norm 1 over all space, so this value is the true signed distance everywhere (no case split that switches at corners, as in box_sdf, is needed).

Arguments and validation (ValueError):

• grid: float array (..., 3) whose last axis is 3 (output of grid_coords or a point list).

• point: 1 point on the plane (3 elements).

• normal: the plane normal (3 elements, zero vector and NaN are rejected). Its length is automatically normalised to 1, so the magnitude does not affect the result (only the direction matters).

Returns: float64 of shape grid.shape[:-1]. Positive on the normal side, negative on the opposite side, 0 on the plane.

Where to use: sdf_subtract(part, plane_sdf(g, p, n)) "cuts away the normal side of that plane". To reverse the orientation, flip the sign of normal (-sdf does the same).

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

Runnable examples (verified samples that actually call this op)

• sdf_csg — py -3.11 examples_3d/sdf_csg.py

Ops the type connects to (they accept sdf as input)

sdf_to_occupancy · fuse_to_voxel · integrate · extract_surface_points · query_distance · sdf_union · sdf_intersect · sdf_subtract

Same category (sdf_csg)

grid_coords · sphere_sdf · box_sdf · cylinder_sdf · torus_sdf · capsule_sdf · sdf_union · sdf_intersect


*Provenance: sdf_ops.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.