fit_bspline_curve — 3D freeform op

• Data kinds: points → bspline_curve

• Call: import fullseye as fs; fs.ledger.fit_bspline_curve(points, smooth=0.0, k=3, nest=None) (implementation को सीधे call करना हो तो import bspline_surf; bspline_surf.fit_bspline_curve(points, smooth=0.0, k=3, nest=None), registry से लेना हो तो ops3d.get("fit_bspline_curve"))

उपयोग

ordered point sequence (M,D) पर B-spline curve fit करता है (splprep, parametric)।

seam/edge/measurement probe की trajectory जैसे "क्रम का अर्थ रखने वाले" point sequence को smooth parametric curve r(u), u∈[0,1] के रूप में फिर से बनाता है। z=f(x,y) के विपरीत यह multi-valued (मुड़कर लौटने वाले, loop) आकार भी दर्शा सकता है।

Parameters

points : array_like, shape (M, D)

क्रमित vertices। D=3 आम है (3D curve), पर 2D या अधिक की अनुमति है।

smooth : float

smoothing factor s। 0.0 पर सभी points से गुज़रता है (interpolation), जितना बड़ा उतना smooth।

k : int

degree (default 3=cubic)। points की संख्या k+1 से कम हो तो अपने-आप घटा दी जाती है।

nest : int or None

knots की संख्या की ऊपरी सीमा (splprep को जैसी की तैसी दी जाती है)। None पर automatic।

Returns

tck : tuple

(t, c, k)। eval_bspline_curve को दें।

Raises

ValueError

जब points 2 से कम हों, dimensions असंगत हों, non-finite मान हों, या duplicate/degeneracy के कारण splprep

curve न लौटा सके।

अतिरिक्त:

• default smooth=0.0 interpolation है (सभी points से गुज़रता है)। यह surface वाले default (points की संख्या से automatic मान) से अलग है, इसलिए noise वाले point sequence के लिए smooth स्पष्ट रूप से दें। parameter u splprep का default है (chord length के अनुपात में, [0,1] पर normalised)।

• degree k k >= m होने पर चुपचाप m-1 कर दी जाती है (2 points पर सीधी रेखा)।

• लगातार duplicate points हों तो splprep विफल होकर ValueError देता है। पहले चरण में duplicates हटाएँ या resample_uniform से समान spacing करें।

• लौटाया गया tck [t, c, k] की list है (c, D coefficient arrays की list है)। इसे eval_bspline_curve को दें। closed curve नहीं माना जाता (सिरे खुले रहते हैं)।

• deterministic (कोई random नहीं)।

संदर्भ (sample data, साहित्य)

• 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 के स्रोत।

चलाए जा सकने वाले उदाहरण (verified samples जो सच में यह op call करते हैं)

• bspline_freeform — py -3.11 examples_3d/bspline_freeform.py

वे अगले ops जिनसे type जुड़ता है (bspline_curve को input के रूप में लेते हैं)

fuse_to_voxel · eval_bspline_curve

इसी category के (freeform)

fit_bspline_surface · eval_bspline_surface · surface_residual · eval_bspline_curve


*Provenance: bspline_surf.py — 3D operator registry. यह per-op note tools/opdocs.py md से अपने-आप generate होता है (हाथ से edit न करें)।*

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