fit_cone — 3D robust_fit op

Data kinds: pointsprimitive

Call: import fullseye as fs; fs.ledger.fit_cone(points) -> 'dict' (to call the implementation directly, import fit_primitives_ext; fit_primitives_ext.fit_cone(points) -> 'dict'; from the registry, ops3d.get("fit_cone"))

Usage

Fit an infinite cone to a point set and return `{apex, axis, half_angle, residual}`.

> The detailed description below is the original text — the summary and the headings are translated.

子午面での点-母線直交距離 `a·sinα − ρ·cosα(a=軸成分, ρ`=半径,

`α=半角)を scipy.optimize.least_squares` で最小化する。初期値は PCA 軸 +

半径 ρ の軸成分 t に対する線形回帰(`ρ = m·t + b` の傾き m=tanα, 切片ゼロ点=頂点)。

軸の向きは「頂点から離れるほど ρ が増える(+方向に開く)」に正規化する。

Args:

points: (N,3) 点群(最低 6 点)。

Returns:

dict: ``{"apex": (3,), "axis": (3,) 単位軸(開く向き), "half_angle": float [rad],

"residual": float 点-面距離の RMS}``。

Raises:

ValueError: 形状不正/点数不足/半角 ~0(円柱へ縮退)など fail-closed。

Background guides (the physics and conventions behind this op)

blas_threads_and_memory — 行列分解が遅い理由の知識 — BLAS スレッド・キャッシュ・メモリ配置

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

Runnable examples (verified samples that actually call this op)

fit_primitives_extpy -3.11 examples_3d/fit_primitives_ext.py

Ops the type connects to (they accept primitive as input)

fuse_to_voxel · angle_between_lines · angle_between_planes · angle_line_plane · distance_point_plane · distance_point_line · distance_line_line · distance_segment_segment

Same category (robust_fit)

ransac_plane · ransac_sphere · ransac_line · ransac_cylinder · fit_torus · fit_ellipsoid


*Provenance: fit_primitives_ext.py — 3D operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

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