Files
massive-cloud/alg/delivery_v1.2.1/coupler_panel_release/coupler_panel/exceptions.py
lipan 29f1d45d66 feat: 算法升级、整车配准集成与性能分析文档
算法更新: delivery v1.2.1、平整度v1.5、测距v2.2、整车配准v1.3
适配器: vehicle-registration 新增、各算法 manifest 和 adapter 更新
后端: taskCadFiles/source 字段迁移、derivedPointClouds 注册、取消任务联动
前端: ElapsedTime 时长显示、两步算法流程、canRun 逻辑修复
文档: 新增5份算法性能分析报告
2026-06-25 08:22:20 +00:00

56 lines
1.5 KiB
Python

"""Public exception hierarchy for coupler_panel.
Catch :class:`CouplerError` for any algorithm failure that should be
surfaced to the user. Subclasses indicate what specifically went wrong so
callers can render targeted error messages.
Non-fatal data-quality issues are **not** raised; they are reported via
``CouplerMeasurement.quality_flags``.
"""
from __future__ import annotations
class CouplerError(Exception):
"""Base class for all errors raised by the coupler-panel pipeline."""
class InvalidPointCloudError(CouplerError):
"""Raised when the input point cloud is malformed or unreadable."""
class UnsupportedFormatError(InvalidPointCloudError):
"""Raised when the input file extension is not supported."""
class InsufficientPointsError(CouplerError):
"""Raised when the input has too few points to run the pipeline."""
class CADParseError(CouplerError):
"""Raised when the STP file cannot be parsed or has unexpected topology."""
class HoleDetectionError(CouplerError):
"""Raised when the four locating holes cannot be reliably detected."""
class RegistrationError(CouplerError):
"""Raised when 4-hole Kabsch registration fails (e.g. degenerate pairing)."""
class PlaneFitError(CouplerError):
"""Raised when the panel plane cannot be fitted (too few inliers, etc.)."""
__all__ = [
"CouplerError",
"InvalidPointCloudError",
"UnsupportedFormatError",
"InsufficientPointsError",
"CADParseError",
"HoleDetectionError",
"RegistrationError",
"PlaneFitError",
]