!924 修复:走刀方向

pull/924/MERGE
ZoeLeeFZ 5 years ago committed by ChenX
parent dedd6cc237
commit da5bda9f4a

@ -31,6 +31,9 @@ export function OptimizeToolPath(offsetCus: Curve[], originShape: Shape, rad: nu
} }
if (cu instanceof Polyline) if (cu instanceof Polyline)
{ {
//轮廓朝下的逆时针轮廓需要翻转
if (cu.IsClose && cu.Normal.z * cu.Area2 < 0)
cu.Reverse();
plList.push(cu); plList.push(cu);
} }
else if (cu instanceof Circle) else if (cu instanceof Circle)

@ -214,7 +214,7 @@ export namespace Production
} }
else else
{ {
if (cu.Area2 < 0) if (cu.IsClose && cu.Normal.z * cu.Area2 < 0)
cu.Reverse(); cu.Reverse();
ptsBuls = SplitePolylineAtArc(cu); ptsBuls = SplitePolylineAtArc(cu);
} }

Loading…
Cancel
Save