|
|
|
@ -145,3 +145,23 @@ test("封边错误板件2", () =>
|
|
|
|
|
|
|
|
|
|
expect(con.Area).toMatchSnapshot();
|
|
|
|
|
});
|
|
|
|
|
test("封边错误板件3", () =>
|
|
|
|
|
{
|
|
|
|
|
let data = { "file": [1, "Board", 8, 2, 100, false, 1, 3, 0, [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 668.6547958775191, 360.34483792621177, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 668.6547958775191, 360.34483792621177, 0, 1], 0, 3, 430.00000000003945, 843.0000701800069, 18, true, "Polyline", 8, 2, 0, false, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 429.99984841118567, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 2, 6, [843, -429.99984841118567], 0, [843.0000701800067, 0.00015158885375399223], 0, [843.0000701800069, 0.00015158885375399223], 0, [843.0000000000002, 0.00015158881433308125], 0, [0, 0], 0, [0, -429.99984841118567], 0, true, 0, 3, 0, 0, 0, 0, 0, 9, 2, "背板", "", "父母房-衣柜", "兔宝宝洛萨暮影(杉木芯)", "兔宝宝洛萨暮影(杉木芯)", "兔宝宝洛萨暮影(杉木芯)", 0, 1, "三合一", 2, 5, 1, 1, 1, 1, 1, "1", "1", "1", "1", "", "", "", 6, "三合一", "三合一", "三合一", "三合一", "三合一", "三合一", false, true, 0, 0, 0, 0, 0, 0, 0, 0, true], "basePt": { "x": 668.6547958775191, "y": 342.34483792621177, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
|
|
|
|
|
let br = LoadBoardsFromFileData(data)[0];
|
|
|
|
|
|
|
|
|
|
let con = GetSealedBoardContour(br, false);
|
|
|
|
|
expect(con.IsClose).toBeTruthy();
|
|
|
|
|
|
|
|
|
|
expect(con.Area).toMatchSnapshot();
|
|
|
|
|
});
|
|
|
|
|
test("封边错误板件4", () =>
|
|
|
|
|
{
|
|
|
|
|
let data = { "file": [1, "Board", 8, 2, 104, false, 1, 4, 0, [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, 1791.2350208071002, 332.28157054709305, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1791.221632944289, 332.28157054709305, -1220.5383064692724, 1], 0, 3, 608.4984929746847, 54, 18, false, "Polyline", 8, 2, 0, false, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 2, 5, [0, 0], 0, [53.986612137188786, 0], 0, [54, 0.8772342627713384], 0, [53.99999999999998, 578.4441943321467], 0, [0, 608.4984929746847], 0, true, 0, 3, 0, 0, 0, 0, 0, 9, 2, "左收口条", "主卧", "下柜左收口", "多层板", "多层板", "无语枫木", 0, 0, "三合一", 2, 0, "1", "1", "1", "1", "", "", "", 5, "三合一", "三合一", "三合一", "三合一", "三合一", true, true, 0, 0, 0, 0, 0, 0, 0, 0, true], "basePt": { "x": 1791.2350208071002, "y": 314.28157054709305, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
|
|
|
|
|
let br = LoadBoardsFromFileData(data)[0];
|
|
|
|
|
|
|
|
|
|
let con = GetSealedBoardContour(br, false);
|
|
|
|
|
expect(con.IsClose).toBeTruthy();
|
|
|
|
|
|
|
|
|
|
expect(con.Area).toMatchSnapshot();
|
|
|
|
|
});
|
|
|
|
|