!2261 新增:定义命令到CommandList中

pull/2279/head
黄诗津 1 year ago committed by ChenX
parent 8c819355c7
commit 5803ebaadc

@ -54,6 +54,7 @@ export enum CommandNames
ZS = "LEFTVIEW",
BackView = "BACKVIEW",
BottomView = "BOTTOMVIEW",
FixView = "FIXVIEW",
Swiso = "SWISO",
HideSelect = "HIDESELECT",
@ -65,6 +66,7 @@ export enum CommandNames
SaveToDxf = "SAVETODXF",
New = "NEW",
Open = "OPEN",
Reopen = "REOPEN",
OpenHistory = "OPENHISTORY",
OpenHistory2 = "OPENHISTORY2",
CustomUCS = "UCS",
@ -217,6 +219,11 @@ export enum CommandNames
Pl2Br = "RECT2BOARD",
Curve2VSBox = "CURVE2VSBOX",
templateDelete = "TEMPLATEDELETE",
RotateTemplateSpace = "ROTATETEMPLATESPACE",
SplitTemplateY = "SPLITTEMPLATEY",
Attach = "ATTACH",
Attach2 = "ATTACH2",
TemplateArray = "TEMPLATEARRAY",
SetSmoothEdge = "SETSMOOTHEDGE",
ClearRef = "CLEARRELEVANCE",
Clear2DModeling = "CLEAR2DMODELING",
@ -236,6 +243,9 @@ export enum CommandNames
CopyBase = "COPYBASE",
PasteClip = "PASTECLIP",
Text2Curve = "TEXT2CURVE",
DeleteCurve = "DELETECURVE",
EraseLineArc = "ERASELINEARC",
Area = "AREA",
R2b = "RECT2BOARD",
RecyleBin = "RECYCLEBIN",
ChangeColorByMaterial = "CHANGECOLORBYMATERIAL",//根据板材改颜色
@ -269,6 +279,7 @@ export enum CommandNames
SetHoleNoneType = "SETHOLENONETYPE",
FindMaxSizeBoard = "FINDMAXSIZEBOARDS",
FindMinSizeBoard = "FINDMINSIZEBOARDS",
FindBoardModelingKnife = "FINDBOARDMODELINGKNIFE",
CheckNoHoleBoard = "CHECKNOHOLEBOARD",
CheckDrawHole = "CHECKDRAWHOLE",
FindModelKnifeRadius = "FINDMODELKNIFERADIUS",

