From 4c34bf4829431b6ba7f092ca1d4c23e877ddc5d1 Mon Sep 17 00:00:00 2001 From: ZoeLeeFZ Date: Wed, 10 Jul 2019 18:18:39 +0800 Subject: [PATCH] =?UTF-8?q?!395=20=E8=A1=A5=E5=85=85#IYX1P=E5=8D=95?= =?UTF-8?q?=E5=85=83=E6=B5=8B=E8=AF=95=20Merge=20pull=20request=20!395=20f?= =?UTF-8?q?rom=20ZoeLeeFZ/addFeedingTest?= 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 | 12 ++++++++++++ 2 files changed, 20 insertions(+) diff --git a/__test__/FeedingToolPath/FeedingToolPath.test.ts b/__test__/FeedingToolPath/FeedingToolPath.test.ts index f5bbff1e5..bb5e3613b 100644 --- a/__test__/FeedingToolPath/FeedingToolPath.test.ts +++ b/__test__/FeedingToolPath/FeedingToolPath.test.ts @@ -117,3 +117,11 @@ test("造型的外框和内框厚度等于刀直径", () => let brs = LoadBoardsFromFileData(data); testPathCount(brs[0], 4); }) + +test("#IYX1P", () => +{ + let data = + [1, "Board", 5, 2, 101, false, 1, 11, 0, [0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 25627.96702118174, -1046.5797499058865, 0, 1], 0, 0, 2, 1200, 600, 18, true, "Polyline", 5, 2, 0, false, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 0, 2, 4, [0, 0], 0, [600, 0], 0, [600, 1200], 0, [0, 1200], 0, true, 1, 2, 416.58619999999996, 325.1405, 5, true, "Polyline", 5, 2, 0, false, 0, 1, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -1187.5114150409554, -619.5823942857144, 0, 1], 0, 0, 2, 4, [1187.5114150409554, 619.5823942857144], 0, [1512.6519150409554, 619.5823942857144], 0, [1512.6519150409554, 1036.1685942857143], 0, [1187.5114150409554, 1036.1685942857143], 0, true, 1, 2, 404.58619999999996, 313.1405, 5, false, "Polyline", 5, 2, 0, false, 0, 1, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -1193.5114150409554, -625.5823942857144, 0, 1], 0, 0, 2, 4, [1444.8769130439057, 968.3935922886646], 0, [1193.5114150409554, 1030.1685942857143], 0, [1193.5114150409554, 625.5823942857144], 0, [1506.6519150409554, 625.5823942857144], 0, true, 0, 3, 0, 0, 0, [0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 25640.96702118174, -917.6659343956826, 455.37831265306136, 1], 3, 0, 0, 0, [0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 25640.96702118174, -923.6659343956826, 449.37831265306136, 1], 3, 0, 0, 0, 3, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -1686.3109561311285, 160.2072462301978, 0, 1], 1, "左侧板", "", "", "", "", "", 0, 0, "three", 2, 0, "1", "1", "1", "1", "", "", "", 6, "three", "three", "three", "three", "three", "three", true, true, 0, 0]; + let brs = LoadBoardsFromFileData(data); + testPathCount(brs[0], 5); +}) diff --git a/__test__/FeedingToolPath/__snapshots__/FeedingToolPath.test.ts.snap b/__test__/FeedingToolPath/__snapshots__/FeedingToolPath.test.ts.snap index b8bba279c..7b890a51b 100644 --- a/__test__/FeedingToolPath/__snapshots__/FeedingToolPath.test.ts.snap +++ b/__test__/FeedingToolPath/__snapshots__/FeedingToolPath.test.ts.snap @@ -1,5 +1,17 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`#IYX1P: 曲线长度 1`] = `1334.7992356906177`; + +exports[`#IYX1P: 曲线长度 2`] = `7092.317327216775`; + +exports[`#IYX1P: 曲线长度 3`] = `3600`; + +exports[`#IYX1P: 曲线长度 4`] = `1483.4533999999999`; + +exports[`#IYX1P: 曲线长度 5`] = `1324.9044565737036`; + +exports[`#IYX1P: 走刀数量 1`] = `2`; + exports[`刀切到外轮廓情况: 曲线长度 1`] = `22596.75011038597`; exports[`刀切到外轮廓情况: 曲线长度 2`] = `6355.243980781998`;