!1292 修复:走刀问题

pull/1292/MERGE
ZoeLeeFZ 4 years ago committed by ChenX
parent 7c9c8fbfe7
commit 745aa6b959

@ -112,7 +112,7 @@ export class FeedingCommand implements Command
{
for (let cd of data.feeding)
{
let c = Production.Data2Polyline(cd);
let c = Production.Data2Polyline(cd, false);
c.ColorIndex = 1;
c.ApplyMatrix(tMtx);
app.Database.ModelSpace.Append(c);

@ -139,7 +139,7 @@ export class FeedingToolPath extends Singleton
if (isOut)
{
let outlineOffsetCus = outline.GetOffsetCurves(dir * knifRadius).filter(c => c.IsClose) as Curve[];
let outlineCus = GetOffsetCurves(outline, dir * knifRadius);
let outlineCus = GetOffsetCurves(outline, dir * knifRadius).filter(c => c.IsClose) as Curve[];;
let ho = holeOffsetCus[i];
let maxArea = Math.max(...(outlineOffsetCus.map(c => c.Area)));
for (let j = 0; j < outlineOffsetCus.length; j++)

@ -1002,10 +1002,11 @@ export namespace Production
}
return sizeData;
}
export function Data2Polyline(data: IContourData)
export function Data2Polyline(data: IContourData, isClose = true)
{
let pl = new Polyline(data.pts.map((p, i) => ({ pt: new Vector2(p.x, p.y), bul: data.buls[i] })));
pl.CloseMark = true;
if (isClose)
pl.CloseMark = true;
return pl;
}
}

Loading…
Cancel
Save