@ -33,12 +33,12 @@ import { Command_ClosePt } from "../Add-on/closetest";
import { Cmd_Freeze, Cmd_UnFreeze } from "../Add-on/Cmd_Freeze";
import { Cmd_UnVisibleInRender, Cmd_VisibleInRender } from "../Add-on/Cmd_VisibleInRender";
import { CombinatAttributeBrush } from "../Add-on/CombinatAttributeBrush";
import { FeedingCommand } from "../Add-on/CommandFeeding";
import { Command_CombineEntity } from "../Add-on/Command_CombineEntity";
import { Command_CommandPanel } from "../Add-on/Command_CommandPanel";
import { Command_Options } from "../Add-on/Command_Option";
import { Command_Purge } from "../Add-on/Command_Purge";
import { Command_SetBRXAxis } from "../Add-on/Command_SetBRXAxis";
import { FeedingCommand } from "../Add-on/CommandFeeding";
import { Command_Conver2Polyline } from "../Add-on/Conver2Polyline";
import { Command_Copy } from "../Add-on/Copy";
import { CopyClip } from "../Add-on/CopyClip";
@ -272,7 +272,7 @@ import { Command_TestSum } from "../Nest/Test/TestSum";
import { Command_TestYH2 } from "../Nest/Test/TestYH2";
import { Command_TestYHSingle } from "../Nest/Test/TestYHSingle";
import { Command_TestYHWorker } from "../Nest/Test/TestYHWorker";
import { Command_ChangeLayout, Command_ModuleBar, Command_PropertiesBar, Command_RightPanel, Comman_SwitchServers, RightTabCommandMap } from "../UI/Components/CommandPanel/SystemCommand/UICpmmand";
import { Comman_SwitchServers, Command_ChangeLayout, Command_ModuleBar, Command_PropertiesBar, Command_RightPanel, RightTabCommandMap } from "../UI/Components/CommandPanel/SystemCommand/UICpmmand";
import Command_Gallery from "../UI/Components/Gallery/command/Command_Gallery";
import { EOptionTabId } from "../UI/Components/Modal/OptionModal/ConfigDialog";
import { Align } from "./../Add-on/Align";
@ -376,8 +376,8 @@ export function registerCommand()
}
commandMachine.RegisterCommand(CommandNames.Erase, new Command_Erase());
commandMachine.RegisterCommand("deletecurve", new DeleteCurve());
commandMachine.RegisterCommand("EraseLineArc", new Command_EraseLineAndArc());
commandMachine.RegisterCommand(CommandNames.DeleteCurve, new DeleteCurve());
commandMachine.RegisterCommand(CommandNames.EraseLineArc, new Command_EraseLineAndArc());
commandMachine.RegisterCommand("Circle0", new DrawCircle0());
commandMachine.RegisterCommand(CommandNames.Break, new Command_Break());
@ -398,7 +398,7 @@ export function registerCommand()
commandMachine.RegisterCommand(CommandNames.BackView, new ViewChange(new Vector3(0, -1)));
commandMachine.RegisterCommand(CommandNames.Swiso, new ViewChange(new Vector3(1, 1, -1), true));
commandMachine.RegisterCommand(CommandNames.BottomView, new ViewChange(new Vector3(0, 0, 1)));
commandMachine.RegisterCommand("fixview", new Command_FixView());
commandMachine.RegisterCommand(CommandNames.FixView, new Command_FixView());
commandMachine.RegisterCommand("grip", new DrawGripStretch());
@ -416,7 +416,7 @@ export function registerCommand()
commandMachine.RegisterCommand(CommandNames.New, new New());
commandMachine.RegisterCommand(CommandNames.Open, new Open());
commandMachine.RegisterCommand("reopen", new ReOpen());
commandMachine.RegisterCommand(CommandNames.Reopen, new ReOpen());
commandMachine.RegisterCommand(CommandNames.OpenHistory, new OperLogs(false));
commandMachine.RegisterCommand(CommandNames.OpenHistory2, new Command_OpenHistory());
@ -455,7 +455,7 @@ export function registerCommand()
commandMachine.RegisterCommand("TO", new Command_DynOffsetToolPath());
commandMachine.RegisterCommand(CommandNames.Length, new Command_Length());
commandMachine.RegisterCommand("Area", new Command_Area());
commandMachine.RegisterCommand(CommandNames.Area, new Command_Area());
//绘制灯
commandMachine.RegisterCommand(CommandNames.PointLight, new DrawPointLight());
@ -659,9 +659,9 @@ export function registerCommand()
commandMachine.RegisterCommand(CommandNames.TemplateCheck, new Command_TemplateSearch(true));
commandMachine.RegisterCommand(CommandNames.SpliteTemplate, new Command_SplitTemplate());
commandMachine.RegisterCommand("SplitTemplateX", new Command_SplitTemplateByDir(0));
commandMachine.RegisterCommand("SplitTemplateY", new Command_SplitTemplateByDir(1));
commandMachine.RegisterCommand(CommandNames.SplitTemplateY, new Command_SplitTemplateByDir(1));
commandMachine.RegisterCommand("SplitTemplateZ", new Command_SplitTemplateByDir(2));
commandMachine.RegisterCommand("RotateTemplateSpace", new Command_RotateTemplateSpace());
commandMachine.RegisterCommand(CommandNames.RotateTemplateSpace, new Command_RotateTemplateSpace());
commandMachine.RegisterCommand(CommandNames.RenderModulesState, new Command_RenderModulesState());
//优化算法
@ -729,7 +729,7 @@ export function registerCommand()
commandMachine.RegisterCommand(CommandNames.Clear2DModeling, new Command_ClearBoard2DModeling());
commandMachine.RegisterCommand(CommandNames.ExportobjMtl, new Command_ExportObjAndMtl());
commandMachine.RegisterCommand(CommandNames.ExportObj, new Command_ExportObj());
commandMachine.RegisterCommand("ExportSTL", new Command_ExportSTL());
commandMachine.RegisterCommand(CommandNames.ExportSTL, new Command_ExportSTL());
commandMachine.RegisterCommand(CommandNames.UpdateBoardInfos, new UpdateBoardInfos());
@ -772,7 +772,7 @@ export function registerCommand()
commandMachine.RegisterCommand(CommandNames.SetHoleNoneType, new SetHoleNoneType());
commandMachine.RegisterCommand(CommandNames.FindMaxSizeBoard, new FindMaxOrMinSizeBoard());
commandMachine.RegisterCommand(CommandNames.FindMinSizeBoard, new FindMaxOrMinSizeBoard(false));
commandMachine.RegisterCommand("FindBoardModelingKnife", new Command_FindBoardModelingKnife());
commandMachine.RegisterCommand(CommandNames.FindBoardModelingKnife, new Command_FindBoardModelingKnife());
commandMachine.RegisterCommand(CommandNames.CheckNoHoleBoard, new CheckHasHoleBoard());
commandMachine.RegisterCommand(CommandNames.CheckDrawHole, new CheckDrawHole());
commandMachine.RegisterCommand(CommandNames.FindModelKnifeRadius, new FindModeingKnifeRadius());
@ -847,9 +847,9 @@ export function registerCommand()
commandMachine.RegisterCommand(CommandNames.SendCADFileToKF, new Command_SendCADFileOnKf());
//修改注册位置
commandMachine.RegisterCommand("Attach", new TemplateAttach());
commandMachine.RegisterCommand("Attach2", new TemplateAttach2());
commandMachine.RegisterCommand("TemplateArray", new TemplateArray());
commandMachine.RegisterCommand(CommandNames.Attach, new TemplateAttach());
commandMachine.RegisterCommand(CommandNames.Attach2, new TemplateAttach2());
commandMachine.RegisterCommand(CommandNames.TemplateArray, new TemplateArray());
}
export async function LimitCommand()

