sdf_offset — 3D sdf_csg op

Data kinds: sdfsdf

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"))

Usage

Move an SDF's zero level set by a distance `r along the normal = sdf − r` (r>0 inflates, r<0 shrinks).

> The detailed description below is the original text — the summary and the headings are translated.

新しいゼロ集合は旧 `sdf == r の等値面。全点で距離が一様に r` シフトするので、距離場

としての性質(勾配ノルム 1)は保たれる。プリミティブの厚み付け(丸めた殻)や配管の

クリアランス確保に使う。

計算: `np.asarray(sdf, float64) - float(r)r` はスカラのみ(配列を渡すと

`float()TypeError)。単位は sdf の距離単位と同じ。r = 0` は恒等。

shape・NaN・inf の検査はしない(`inf - r = inf` で契約どおり伝播)。

幾何的意味: 厳密な SDF に対しては Minkowski 和(`r > 0 で半径 r` の球で

膨張、`r < 0 で収縮)に一致する。sphere_sdf(g, c, R)r` を掛けると

`sphere_sdf(g, c, R + r) と厳密に等しい。box_sdf` の膨張では角が丸くなる

(ユークリッド膨張なので、箱が大きくなるのではなく角 R = r の丸箱になる)。

注意:

• 収縮(`r < 0)で |r|` が最小内接半径を超えると形は消える(全要素が正)。

エラーにはならない。

• `sdf_union / sdf_intersect` の内側は真の距離の下界なので、合成後に

`r < 0` で収縮すると、重なり領域で実際より多く削れることがある。

• 厚さ `t の殻: sdf_subtract(sdf, sdf_offset(sdf, -t))`。

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)

sfm_reconpy -3.11 examples_3d/sfm_recon.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 · 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.