fullseye

capsule_sdf — 3D sdf_csg op

使い方

線分 ab を半径 radius で太らせたカプセルの厳密な符号付き距離場。

sdf(p) = ‖p - (a + clamp(((p-a)·(b-a))/‖b-a‖², 0, 1)·(b-a))‖ - radius。 線分への最短距離そのものなので全空間で勾配ノルム 1(円柱と違い端が丸いぶん、 角が無く厳密)。リブ・配管・骨・ワイヤ・工具の掃引体積の近似に向く。

引数と検証(ValueError):

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

使いどころ: 工具の到達性を「工具の掃引体積が部品と交わらないか」で見るとき、工具を カプセルで置いて sdf_intersect の最小値が正かを見る。骨梁・血管・繊維の合成にも。

参考(サンプルデータ・文献)

実行できる例(この op を実際に呼ぶ検証済みサンプル)

型が繋がる次の op(sdf を入力に取れる)

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 · sdf_union · sdf_intersect


Provenance: sdf_ops.py — 3D operator registry. この per-op ノートは tools/opdocs.py md が自動生成(手編集しない)。

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.