|
|
|
@ -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;//
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|