|
|
|
@ -117,13 +117,16 @@ export class ArcBoardBuild
|
|
|
|
|
let path = ArcBoardBuild.OffsetPolyline(this._SweepPath, -this._board.Thickness);
|
|
|
|
|
if (this._FaceDir === FaceDirection.Back)
|
|
|
|
|
{
|
|
|
|
|
this._SweepPath1 = this._SweepPath;
|
|
|
|
|
this._SweepPath1 = ArcBoardBuild.OffsetPolyline(path, this._board.Thickness);
|
|
|
|
|
this._SweepPath2 = path;
|
|
|
|
|
|
|
|
|
|
this._SweepCurves1 = this._SweepPath.Explode();
|
|
|
|
|
this._SweepCurves1 = this._SweepPath1.Explode();
|
|
|
|
|
this._SweepCurves2 = this._SweepCurves1.map(c =>
|
|
|
|
|
{
|
|
|
|
|
return c.GetOffsetCurves(-this._board.Thickness)[0];
|
|
|
|
|
let offsetC = c.GetOffsetCurves(-this._board.Thickness)[0];
|
|
|
|
|
if (!offsetC)
|
|
|
|
|
offsetC = new Line(c.StartPoint, c.StartPoint);
|
|
|
|
|
return offsetC;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
@ -131,10 +134,13 @@ export class ArcBoardBuild
|
|
|
|
|
this._SweepPath1 = path;
|
|
|
|
|
this._SweepPath2 = ArcBoardBuild.OffsetPolyline(this._SweepPath1, this._board.Thickness);
|
|
|
|
|
|
|
|
|
|
this._SweepCurves1 = path.Explode();
|
|
|
|
|
this._SweepCurves1 = this._SweepPath1.Explode();
|
|
|
|
|
this._SweepCurves2 = this._SweepCurves1.map(c =>
|
|
|
|
|
{
|
|
|
|
|
return c.GetOffsetCurves(this._board.Thickness)[0];
|
|
|
|
|
let offsetC = c.GetOffsetCurves(this._board.Thickness)[0];
|
|
|
|
|
if (!offsetC)
|
|
|
|
|
offsetC = new Line(c.StartPoint, c.StartPoint);
|
|
|
|
|
return offsetC;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -283,7 +289,7 @@ export class ArcBoardBuild
|
|
|
|
|
let co2 = this._SweepCurves2[i + 1];
|
|
|
|
|
|
|
|
|
|
//避免多余槽
|
|
|
|
|
if (equalv2(co1.EndPoint, co2.StartPoint, 0.1)) continue;
|
|
|
|
|
if (co1.Length < 0.1 || co2.Length < 0.1 || equalv2(co1.EndPoint, co2.StartPoint, 0.1)) continue;
|
|
|
|
|
|
|
|
|
|
let p = co1.IntersectWith(co2, IntersectOption.ExtendNone, 0.1);
|
|
|
|
|
if (p.length === 1)
|
|
|
|
|