|
|
@ -158,3 +158,32 @@ test("#I1MUQD", () =>
|
|
|
|
let brs = LoadBoardsFromFileData(data);
|
|
|
|
let brs = LoadBoardsFromFileData(data);
|
|
|
|
testPathCount(brs[0], 8);
|
|
|
|
testPathCount(brs[0], 8);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test("日字加工", () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let data =
|
|
|
|
|
|
|
|
{ "file": [1, "Board", 8, 2, 686, false, 1, 11, 0, [-0.999997439714021, -0.0022628666339358583, 0, 0, 0, 0, 1, 0, -0.0022628666339358583, 0.999997439714021, 0, 0, 431.23731244072155, 1126.9116927510254, 0, 1], 0, 0, true, [-0.0022628666339358583, 0.999997439714021, 0, 0, -0.999997439714021, -0.0022628666339358583, 0, 0, 0, 0, 1, 0, 442.24629054531874, 1126.9366046640337, 0, 1], 0, 3, 432.00000000000006, 206.21628154156102, 18, true, "Polyline", 8, 2, 0, false, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -11.009006290800926, 432, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -11.009006290800926, 2.2737367544323206e-13, 0, 1], 0, 2, 4, [217.22528783236191, -432], 0, [217.22528783236191, 5.684341886080802e-14], 0, [11.009006290800892, 0], 0, [11.009006290800892, -432], 0, true, 1, 3, 21.459983999999963, 40.381175249996886, 1.8, false, "Polyline", 8, 2, 0, false, 0, 1, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -245.01875510359605, 301.84343598133, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -245.0187551035961, 301.84343598133, 32.40000000000006, 1], 0, 2, 44, [285.0646181035918, -284.11978848133003], 0, [282.83718672859686, -282.58693248133], 0, [280.60975535359466, -281.05407648133007], 0, [279.6756712285933, -282.27557110633006], 0, [278.7415871035919, -283.49706573132994], 0, [263.96389722859385, -283.49706573132994], 0, [249.18620735359218, -283.49706573132994], 0, [247.10248122859048, -281.94025885633005], 0, [245.01875510359605, -280.38345198133004], 0, [245.16246035358927, -283.59286923133004], 0, [245.2103621035858, -287.08969698132995], 0, [245.2103621035858, -291.28110010633], 0, [245.2103621035858, -295.47250323132994], 0, [245.138509478591, -298.13105035633], 0, [245.06665685359258, -300.78959748133], 0, [245.17443579109022, -301.57997635633], 0, [245.49777260359042, -301.84343598133], 0, [246.10851991609525, -301.69973073133], 0, [247.07853035359585, -301.26861498133], 0, [247.97668816609075, -300.53811329383], 0, [248.27607410358905, -299.59205373133005], 0, [248.27607410358905, -299.30464323133003], 0, [248.27607410358905, -299.01723273133], 0, [263.96389722859385, -299.01723273133], 0, [279.65172035359865, -299.01723273133], 0, [279.65172035359865, -299.73575898133004], 0, [279.65172035359865, -300.45428523133], 0, [279.7714747285936, -301.49614829383], 0, [280.1307378535894, -301.84343598133], 0, [280.7893869160944, -301.71170616883006], 0, [281.80729910359514, -301.31651673133], 0, [282.74138322859653, -300.63391679383005], 0, [283.05274460359215, -299.73575898133004], 0, [282.9808919785937, -298.4663626063301], 0, [282.90903935359165, -297.19696623133], 0, [282.801260416094, -295.66411023133], 0, [282.7653341035875, -294.13125423133], 0, [282.7653341035875, -290.27516335633004], 0, [282.7653341035875, -286.41907248133003], 0, [283.86707435359494, -285.70054623133], 0, [284.9688146035951, -284.98201998133004], 0, [285.29215141609166, -284.73053579383003], 0, [285.39993035359294, -284.55090423133004], 0, [285.31610229109356, -284.34732179383], 0, true, 2, 3, 5.84401349999996, 31.375646250009595, 1.8, true, "Polyline", 8, 2, 0, false, 1, 1, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -248.27607410358905, 290.5386229813299, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -248.2760741035891, 290.5386229813299, 32.40000000000007, 1], 0, 2, 4, [279.65172035359865, -290.5386229813299], 0, [279.65172035359865, -284.69460948132996], 0, [248.27607410358905, -284.69460948132996], 0, [248.27607410358905, -290.5386229813299], 0, true, 0, 3, 0, 0, 0, 0, 0, [-0.999997439714021, -0.0022628666339358583, 0, 0, 0, 0, 1, 0, -0.0022628666339358583, 0.999997439714021, 0, 0, 346.4066151822023, 1142.9197731819293, 191.98120133753412, 1], 3, 6.083522250000101, 31.375646250009595, 1.8, true, "Polyline", 8, 2, 0, false, 1, 1, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -248.27607410358905, 297.81968898133005, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -248.2760741035891, 297.81968898133005, 32.40000000000007, 1], 0, 2, 4, [279.65172035359865, -297.81968898133005], 0, [279.65172035359865, -291.73616673132994], 0, [248.27607410358905, -291.73616673132994], 0, [248.27607410358905, -297.81968898133005], 0, true, 0, 3, 0, 0, 0, 0, 0, [-0.999997439714021, -0.0022628666339358583, 0, 0, 0, 0, 1, 0, -0.0022628666339358583, 0.999997439714021, 0, 0, 346.4066151822023, 1142.9197731819293, 184.700135337534, 1], 1, 0, 0, 0, 0, 0, [-0.999997439714021, -0.0022628666339358583, 0, 0, 0, 0, 1, 0, -0.0022628666339358583, 0.999997439714021, 0, 0, 349.66392584252543, 1142.9271440604105, 180.67638833753404, 1], 3, 0, 0, 0, 0, 0, 9, 1, "右侧板", "主卧", "下柜", "", "", "", 0, 0, "拉米诺", 2, 0, "1", "1", "1", "1", "", "", "", 4, "拉米诺", "拉米诺", "拉米诺", "拉米诺", true, true, 0, 0, 0, 0, 0, 0, 0, 0, true], "basePt": { "x": 224.98082727240399, "y": 1126.4450528081506, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
|
|
|
|
|
|
|
|
let brs = LoadBoardsFromFileData(data);
|
|
|
|
|
|
|
|
testPathCount(brs[0], 7);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("孔轮廓比外轮廓大", () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let data =
|
|
|
|
|
|
|
|
{ "file": [1, "Board", 8, 2, 100, false, 1, 3, 0, [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, -480.60225895268377, -185.23833994346205, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -480.60225895268377, -185.23833994346205, 0, 1], 0, 3, 800, 600, 18, true, "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, 4, [0, 0], 0, [600, 0], 0, [600, 800], 0, [0, 800], 0, true, 1, 3, 680, 480, 5, false, "Polyline", 8, 2, 0, false, 0, 1, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -60, -60, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -60, -60, 13, 1], 0, 2, 8, [66, 60], 0, [534, 60], 0.41421356237309503, [540, 66], 0, [540, 734], 0.41421356237309503, [534, 740], 0, [66, 740], 0.41421356237309503, [60, 734], 0, [60, 66], 0.41421356237309503, true, 1, 3, 668, 468, 5, true, "Polyline", 8, 2, 0, false, 0, 1, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -66, -66, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -66, -66, 13, 1], 0, 2, 4, [66, 66], 0, [534, 66], 0, [534, 734], 0, [66, 734], 0, true, 0, 3, 0, 0, 0, 0, 0, [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, -414.60225895268377, -198.23833994346205, 66, 1], 3, 0, 0, 0, 0, 0, [1, 0, 0, 0, 0, 0, 1, 0, 0, -1, 0, 0, -420.60225895268377, -198.23833994346205, 60, 1], 3, 0, 0, 0, 0, 0, 9, 2, "背板", "", "", "", "", "", 0, 0, "三合一", 2, 0, "1", "1", "1", "1", "", "", "", 4, "三合一", "三合一", "三合一", "三合一", true, true, 0, 0, 0, 0, 0, 0, 0, 0, true], "basePt": { "x": -480.60225895268377, "y": -203.23833994346205, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
|
|
|
|
|
|
|
|
let brs = LoadBoardsFromFileData(data);
|
|
|
|
|
|
|
|
testPathCount(brs[0]);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("门字部分", () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let data =
|
|
|
|
|
|
|
|
{ "file": [1, "Board", 8, 2, 2223, false, 1, 2, 0, [0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 8426.318707426251, 2299.282791618, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 8426.318707426251, 2299.282791618, 0, 1], 0, 3, 1200, 600, 18, true, "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, 4, [0, 0], 0, [600, 0], 0, [600, 1200], 0, [0, 1200], 0, true, 1, 3, 57.21600000000001, 31.968000000000757, 2, false, "Polyline", 8, 2, 0, false, 0, 1, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -209.6453198822055, 283.06701259445845, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -209.6453198822055, 283.06701259445845, 64.20000000000219, 1], 0, 2, 44, [241.0853198822042, -230.31501259445847], 0, [241.48131988220484, -229.99101259445843], 0, [241.61331988220627, -229.6910125944584], 0, [241.48131988220484, -229.36701259445846], 0, [241.0853198822042, -228.97101259445847], 0, [238.94931988220924, -227.41101259445844], 0, [236.81331988220336, -225.85101259445844], 0, [235.85331988220423, -227.24301259445846], 0, [234.89331988220147, -228.63501259445843], 0, [224.69331988220438, -228.63501259445843], 0, [214.49331988221093, -228.63501259445843], 0, [211.9613198822044, -228.57501259445843], 0, [209.6453198822055, -228.39501259445845], 0, [210.5813198822034, -229.6190125944584], 0, [211.51731988219763, -230.84301259445846], 0, [213.56931988220822, -230.3030125944585], 0, [215.9813198822012, -230.12301259445843], 0, [226.03731988220534, -230.12301259445843], 0, [236.09331988220583, -230.12301259445843], 0, [236.09331988220583, -252.68301259445846], 0, [236.09331988220583, -275.2430125944585], 0, [235.90131988219946, -276.5390125944584], 0, [235.3253198822058, -277.25901259445845], 0, [234.28131988219684, -277.54701259445847], 0, [232.6853198822064, -277.64301259445847], 0, [229.78131988220775, -277.37901259445846], 0, [224.81331988219972, -276.5870125944585], 0, [224.7893198822021, -277.09101259445845], 0, [224.7653198822045, -277.5950125944585], 0, [227.42931988220516, -278.41101259445844], 0, [229.9493198822056, -279.4190125944585], 0, [231.95331988220642, -280.7270125944585], 0, [232.97331988219958, -282.4430125944585], 0, [233.1653198822023, -282.91101259445844], 0, [233.45331988220642, -283.06701259445845], 0, [234.6653198822096, -282.76701259445844], 0, [236.3813198822063, -281.86701259445846], 0, [237.98931988220284, -280.5950125944585], 0, [238.8773198821982, -279.1790125944584], 0, [239.23731988220243, -277.3070125944585], 0, [239.3573198822014, -274.57101259445847], 0, [239.3573198822014, -253.01901259445842], 0, [239.3573198822014, -231.46701259445845], 0, [240.22131988220644, -230.89101259445843], 0, true, 0, 2, 0, 0, 0, 0, 0, [0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 7822.589893866929, 2546.062452634949, 16, 1], 3, 0, 0, 0, 0, 0, 9, 0, "层板", "", "", "", "", "", 0, 0, "三合一", 2, 0, "1", "1", "1", "1", "", "", "", 4, "三合一", "三合一", "三合一", "三合一", true, true, 0, 0, 0, 0, 0, 0, 0, 0, true], "basePt": { "x": 7226.318707426251, "y": 2299.282791618, "z": 0 }, "ucs": [0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
|
|
|
|
|
|
|
|
let brs = LoadBoardsFromFileData(data);
|
|
|
|
|
|
|
|
testPathCount(brs[0], 4);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
test("通槽加长错误", () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let data =
|
|
|
|
|
|
|
|
{ "file": [1, "Board", 8, 2, 100, false, 1, 2, 0, [0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 339.80952861870173, 249.3538870831253, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 339.80952861870173, 229.3538870831253, 0, 1], 0, 3, 918.0000000000002, 324.5928486066955, 18, true, "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, 4, [0, 0], 0, [324.5928486066955, 0], 0, [324.5928486066955, 918.0000000000002], 0, [0, 918.0000000000002], 0, true, 1, 3, 6, 712.0896318545867, 8.99999999999909, 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, [-0.20303412411504598, -0.9791716623988034, 0, 0, 0.9791716623988034, -0.20303412411504598, 0, 0, 0, 0, 1, 0, -150.85291425915239, 365.69871018220056, 0, 1], 0, 2, 5, [712.0896318545867, 5.999999999999886], 0, [0, 5.999999999999943], 0, [-5.684341886080802e-14, 2.921526605141594], 0, [14.089631854583672, -5.684341886080802e-14], 0, [710.8455142075273, 0], 0, true, 0, 3, 6, 0, 0, 0, 0, [-0.9791716623988034, -0.20303412411504598, 0, 0, 0.20303412411504598, -0.9791716623988034, 0, 0, 0, 0, 1, 0, 117.849312474018, 576.8074117525202, 0, 1], 3, 0, 0, 0, 0, 0, 9, 0, "层板", "5-主卧", "阳台柜", "", "E0级儿童板", "书香桐", 0, 1, "三合一", 2, 0, "1", "1", "1", "1", "", "", "", 8, "三合一", "三合一", "三合一", "三合一", "三合一", "三合一", "三合一", "三合一", true, true, 0, 0, 0, 0, 0, 0, 0, 0, true], "basePt": { "x": -578.1904713812985, "y": 249.3538870831253, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
|
|
|
|
|
|
|
|
let brs = LoadBoardsFromFileData(data);
|
|
|
|
|
|
|
|
testPathCount(brs[0], 3);
|
|
|
|
|
|
|
|
});
|
|
|
|