|
|
@ -4,7 +4,7 @@ import { arrayRemoveIf } from '../Common/ArrayExt';
|
|
|
|
import { UpdateDraw } from '../Common/Status';
|
|
|
|
import { UpdateDraw } from '../Common/Status';
|
|
|
|
import { ObjectSnapMode } from '../Editor/ObjectSnapMode';
|
|
|
|
import { ObjectSnapMode } from '../Editor/ObjectSnapMode';
|
|
|
|
import { Box3Ext } from '../Geometry/Box';
|
|
|
|
import { Box3Ext } from '../Geometry/Box';
|
|
|
|
import { equaln, MoveMatrix, rotatePoint } from '../Geometry/GeUtils';
|
|
|
|
import { equaln, MoveMatrix, rotatePoint, equalv3 } from '../Geometry/GeUtils';
|
|
|
|
import ThreeBSP from '../Geometry/ThreeCSG';
|
|
|
|
import ThreeBSP from '../Geometry/ThreeCSG';
|
|
|
|
import { RenderType } from '../GraphicsSystem/RenderType';
|
|
|
|
import { RenderType } from '../GraphicsSystem/RenderType';
|
|
|
|
import { BoardProcessOption, ComposingType, DrillType, LinesType, PXLFaceType } from '../UI/Store/BoardInterface';
|
|
|
|
import { BoardProcessOption, ComposingType, DrillType, LinesType, PXLFaceType } from '../UI/Store/BoardInterface';
|
|
|
@ -542,7 +542,7 @@ export class Board extends Entity
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
gripShape.MoveGripPoints(indexList, vl);
|
|
|
|
gripShape.MoveGripPoints(indexList, vl);
|
|
|
|
this.UpdateModelShape();
|
|
|
|
this.UpdateBoardShape();
|
|
|
|
this.UpdateBoardSize();
|
|
|
|
this.UpdateBoardSize();
|
|
|
|
this.Update(UpdateDraw.Geometry);
|
|
|
|
this.Update(UpdateDraw.Geometry);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -636,7 +636,7 @@ export class Board extends Entity
|
|
|
|
|
|
|
|
|
|
|
|
outlen += count;
|
|
|
|
outlen += count;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.UpdateModelShape();
|
|
|
|
this.UpdateBoardShape();
|
|
|
|
this.UpdateBoardSize();
|
|
|
|
this.UpdateBoardSize();
|
|
|
|
this.Update(UpdateDraw.Geometry);
|
|
|
|
this.Update(UpdateDraw.Geometry);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -649,7 +649,7 @@ export class Board extends Entity
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 更新造型形状和外轮廓形状,用布尔运算
|
|
|
|
* 更新造型形状和外轮廓形状,用布尔运算
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
private UpdateModelShape()
|
|
|
|
private UpdateBoardShape()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
let deleteModel: Set<IModeling> = new Set();
|
|
|
|
let deleteModel: Set<IModeling> = new Set();
|
|
|
|
|
|
|
|
|
|
|
@ -695,6 +695,22 @@ export class Board extends Entity
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
arrayRemoveIf(this.m_BoardModeling, m => deleteModel.has(m));
|
|
|
|
arrayRemoveIf(this.m_BoardModeling, m => deleteModel.has(m));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//源形状min应在0点
|
|
|
|
|
|
|
|
let min = this.m_Shape.BoundingBox.min;
|
|
|
|
|
|
|
|
if (!equalv3(min, new Vector3()))
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let matVec = MoveMatrix(min.clone().negate());
|
|
|
|
|
|
|
|
this.m_Shape.ApplyMatrix(matVec);
|
|
|
|
|
|
|
|
this.m_BoardModeling.forEach(m =>
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
m.shape.ApplyMatrix(matVec);
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.ApplyMatrix(
|
|
|
|
|
|
|
|
MoveMatrix(min.applyMatrix4(new Matrix4().extractRotation(this.OCS))));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
InitDrawObject(renderType: RenderType = RenderType.Wireframe): Object3D
|
|
|
|
InitDrawObject(renderType: RenderType = RenderType.Wireframe): Object3D
|
|
|
|
{
|
|
|
|
{
|
|
|
|