Weldone Hybrid Seam Replay Debug
Overview
定位 Weldone 混合焊缝重构问题时,优先围绕 replay 包复现、RANSAC 拟合质量、Arc 弱诊断和重构几何连续性推进。目标是用最少代码改动判断是点云质量问题、阈值策略问题、端点/相切几何问题,还是 replay 包/CLI 保存链路问题。
Trigger Scenarios
Use this skill when the user mentions any of these:
SingleHybridReconstructionReplayPackage.jsonorReconstructionReplayPackage.json.replay-single-hybrid,replay-dualarm-hybrid, or "新的 replay 包能不能存下来".- 单机混合焊缝、双机混合焊缝、HybridSeam、LaserPoint RANSAC、Arc 拟合失败。
- 半径偏差、圆心偏差、短弧 3 点、弦高、相切关系、端头锚点、未扫描 arc 对齐。
- Logs containing
HybridRansacFitException,LaserPoint Arc RANSAC,RadiusDeviation,CenterDeviation,MaxResidual, orInlierRatio.
Fast Workflow
- Read
AGENTS.mdandCLAUDE.mdin the Weldone repo before changing code. - Identify package type:
SingleHybridReconstructionReplayPackage.json-> runjust replay-single-hybrid "INPUT_PATH" "OUTPUT_PATH".ReconstructionReplayPackage.json-> runjust replay-dualarm-hybrid "INPUT_PATH" "OUTPUT_PATH".
- Never overwrite the original replay package. Always write a timestamped output beside it or into a temp/debug folder.
- After CLI replay, inspect:
FailureExceptionType/FailureMessage.LineFitDiagnostics,ArcFitDiagnostics,CommonTangentDiagnostics.- Reconstructed segment count, endpoint anchor error, tangent continuity logs.
- Use
scripts/summarize_replay_arc_diagnostics.py REPLAY_JSON_OR_DIRECTORYto summarize Arc diagnostics quickly. - If CLI execution modifies
src/Weldone.Cli/Logs/logs.txt, restore it unless the user explicitly wants log changes committed. - Add or update focused tests before finalizing:
HybridSeamSegmentFitterTestsfor domain fitting behavior.HybridSinglePointReconstructionTestsfor single-machine application behavior when relevant.- Replay CLI verification with a field package when available.
Arc Threshold Policy
Treat Arc RANSAC hard failures as point-cloud quality failures only:
InlierRatioat least0.6.RmsResidualat most1.0mm.MaxResidualat most2.0mm.
Treat RadiusDeviation and CenterDeviation as diagnostics, not hard failures. Short arcs can have large radius or center deviation while still being acceptable if the captured points are self-consistent and the reconstructed geometry stays continuous.
Mark weak Arc reconstruction for observability, not rejection, when any of these are true:
PointCountat most3.SagittaRatioless than0.05.ChordRadiusRatioless than0.30.RadiusDeviationRatiogreater than0.20.MaxOriginalRadialDeviationgreater than30mm.
Code Map
Check these files first:
src/Weldone.Domain/WeldProcedure/HybridSeam/HybridConstrainedRansacFitter.cs- RANSAC candidate scoring and hard failure thresholds.src/Weldone.Domain/WeldProcedure/HybridSeam/HybridSeamSegmentFitter.cs- segment fitting, endpoint resolution, tangent handling, andLast*Diagnostics.src/Weldone.Domain/WeldProcedure/HybridSeam/HybridRansacFitQuality.cs- diagnostic records and log formatting.src/Weldone.Application/Scanning/HybridSeam/HybridWeldSeamCalibrationService.cs- replay package creation/saving and field debug package capture.src/Weldone.Application/Scanning/HybridSeam/*ReplayPackage.cs- replay package schemas.src/Weldone.Cli/Commands/ReplaySingleHybridCommand.cs- single-machine replay CLI.src/Weldone.Cli/Commands/ReplayHybridCommand.cs- dual-arm replay CLI.test/Weldone.Domain.Tests/WeldProcedure/HybridSeamSegmentFitterTests.cs- domain regression tests.
Detailed Reference
Load references/hybrid_replay_debug_workflow.md when the task needs root-cause analysis, code changes, threshold design, or a final explanation of replay results.