sdf_intersect — 3D sdf_csg op

Data kinds: sdf × sdfsdf

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

Usage

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

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

ゼロ等値面は両境界の共通部分。外側で厳密 SDF、内側は保守的下界。

計算: `np.maximum(np.asarray(a, float64), np.asarray(b, float64))`。要素ごとの

max なので、ある点が A∩B の内側(負)になるのは `a < 0 かつ b < 0` のときだけ。

shape はブロードキャスト整合していればよく(不整合なら numpy の `ValueError`)、

それ以外の検査はしない。NaN は伝播、`±inf は厳密に伝播(max(a, -inf) = a`)。

入力: 同一グリッド上で評価した 2 つの SDF(`sphere_sdf / box_sdf` /

`esdf` の出力など、内側負・外側正)。距離の単位は入力と同じ。

返り値: ブロードキャスト後の shape の float64。`<= 0` が A∩B の占有。

注意:

外側の値は真の距離より小さく出うる: 交差の外側で、点が A の外かつ B の外の

とき `max(a, b)` は「遠い方の表面まで」の距離で、A∩B の表面はそれより遠い

ことがある(下界)。ゼロ等値面は厳密。

• 共通部分が無ければ全要素が正(占有 0)になり、エラーにはならない。

• 箱で球を切る・2 つの箱で角柱を作る、といった CSG の「切り出し」に使う。

A から B を抜くのは `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_metrologypy -3.11 examples_3d/gear_metrology.py

render_beautypy -3.11 examples_3d/render_beauty.py

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