mirror of https://gitee.com/cf-fz/WebCAD.git
parent
795360d446
commit
f8bfe68927
@ -0,0 +1,5 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`交点大于等于2_但是还是分离 1`] = `310430.5057844047`;
|
||||
|
||||
exports[`交点大于等于2_但是还是分离 2`] = `40090.549687200226`;
|
@ -0,0 +1,18 @@
|
||||
import { LoadRegionsFromFileData } from "../Utils/LoadEntity.util";
|
||||
import { BoolOpeartionType } from "../../src/GraphicsSystem/BoolOperateUtils";
|
||||
|
||||
test('交点大于等于2_但是还是分离', () =>
|
||||
{
|
||||
|
||||
let d = [2, "Region", 3, 2, 629, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 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, 0, 0, 0, 1], 2, 4, [5842.2632447015285, -382.81544021645357], 0, [6075.449244701528, -382.81544021645357], 0, [6075.449244701528, -210.8902402164536], 0, [5842.2632447015285, -210.8902402164536], 0, true, 0, "Region", 3, 2, 630, false, 1, 7, 0, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 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, 0, 0, 0, 1], 2, 8, [5622.910304827508, -210.8902402164536], 0, [5842.2632447015285, -210.8902402164536], 0, [5842.2632447015285, -13.274942384012917], 0, [6075.449244701528, -13.274942384012888], 0, [6075.449244701528, -210.8902402164536], 0, [6253.303004827509, -210.8902402164536], 0, [6253.303004827509, 291.05255978354637], 0, [5622.910304827508, 291.05255978354637], 0, true, 0]
|
||||
|
||||
let [reg1, reg2] = LoadRegionsFromFileData(d);
|
||||
|
||||
let reg = reg1.Clone();
|
||||
reg.BooleanOper(reg2.Clone(), BoolOpeartionType.Union);
|
||||
expect(reg.Area).toMatchSnapshot();
|
||||
|
||||
reg = reg1.Clone();
|
||||
reg.BooleanOper(reg2.Clone(), BoolOpeartionType.Subtract);
|
||||
expect(reg.Area).toMatchSnapshot();
|
||||
});
|
Loading…
Reference in new issue