torus_sdf — 3D sdf_csg op

Data kinds: coordgridsdf

Call: import fullseye as fs; fs.ledger.torus_sdf(grid, center, axis, major_radius, minor_radius) (to call the implementation directly, import sdf_ops; sdf_ops.torus_sdf(grid, center, axis, major_radius, minor_radius); from the registry, ops3d.get("torus_sdf"))

Usage

> This operator's description has not been translated yet. The original text follows as it is.

トーラス(ドーナツ)の厳密な符号付き距離場(内側負・外側正)。

`sdf(p) = ‖(r - major_radius, t)‖ - minor_radius(r は軸からの半径、t` は

軸方向の距離)。芯線が半径 `major_radius の円で、その周りに半径 minor_radius`

の管が付いた形なので、フィレット(隅の丸み)の解析形としてそのまま使える。

引数と検証(`ValueError`):

• `grid / center / axis: :func:cylinder_sdf` と同じ(軸はドーナツの穴の向き)。

• `major_radius`: 芯線の半径(負は拒否)。

• `minor_radius: 管の半径(負は拒否)。minor_radius >= major_radius` だと穴が

潰れた形になるが、距離場としては正しいので拒否しない

返り値: `grid.shape[:-1]` の float64。

使いどころ: `sdf_subtract で内隅にフィレットを削り出す / sdf_union` で O リング溝の

形を作る。角を丸めるだけなら `sdf_smooth_union` のほうが手軽だが、あちらは丸みの

半径が形状に依存する —— 半径を設計値として持ちたいときはこちら

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_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_intersect · sdf_subtract

Same category (sdf_csg)

grid_coords · sphere_sdf · box_sdf · plane_sdf · cylinder_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.