|
|
@ -16,6 +16,8 @@ import { equaln, MoveMatrix, ZAxis } from "../../Geometry/GeUtils";
|
|
|
|
import { FaceDirection } from "../../UI/Store/BoardInterface";
|
|
|
|
import { FaceDirection } from "../../UI/Store/BoardInterface";
|
|
|
|
import { DrillingOption, SpacingType } from "../../UI/Store/drillInterface";
|
|
|
|
import { DrillingOption, SpacingType } from "../../UI/Store/drillInterface";
|
|
|
|
import { begin } from "xaop";
|
|
|
|
import { begin } from "xaop";
|
|
|
|
|
|
|
|
import { IsPointInPolyLine } from "../../DatabaseServices/PointInPolyline";
|
|
|
|
|
|
|
|
import { Polyline } from "../../DatabaseServices/Entity/Polyline";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class DrawDrillingTool extends Singleton
|
|
|
|
export class DrawDrillingTool extends Singleton
|
|
|
@ -231,7 +233,9 @@ export class DrawDrillingTool extends Singleton
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (this.CheckModelingCollision(this.m_Face.m_InterBoard, this.drillEnts[0], dist))
|
|
|
|
if (this.CheckModelingCollision(this.m_Face.m_InterBoard, this.drillEnts[0], dist))
|
|
|
|
continue;
|
|
|
|
continue;
|
|
|
|
|
|
|
|
//检测排钻是否在板件内
|
|
|
|
|
|
|
|
if (userConfig.openExactDrill && !this.CheckDrillInBoard(this.m_Face.m_InterBoard, this.drillEnts[0], dist))
|
|
|
|
|
|
|
|
continue;
|
|
|
|
if (this.drillEnts.length === 3)
|
|
|
|
if (this.drillEnts.length === 3)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (this.CheckModelingCollision(this.m_Face.m_LocalBoard, this.drillEnts[2], dist))
|
|
|
|
if (this.CheckModelingCollision(this.m_Face.m_LocalBoard, this.drillEnts[2], dist))
|
|
|
@ -273,6 +277,12 @@ export class DrawDrillingTool extends Singleton
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
private CheckDrillInBoard(br: Board, en: GangDrill, dist: number)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
let cu = br.ContourCurve;
|
|
|
|
|
|
|
|
let p = en.Position.setX(dist).applyMatrix4(this.m_Face.OCS).applyMatrix4(br.OCSInv);
|
|
|
|
|
|
|
|
return IsPointInPolyLine(cu as Polyline, p);
|
|
|
|
|
|
|
|
}
|
|
|
|
// 分析当前排钻
|
|
|
|
// 分析当前排钻
|
|
|
|
private ParseDrillList(drills: ObjectId[][])
|
|
|
|
private ParseDrillList(drills: ObjectId[][])
|
|
|
|
{
|
|
|
|
{
|
|
|
|