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(); });