!2326 优化:通孔排钻偏移后判断排钻与板的位置关系

pull/2310/MERGE
林三 1 year ago committed by ChenX
parent 91c1423fe4
commit a3177c1ec9

@ -782,6 +782,8 @@ export class DrawDrillingTool extends Singleton
let drillBox = drill.BoundingBox;
if (this.m_Face.InterBoard.Grooves.some(groove => groove.BoundingBox.intersect(drillBox).Volume > 0))
return true;
if (this.m_Face.LocalBoard.Grooves.some(groove => groove.BoundingBox.intersect(drillBox).Volume > 0))
return true;
}
return false;
};
@ -796,9 +798,9 @@ export class DrawDrillingTool extends Singleton
Log(`${this.m_Face.LocalBoard.Name}-${this.m_Face.InterBoard.Name}${isWoodPinss ? "木梢" : "通孔排钻"}偏移后与造型碰撞,跳过绘制`);
needRemoveDrillList.add(hole);
}
//偏移后判断是否在两个板件外面 #I7NPAV
else if (!CyHoleInBoard(moveAfterDrills, this.m_Face.InterBoard, this.m_Face.InterBoard.OCSInv) &&
!CyHoleInBoard(moveAfterDrills, this.m_Face.LocalBoard, this.m_Face.LocalBoard.OCSInv))
//偏移后判断是否在两个排钻板件外面 #I7NPAV
else if (!CyHoleInBoard(moveAfterDrills, this.m_Face.InterBoard, this.m_Face.InterBoard.OCSInv, true) &&
!CyHoleInBoard(moveAfterDrills, this.m_Face.LocalBoard, this.m_Face.LocalBoard.OCSInv, true))
{
Log(`${this.m_Face.LocalBoard.Name}-${this.m_Face.InterBoard.Name}${isWoodPinss ? "木梢" : "通孔排钻"}偏移后在板件外,跳过绘制`);
needRemoveDrillList.add(hole);

@ -14,9 +14,9 @@ import { DrillType } from "./DrillType";
export const SCALAR = 0.1;
export function CyHoleInBoard(cys: CylinderHole[], br: Board, ocs: Matrix4)
export function CyHoleInBoard(cys: CylinderHole[], br: Board, ocs: Matrix4, checkAll = false)
{
if (cys.length === 1 && cys[0].Type === GangDrillType.Ymj)
if (!checkAll && cys.length === 1 && cys[0].Type === GangDrillType.Ymj)
return true;
const outline = br.ContourCurve;

Loading…
Cancel
Save