From 285d9fb77601825f596c323eb796e7493fcd3bcb Mon Sep 17 00:00:00 2001 From: ChenX Date: Fri, 26 Jul 2019 16:27:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B9=B6=E9=9B=86=E6=97=B6?= =?UTF-8?q?=E8=A1=8C=E6=88=90=E7=9A=84=E5=9C=86=E5=BD=A2=E7=BD=91=E6=B4=9E?= =?UTF-8?q?=E6=B6=88=E5=A4=B1=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/DatabaseServices/Contour.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/DatabaseServices/Contour.ts b/src/DatabaseServices/Contour.ts index 893c4df57..60f2d0386 100644 --- a/src/DatabaseServices/Contour.ts +++ b/src/DatabaseServices/Contour.ts @@ -132,11 +132,20 @@ export class Contour let c1 = g[i]; let nextI = FixIndex(i + 1, g); let c2 = g[nextI]; - if (c1.Join(c2)) + + let status = c1.Join(c2); + if (status === Status.True) { g.splice(nextI, 1); i--; } + else if (status === Status.ConverToCircle) + { + g.length = 0; + let a = c1 as Arc; + g.push(new Circle(a.Center, a.Radius)); + break; + } } } return Contour.GetAllContour(cuGroups);