|
|
|
@ -103,6 +103,7 @@ export class Board extends ExtrudeSolid
|
|
|
|
|
{
|
|
|
|
|
protected HasEdgeRenderType = true;
|
|
|
|
|
protected HasPlaceFaceRenderType = true;
|
|
|
|
|
protected HasBigHoleFaceRenderType = true;
|
|
|
|
|
|
|
|
|
|
private _Rotation = {
|
|
|
|
|
x: 0,
|
|
|
|
@ -220,6 +221,15 @@ export class Board extends ExtrudeSolid
|
|
|
|
|
obj.updateMatrixWorld(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (key === EBoardKeyList.BigHole)
|
|
|
|
|
{
|
|
|
|
|
let obj = this.CacheDrawObject.get(RenderType.BigHoleFace);
|
|
|
|
|
if (obj)
|
|
|
|
|
{
|
|
|
|
|
this.UpdateDrawObject(RenderType.BigHoleFace, obj);
|
|
|
|
|
obj.updateMatrixWorld(true);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
@ -1535,6 +1545,7 @@ export class Board extends ExtrudeSolid
|
|
|
|
|
let obj: Object3D;
|
|
|
|
|
if (renderType === RenderType.Edge //封边检查
|
|
|
|
|
|| renderType === RenderType.PlaceFace //排版面检查
|
|
|
|
|
|| renderType === RenderType.BigHoleFace //大孔面检查
|
|
|
|
|
|| renderType === RenderType.CustomNumber //自定义编号
|
|
|
|
|
|| renderType === RenderType.CustomNumberPrint//自定义编号打印
|
|
|
|
|
)
|
|
|
|
@ -1569,6 +1580,15 @@ export class Board extends ExtrudeSolid
|
|
|
|
|
if (!isArbitrary)//如果不是任意面
|
|
|
|
|
obj.add(this.GetPlaceFace());
|
|
|
|
|
}
|
|
|
|
|
else if (renderType === RenderType.BigHoleFace)
|
|
|
|
|
{
|
|
|
|
|
obj.add(new Mesh(this.MeshGeometry, ColorMaterial.GetConceptualMaterial(8)),
|
|
|
|
|
new LineSegments(this.EdgeGeometry, ColorMaterial.GetLineMaterial(7))
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
obj.add(this.GetBigHoleFace());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
else if (renderType === RenderType.CustomNumber || renderType === RenderType.CustomNumberPrint)
|
|
|
|
|
{
|
|
|
|
|
if (renderType === RenderType.CustomNumberPrint)
|
|
|
|
@ -1620,6 +1640,17 @@ export class Board extends ExtrudeSolid
|
|
|
|
|
return mesh;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//大孔面网格
|
|
|
|
|
private GetBigHoleFace(): Mesh
|
|
|
|
|
{
|
|
|
|
|
let shapeGeom = new ShapeGeometry(this.contourCurve.Shape);
|
|
|
|
|
let isBack = this._BoardProcessOption[EBoardKeyList.BigHole] === FaceDirection.Back;
|
|
|
|
|
shapeGeom.applyMatrix4(this.contourCurve.OCSNoClone);
|
|
|
|
|
shapeGeom.translate(0, 0, isBack ? -1e-3 : this.thickness + 1e-3);
|
|
|
|
|
let mesh = new Mesh(shapeGeom, ColorMaterial.GetBasicMaterialDoubleSide(this.PlaceColor));
|
|
|
|
|
return mesh;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//偏移缓存
|
|
|
|
|
private _OffsetPathCache = new Map<Polyline, { [key: string]: Polyline; }>();
|
|
|
|
|
private GetOffsetPath(path: Polyline, item: I2DModeingItem): Polyline
|
|
|
|
@ -1704,7 +1735,7 @@ export class Board extends ExtrudeSolid
|
|
|
|
|
{
|
|
|
|
|
super.UpdateDrawObjectMaterial(renderType, obj);
|
|
|
|
|
|
|
|
|
|
if (renderType === RenderType.PlaceFace)
|
|
|
|
|
if (renderType === RenderType.PlaceFace || renderType === RenderType.BigHoleFace)
|
|
|
|
|
{
|
|
|
|
|
let face = obj.children[2] as Mesh;
|
|
|
|
|
if (!face) return;
|
|
|
|
|