mirror of https://gitee.com/cf-fz/WebCAD.git
parent
b19f5ca43b
commit
2b966de4eb
@ -0,0 +1,32 @@
|
||||
//翻转纹路
|
||||
|
||||
import { app } from "../ApplicationServices/Application";
|
||||
import { EBoardKeyList } from "../Common/BoardKeyList";
|
||||
import { Board } from "../DatabaseServices/Entity/Board";
|
||||
import { Command } from "../Editor/CommandMachine";
|
||||
import { PromptStatus } from "../Editor/PromptResult";
|
||||
import { LinesType } from "../UI/Store/BoardInterface";
|
||||
|
||||
export class Command_FZWL implements Command
|
||||
{
|
||||
async exec()
|
||||
{
|
||||
let brsRes = await app.Editor.GetSelection({
|
||||
UseSelect: true,
|
||||
Msg: "选择需要反转排钻面的板件",
|
||||
Filter: { filterTypes: [Board] }
|
||||
});
|
||||
|
||||
if (brsRes.Status === PromptStatus.Cancel) return;
|
||||
|
||||
let brs = brsRes.SelectSet.SelectEntityList as Board[];
|
||||
|
||||
for (let br of brs)
|
||||
{
|
||||
if (br.BoardProcessOption[EBoardKeyList.Lines] === LinesType.Reverse)
|
||||
br.BoardProcessOption[EBoardKeyList.Lines] = LinesType.Positive;
|
||||
else if (br.BoardProcessOption[EBoardKeyList.Lines] === LinesType.Positive)
|
||||
br.BoardProcessOption[EBoardKeyList.Lines] = LinesType.Reverse;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in new issue