|
|
|
@ -19,6 +19,7 @@ import { Face } from "../../Geometry/DrillParse/Face";
|
|
|
|
|
import { equaln, MoveMatrix, ZAxis } from "../../Geometry/GeUtils";
|
|
|
|
|
import { FaceDirection } from "../../UI/Store/BoardInterface";
|
|
|
|
|
import { DrillingOption, SpacingType } from "../../UI/Store/drillInterface";
|
|
|
|
|
import { Entity } from "../../DatabaseServices/Entity/Entity";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class DrawDrillingTool extends Singleton
|
|
|
|
@ -489,13 +490,12 @@ export class DrawDrillingTool extends Singleton
|
|
|
|
|
private MoveDrillEnts(drillent: ObjectId[], dist: number, dir = 1)
|
|
|
|
|
{
|
|
|
|
|
let offVec = new Vector3(dist * dir);
|
|
|
|
|
|
|
|
|
|
let ro = new Matrix4().extractRotation(this.m_Face.OCS);
|
|
|
|
|
for (let objId of drillent)
|
|
|
|
|
{
|
|
|
|
|
let d = objId.Object as GangDrill;
|
|
|
|
|
d.ApplyMatrix(this.m_Face.OCSInv)
|
|
|
|
|
.ApplyMatrix(MoveMatrix(offVec))
|
|
|
|
|
.ApplyMatrix(this.m_Face.OCS);
|
|
|
|
|
let d = objId.Object as Entity;
|
|
|
|
|
|
|
|
|
|
d.Position = d.Position.add(offVec.clone().applyMatrix4(ro));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private CheckCollision(drills: ObjectId[][], refDrillList: ObjectId[][], woodPinss: ObjectId[][])
|
|
|
|
@ -520,8 +520,8 @@ export class DrawDrillingTool extends Singleton
|
|
|
|
|
//排钻是不是通孔
|
|
|
|
|
const isTK = (ds: ObjectId[]) =>
|
|
|
|
|
{
|
|
|
|
|
return ds.some(d => (d.Object as GangDrill).Type === GangDrillType.TK)
|
|
|
|
|
}
|
|
|
|
|
return ds.some(d => (d.Object as GangDrill).Type === GangDrillType.TK);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < drills.length; i++)
|
|
|
|
|
{
|
|
|
|
|