|
|
@ -257,17 +257,11 @@ export class PolyOffestUtil
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
iPts = frontLine.IntersectWith(laterLine, IntersectOption.ExtendBoth);
|
|
|
|
iPts = frontLine.IntersectWith(laterLine, IntersectOption.ExtendBoth);
|
|
|
|
|
|
|
|
//过滤掉交点为laterline终点的交点
|
|
|
|
tPts = iPts.filter(p =>
|
|
|
|
tPts = iPts.filter(p =>
|
|
|
|
(frontLine instanceof Arc || frontLine.GetParamAtPoint(p) > 0)
|
|
|
|
frontLine.PtOnCurve(p)
|
|
|
|
&& (laterLine instanceof Arc || laterLine.GetParamAtPoint(p) < 1)
|
|
|
|
&& laterLine.PtOnCurve(p)
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
// iPts = frontLine.IntersectWith(laterLine, IntersectOption.ExtendBoth);
|
|
|
|
|
|
|
|
// //过滤掉交点为laterline终点的交点
|
|
|
|
|
|
|
|
// tPts = iPts.filter(p =>
|
|
|
|
|
|
|
|
// frontLine.PtOnCurve(p)
|
|
|
|
|
|
|
|
// && laterLine.PtOnCurve(p)
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (tPts.length > 0)//存在真交点情况下直接修剪
|
|
|
|
if (tPts.length > 0)//存在真交点情况下直接修剪
|
|
|
@ -364,6 +358,10 @@ export class PolyOffestUtil
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.appendNewCuAndContour(frontLine, nextPt, intPt, startIndex);
|
|
|
|
this.appendNewCuAndContour(frontLine, nextPt, intPt, startIndex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (frontLine instanceof Arc && par1 < 0 && par2 < 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
this.appendNewCuAndContour(frontLine, nextPt, intPt, startIndex);
|
|
|
|
|
|
|
|
}
|
|
|
|
else if (frontLine instanceof Arc)
|
|
|
|
else if (frontLine instanceof Arc)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.fillArc(endIndex - 1, endIndex, nextPt, frontLine, laterLine);
|
|
|
|
this.fillArc(endIndex - 1, endIndex, nextPt, frontLine, laterLine);
|
|
|
|