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__/Polyline/polyline_ext.test.ts

15 lines
896 B

import { Polyline } from "../../src/DatabaseServices/Entity/Polyline";
import { LoadCurvesFromFileData } from "../Utils/LoadEntity.util";
import "../Utils/jest.util";
test('多段线圆弧前向延伸错误', () =>
{
let d =
{ "file": [1, "Polyline", 10, 2, 103, 0, 1, 7, 71, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 379.4117647058823, 179.41176470588238, 0, 1], 0, 0, 1, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1], 0, 0, 1, 2, 4, [0, 0], -0.592698851053085, [511.76470588235316, -30.882352941176464], 0, [1054.4117647058824, -45.58823529411765], -0.8681818857079551, [1107.3529411764707, -508.8235294117648], 0, false], "basePt": { "x": 379.4117647058823, "y": -329.41176470588243, "z": 0 }, "ucs": [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1] };
let pl = LoadCurvesFromFileData(d)[0] as Polyline;
pl.Extend(-0.2);
expect(pl.Length).toMatchNumberSnapshot();
});