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); +});