From b6a5fe1cb26c8cc44c157c893057a63f6a047438 Mon Sep 17 00:00:00 2001 From: Zoe Date: Fri, 7 Dec 2018 16:03:33 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B0=81=E8=BE=B9bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- __test__/EdgeSealing/EdgeSealing.test.ts | 2 +- src/GraphicsSystem/CalcEdgeSealing.ts | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/__test__/EdgeSealing/EdgeSealing.test.ts b/__test__/EdgeSealing/EdgeSealing.test.ts index a1efbcfc5..cc0e5d6d7 100644 --- a/__test__/EdgeSealing/EdgeSealing.test.ts +++ b/__test__/EdgeSealing/EdgeSealing.test.ts @@ -59,7 +59,7 @@ test("常规板件,常规坐标系", () => test("异型板件,常规坐标系", () => { - let data = [1, ["Board", 1, 1, 9, false, 7, -1, [0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 3681.8686077049847, -1396.263281011676, 0, 1], 1, 1, ["Polyline", 1, 1, -1, true, 7, -1, [6.123233995736766e-17, -1, 0, 0, 1, 6.123233995736766e-17, 0, 0, 0, 0, 1, 0, 1396.2632810116759, 3681.8686077049847, 0, 1], 2, 5, [2345.694899782759, -1396.263281011676], 0, [3681.8686077049847, -1396.263281011676], 0, [3681.8686077049847, 443.1597468696174], 0.41421356237309503, [3481.8686077049847, 643.1597468696174], 0, [2345.694899782759, 643.1597468696174], 0, true], 0, 1336.1737079222257, 2039.4230278812934, 18, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3681.8686077049847, -1396.263281011676, 0, 1], 0, "层板", "{\"roomName\":\"\",\"cabinetName\":\"\",\"boardName\":\"\",\"material\":\"\",\"color\":\"\",\"lines\":0,\"bigHoleDir\":0,\"drillType\":\"three\",\"composingFace\":2,\"sealedUp\":\"1.0\",\"sealedDown\":\"1.0\",\"sealedLeft\":\"1.0\",\"sealedRight\":\"1.0\",\"knifeRad\":\"0\",\"grooveAddLength\":\"0\",\"grooveAddWidth\":\"0\",\"grooveAddDepth\":\"0\",\"spliteHeight\":\"\",\"spliteWidth\":\"\",\"spliteThickness\":\"\"}", 0]]; + let data = [1, ["Board", 1, 1, 9, false, 7, -1, [0, 1, 0, 0, -1, 0, 0, 0, 0, 0, 1, 0, 3681.8686077049847, -1396.263281011676, 0, 1], 1, 1, ["Polyline", 1, 1, -1, true, 7, -1, [6.123233995736766e-17, -1, 0, 0, 1, 6.123233995736766e-17, 0, 0, 0, 0, 1, 0, 1396.2632810116759, 3681.8686077049847, 0, 1], 2, 5, [2345.694899782759, -1396.263281011676], 0, [3681.8686077049847, -1396.263281011676], 0, [3681.8686077049847, 443.1597468696174], 0.41421356237309503, [3481.8686077049847, 643.1597468696174], 0, [2345.694899782759, 643.1597468696174], 0, true], 0, 1336.1737079222257, 2039.4230278812934, 18, [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 3681.8686077049847, -1396.263281011676, 0, 1], 0, "层板", "{\"roomName\":\"\",\"cabinetName\":\"\",\"boardName\":\"\",\"material\":\"\",\"color\":\"\",\"lines\":0,\"bigHoleDir\":0,\"drillType\":\"three\",\"composingFace\":2,\"sealedUp\":\"1.0\",\"sealedDown\":\"1.0\",\"sealedLeft\":\"1.0\",\"sealedRight\":\"1.0\",\"knifeRad\":\"0\",\"grooveAddLength\":\"0\",\"grooveAddWidth\":\"0\",\"grooveAddDepth\":\"0\",\"spliteHeight\":\"\",\"spliteWidth\":\"\",\"spliteThickness\":\"\"}", 0]] //第三段为圆弧 let br = loadFile(data)[0]; let sealingSize = [1, 1, 1]; diff --git a/src/GraphicsSystem/CalcEdgeSealing.ts b/src/GraphicsSystem/CalcEdgeSealing.ts index b4aaf3d29..47698ccc6 100644 --- a/src/GraphicsSystem/CalcEdgeSealing.ts +++ b/src/GraphicsSystem/CalcEdgeSealing.ts @@ -87,13 +87,8 @@ export function calcEdgeSealing(cus: Curve[]) ); let iPt = PolyOffsetUtil.selectFitInterPt(tPts.length > 0 ? tPts : iPts, frontLine.EndPoint); - let iPt1 = iPt.clone(); - if (frontLine instanceof Polyline) - iPt1.applyMatrix4(frontLine.OCSInv); - frontLine.EndPoint = iPt1; - if (laterLine instanceof Polyline) - iPt.applyMatrix4(laterLine.OCSInv) + frontLine.EndPoint = iPt; laterLine.StartPoint = iPt; } }