|
|
|
@ -184,18 +184,16 @@ export class Board extends ExtrudeSolid
|
|
|
|
|
if (this._ArcBoardOptions.size > 0)
|
|
|
|
|
return this._ArcBoardOptions;
|
|
|
|
|
|
|
|
|
|
let cus = this._SweepPath.Explode();
|
|
|
|
|
let cus = new ArcBoardBuild(this).ParseSweepCurves().SweepCurves1;
|
|
|
|
|
|
|
|
|
|
//key=-1 为通用转角槽配置
|
|
|
|
|
this._ArcBoardOptions.set(-1, defultArcBoardOption);
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < cus.length; i++)
|
|
|
|
|
cus.forEach((cu, i) =>
|
|
|
|
|
{
|
|
|
|
|
if (cus[i] instanceof Arc)
|
|
|
|
|
{
|
|
|
|
|
this._ArcBoardOptions.set(i, { ...defultArcBoardOption, arcLength: parseFloat(FixedNotZero(cus[i].Length, 5)) });
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (cu instanceof Arc)
|
|
|
|
|
this._ArcBoardOptions.set(i, { ...defultArcBoardOption, arcLength: parseFloat(FixedNotZero(cu.Length, 5)) });
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
return this._ArcBoardOptions;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -203,9 +201,28 @@ export class Board extends ExtrudeSolid
|
|
|
|
|
{
|
|
|
|
|
this.WriteAllObjectRecord();
|
|
|
|
|
this._ArcBoardOptions = opt;
|
|
|
|
|
this.UpdateArcBoardOptions();
|
|
|
|
|
this.Update();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
UpdateArcBoardOptions(): void
|
|
|
|
|
{
|
|
|
|
|
//更新ArcBuild曲线数据
|
|
|
|
|
this._SweepArcBoardBuild = new ArcBoardBuild(this).ParseSweepCurves();
|
|
|
|
|
let cus = this.GetSweepPathInWCS().Explode();
|
|
|
|
|
if (cus.filter(cu => cu instanceof Arc).length <= this._ArcBoardOptions.size - 1)
|
|
|
|
|
{
|
|
|
|
|
let newOpts = new Map<number, ArcBoardOptions>();
|
|
|
|
|
newOpts.set(-1, this._ArcBoardOptions.get(-1));
|
|
|
|
|
cus.forEach((cu, i) =>
|
|
|
|
|
{
|
|
|
|
|
if (cu instanceof Arc && this._ArcBoardOptions.has(i))
|
|
|
|
|
newOpts.set(i, { ...this._ArcBoardOptions.get(i), arcLength: parseFloat(FixedNotZero(cu.Length, 5)) });
|
|
|
|
|
});
|
|
|
|
|
this._ArcBoardOptions = newOpts;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get IsArcBoard()
|
|
|
|
|
{
|
|
|
|
|
return this._SweepPath != undefined;
|
|
|
|
@ -308,6 +325,7 @@ export class Board extends ExtrudeSolid
|
|
|
|
|
this._SweepPath = ArcBoardBuild.OffsetPolyline(path, this.thickness);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.UpdateArcBoardOptions();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ParseBoardLengthInArcSweep(): number
|
|
|
|
@ -2901,7 +2919,7 @@ export class Board extends ExtrudeSolid
|
|
|
|
|
};
|
|
|
|
|
if (ver > 18)
|
|
|
|
|
opt.arcExtension = file.Read();
|
|
|
|
|
this.ArcBoardOptions.set(key, opt);
|
|
|
|
|
this._ArcBoardOptions.set(key, opt);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|