sdf_csg op• Data kinds: sdf → sdf
• Call: import fullseye as fs; fs.ledger.sdf_offset(sdf, r) (implementation को सीधे call करना हो तो import sdf_ops; sdf_ops.sdf_offset(sdf, r), registry से लेना हो तो ops3d.get("sdf_offset"))
SDF की zero level set को दूरी r जितना normal direction में खिसकाता है = sdf - r (r>0 फैलाव, r<0 सिकुड़न)।
नया zero set पुराने field का isosurface sdf == r है। हर point पर दूरी एक समान r से खिसकती है, इसलिए distance field के रूप में गुण (gradient norm 1) बने रहते हैं। primitives को मोटाई देने (गोल shell) या piping की clearance सुनिश्चित करने के लिए उपयोग होता है।
गणना: np.asarray(sdf, float64) - float(r)। r केवल scalar (array देने पर float() से TypeError)। unit sdf की दूरी की unit जैसी ही। r = 0 identity है। shape, NaN और inf की जाँच नहीं होती (inf - r = inf contract के अनुसार propagate होता है)।
ज्यामितीय अर्थ: exact SDF के लिए यह Minkowski sum के बराबर है (r > 0 पर radius r के sphere से dilation, r < 0 पर erosion)। sphere_sdf(g, c, R) पर r लगाने से परिणाम sphere_sdf(g, c, R + r) के exact बराबर होता है। box_sdf के dilation में कोने गोल हो जाते हैं (Euclidean dilation होने के कारण box केवल बड़ा नहीं होता, बल्कि कोने R = r वाला गोल box बन जाता है)।
ध्यान दें:
• erosion (r < 0) में |r| यदि सबसे छोटे inscribed radius से अधिक हो तो आकार गायब हो जाता है (सभी elements positive)। यह error नहीं है।
• sdf_union / sdf_intersect का अंदर का भाग सच्ची दूरी की lower bound है, इसलिए combine करने के बाद r < 0 से erosion करने पर overlap क्षेत्र में वास्तविक से अधिक कट सकता है।
• मोटाई t का shell: sdf_subtract(sdf, sdf_offset(sdf, -t))।
• Sample data catalog (DL URL / license) — 2-D के लिए skimage.data (BSD/public) + synthetic, 3-D के लिए real data sources (Stanford/PDS आदि) के DL URL।
• Operators का स्रोत और संदर्भ — इस op family के मूल research/methods के स्रोत।
• sfm_recon — py -3.11 examples_3d/sfm_recon.py
sdf को input के रूप में लेते हैं)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 · capsule_sdf · sdf_union
*Provenance: sdf_ops.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*
© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.