mirror of https://gitee.com/cf-fz/WebCAD.git
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.
15 lines
968 B
15 lines
968 B
5 years ago
|
import { LoadRegionsFromFileData } from "../Utils/LoadEntity.util";
|
||
|
import { BoolOpeartionType } from "../../src/GraphicsSystem/BoolOperateUtils";
|
||
|
import "../Utils/jest.util";
|
||
|
|
||
|
test('并集错误,错误的曲线包含', () =>
|
||
|
{
|
||
|
let regsData =
|
||
|
[2, "Region", 5, 2, 103, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 0, 1, 1, 1, 1, "Polyline", 5, 2, 0, false, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 0, 2, 4, [0, 0], 0, [100, 0], 0, [100, 100], 0, [0, 100], 0, true, 0, "Region", 5, 2, 104, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 100.0001, 0, 1], 0, 0, 1, 1, 1, 1, "Polyline", 5, 2, 0, false, 0, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 100.0001, 0, 1], 0, 0, 2, 4, [0, 0], 0, [100, 0], 0, [100, 100], 0, [0, 100], 0, true, 0]
|
||
|
|
||
|
let regs = LoadRegionsFromFileData(regsData);
|
||
|
|
||
|
regs[0].BooleanOper(regs[1], BoolOpeartionType.Union);
|
||
|
expect(regs[0].Area).toMatchNumberSnapshot();
|
||
|
});
|