diff --git a/src/GraphicsSystem/ToolPath/OptimizeToolPath.ts b/src/GraphicsSystem/ToolPath/OptimizeToolPath.ts index 6abf6523d..328f89bf2 100644 --- a/src/GraphicsSystem/ToolPath/OptimizeToolPath.ts +++ b/src/GraphicsSystem/ToolPath/OptimizeToolPath.ts @@ -33,17 +33,11 @@ export function OptimizeToolPath(offsetCus: Curve[], originShape: Shape, rad: nu if (cu instanceof Polyline) { //轮廓朝下的逆时针轮廓需要翻转 - //如果走刀不止一条,第一刀为顺时针,其余为逆时针 + //第一刀为顺时针,其余为逆时针 if (cu.IsClose) { - if (offsetCus.length === 1) - { - if (cu.Normal.z * cu.Area2 < 0) - cu.Reverse(); - } - else - if ((cu.Normal.z * cu.Area2 < 0) === (cu !== offsetCus[0])) - cu.Reverse(); + if ((cu.Normal.z * cu.Area2 < 0) === (cu !== offsetCus[0])) + cu.Reverse(); } plList.push(cu); }