!2815 功能:添加模板右键删除节点功能,优化fbx上传缩放显示

pull/2817/MERGE
黄诗津 4 months ago committed by ChenX
parent 18dc2c70b1
commit d9e0072f5a

@ -76,6 +76,7 @@ export async function FbxImport(f: File)
CommandWrap(() =>
{
app.Database.ModelSpace.Append(fbxEnt);
app.Viewer.ZoomtoEntitys([fbxEnt]);
}, "");
app.Database.hm.lockIndex++;//禁止初始化动作被撤销

@ -199,7 +199,7 @@ export enum CommandNames
TemplateDesign = "TEMPLATEDESIGN",
TemplateCollection = "TEMPLATECOLLECTION",
TemplateSearch = "TEMPLATESEARCH",
TemplateDelete = "TEMPLATEDELETE",
TemplateDelete = "TEMPLATEDELETE", // 删除模板节点
TemplateCheck = "TEMPLATECHECK",
RotateTemplate = "ROTATETEMP",
Print = "PRINT",
@ -228,7 +228,6 @@ export enum CommandNames
Curve2Rect = "CURVE2RECT",
Pl2Br = "RECT2BOARD",
Curve2VSBox = "CURVE2VSBOX",
templateDelete = "TEMPLATEDELETE",
RotateTemplateSpace = "ROTATETEMPLATESPACE",
SplitTemplateY = "SPLITTEMPLATEY",
Attach = "ATTACH",

@ -129,6 +129,9 @@ export class EntityFbx extends Entity
}
this.newObject = obj;
const boundingBox = new Box3().expandByObject(this.newObject);
boundingBox.getSize(this._Size);
boundingBox.getCenter(this._Center);
this.Update();
//del_exp_end return;
}

@ -699,7 +699,7 @@ export function registerCommand()
commandMachine.RegisterCommand(CommandNames.TemplateCollection, new ShowTemplate("Collection"));
commandMachine.RegisterCommand(CommandNames.TemplateDesign, new ShowTemplateDesign());
commandMachine.RegisterCommand(CommandNames.Modeling, new Command_Modeling());
commandMachine.RegisterCommand(CommandNames.templateDelete, new Command_DeleteTemplate());
commandMachine.RegisterCommand(CommandNames.TemplateDelete, new Command_DeleteTemplate());
commandMachine.RegisterCommand(CommandNames.TemplateCheck, new Command_TemplateSearch(true));
commandMachine.RegisterCommand(CommandNames.TemplateGroup, new Command_TemplateGroup());
commandMachine.RegisterCommand(CommandNames.SpliteTemplate, new Command_SplitTemplate());

@ -63,6 +63,7 @@ const KeyWordCommandMap: Map<string, string> = new Map(Object.entries({
"N": CommandNames.HighlightNode,
"N2": CommandNames.HighlightNodeAndChilds,
"TD": CommandNames.TemplateDelete,
}));
/**
@ -175,13 +176,14 @@ export class ContextMenuServices implements EditorService
{
if (selects[0] instanceof Board)
menuKeywords.push(...[
MenuDividerKWD,
{ key: "10", msg: `加点` },
{ key: "11", msg: `删点` },
]);
if (selects[0].Template && selects[0].Template.Object)
{
let temp = selects[0].Template.Object;
menuKeywords.push({ key: "N", msg: "亮显本节点" }, { key: "N2", msg: "亮显空间子层" });
menuKeywords.push(MenuDividerKWD, { key: "N", msg: "亮显本节点" }, { key: "N2", msg: "亮显空间子层" }, { key: "TD", msg: "删除节点" });
if (temp instanceof TemplateWineRackRecord)
menuKeywords.push({ key: "WR", msg: "编辑酒格模块" });
else if (temp instanceof TemplateBoardRecord || temp instanceof TemplateLeftRightBoardRecord || temp instanceof TemplateTopBottomBoard)

@ -2891,8 +2891,8 @@ export const CommandList: ICommand[] = [
{
typeId: "module",
link: `#`,
defaultCustom: CommandNames.templateDelete,
command: CommandNames.templateDelete,
defaultCustom: CommandNames.TemplateDelete,
command: CommandNames.TemplateDelete,
type: "模块",
chName: "删除模块节点",
chDes: "删除模块节点",

Loading…
Cancel
Save