|
|
@ -52,6 +52,7 @@ export class DrawDrillingTool extends Singleton
|
|
|
|
@observable private _collsionFaces: Face[] = [];
|
|
|
|
@observable private _collsionFaces: Face[] = [];
|
|
|
|
private _hasBackupOption = false;
|
|
|
|
private _hasBackupOption = false;
|
|
|
|
private _useBackup = false;
|
|
|
|
private _useBackup = false;
|
|
|
|
|
|
|
|
private _isDrillTouch = false;//排钻与造型碰撞
|
|
|
|
constructor()
|
|
|
|
constructor()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
super();
|
|
|
|
super();
|
|
|
@ -462,7 +463,6 @@ export class DrawDrillingTool extends Singleton
|
|
|
|
|
|
|
|
|
|
|
|
const Mid = (this.m_Face.InterBoard.__OriginalEnt__ ?? this.m_Face.InterBoard).Id;
|
|
|
|
const Mid = (this.m_Face.InterBoard.__OriginalEnt__ ?? this.m_Face.InterBoard).Id;
|
|
|
|
const Fid = (this.m_Face.LocalBoard.__OriginalEnt__ ?? this.m_Face.LocalBoard).Id;
|
|
|
|
const Fid = (this.m_Face.LocalBoard.__OriginalEnt__ ?? this.m_Face.LocalBoard).Id;
|
|
|
|
let isDrillTouch = false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (let dist of this.m_MoveDistList)
|
|
|
|
for (let dist of this.m_MoveDistList)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -473,7 +473,8 @@ export class DrawDrillingTool extends Singleton
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (this.CheckModelingCollision(localBox3, intBox3, dist))
|
|
|
|
if (this.CheckModelingCollision(localBox3, intBox3, dist))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
isDrillTouch = true;
|
|
|
|
this._isDrillTouch = true;
|
|
|
|
|
|
|
|
Log(`${this.m_Face.LocalBoard.Name}-${this.m_Face.InterBoard.Name}有排钻与造型碰撞,跳过绘制`);
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -498,12 +499,6 @@ export class DrawDrillingTool extends Singleton
|
|
|
|
newDrillentList.push(newDrillEnts);
|
|
|
|
newDrillentList.push(newDrillEnts);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (isDrillTouch)
|
|
|
|
|
|
|
|
AppToaster.show({
|
|
|
|
|
|
|
|
message: `${this.m_Face.LocalBoard.Name}-${this.m_Face.InterBoard.Name}有排钻与造型碰撞,跳过绘制`,
|
|
|
|
|
|
|
|
timeout: 5000,
|
|
|
|
|
|
|
|
intent: Intent.DANGER,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
let startDist = this.m_MoveDistList[0];
|
|
|
|
let startDist = this.m_MoveDistList[0];
|
|
|
|
let endDist = arrayLast(this.m_MoveDistList);
|
|
|
|
let endDist = arrayLast(this.m_MoveDistList);
|
|
|
|
|
|
|
|
|
|
|
@ -972,12 +967,23 @@ export class DrawDrillingTool extends Singleton
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let checkRes = new CollisionDetection(await this.GetSpliteBoards(brs));
|
|
|
|
let checkRes = new CollisionDetection(await this.GetSpliteBoards(brs));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this._isDrillTouch = false;
|
|
|
|
|
|
|
|
|
|
|
|
for (let f of checkRes.CollisonFaces)
|
|
|
|
for (let f of checkRes.CollisonFaces)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
this.Exec(f, false);
|
|
|
|
this.Exec(f, false);
|
|
|
|
if (this._useBackup)
|
|
|
|
if (this._useBackup)
|
|
|
|
this.Exec(f, true);
|
|
|
|
this.Exec(f, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this._isDrillTouch)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
AppToaster.show({
|
|
|
|
|
|
|
|
message: `有部分排钻与造型碰撞,跳过绘制,详情查看左下角`,
|
|
|
|
|
|
|
|
timeout: 5000,
|
|
|
|
|
|
|
|
intent: Intent.DANGER,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private Exec(f: Face, isBackup = false)
|
|
|
|
private Exec(f: Face, isBackup = false)
|
|
|
|