|
|
@ -260,3 +260,24 @@ test('z不为0时分析错误', () =>
|
|
|
|
for (let c of walls[0].LidCurves)
|
|
|
|
for (let c of walls[0].LidCurves)
|
|
|
|
expect(c.Length).toMatchNumberSnapshot();
|
|
|
|
expect(c.Length).toMatchNumberSnapshot();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test('直线与圆弧正确的删除盖子线', () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let d =
|
|
|
|
|
|
|
|
{ "file": [2, "RoomWallLine", 1, 3, 8, 2, 321, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 5814.300457333236, -2014.354128653851, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 5814.300457333236, -2014.354128653851, 0, 1], 0, 120, 0, 2700, 4062.232098765433, -1342.7555592592594, 0, 4062.232098765433, -564.4939173809105, 0, "RoomWallArc", 3, 8, 2, 329, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10274.71129794628, -2578.8480460347614, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 79.4, 0, 2700, 2, 398.1787418476097, 3.141592653589793, 0, true], "basePt": { "x": 9816.53255609867, "y": -3357.10968791311, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let walls = LoadEntityFromFileData<RoomWallLine>(d);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TestWallCurveParse(walls);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
test("直线与圆弧正确的删除盖子线(盒子问题导致点不在线内)", () =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let d =
|
|
|
|
|
|
|
|
{ "file": [2, "RoomWallLine", 1, 3, 8, 2, 100, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -4002.9032397050305, 1355.3730089236885, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -4002.9032397050305, 1355.3730089236885, 0, 1], 0, 120, 0, 2700, 4062.232098765433, -1342.7555592592594, 0, 4062.232098765433, -564.4939173809105, 0, "RoomWallArc", 3, 8, 2, 101, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 457.50760090801305, 790.879091542778, 0, 1], 0, 0, true, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, -9817.203697038267, 3369.7271375775395, 0, 1], 0, 79.4, 0, 2700, 2, 398.1787418476097, 3.141592653589793, 0, true], "basePt": { "x": -0.6711409395975352, "y": 12.61744966442916, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let walls = LoadEntityFromFileData<RoomWallLine>(d);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
TestWallCurveParse(walls);
|
|
|
|
|
|
|
|
});
|
|
|
|