sdf_intersect — 3D sdf_csg op

• Data kinds: sdf × sdf → sdf

• Call: import fullseye as fs; fs.ledger.sdf_intersect(a, b) (to call the implementation directly, import sdf_ops; sdf_ops.sdf_intersect(a, b); from the registry, ops3d.get("sdf_intersect"))

• GPU: none (CPU reference implementation only)

Usage

The intersection of two SDFs, A∩B = the element-wise max(a, b) (inside only where both are inside).

The zero isosurface is the common part of both boundaries. Both inside and outside are generally not strict SDFs, but can be lower bounds of distance.

Calculation: np.maximum(np.asarray(a, float64), np.asarray(b, float64)). per element max, so a point is inside (negative) A∩B only when a < 0 and b < 0. The shape only needs to be broadcast consistent (if not, numpy's ValueError), No other tests will be performed. NaN is propagated, ±inf is strictly propagated (max(a, -inf) = a).

Input: Two SDFs evaluated on the same grid (sphere_sdf / box_sdf / (such as the output of esdf, inner negative and outer positive). The distance unit is the same as the input.

Returns: a float64 of shape after broadcast. <= 0 is the occupation of A∩B.

Attention:

• Outer values can be smaller than the true distance: Outside the intersection, if the point is outside A and outside B When max(a, b) is the distance to the farthest surface,'' the surface of A∩B is further away. There are things (lower bound). The zero isosurface is exact.

• If there is no common part, all elements will be positive (occupancy 0) and no error will occur.

• Used for CSG "cutting" such as cutting a sphere with a box or making a prism with two boxes. Subtracting B from A is sdf_subtract.

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)

• gear_metrology — py -3.11 examples_3d/gear_metrology.py

• render_beauty — py -3.11 examples_3d/render_beauty.py

• 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_subtract · sdf_smooth_union

Same category (sdf_csg)

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


*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.