From 39b566b5d1932578e9a57b8d3e45dacaf7c4cb34 Mon Sep 17 00:00:00 2001 From: ChenX Date: Fri, 4 Aug 2023 15:40:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91:=E5=A2=9E=E5=8A=A0=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __test__/FeedingToolPath/FeedingToolPath.test.ts | 8 ++++++++ .../__snapshots__/FeedingToolPath.test.ts.snap | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/__test__/FeedingToolPath/FeedingToolPath.test.ts b/__test__/FeedingToolPath/FeedingToolPath.test.ts index 2743da4ad..4b1e9f9c8 100644 --- a/__test__/FeedingToolPath/FeedingToolPath.test.ts +++ b/__test__/FeedingToolPath/FeedingToolPath.test.ts @@ -206,3 +206,11 @@ test('板边通槽走刀错误', () => let brs = LoadBoardsFromFileData(d); testPathCount(brs[0]); }); + +test('板边通槽走刀错误2', () => +{ + let d = + { "file": [1, "Board", 10, 2, 102, 0, 1, 2, 71, [1, -2.4105887386831976e-48, -1.2246467991473532e-16, 0, 1.2246467991473532e-16, 1.8367099231598242e-40, 1, 0, 0, -1, 0, 0, 1271.9939346213823, -1101.8512484286912, 4.898587350745864e-14, 1], 0, 0, 1, [1, -2.4105887386831976e-48, -1.2246467991473532e-16, 0, 0, 1, 0, 0, 1.2246467991473532e-16, 1.8367099231598242e-40, 1, 0, 1271.9939346213823, -1101.8512484286912, 4.898587350745864e-14, 1], 0, 0, 1, 3, 599.9999999343779, 400.0000125878295, 18, false, "Polyline", 10, 2, 0, 0, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 400.0000125878295, 0, 0, 1], 0, 0, 1, [1, 1.312449346675325e-8, 0, 0, 0, 0, -1, 0, -1.3124493466753246e-8, 0.9999999999999998, 0, 0, -1309.1361228011178, -2992.9802411616583, 0, 1], 0, 0, 1, 2, 7, [-400.0000005249786, 599.9999999343776], 0, [-400.0000125878295, 2.3624108456233916e-7], 0, [-18.000012062849976, 0], 0, [-18.000014048559137, 151.29796836193597], -0.19387051618840104, [-16.603531571438907, 154.76418559650477], 0, [-4.227933914080495e-8, 172.065010716585], 0, [0, 599.9999999343779], 0, true, 1, 3, 180.1187825806142, 27.000014065213747, 14.2, false, "Polyline", 10, 2, 0, 0, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 27.000014065213747, 0, 0, 1], 0, 0, 1, [1, 1.312449346675325e-8, 0, 0, -1.3124493466753246e-8, 0.9999999999999998, 0, 0, 0, 0, 1, 0, -318.99997040240686, 2.4412955498072797e-7, 0, 1], 0, 0, 1, 2, 11, [-9.977156878449023e-9, 180.0717639954068], 0, [0, 172.06501072447347], 0, [-16.603531529159568, 154.76418560439325], 0.19387051618840104, [-18.000014006279798, 151.29796836982445], 0, [-18.000013994854044, 150.42739764190978], 0, [-18.000012020570637, 7.88847041838881e-9], 0, [-27.00001205994488, 0], 0, [-27.000014065213747, 152.78829131841357], -0.20279376379021757, [-24.041006272401887, 158.5242485806384], 0, [-4.756374435948146, 179.28634117878767], -0.19816084316146357, [-1.90253541078539, 180.09270687876517], 0, true, 0, 3, 0, 0, 0, 0, 0, [1, -2.4105887386831976e-48, -1.2246467991473532e-16, 0, 1.2246467991473532e-16, 1.8367099231598242e-40, 1, 0, 0, -1, 0, 0, 1644.9939330557827, -1101.8512484286912, -1.3913358667597267e-7, 1], 3, 0, 0, 0, 0, 0, 13, 2, "牛角拉手", "1", "标准柜", "PET神秘灰肤感", "奥松", "神秘灰肤感", 0, 0, "不排", 2, 6, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, "0.8", "0.8", "0.8", "0.8", "", "", "", 7, "不排", "不排", "不排", "不排", "不排", "不排", "不排", true, true, 0, 0, 0, 0, 0, 0, 0, 0, true, 0, 0, null, 0, 0], "basePt": { "x": 1271.9939346213823, "y": -1119.8512484286912, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] }; + let brs = LoadBoardsFromFileData(d); + testPathCount(brs[0]); +}); diff --git a/__test__/FeedingToolPath/__snapshots__/FeedingToolPath.test.ts.snap b/__test__/FeedingToolPath/__snapshots__/FeedingToolPath.test.ts.snap index 09f3adeec..45031f24f 100644 --- a/__test__/FeedingToolPath/__snapshots__/FeedingToolPath.test.ts.snap +++ b/__test__/FeedingToolPath/__snapshots__/FeedingToolPath.test.ts.snap @@ -152,6 +152,10 @@ exports[`板边通槽走刀错误 1`] = `"460.00000"`; exports[`板边通槽走刀错误: 走刀数量 1`] = `1`; +exports[`板边通槽走刀错误2 1`] = `"534.13218"`; + +exports[`板边通槽走刀错误2: 走刀数量 1`] = `1`; + exports[`极限刀半径 1`] = `"1000.00000"`; exports[`极限刀半径 2`] = `"716.16750"`;