From 11545bd8b01b6f2ee6c87616a039db4cea8ddbac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A2=81=E8=96=84=E4=BA=91?= Date: Wed, 29 Jul 2026 11:27:50 +0800 Subject: [PATCH] test: cover b-spline parameter-matched displacement --- ClumsyPilot/tests/verify_path_smoothing_bspline.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ClumsyPilot/tests/verify_path_smoothing_bspline.ps1 b/ClumsyPilot/tests/verify_path_smoothing_bspline.ps1 index 1dd75a2..8de3f8d 100644 --- a/ClumsyPilot/tests/verify_path_smoothing_bspline.ps1 +++ b/ClumsyPilot/tests/verify_path_smoothing_bspline.ps1 @@ -202,6 +202,11 @@ foreach ($point in $cornerPoints) { Assert-True ((Get-DistanceToPolyline $point $cornerSource) -le ($allowedRadius + 0.000000001)) 'Every B-spline displacement must stay inside the per-anchor clearance reserve radius.' } +# A 0.035 m reserve radius must reject this corner by its parameter-matched source reference, +# even though the candidate's nearest-polyline distance is smaller than 0.035 m. +$parameterMatchedReserveCandidate = Invoke-Candidate @((New-DirectionSegment 0 $forward $cornerSource)) 0.045 +Assert-True (-not (Get-PropertyValue $parameterMatchedReserveCandidate 'Succeeded')) 'A medium reserve must reject B-spline geometry that exceeds its parameter-matched movement radius.' + # A tight reserve may not publish an evaluated B-spline that leaves its 0.005 m movement radius. $tightReserveCandidate = Invoke-Candidate @((New-DirectionSegment 0 $forward $cornerSource)) 0.075