|
|
|
@ -1,7 +1,9 @@
|
|
|
|
|
import { app } from '../../ApplicationServices/Application';
|
|
|
|
|
import { BoardType } from '../../DatabaseServices/Entity/BoardInterface';
|
|
|
|
|
import { Entity } from '../../DatabaseServices/Entity/Entity';
|
|
|
|
|
import { TemplateVerticalBoard } from '../../DatabaseServices/Template/ProgramTempate/TemplateVerticalBoard';
|
|
|
|
|
import { SetTemplatePositionAndSetParent } from '../../DatabaseServices/Template/TempateUtils';
|
|
|
|
|
import { JigUtils } from '../../Editor/JigUtils';
|
|
|
|
|
import { VerticalBoardOption } from "../../UI/Store/OptionInterface/IOptionInterface";
|
|
|
|
|
import { BuildVerticalBoards } from './BuildBoardTool';
|
|
|
|
|
import { CuttingProtrudingPart } from './CuttingProtrudingPart';
|
|
|
|
@ -20,18 +22,25 @@ export class DrawVerticalBoard extends DrawBoardTool
|
|
|
|
|
temp.BoardProcessOption = this.store.BoardProcessOption;
|
|
|
|
|
temp.GrooveOption = this.store.grooveOption;
|
|
|
|
|
|
|
|
|
|
let effectBoards: Entity[];
|
|
|
|
|
if (this.store.m_Option.cuttingProtrudingPart)
|
|
|
|
|
{
|
|
|
|
|
temp.IntersectSpaceEntitys = this.IntersectSpaceEntitys;
|
|
|
|
|
|
|
|
|
|
effectBoards = Array.from(this.IntersectSpaceEntitys).map(objectId => objectId?.Object as Entity);
|
|
|
|
|
}
|
|
|
|
|
app.Database.TemplateTable.Append(temp);
|
|
|
|
|
await SetTemplatePositionAndSetParent(this.space, temp);
|
|
|
|
|
await SetTemplatePositionAndSetParent(this.space, temp, true, undefined, effectBoards);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
//BuildVerticalBoards()的时候cuttingProtrudingPart会被修改
|
|
|
|
|
let cuttingProtrudingPart = this.store.m_Option.cuttingProtrudingPart;
|
|
|
|
|
let brs = await BuildVerticalBoards(this.store.m_Option as VerticalBoardOption, this.space);
|
|
|
|
|
|
|
|
|
|
if (this.store.m_Option.cuttingProtrudingPart)
|
|
|
|
|
if (cuttingProtrudingPart)
|
|
|
|
|
CuttingProtrudingPart(this.IntersectSpaceEntitys, brs);
|
|
|
|
|
|
|
|
|
|
brs.forEach(br => JigUtils.Draw(br));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|