|
|
|
@ -1,13 +1,12 @@
|
|
|
|
|
import { Intent } from "@blueprintjs/core";
|
|
|
|
|
import { Line3, Matrix4, Quaternion, Vector3 } from "three";
|
|
|
|
|
import { app } from "../../ApplicationServices/Application";
|
|
|
|
|
import { arrayLast, arrayRemoveIf } from "../../Common/ArrayExt";
|
|
|
|
|
import { arrayLast } from "../../Common/ArrayExt";
|
|
|
|
|
import { AlignLineGroupRecord } from "../../DatabaseServices/AlignLine/AlignLineGroupRecord";
|
|
|
|
|
import { Contour } from "../../DatabaseServices/Contour";
|
|
|
|
|
import { Board, I2DModeling } from "../../DatabaseServices/Entity/Board";
|
|
|
|
|
import { ExtrudeContourCurve } from "../../DatabaseServices/Entity/Extrude";
|
|
|
|
|
import { BUL_IS_LINE_FUZZ, Polyline } from "../../DatabaseServices/Entity/Polyline";
|
|
|
|
|
import { HardwareCompositeEntity } from "../../DatabaseServices/Hardware/HardwareCompositeEntity";
|
|
|
|
|
import { Command } from "../../Editor/CommandMachine";
|
|
|
|
|
import { PromptStatus } from "../../Editor/PromptResult";
|
|
|
|
|
import { CreateContour2 } from "../../Geometry/CreateContour2";
|
|
|
|
@ -280,34 +279,6 @@ export class LinearCutting implements Command
|
|
|
|
|
br.HandleSpliteEntitys(spliteEnts);
|
|
|
|
|
br.GrooveCheckAllAutoSplit();
|
|
|
|
|
|
|
|
|
|
//关联复合实体 重新关联
|
|
|
|
|
arrayRemoveIf(br.RelativeHardware, (hwdObjId) =>
|
|
|
|
|
{
|
|
|
|
|
if (!hwdObjId || hwdObjId.IsErase) return true;
|
|
|
|
|
|
|
|
|
|
for (let ent of spliteEnts)
|
|
|
|
|
{
|
|
|
|
|
let hwd = (hwdObjId.Object as HardwareCompositeEntity);
|
|
|
|
|
if (ent.BoundingBox.intersectsBox(hwd.BoundingBox))
|
|
|
|
|
{
|
|
|
|
|
arrayRemoveIf(hwd.RelevanceBoards, (rbr) =>
|
|
|
|
|
{
|
|
|
|
|
return rbr && rbr.Object === br;
|
|
|
|
|
});
|
|
|
|
|
hwd.RelevanceBoards.push(ent.objectId);
|
|
|
|
|
ent.RelativeHardware.push(hwdObjId);
|
|
|
|
|
|
|
|
|
|
if (br.RelativeHandle.includes(hwdObjId))
|
|
|
|
|
{
|
|
|
|
|
arrayRemoveIf(br.RelativeHandle, (handle) => handle === hwdObjId);
|
|
|
|
|
ent.RelativeHandle.push(hwdObjId);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fixPath.SetBoardPath2d(br);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|