同时拷贝板件和排钻时,排钻被过滤.

pull/318/MERGE
ChenX 5 years ago
parent 3dc271f2d7
commit a8941a98e0

@ -1,5 +1,7 @@
import { app } from '../ApplicationServices/Application';
import { DeepCloneFiler } from '../DatabaseServices/DeepCloneFiler';
import { arrayRemoveIf } from '../Common/ArrayExt';
import { GangDrill } from '../DatabaseServices/3DSolid/GangDrill';
import { Board } from '../DatabaseServices/Board';
import { Entity } from '../DatabaseServices/Entity';
import { Command } from '../Editor/CommandMachine';
import { JigUtils } from '../Editor/JigUtils';
@ -23,6 +25,10 @@ export class Command_Copy implements Command
let orgEns = ssRes.SelectSet.SelectEntityList;
//当拷贝板件时,不拷贝排钻.
if (orgEns.some(en => en instanceof Board))
arrayRemoveIf(orgEns, e => e instanceof GangDrill);
let jigEns = orgEns.map(e => JigUtils.Draw(e));
while (true)
{

Loading…
Cancel
Save