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 为各轴的体素数(标量=立方体或长度 3)。体素 i 的中心为 world lo + (i+0.5)/res * span(与 occupancy.query_distance 的 c=(q-lo)/span*res-0.5 一致 = 中心对齐)。返回值为形状 (nx,ny,nz,3) 的 coords 与 extent=(xmin,xmax,ymin,ymax,zmin,zmax)。
在这样生成的坐标上计算 sphere_sdf/box_sdf 并做 CSG 合成,即可直接传给 recon3d 的 marching cubes 或 occupancy 的过零点提取。
bounds 退化或 res<=0 时抛出 ValueError。
• 示例数据目录(下载 URL / 许可证) —— 2-D 用 skimage.data(BSD/公有领域)加合成图,3-D 给出真实数据源(Stanford/PDS 等)的下载 URL。
• 算子来历与参考文献 —— 该算子族所依据的研究/方法出处。
• gear_metrology — py -3.11 examples_3d/gear_metrology.py
• molecule_atom_count — py -3.11 examples_3d/molecule_atom_count.py
• procedural_hand — py -3.11 examples_3d/procedural_hand.py
• render_beauty — py -3.11 examples_3d/render_beauty.py
• sdf_csg — py -3.11 examples_3d/sdf_csg.py
• sfm_recon — py -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.