You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
WebCAD/__test__/EdgeSealing/BoardHighHole.test.ts

29 lines
1.8 KiB

import { IBoardRectHoleType, ParseBoardRectHoleType, SetBrHighHoleTypeFromRectHoleType } from "../../src/Add-on/DrawDrilling/HoleUtils";
import "../Utils/jest.util";
import { LoadBoardsFromFileData } from "../Utils/LoadEntity.util";
test('分析上下左右排钻错误', () =>
{
let d = { "file": [1, "Board", 8, 2, 100, false, 1, 3, 0, [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, -663.6125654450263, 18, -228.07330801010744, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -663.6125654450263, 18, -228.07330801010744, 1], 0, 3, 1583.8020726116358, 409.9999999999068, 18, true, "Polyline", 8, 2, 0, false, 0, 3, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2052, 2475.00000958101, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2052, 2475.00000958101, 0, 1], 0, 2, 4, [-1642.0000000000932, -2475.00000958101], 0, [-1642.0000000000932, -891.1979369693743], 0, [-2052, -891.1979369693743], 0, [-2052, -2475], 0, true, 0, 3, 0, 0, 0, 0, 0, 10, 2, "左开门板", "男孩房衣柜", "门板+见光板", "4*9尺华纶卡其L1075", "颗粒板", "华纶卡其L1075", 0, 0, "不排", 2, 0, "0.8", "0.8", "0.8", "0.8", "", "", "", 4, "不排", "不排", "不排", "不排", true, true, 0, 0, 0, 0, 0, 0, 0, 0, true, 0, 0], "basePt": { "x": -663.6125654450263, "y": 0, "z": -228.07330801010744 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
let brs = LoadBoardsFromFileData(d);
let rectHoleOption: IBoardRectHoleType = {
up: "",
down: "",
left: "",
right: ""
};
ParseBoardRectHoleType(brs[0], rectHoleOption);
expect(rectHoleOption).toMatchSnapshot();
SetBrHighHoleTypeFromRectHoleType(brs[0], {
up: "三合一",
down: "二合一",
left: "不排",
right: "不排"
});
expect(brs[0].BoardProcessOption.highDrill).toMatchSnapshot();
});