From 9dce031fd54ea690a492bace7c211a1060a08449 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=B8=89?= <940119273@qq.com> Date: Thu, 8 Aug 2024 03:33:43 +0000 Subject: [PATCH] =?UTF-8?q?!2970=20=E5=BC=80=E5=8F=91:=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=BF=AB=E7=85=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../__snapshots__/wblockClone.test.ts.snap | 12 ++++++++---- package.json | 3 ++- src/Common/InterfereUtil.ts | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/__test__/FileSystem/__snapshots__/wblockClone.test.ts.snap b/__test__/FileSystem/__snapshots__/wblockClone.test.ts.snap index 2cea6e3fb..4fb13d25c 100644 --- a/__test__/FileSystem/__snapshots__/wblockClone.test.ts.snap +++ b/__test__/FileSystem/__snapshots__/wblockClone.test.ts.snap @@ -62,7 +62,7 @@ Array [ 3, 1, "材质1", - 10, + 11, "#ffffff", false, 0.2, @@ -114,6 +114,7 @@ Array [ 0, 1, 0, + false, 0, 0, 0, @@ -257,7 +258,7 @@ Array [ 3, 1, "材质1", - 10, + 11, "#ffffff", false, 0.2, @@ -309,6 +310,7 @@ Array [ 0, 1, 0, + false, "PhysicalMaterialRecord", 2, 103, @@ -316,7 +318,7 @@ Array [ 3, 1, "材质1(1)", - 10, + 11, "#ffffff", false, 0.2, @@ -368,6 +370,7 @@ Array [ 0, 1, 0, + false, 0, 0, 0, @@ -495,7 +498,7 @@ Array [ 3, 1, "材质1", - 10, + 11, "#ffffff", false, 0, @@ -547,6 +550,7 @@ Array [ 0, 1, 0, + false, 0, 0, 0, diff --git a/package.json b/package.json index 1b82e9d54..5ea9ebb14 100644 --- a/package.json +++ b/package.json @@ -159,6 +159,7 @@ "ts", "tsx", "js" - ] + ], + "testEnvironment": "jsdom" } } diff --git a/src/Common/InterfereUtil.ts b/src/Common/InterfereUtil.ts index 37e4cd50c..2b3fb5215 100644 --- a/src/Common/InterfereUtil.ts +++ b/src/Common/InterfereUtil.ts @@ -176,7 +176,7 @@ export class CheckInterfereTool let planeSet = new Set(); let f = new FuzzyFactory; for (let polygon of interCsg.polygons) - planeSet.add(f.lookupOrCreate(polygon.plane, polygon.plane)); + planeSet.add(f.lookupOrCreate((polygon as any).plane, (polygon as any).plane));//防止TS类型检测错误 if (planeSet.size >= 4)//最少4个面围成一个三维实体 {