sdf_csg op• Data kinds: sdf → sdf
• Call: import fullseye as fs; fs.ledger.sdf_offset(sdf, r) (to call the implementation directly, import sdf_ops; sdf_ops.sdf_offset(sdf, r); from the registry, ops3d.get("sdf_offset"))
Move an SDF's zero level set by a distance r along the normal = sdf − r (r>0 inflates, r<0 shrinks).
The new zero set is the isosurface sdf == r of the old field. The distance shifts uniformly by r at every point, so its properties as a distance field (gradient norm 1) are preserved. Used to give primitives thickness (rounded shells) or to secure clearance for piping.
Computation: np.asarray(sdf, float64) - float(r). r must be a scalar (passing an array gives TypeError from float()). The unit is the distance unit of sdf. r = 0 is the identity. No checks on shape, NaN or inf (inf - r = inf propagates as per the contract).
Geometric meaning: for an exact SDF it equals the Minkowski sum (r > 0 dilates by a sphere of radius r, r < 0 erodes). Applying r to sphere_sdf(g, c, R) gives exactly sphere_sdf(g, c, R + r). Dilating box_sdf rounds the corners (as it is a Euclidean dilation, the box does not just get bigger but becomes a rounded box with corner R = r).
Notes:
• When eroding (r < 0), if |r| exceeds the smallest inscribed radius the shape vanishes (every element positive). This is not an error.
• The inside of sdf_union / sdf_intersect is a lower bound of the true distance, so eroding with r < 0 after combining can remove more than it should in the overlap region.
• Shell of thickness t: sdf_subtract(sdf, sdf_offset(sdf, -t)).
• 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.
• sfm_recon — py -3.11 examples_3d/sfm_recon.py
sdf as input)sdf_to_occupancy · fuse_to_voxel · integrate · extract_surface_points · query_distance · sdf_union · sdf_intersect · sdf_subtract
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.