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.
WebCAD/__test__/Booloperate/circlebox.test.ts

10 lines
1.2 KiB

import { Circle } from "../../src/DatabaseServices/Entity/Circle";
import { LoadEntityFromFileData } from "../Utils/LoadEntity.util";
test('圆的包围盒', () =>
{
let d = { "file": [1, "Region", 8, 2, 105, false, 1, 7, 0, [0.6691018466770633, 0.7431707198035619, 0, 0, -0.7431707198035619, 0.6691018466770633, 0, 0, 0, 0, -1, 0, 71.6669159265063, -696.9548738242638, 0, 1], 0, 0, true, [0.6691018466770633, 0.7431707198035619, 0, 0, -0.7431707198035619, 0.6691018466770633, 0, 0, 0, 0, -1, 0, 71.6669159265063, -696.9548738242638, 0, 1], 0, 1, 1, 1, 1, "Circle", 8, 2, 0, false, 0, 7, 0, [0.6691018466770633, 0.7431707198035619, 0, 0, 0.7431707198035619, -0.6691018466770633, 0, 0, 0, 0, -1, 0, 71.6669159265063, -696.9548738242638, 0, 1], 0, 0, true, [0.7431707198035619, -0.6691018466770633, 0, 0, 0.6691018466770633, 0.7431707198035619, 0, 0, 0, 0, -1, 0, -2215.799673512821, 1439.917154472948, 0, 1], 0, 1, 725.6224110016442, 0], "basePt": { "x": -653.9554950751378, "y": -1422.577284825908, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
let ens = LoadEntityFromFileData(d) as Circle[];
expect(ens[0].BoundingBox).toMatchSnapshot();
});