@ -186,6 +186,15 @@ export const CommandList: ICommand[] = [
// enName: "Draw Region",
chDes: "导入样条线顶点数非常多,简化成圆弧多段线(减少顶点个数,提高加工速度)",
},
{
typeId: "i2d",
link: `#`,
defaultCustom: CommandNames.Area,
command: CommandNames.Area,
type: "二维",
chName: "计算封闭线段的面积",
chDes: "计算封闭线段的面积",
},
//三维命令
{
@ -2155,13 +2164,22 @@ export const CommandList: ICommand[] = [
{
typeId: "util",
link: `#`,
defaultCustom: "DELETECURVE",
command: "DELETECURVE",
defaultCustom: CommandNames.DeleteCurve,
command: CommandNames.DeleteCurve,
type: "工具",
chName: "删除线条",
// enName: "Delete Curve",
chDes: "批量删除线条",
},
{
typeId: "util",
link: `#`,
defaultCustom: CommandNames.EraseLineArc,
command: CommandNames.EraseLineArc,
type: "工具",
chName: "删除直线和圆弧",
chDes: "删除直线和圆弧",
},
{
typeId: "util",
link: `#`,
@ -2243,6 +2261,15 @@ export const CommandList: ICommand[] = [
chName: "查找超短板",
chDes: "查找超短板",
},
{
typeId: "util",
link: `#`,
defaultCustom: CommandNames.FindBoardModelingKnife,
command: CommandNames.FindBoardModelingKnife,
type: "工具",
chName: " 查找指定刀半径的造型",
chDes: " 查找指定刀半径的造型",
},
{
typeId: "util",
link: `${HelpUrlBase}Tool/TemplateImport`,
@ -2527,6 +2554,24 @@ export const CommandList: ICommand[] = [
chName: "打开",
chDes: "打开文件",
},
{
typeId: "file",
link: `#`,
defaultCustom: CommandNames.Reopen,
command: CommandNames.Reopen,
type: "文件",
chName: "重新打开文件",
chDes: "重新打开文件",
},
{
typeId: "file",
link: `#`,
defaultCustom: CommandNames.FixView,
command: CommandNames.FixView,
type: "文件",
chName: "修复图纸坐标",
chDes: "修复图纸坐标,图形坐标,避免图纸缩放失败,无法开图,(也可以试试pm0)",
},
{
typeId: "file",
link: `#`,
@ -2558,6 +2603,15 @@ export const CommandList: ICommand[] = [
// enName: "Import DXF",
chDes: "导出DXF文件",
},
{
typeId: "file",
link: `#`,
defaultCustom: CommandNames.ExportSTL,
command: CommandNames.ExportSTL,
type: "文件",
chName: "导出STL文件",
chDes: "导出STL文件(3D格式)",
},
{
icon: IconEnum.ClearHistoryRecord,
typeId: "file",
@ -2659,6 +2713,51 @@ export const CommandList: ICommand[] = [
chName: "删除模块节点",
chDes: "删除模块节点",
},
{
typeId: "module",
link: `#`,
defaultCustom: CommandNames.RotateTemplateSpace,
command: CommandNames.RotateTemplateSpace,
type: "模块",
chName: "旋转模块节点",
chDes: "旋转模块节点",
},
{
typeId: "module",
link: `#`,
defaultCustom: CommandNames.SplitTemplateY,
command: CommandNames.SplitTemplateY,
type: "模块",
chName: "按Y轴切割模块",
chDes: "按Y轴切割模块",
},
{
typeId: "module",
link: `#`,
defaultCustom: CommandNames.Attach,
command: CommandNames.Attach,
type: "模块",
chName: "模块附加到指定空间内",
chDes: "模块附加到指定空间内",
},
{
typeId: "module",
link: `#`,
defaultCustom: CommandNames.Attach2,
command: CommandNames.Attach2,
type: "模块",
chName: "模块附加到指定空间内2",
chDes: "模块附加到指定空间内2",
},
{
typeId: "module",
link: `#`,
defaultCustom: CommandNames.TemplateArray,
command: CommandNames.TemplateArray,
type: "模块",
chName: "模块阵列",
chDes: "模块阵列",
},
// 拆单命令
{

Loading…
Cancel
Save