mirror of https://gitee.com/cf-fz/WebCAD.git
!1952 修复:分析排钻位置错误问题
parent
d4be750e08
commit
7f2880a87f
@ -0,0 +1,28 @@
|
||||
import { InitRectBoardHoleOption, IRectHoleOption, SetRectHighHole } 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: IRectHoleOption = {
|
||||
up: "",
|
||||
down: "",
|
||||
left: "",
|
||||
right: ""
|
||||
};
|
||||
|
||||
InitRectBoardHoleOption(brs[0], rectHoleOption);
|
||||
expect(rectHoleOption).toMatchSnapshot();
|
||||
|
||||
|
||||
SetRectHighHole(brs[0], {
|
||||
up: "三合一",
|
||||
down: "二合一",
|
||||
left: "不排",
|
||||
right: "不排"
|
||||
});
|
||||
expect(brs[0].BoardProcessOption.highDrill).toMatchSnapshot();
|
||||
});
|
@ -0,0 +1,19 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`分析上下左右排钻错误 1`] = `
|
||||
Object {
|
||||
"down": "不排",
|
||||
"left": "不排",
|
||||
"right": "不排",
|
||||
"up": "不排",
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`分析上下左右排钻错误 2`] = `
|
||||
Array [
|
||||
"不排",
|
||||
"三合一",
|
||||
"不排",
|
||||
"二合一",
|
||||
]
|
||||
`;
|
Loading…
Reference in new issue