|
|
|
@ -12,7 +12,8 @@ test('布尔_误差共线_误差交点', () =>
|
|
|
|
|
expect(regs[0].Area).toMatchSnapshot();
|
|
|
|
|
|
|
|
|
|
//弧形情况
|
|
|
|
|
d = [2, "Region", 3, 2, 156, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3051.4141274641142, 141.87083942583706, 0, 1], 1, 1, 1, 1, "Polyline", 3, 2, 0, false, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3051.4141274641142, 141.87083942583706, 0, 1], 2, 4, [600, 0], 0, [600, 1241.380049628613], 0, [0, 1241.380049628613], 0, [0, 0], 0, true, 0, "Region", 3, 2, 155, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3051.4141274641142, 1374.2508890544507, 0, 1], 1, 1, 1, 1, "Polyline", 3, 2, 0, false, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3051.4141274641142, 1374.2508890544507, 0, 1], 2, 4, [0, 0], 0, [582, 0], 0.26581272283978424, [582, 8.999955254199449], 0, [0, 8.999955254199449], 0, true, 0];
|
|
|
|
|
d =
|
|
|
|
|
[2, "Region", 3, 2, 156, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3051.4141274641142, 141.87083942583706, 0, 1], 1, 1, 1, 1, "Polyline", 3, 2, 0, false, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3051.4141274641142, 141.87083942583706, 0, 1], 2, 4, [600, 0], 0, [600, 1241.380049628613], 0, [0, 1241.380049628613], 0, [0, 0], 0, true, 0, "Region", 3, 2, 155, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3051.4141274641142, 1374.2508890544507, 0, 1], 1, 1, 1, 1, "Polyline", 3, 2, 0, false, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3051.4141274641142, 1374.2508890544507, 0, 1], 2, 4, [0, 0], 0, [582, 0], 0.26581272283978424, [582, 8.999955254199449], 0, [0, 8.999955254199449], 0, true, 0];
|
|
|
|
|
regs = LoadRegionsFromFileData(d);
|
|
|
|
|
regs[0].BooleanOper(regs[1], BoolOpeartionType.Subtract);
|
|
|
|
|
expect(regs[0].Area).toMatchSnapshot();
|
|
|
|
|