cylinder_sdf — 3D sdf_csg op

데이터 종류: coordgridsdf

호출: import fullseye as fs; fs.ledger.cylinder_sdf(grid, center, axis, radius, height)(구현을 직접 호출하려면 import sdf_ops; sdf_ops.cylinder_sdf(grid, center, axis, radius, height), 원장에서 가져오려면 ops3d.get("cylinder_sdf"))

사용법

> 이 연산자의 설명은 아직 번역이 없습니다. 원문을 그대로 싣습니다.

有限長の円柱(両端が平らな蓋)の厳密な符号付き距離場(内側負・外側正)。

軸方向の距離 `t と軸からの半径 r に分け、q = (r - radius, |t| - height/2)`

として `outside = ‖max(q, 0)‖inside = min(max(q), 0)sdf = outside + inside`。

これは `box_sdf` と同じ Quilez 流の構成を「(半径, 軸)の 2-D 断面」に適用したもので、

側面・蓋・角(縁)のいずれに対しても真のユークリッド距離になる。

引数と検証(`ValueError`):

• `grid: 最終軸が 3 の float 配列 (..., 3)`。

• `center`: 円柱の中心(端面ではなく重心。要素数 3)。

• `axis`: 軸の向き(要素数 3、零ベクトル・NaN は拒否。長さは自動正規化)。

• `radius: 半径 > 0 相当のスカラ(0` は軸線そのもの、負は拒否)。

• `height: 全長のスカラ(center` から ±height/2。負は拒否)。

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

使いどころ: **貫通穴は `sdf_subtract(part, cylinder_sdf(...))**(height` を部品より

長くして端面の縁を残さない)。ボス・ピン・シャフトは `sdf_union`。無限長の円柱が

要るなら `height` を十分大きく取る(端面が評価域の外に出れば側面だけが効く)。

참고(샘플 데이터·문헌)

• 샘플 데이터 카탈로그(DL URL / 라이선스) —— 2-D 는 skimage.data(BSD/public)+ 합성, 3-D 는 실데이터 소스(Stanford/PDS 등)의 DL URL.

• 연산자의 내력·참고문헌 —— 이 연산자 족의 바탕이 된 연구/기법의 출처.

실행 가능한 예제(이 연산자를 실제로 호출하는 검증된 샘플)

sdf_csgpy -3.11 examples_3d/sdf_csg.py

타입이 이어지는 다음 연산자(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 · torus_sdf · capsule_sdf · sdf_union · sdf_intersect


*Provenance: sdf_ops.py — 3D 연산자 레지스트리. 이 op 노트는 tools/opdocs.py md 가 자동 생성합니다(직접 편집하지 마세요).*

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