From 5e437794cee5d9fa8cd0c6cf6fe87df9791d8f8d Mon Sep 17 00:00:00 2001 From: Mike Molinari Date: Fri, 18 Feb 2022 05:36:15 +0000 Subject: [PATCH] moved geometry selection activities to top of forms for fillet and shell tools. Made shell tool default toinside the selected face. --- .../modeler/features/fillet_tool/index.ts | 24 +++++++++---------- .../features/shell_tool/shell.operation.ts | 15 ++++++------ 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/modules/workbenches/modeler/features/fillet_tool/index.ts b/modules/workbenches/modeler/features/fillet_tool/index.ts index cc9fc1e5..6f35369f 100644 --- a/modules/workbenches/modeler/features/fillet_tool/index.ts +++ b/modules/workbenches/modeler/features/fillet_tool/index.ts @@ -25,6 +25,17 @@ export default { mutualExclusiveFields: [], paramsInfo: ({ size, opperationType, }) => `(${r(size)} ${r(opperationType)}})`, form: [ + { + type: 'selection', + name: 'edges', + capture: [EntityKind.EDGE], + label: 'edges', + multi: true, + defaultValue: { + usePreselection: true, + preselectionIndex: 0 + }, + }, { type: 'choice', style: "dropdown", @@ -39,19 +50,6 @@ export default { name: 'size', defaultValue: 5, }, - - { - type: 'selection', - name: 'edges', - capture: [EntityKind.EDGE], - label: 'edges', - multi: true, - defaultValue: { - usePreselection: true, - preselectionIndex: 0 - }, - }, - ], run: (params, ctx: ApplicationContext) => { diff --git a/modules/workbenches/modeler/features/shell_tool/shell.operation.ts b/modules/workbenches/modeler/features/shell_tool/shell.operation.ts index 2cb6abc9..94388fa3 100644 --- a/modules/workbenches/modeler/features/shell_tool/shell.operation.ts +++ b/modules/workbenches/modeler/features/shell_tool/shell.operation.ts @@ -50,8 +50,7 @@ const ShellOperation: MDFCommand = { console.log(shellToOpperateOn); var bodyToPerformShellOpperationOn = shellToOpperateOn[0].shell; - oci.offsetshape(newShellName, bodyToPerformShellOpperationOn , params.thickness, "1.e-3", ...shellToOpperateOn) - + oci.offsetshape(newShellName, bodyToPerformShellOpperationOn, -params.thickness, "1.e-3", ...shellToOpperateOn) returnObject.created.push(occ.io.getShell(newShellName)); }); @@ -61,12 +60,6 @@ const ShellOperation: MDFCommand = { }, form: [ - { - type: 'number', - name: 'thickness', - label: 'thickness', - defaultValue: 5, - }, { type: 'selection', name: 'faces', @@ -78,6 +71,12 @@ const ShellOperation: MDFCommand = { preselectionIndex: 0 }, }, + { + type: 'number', + name: 'thickness', + label: 'thickness', + defaultValue: 5, + }, ], }