mirror of https://gitee.com/cf-fz/WebCAD.git
!1909 修复:酷家乐导入因为重复点导致的半圆错误
parent
817d4377bf
commit
e2c07eaeaa
@ -0,0 +1,21 @@
|
|||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`删除多段线重复的点 1`] = `
|
||||||
|
Array [
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
4,
|
||||||
|
5,
|
||||||
|
]
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`删除多段线重复的点 2`] = `
|
||||||
|
Array [
|
||||||
|
Array [
|
||||||
|
-0.1,
|
||||||
|
2,
|
||||||
|
3,
|
||||||
|
0.2,
|
||||||
|
],
|
||||||
|
]
|
||||||
|
`;
|
@ -0,0 +1,12 @@
|
|||||||
|
import { ArrayRemoveDupSavePre } from "../../src/Common/ArrayExt";
|
||||||
|
|
||||||
|
|
||||||
|
test('删除多段线重复的点', () =>
|
||||||
|
{
|
||||||
|
let pts = [0, 1, 1, 1, 1, 4, 5, 5, 5];
|
||||||
|
let buls = [[-0.1, 0.1, 0.5, 1, 2, 3, 4, 0.1, 0.2]];
|
||||||
|
ArrayRemoveDupSavePre(pts, buls);
|
||||||
|
|
||||||
|
expect(pts).toMatchSnapshot();
|
||||||
|
expect(buls).toMatchSnapshot();
|
||||||
|
});
|
Loading…
Reference in new issue