From e8d470a9a16e5ca274feb28502df1c2db3b04b55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E4=B8=89?= <940119273@qq.com> Date: Thu, 18 Apr 2024 03:34:59 +0000 Subject: [PATCH] =?UTF-8?q?!2635=20=E4=BC=98=E5=8C=96:=E9=87=8D=E6=9E=84?= =?UTF-8?q?=E7=BC=BA=E5=8F=A3=E6=9D=BF=E4=BB=B6=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Add-on/DrawBoard/CuttingProtrudingPart.ts | 21 ++++-- src/Add-on/DrawBoard/DrawBoardTool.ts | 20 +++--- src/Add-on/DrawBoard/DrawLayerBoard.ts | 7 +- src/Add-on/DrawBoard/DrawVerticalBoard.ts | 6 +- .../Positioning/PositioningClampSpace.ts | 8 --- .../Positioning/PositioningTemporary.ts | 4 +- .../Template/ProgramTempate/TemplateBoard.ts | 67 +++++++++++++++++-- .../ProgramTempate/TemplateLayerBoard.ts | 37 ++++++++-- .../ProgramTempate/TemplateVerticalBoard.ts | 32 ++++++++- src/DatabaseServices/Template/TempateUtils.ts | 5 -- .../Template/TemplateRecord.ts | 9 --- src/Geometry/SpaceParse/ISpaceParse.ts | 4 -- 12 files changed, 161 insertions(+), 59 deletions(-) diff --git a/src/Add-on/DrawBoard/CuttingProtrudingPart.ts b/src/Add-on/DrawBoard/CuttingProtrudingPart.ts index c765c5b3d..663bf7e5e 100644 --- a/src/Add-on/DrawBoard/CuttingProtrudingPart.ts +++ b/src/Add-on/DrawBoard/CuttingProtrudingPart.ts @@ -1,20 +1,20 @@ import { ExtrudeHole } from "../../DatabaseServices/3DSolid/ExtrudeHole"; import { Board } from "../../DatabaseServices/Entity/Board"; +import { Entity } from "../../DatabaseServices/Entity/Entity"; import { ExtrudeSolid } from "../../DatabaseServices/Entity/Extrude"; import { HardwareCompositeEntity } from "../../DatabaseServices/Hardware/HardwareCompositeEntity"; -import { ISpaceParse } from "../../Geometry/SpaceParse/ISpaceParse"; /** * 缺口(柱子、梁)柜内空间绘制层立板自动按缺口尺寸绘制出异形板件0 * 切割凸出部分 * - * @param {ISpaceParse} paceParse + * @param {Entity} knifeBrs 切割的刀 * @param {Board[]} brs */ -export function CuttingProtrudingPart(paceParse: ISpaceParse, brs: Board[]) +export function CuttingProtrudingPart(knifeBrs: Set, brs: Board[]): Board[] { // 获取包围框里的实体 - let intersectsEnt = paceParse.IntersectSpaceEntitys || []; + let intersectsEnt = Array.from(knifeBrs) || []; // 获取包围框里的实体与需要绘制实体碰撞的实体 let brKfs = intersectsEnt.filter((ent) => ent instanceof Board) as Board[]; // 处理碰撞的复合实体 @@ -32,7 +32,18 @@ export function CuttingProtrudingPart(paceParse: ISpaceParse, brs: Board[]) hardwareKfs.push(e); } } + + let newBrs: Board[] = []; //直接切掉 for (let br of brs) - br.Subtract([...hardwareKfs, ...brKfs]); + { + let splitBrs: Board[] = []; + br.Subtract([...hardwareKfs, ...brKfs], splitBrs); + splitBrs.push(br); + splitBrs.sort((b1, b2) => b2.Volume - b1.Volume); + //切割后留下大块的 + newBrs.push(splitBrs[0]); + } + + return newBrs; } diff --git a/src/Add-on/DrawBoard/DrawBoardTool.ts b/src/Add-on/DrawBoard/DrawBoardTool.ts index e11150802..40f0ab5c9 100644 --- a/src/Add-on/DrawBoard/DrawBoardTool.ts +++ b/src/Add-on/DrawBoard/DrawBoardTool.ts @@ -16,8 +16,6 @@ import { BehindBoardStore, LayerBoardStore, VerticalBoardStore } from '../../UI/ import { PointToString } from '../../UI/Store/PointToString'; import { AutoCutting } from '../BoardCutting/AutoCuttingReactor'; -const CacheSpaceEntitysMap: Map = new Map(); - export abstract class DrawBoardTool implements Command { //画板件类型,默认画层板 @@ -25,10 +23,13 @@ export abstract class DrawBoardTool implements Command protected modalType: BoardModalType; protected store: LayerBoardStore | VerticalBoardStore | BehindBoardStore; protected space: ISpaceParse; + protected IntersectSpaceEntitys: Set; + CacheSpaceEntitysMap: Map> = new Map(); + async exec() { let helpUrlName = ""; - CacheSpaceEntitysMap.clear(); + this.CacheSpaceEntitysMap.clear(); switch (this.drawType) { @@ -73,7 +74,7 @@ export abstract class DrawBoardTool implements Command if (selectSpace.ParseOK) { if (selectSpace.AutoCutting) - selectSpace.SpaceParse.IntersectSpaceEntitys = this.GetIntersectSpaceEntitys(selectSpace.SpaceParse); + this.IntersectSpaceEntitys = this.GetIntersectSpaceEntitys(selectSpace.SpaceParse); this.buildBoard(false); } @@ -100,7 +101,7 @@ export abstract class DrawBoardTool implements Command return; if (selectSpace.AutoCutting) - selectSpace.SpaceParse.IntersectSpaceEntitys = this.GetIntersectSpaceEntitys(selectSpace.SpaceParse); + this.IntersectSpaceEntitys = this.GetIntersectSpaceEntitys(selectSpace.SpaceParse); this.space = selectSpace.SpaceParse; this.store.m_Option.cuttingProtrudingPart = selectSpace.AutoCutting; @@ -116,16 +117,15 @@ export abstract class DrawBoardTool implements Command { let box = spaceParse.SpaceBox.clone().applyMatrix4(spaceParse.SpaceOCS); let key = `${PointToString(box.min)}${PointToString(box.max)}`; - - let ents = CacheSpaceEntitysMap.get(key); + let ents = this.CacheSpaceEntitysMap.get(key); if (!ents) { - ents = app.Database.ModelSpace.Entitys.filter((ent) => + ents = new Set(app.Database.ModelSpace.Entitys.filter((ent) => { return !ent.IsErase && (ent instanceof Board || ent instanceof HardwareCompositeEntity) && box.intersectsBox(ent.BoundingBox); - }); - CacheSpaceEntitysMap.set(key, ents); + })); + this.CacheSpaceEntitysMap.set(key, ents); } return ents; } diff --git a/src/Add-on/DrawBoard/DrawLayerBoard.ts b/src/Add-on/DrawBoard/DrawLayerBoard.ts index 67d0315c4..39c89de40 100644 --- a/src/Add-on/DrawBoard/DrawLayerBoard.ts +++ b/src/Add-on/DrawBoard/DrawLayerBoard.ts @@ -21,6 +21,10 @@ export class DrawLayerBoard extends DrawBoardTool temp.NailOption = store.layerNailOption; temp.UseBoardProcessOption = this.store.BoardProcessOption.useBoardProcessOption; temp.BoardProcessOption = this.store.BoardProcessOption; + + if (this.store.m_Option.cuttingProtrudingPart) + temp.IntersectSpaceEntitys = this.IntersectSpaceEntitys; + app.Database.TemplateTable.Append(temp); await SetTemplatePositionAndSetParent(this.space, temp); } @@ -28,7 +32,8 @@ export class DrawLayerBoard extends DrawBoardTool { let brs = BuildLayerBoards(this.store.m_Option as LayerBoardOption, this.space); if (this.store.m_Option.cuttingProtrudingPart) - CuttingProtrudingPart(this.space, brs); + CuttingProtrudingPart(this.IntersectSpaceEntitys, brs); + brs.forEach(b => JigUtils.Draw(b)); } } diff --git a/src/Add-on/DrawBoard/DrawVerticalBoard.ts b/src/Add-on/DrawBoard/DrawVerticalBoard.ts index c074fd2c9..be8313882 100644 --- a/src/Add-on/DrawBoard/DrawVerticalBoard.ts +++ b/src/Add-on/DrawBoard/DrawVerticalBoard.ts @@ -20,6 +20,10 @@ export class DrawVerticalBoard extends DrawBoardTool temp.UseBoardProcessOption = this.store.BoardProcessOption.useBoardProcessOption;; temp.BoardProcessOption = this.store.BoardProcessOption; temp.GrooveOption = this.store.grooveOption; + + if (this.store.m_Option.cuttingProtrudingPart) + temp.IntersectSpaceEntitys = this.IntersectSpaceEntitys; + app.Database.TemplateTable.Append(temp); await SetTemplatePositionAndSetParent(this.space, temp); } @@ -28,7 +32,7 @@ export class DrawVerticalBoard extends DrawBoardTool let brs = BuildVerticalBoards(this.store.m_Option as VerticalBoardOption, this.space); if (this.store.m_Option.cuttingProtrudingPart) - CuttingProtrudingPart(this.space, brs); + CuttingProtrudingPart(this.IntersectSpaceEntitys, brs); brs.forEach(b => JigUtils.Draw(b)); } diff --git a/src/DatabaseServices/Template/Positioning/PositioningClampSpace.ts b/src/DatabaseServices/Template/Positioning/PositioningClampSpace.ts index 6ca7b52a4..bc3664c39 100644 --- a/src/DatabaseServices/Template/Positioning/PositioningClampSpace.ts +++ b/src/DatabaseServices/Template/Positioning/PositioningClampSpace.ts @@ -5,7 +5,6 @@ import { AutoRecord } from "../../AutoRecord"; import { Factory } from "../../CADFactory"; import { CADFiler } from "../../CADFiler"; import { Board } from "../../Entity/Board"; -import { Entity } from "../../Entity/Entity"; import { ObjectId } from "../../ObjectId"; import { Positioning, PositioningParam } from "./Positioning"; @@ -18,19 +17,12 @@ export class PositioningClampSpace extends Positioning @AutoRecord SelectBoxIndex: number[] = [0, 0, 0];//左右下 @AutoRecord SignalDist = 100;//默认为100 防止空 - //与空间相交的实体 - IntersectSpaceEntitys: Entity[]; - FromSpaceParse(parse: ClampSpaceParse) { this.SignalDist = parse.SignalDist || 100; this.Objects = parse.Boards.map(br => br.Id); for (let [splitType, index] of parse.SelectBoxRecord) this.SelectBoxIndex[splitType] = index; - - //与空间相交的实体 - if (parse.IntersectSpaceEntitys) - this.IntersectSpaceEntitys = parse.IntersectSpaceEntitys; } _SpaceParse: ClampSpaceParseFix; diff --git a/src/DatabaseServices/Template/Positioning/PositioningTemporary.ts b/src/DatabaseServices/Template/Positioning/PositioningTemporary.ts index d0d8a938f..5477c6cf4 100644 --- a/src/DatabaseServices/Template/Positioning/PositioningTemporary.ts +++ b/src/DatabaseServices/Template/Positioning/PositioningTemporary.ts @@ -1,5 +1,4 @@ import { Factory } from "../../CADFactory"; -import { Entity } from "../../Entity/Entity"; import { Positioning } from "./Positioning"; /** @@ -9,6 +8,5 @@ import { Positioning } from "./Positioning"; @Factory export class PositioningTemporary extends Positioning { - //与绘制的空间相交的实体 - IntersectSpaceEntitys: Entity[]; + } diff --git a/src/DatabaseServices/Template/ProgramTempate/TemplateBoard.ts b/src/DatabaseServices/Template/ProgramTempate/TemplateBoard.ts index 13e469c45..2bf7ff791 100644 --- a/src/DatabaseServices/Template/ProgramTempate/TemplateBoard.ts +++ b/src/DatabaseServices/Template/ProgramTempate/TemplateBoard.ts @@ -1,4 +1,5 @@ import { ExtendsBoardThickness } from "../../../Add-on/DrawBoard/BuildBoardTool"; +import { CuttingProtrudingPart } from "../../../Add-on/DrawBoard/CuttingProtrudingPart"; import { EBoardKeyList } from "../../../Common/BoardKeyList"; import { ISpaceParse } from "../../../Geometry/SpaceParse/ISpaceParse"; import { BoardProcessOption } from "../../../UI/Store/OptionInterface/BoardProcessOption"; @@ -22,6 +23,11 @@ export class TemplateBoardRecord extends TemplateRecord @AutoRecord DrawBoardCount = 1; + //空间分析缺口切割需要的板件 + protected IntersectSpaceEntitys: Set; + //空间分析缺口切割需要原板件排钻信息 + protected IntersectHighDrill: string[]; + protected _option: BoardConfigOption; // InitBaseParams() // { @@ -80,7 +86,23 @@ export class TemplateBoardRecord extends TemplateRecord this.UseBoardProcessOption = false; } + //记录按缺口切割前的板轮廓 + const OldContour = nbrs[0].ContourCurve.Clone(); + //是否是被缺口切割 + const IsIntersectSpaceEntitys = !!this.IntersectSpaceEntitys?.size; + + if (IsIntersectSpaceEntitys) + { + if (!this.IntersectHighDrill?.length) + this.IntersectHighDrill = nbrs[0].BoardProcessOption.highDrill; + nbrs = CuttingProtrudingPart(this.IntersectSpaceEntitys, nbrs); + } + + //继承refBr的BoardProcessOption/IsChaiDan/RelevanceMeats属性 let refBr: Board; + //记录生成的异型缺口板高级排钻列表 + const HighDrill: string[] = []; + if (this.Objects.length > 0) refBr = this.Objects[0].Object as Board; @@ -89,11 +111,18 @@ export class TemplateBoardRecord extends TemplateRecord for (let i = 0; i < nbrs.length; i++) { + let br: Board; + if (i < this.Objects.length) { - let br = this.Objects[i].Object as Board; + br = this.Objects[i].Object as Board; if (i >= this.DrawBoardCount) br.Erase(false); + + //缺口切割旧板 使用切割后的的轮廓信息 + if (IsIntersectSpaceEntitys) + br.ContourCurve = nbrs[i].ContourCurve.Clone(); + br.Position = nbrs[i].Position; br.Width = nbrs[i].Width; br.Height = nbrs[i].Height; @@ -101,16 +130,21 @@ export class TemplateBoardRecord extends TemplateRecord } else { - let br = nbrs[i]; + br = nbrs[i]; + if (refBr) { - br.ContourCurve = refBr.ContourCurve.Clone(); + //新生成的缺口切割板 不使用原有的轮廓信息 + if (!IsIntersectSpaceEntitys) + br.ContourCurve = refBr.ContourCurve.Clone(); + br.BoardProcessOption = refBr.BoardProcessOption; br.IsChaiDan = refBr.IsChaiDan; br.RelevanceMeats = refBr.RelevanceMeats; } - this._db.ModelSpace.Append(nbrs[i]); - this.Objects.push(nbrs[i].Id); + + this._db.ModelSpace.Append(br); + this.Objects.push(br.Id); //新创建的板 关联切割 for (let meat of br.RelevanceMeats) @@ -120,7 +154,30 @@ export class TemplateBoardRecord extends TemplateRecord meatBr.RelevanceKnifs.push(br.objectId); } } + + //缺口生成的异型板 分析排钻 + if (IsIntersectSpaceEntitys && !br.IsRect) + { + if (!HighDrill.length) + { + let indexMap: number[] = []; + let newContour = br.ContourCurve; + for (let i = 0; i < newContour.EndParam; i++) + { + let p = newContour.GetPointAtParam(i + 0.5); + let cp = OldContour.GetClosestPointTo(p, false); + let cparam = OldContour.GetParamAtPoint2(cp); + indexMap.push(Math.floor(cparam)); + } + + for (let index of indexMap) + HighDrill.push(this.IntersectHighDrill[index]); + } + + br.BoardProcessOption.highDrill = HighDrill; + } } + this.DrawBoardCount = nbrs.length; //保持SpaceCS diff --git a/src/DatabaseServices/Template/ProgramTempate/TemplateLayerBoard.ts b/src/DatabaseServices/Template/ProgramTempate/TemplateLayerBoard.ts index 91cb87299..38b413768 100644 --- a/src/DatabaseServices/Template/ProgramTempate/TemplateLayerBoard.ts +++ b/src/DatabaseServices/Template/ProgramTempate/TemplateLayerBoard.ts @@ -1,12 +1,12 @@ import { activityLayerBoardTool } from "../../../Add-on/DrawBoard/ActivityLayerBoardTool"; import { BuildLayerBoards } from "../../../Add-on/DrawBoard/BuildBoardTool"; -import { CuttingProtrudingPart } from "../../../Add-on/DrawBoard/CuttingProtrudingPart"; import { DefaultLayerBoardConfig, DefaultNailOption } from "../../../Editor/DefaultConfig"; import { ISpaceParse } from "../../../Geometry/SpaceParse/ISpaceParse"; import { IGrooveOption, LayerBoardOption, LayerNailOption } from "../../../UI/Store/OptionInterface/IOptionInterface"; import { Factory } from "../../CADFactory"; import { CADFiler } from "../../CADFiler"; import { Board } from "../../Entity/Board"; +import { Entity } from "../../Entity/Entity"; import { TemplateBoardRecord } from "./TemplateBoard"; /** @@ -28,6 +28,10 @@ export class TemplateLayerBoard extends TemplateBoardRecord grooveAddDepth: "0", knifeRadius: "3", }; + + //空间分析缺口切割需要的板件 + IntersectSpaceEntitys: Set = new Set(); + IntersectHighDrill: string[] = []; set GrooveOption(option: IGrooveOption) { this.WriteAllObjectRecord(); @@ -45,10 +49,7 @@ export class TemplateLayerBoard extends TemplateBoardRecord GeneralBoardList(space: ISpaceParse) { - let brs = BuildLayerBoards(this._option, space, this.grooveOption); - if (this._option.cuttingProtrudingPart) - CuttingProtrudingPart(space, brs); - return brs; + return BuildLayerBoards(this._option, space, this.grooveOption);; } protected async Update() @@ -128,11 +129,26 @@ export class TemplateLayerBoard extends TemplateBoardRecord this.grooveOption.grooveAddDepth = this.grooveOption.grooveAddDepth.toString(); this.grooveOption.knifeRadius = this.grooveOption.knifeRadius.toString(); } + + this.IntersectSpaceEntitys.clear(); + if (ver > 4) + { + let size = file.Read(); + for (let i = 0; i < size; i++) + { + let ent = file.ReadObjectId().Object as Entity; + if (ent && !ent.IsErase) + this.IntersectSpaceEntitys.add(ent); + } + + size = file.Read(); + this.IntersectHighDrill = file.ReadArray(size); + } } WriteFile(file: CADFiler) { - file.Write(4); + file.Write(5); super.WriteFile(file); file.Write(this._option.type); file.Write(this._option.name); @@ -170,5 +186,14 @@ export class TemplateLayerBoard extends TemplateBoardRecord file.Write(this.grooveOption.grooveAddWidth); file.Write(this.grooveOption.grooveAddDepth); file.Write(this.grooveOption.knifeRadius); + + //ver5 + file.Write(this.IntersectSpaceEntitys.size); + for (let ent of this.IntersectSpaceEntitys) + file.WriteObjectId(ent?.objectId); + + file.Write(this.IntersectHighDrill.length); + for (let type of this.IntersectHighDrill) + file.Write(type); } } diff --git a/src/DatabaseServices/Template/ProgramTempate/TemplateVerticalBoard.ts b/src/DatabaseServices/Template/ProgramTempate/TemplateVerticalBoard.ts index c74cacb3d..2219a1935 100644 --- a/src/DatabaseServices/Template/ProgramTempate/TemplateVerticalBoard.ts +++ b/src/DatabaseServices/Template/ProgramTempate/TemplateVerticalBoard.ts @@ -4,6 +4,7 @@ import { ISpaceParse } from "../../../Geometry/SpaceParse/ISpaceParse"; import { IGrooveOption, VerticalBoardOption } from "../../../UI/Store/OptionInterface/IOptionInterface"; import { Factory } from "../../CADFactory"; import { CADFiler } from "../../CADFiler"; +import { Entity } from "../../Entity/Entity"; import { TemplateBoardRecord } from "./TemplateBoard"; /** @@ -29,10 +30,16 @@ export class TemplateVerticalBoard extends TemplateBoardRecord this.WriteAllObjectRecord(); Object.assign(this.grooveOption, option); } + + //空间分析缺口切割需要的板件 + IntersectSpaceEntitys: Set = new Set(); + IntersectHighDrill: string[] = []; + GeneralBoardList(space: ISpaceParse) { - return BuildVerticalBoards(this._option, space, this.grooveOption); + return BuildVerticalBoards(this._option, space, this.grooveOption);; } + ReadFile(file: CADFiler) { let ver = file.Read(); @@ -76,10 +83,21 @@ export class TemplateVerticalBoard extends TemplateBoardRecord this.grooveOption.grooveAddDepth = this.grooveOption.grooveAddDepth.toString(); this.grooveOption.knifeRadius = this.grooveOption.knifeRadius.toString(); } + + this.IntersectSpaceEntitys.clear(); + if (ver > 3) + { + let size = file.Read(); + for (let i = 0; i < size; i++) + this.IntersectSpaceEntitys.add(file.ReadObject()); + + size = file.Read(); + this.IntersectHighDrill = file.ReadArray(size); + } } WriteFile(file: CADFiler) { - file.Write(3); + file.Write(4); super.WriteFile(file); file.Write(this._option.type); file.Write(this._option.name); @@ -102,5 +120,15 @@ export class TemplateVerticalBoard extends TemplateBoardRecord file.Write(this.grooveOption.grooveAddWidth); file.Write(this.grooveOption.grooveAddDepth); file.Write(this.grooveOption.knifeRadius); + + + //ver4 + file.Write(this.IntersectSpaceEntitys.size); + for (let ent of this.IntersectSpaceEntitys) + file.WriteObject(ent); + + file.Write(this.IntersectHighDrill.length); + for (let type of this.IntersectHighDrill) + file.Write(type); } } diff --git a/src/DatabaseServices/Template/TempateUtils.ts b/src/DatabaseServices/Template/TempateUtils.ts index 738159ac5..d5055f4b0 100644 --- a/src/DatabaseServices/Template/TempateUtils.ts +++ b/src/DatabaseServices/Template/TempateUtils.ts @@ -1588,11 +1588,6 @@ export async function SetTemplatePositionAndSetParent(spaceParse: ISpaceParse, t let positioning = new PositioningTemporary(); positioning.SpaceCS = spaceParse.SpaceOCS; positioning.SpaceSize = spaceParse.Size; - - //与空间相交的实体 - if (spaceParse.IntersectSpaceEntitys) - positioning.IntersectSpaceEntitys = spaceParse.IntersectSpaceEntitys; - template.Positioning = positioning; //可能需要把父节点设置为空 diff --git a/src/DatabaseServices/Template/TemplateRecord.ts b/src/DatabaseServices/Template/TemplateRecord.ts index 5e19165e8..5b9fefaf3 100644 --- a/src/DatabaseServices/Template/TemplateRecord.ts +++ b/src/DatabaseServices/Template/TemplateRecord.ts @@ -393,11 +393,6 @@ export class TemplateRecord extends SymbolTableRecord if (this.HParam.expr) this._CacheSpaceSize.z = this.HParam.EvalUpdate(this._CacheParamVars, paramMap, evaled, false); - //@ts-ignore - if (this._Positioning.IntersectSpaceEntitys) - //@ts-ignore - this._CacheIntersectSpaceEntitys = this._Positioning.IntersectSpaceEntitys; - if (this._Positioning instanceof PositioningTemporary) this._Positioning = undefined; } @@ -624,7 +619,6 @@ export class TemplateRecord extends SymbolTableRecord protected _CacheSpaceCS: Matrix4; protected _CacheSpaceSize: Vector3; protected _CatchRootParam: Set; - protected _CacheIntersectSpaceEntitys: Entity[]; //空间box相交的实体 /** * 本节点可用的所有变量定义.(包括变量继承) * @param [useCache=true] 当更新当前节点的时候,我们不希望使用缓存,(因为父节点的参数可能已经被更新) @@ -700,8 +694,6 @@ export class TemplateRecord extends SymbolTableRecord spaceParse.ParseOK = true; spaceParse.SpaceBox = new Box3Ext(new Vector3(), this._CacheSpaceSize); - if (this._CacheIntersectSpaceEntitys) - spaceParse.IntersectSpaceEntitys = this._CacheIntersectSpaceEntitys; return spaceParse; } @@ -841,7 +833,6 @@ export class TemplateRecord extends SymbolTableRecord this._CacheSpaceSize = undefined; this._CatchRootParam = undefined; this._NodeDepthCache = undefined; - this._CacheIntersectSpaceEntitys = undefined; } //对象将自身数据写入到文件. WriteFile(file: CADFiler) diff --git a/src/Geometry/SpaceParse/ISpaceParse.ts b/src/Geometry/SpaceParse/ISpaceParse.ts index dfc86919d..8b24294d0 100644 --- a/src/Geometry/SpaceParse/ISpaceParse.ts +++ b/src/Geometry/SpaceParse/ISpaceParse.ts @@ -2,7 +2,6 @@ import { Matrix4, Vector3 } from "three"; import { arrayRemoveDuplicateBySort } from "../../Common/ArrayExt"; import { Board } from "../../DatabaseServices/Entity/Board"; import { BoardType } from "../../DatabaseServices/Entity/BoardInterface"; -import { Entity } from "../../DatabaseServices/Entity/Entity"; import { Box3Ext, SplitType } from "../Box"; import { XAxis, YAxis, ZAxis, equaln, isParallelTo } from "../GeUtils"; import { VisualSpaceBox } from './../../Editor/VisualSpaceBox'; @@ -46,9 +45,6 @@ export class ISpaceParse VisualSpaceBox: VisualSpaceBox; Rotation = { x: 0, y: 0, z: 0 }; - //周围与空间盒子相交的板件 - IntersectSpaceEntitys: Entity[]; - /** * # 构造后请手动调用Parse()方法. * @param boards 板件列表