From 20320d6f811410090c0e9044c3ce574ad8b6b8ee Mon Sep 17 00:00:00 2001 From: ChenX Date: Tue, 12 Feb 2019 10:32:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0BSP=E4=BA=A4=E9=9B=86?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __test__/Extrude/BSP.test.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 __test__/Extrude/BSP.test.ts diff --git a/__test__/Extrude/BSP.test.ts b/__test__/Extrude/BSP.test.ts new file mode 100644 index 000000000..08e7d9e40 --- /dev/null +++ b/__test__/Extrude/BSP.test.ts @@ -0,0 +1,15 @@ +import { LoadEntityFromFileData } from "../Utils/LoadEntity.util"; +import { Board } from "../../src/DatabaseServices/Board"; + +test("#IRGWW BSP交集错误", () => +{ + + let d = + [2, "Board", 2, 1, 103, false, 7, 0, [0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 509.45569620253156, -151.1075949367089, 0, 1], 1, 1, 1200, 600, 18, true, "Polyline", 2, 1, 0, false, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 2, 4, [0, 0], 0, [600, 0], 0, [600, 1200], 0, [0, 1200], 0, true, 0, null, null, 1, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 509.45569620253156, -151.1075949367089, 0, 1], 1, "右侧板", "{\"roomName\":\"\",\"cabinetName\":\"\",\"boardName\":\"\",\"material\":\"\",\"color\":\"\",\"lines\":0,\"bigHoleDir\":0,\"drillType\":\"three\",\"composingFace\":2,\"highSealed\":[],\"sealedUp\":\"1\",\"sealedDown\":\"1\",\"sealedLeft\":\"1\",\"sealedRight\":\"1\",\"knifeRad\":\"0\",\"grooveAddLength\":\"0\",\"grooveAddWidth\":\"0\",\"grooveAddDepth\":\"0\",\"spliteHeight\":\"\",\"spliteWidth\":\"\",\"spliteThickness\":\"\"}", 0, "Board", 2, 1, 104, false, 7, 0, [1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, -282.1708860759492, 175.96835443037966, 0, 1], 1, 1, 1200, 800, 18, true, "Polyline", 2, 1, 0, false, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 2, 4, [0, 0], 0, [800, 0], 0, [800, 1200], 0, [0, 1200], 0, true, 0, null, null, 1, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -282.1708860759492, 175.96835443037966, 0, 1], 2, "背板", "{\"roomName\":\"\",\"cabinetName\":\"\",\"boardName\":\"\",\"material\":\"\",\"color\":\"\",\"lines\":0,\"bigHoleDir\":0,\"drillType\":\"three\",\"composingFace\":2,\"highSealed\":[],\"sealedUp\":\"1\",\"sealedDown\":\"1\",\"sealedLeft\":\"1\",\"sealedRight\":\"1\",\"knifeRad\":\"3\",\"grooveAddLength\":\"0\",\"grooveAddWidth\":\"0\",\"grooveAddDepth\":\"0\",\"spliteHeight\":\"\",\"spliteWidth\":\"\",\"spliteThickness\":\"\"}", 0] + + let brs = LoadEntityFromFileData(d) as Board[]; + + let exts = brs[0].ConverToLocalGroove(brs[1]); + + console.log(exts); +});