From df763a90cb8f4733d8aad335d8d4956dec009f3c Mon Sep 17 00:00:00 2001 From: ChenX Date: Fri, 4 Aug 2023 15:34:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96:=E9=80=9A=E6=A7=BD=E5=8A=A0?= =?UTF-8?q?=E9=95=BF=E5=9C=A8100=E4=BB=A5=E5=86=85=E4=B8=8D=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E4=BA=8C=E6=AC=A1=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/GraphicsSystem/ToolPath/FeedingToolPath.ts | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/GraphicsSystem/ToolPath/FeedingToolPath.ts b/src/GraphicsSystem/ToolPath/FeedingToolPath.ts index e893d466f..6b4f273a8 100644 --- a/src/GraphicsSystem/ToolPath/FeedingToolPath.ts +++ b/src/GraphicsSystem/ToolPath/FeedingToolPath.ts @@ -401,8 +401,14 @@ export class FeedingToolPath extends Singleton let curveOnContour = false; if (brCon.ParamOnCurve(param)) { - let curve = (brCon as Polyline).GetCurveAtParam(param); - curveOnContour = curve.PtOnCurve(c.GetPointAtParam(0.2), 0.1) && curve.PtOnCurve(c.GetPointAtParam(0.8), 0.1); + //#I7MYN9 在长的槽里面,我们防止它加长,短的槽就无所谓了 + if (c.Length > 100) + { + let curve = (brCon as Polyline).GetCurveAtParam(param); + curveOnContour = curve.PtOnCurve(c.GetPointAtParam(0.2), 0.1) && curve.PtOnCurve(c.GetPointAtParam(0.8), 0.1); + } + else + curveOnContour = true; } if (curveOnContour)