From 86424ad33503aca820fe1c89f31474143e0e5ba1 Mon Sep 17 00:00:00 2001 From: ChenX Date: Fri, 5 May 2023 10:15:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D:=E6=A4=AD=E5=9C=86=E7=BB=98?= =?UTF-8?q?=E5=88=B6=E7=9A=84=E7=82=B9=E4=B8=AA=E6=95=B0=E8=BF=87=E5=A4=9A?= =?UTF-8?q?=E5=AF=BC=E8=87=B4=E7=9A=84=E5=8D=A1=E9=A1=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __test__/Geometry/__snapshots__/EdgeGeometry.test.ts.snap | 2 +- src/DatabaseServices/Shape2.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__test__/Geometry/__snapshots__/EdgeGeometry.test.ts.snap b/__test__/Geometry/__snapshots__/EdgeGeometry.test.ts.snap index ac928ce0f..5718b882a 100644 --- a/__test__/Geometry/__snapshots__/EdgeGeometry.test.ts.snap +++ b/__test__/Geometry/__snapshots__/EdgeGeometry.test.ts.snap @@ -1,6 +1,6 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`EdgeGeometry生成 1`] = `236`; +exports[`EdgeGeometry生成 1`] = `148`; exports[`EdgeGeometry生成 2`] = `410`; diff --git a/src/DatabaseServices/Shape2.ts b/src/DatabaseServices/Shape2.ts index 0090cf478..f983940a4 100644 --- a/src/DatabaseServices/Shape2.ts +++ b/src/DatabaseServices/Shape2.ts @@ -32,7 +32,7 @@ export class Shape2 extends Shape let splitCount = tempArc.Radius / ARC_SplitLength; splitCount = clamp(Math.floor(splitCount * 0.5) * 2, Arc_MinSplitCount, ARC_MaxSplitCount); - resolution = Math.max(2, Math.abs(Math.ceil((tempArc.AllAngle * 0.5) / Math.PI)) * splitCount); + resolution = Math.max(2, Math.ceil(Math.abs((tempArc.AllAngle * 0.5) / Math.PI) * splitCount * 0.5)) * 2; } else resolution = divisions * 2;