修复:二维刀路错误的判断导致刀路无法绘制

pull/2555/head
ChenX 9 months ago
parent 43d53d8513
commit 2ed566b935

@ -533,19 +533,33 @@ export class BoardConfigModal extends React.Component<BoardConfigProps, {}>{
let pl = brCurve as Polyline;
let offsetPolyine = pl.GetOffsetCurves(halfWidth * (pl.IsClockWise ? -1 : 1));
if (offsetPolyine?.length && !offsetPolyine[0].PtInCurve(path.StartPoint) && !offsetPolyine[0].PtInCurve(path.EndPoint))
break;
let isInt = offsetPolyine.some(pl => pl.IntersectWith(path, IntersectOption.ExtendNone).length > 0 || pl.PtInCurve(path.StartPoint));
if (!isInt)
{
AppToaster.show({
message: "检测到刀路在板外,可能无法切割到板!",
timeout: 5000,
intent: Intent.WARNING,
});
}
}
}
else
break;
{
AppToaster.show({
message: "检测到刀路在板外,可能无法切割到板!(刀路包围盒没有交集)",
timeout: 5000,
intent: Intent.WARNING,
});
}
path.ColorIndex = c.ColorIndex;
if (!pathMap.has(c.ColorIndex))
pathMap.set(c.ColorIndex, [path]);
else
pathMap.get(c.ColorIndex).push(path);
break;
break;//
}
}
}

Loading…
Cancel
Save