grid_coords — 3D sdf_csg op

資料種類:coordgrid(僅由參數決定的運算子 —— 不接受影像或資料輸入)

呼叫: import fullseye as fs; fs.ledger.grid_coords(bounds, res)(要直接呼叫實作,import sdf_ops; sdf_ops.grid_coords(bounds, res);從台帳取用則 ops3d.get("grid_coords"))

經台帳呼叫的回傳值: fullseye.ledger.grid_coords(...) 只回傳**宣告的 out 型別 coordgrid 的值**(底層函式還會回傳輔助資訊)。需要被捨棄的部分時,請用 fullseye.ledger.grid_coords.raw(...),或直接呼叫 sdf_ops.grid_coords

用法

建構用於 CSG 求值的體素中心座標網格(與 occupancy 相同的格點慣例)。

> 以下的詳細說明為原文 —— 摘要與標題已翻譯。

`bounds=((xmin,xmax),(ymin,ymax),(zmin,zmax))res` は各軸のボクセル数(スカラ=立方

or 長さ3)。voxel `i の中心は world lo + (i+0.5)/res * span(occupancy.query_distance`

の `c=(q-lo)/span*res-0.5` と整合 = 中心アライン)。返り値は

`coords shape (nx,ny,nz,3)extent=(xmin,xmax,ymin,ymax,zmin,zmax)`。

こうして作った座標に `sphere_sdf/box_sdf を評価し CSG 合成すれば、recon3d` の

marching cubes や `occupancy` のゼロ交差抽出へそのまま渡せる。

Raises ValueError for degenerate bounds or res<=0。

參考(範例資料・文獻)

• 範例資料目錄(下載 URL / 授權) —— 2-D 用 skimage.data(BSD/公有領域)加合成圖,3-D 給出真實資料源(Stanford/PDS 等)的下載 URL。

• 運算子來歷與參考文獻 —— 該運算子族所依據的研究/方法出處。

可執行的範例(實際呼叫該運算子並已驗證的樣例)

gear_metrologypy -3.11 examples_3d/gear_metrology.py

molecule_atom_countpy -3.11 examples_3d/molecule_atom_count.py

procedural_handpy -3.11 examples_3d/procedural_hand.py

render_beautypy -3.11 examples_3d/render_beauty.py

sdf_csgpy -3.11 examples_3d/sdf_csg.py

sfm_reconpy -3.11 examples_3d/sfm_recon.py

型別可銜接的下一個運算子(可接受 coordgrid 作為輸入)

fuse_to_voxel · sphere_sdf · box_sdf · plane_sdf · cylinder_sdf · torus_sdf · capsule_sdf

同類別(sdf_csg)

sphere_sdf · box_sdf · plane_sdf · cylinder_sdf · torus_sdf · capsule_sdf · sdf_union · sdf_intersect


*Provenance: sdf_ops.py — 3D 運算子登記表。本條目由 tools/opdocs.py md 自動產生(請勿手動編輯)。*

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