feat: update algorithm integrations and point cloud overlays
This commit is contained in:
@@ -78,7 +78,7 @@ def main() -> int:
|
||||
z_min, z_max = _f("roiZMin"), _f("roiZMax")
|
||||
# 至少有一对轴的范围被填写时才构建 ROI
|
||||
if any(v is not None for v in (x_min, x_max, y_min, y_max, z_min, z_max)):
|
||||
from coupler_panel.roi import ROISpec # type: ignore
|
||||
from coupler_panel.roi_select import ROISpec # type: ignore
|
||||
|
||||
roi_spec = ROISpec(
|
||||
x_min=x_min if x_min is not None else float("-inf"),
|
||||
@@ -150,20 +150,27 @@ def main() -> int:
|
||||
D_y = float(result.D_y_max_mm)
|
||||
D_z = float(result.D_z_max_mm)
|
||||
|
||||
# 斜率形式:offset_mm = baseline * tan(theta),与 Excel 报表一致
|
||||
import math as _math
|
||||
offset_right = 700.0 * _math.tan(_math.radians(raw_right)) if 'raw_right' in dir() else 700.0 * _math.tan(_math.radians(theta_right))
|
||||
offset_ref = 375.0 * _math.tan(_math.radians(raw_ref)) if 'raw_ref' in dir() else 375.0 * _math.tan(_math.radians(theta_ref))
|
||||
|
||||
measurements = [
|
||||
{
|
||||
"name": "偏转角 θ_right (右向)",
|
||||
"value": theta_right,
|
||||
"unit": "deg",
|
||||
"tolerance": 0.5,
|
||||
"status": _status_for(theta_right, 0.5),
|
||||
"name": "车钩面板距纵向中心的右偏转角",
|
||||
"value": round(offset_right, 6),
|
||||
"unit": "mm",
|
||||
"baseline": 700.0,
|
||||
"tolerance": 1.0,
|
||||
"status": _status_for(offset_right, 1.0),
|
||||
},
|
||||
{
|
||||
"name": "偏转角 θ_ref (参考向)",
|
||||
"value": theta_ref,
|
||||
"unit": "deg",
|
||||
"tolerance": 0.5,
|
||||
"status": _status_for(theta_ref, 0.5),
|
||||
"name": "车钩面板距参考面的右偏转角",
|
||||
"value": round(offset_ref, 6),
|
||||
"unit": "mm",
|
||||
"baseline": 375.0,
|
||||
"tolerance": 0.8,
|
||||
"status": _status_for(offset_ref, 0.8),
|
||||
},
|
||||
{
|
||||
"name": "最大 x 偏差 dx_y",
|
||||
|
||||
Reference in New Issue
Block a user