From 3dbbf3ff5f8bd712f4e2430bed11f855bc66f28f Mon Sep 17 00:00:00 2001 From: Mike Molinari Date: Thu, 23 Sep 2021 03:11:22 +0000 Subject: [PATCH] slight refactor torus primitive --- .../modeler/features/primitive_torus/icon.svg | 10 +++++++ .../modeler/features/primitive_torus/index.ts | 26 +++++++++--------- .../{icon.png => old.icon.png} | Bin 3 files changed, 23 insertions(+), 13 deletions(-) create mode 100644 modules/workbenches/modeler/features/primitive_torus/icon.svg rename modules/workbenches/modeler/features/primitive_torus/{icon.png => old.icon.png} (100%) diff --git a/modules/workbenches/modeler/features/primitive_torus/icon.svg b/modules/workbenches/modeler/features/primitive_torus/icon.svg new file mode 100644 index 00000000..78b99920 --- /dev/null +++ b/modules/workbenches/modeler/features/primitive_torus/icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/modules/workbenches/modeler/features/primitive_torus/index.ts b/modules/workbenches/modeler/features/primitive_torus/index.ts index 40d80087..953f026b 100644 --- a/modules/workbenches/modeler/features/primitive_torus/index.ts +++ b/modules/workbenches/modeler/features/primitive_torus/index.ts @@ -2,7 +2,7 @@ import { ApplicationContext } from 'context'; import { MBrepShell } from 'cad/model/mshell'; import { roundValueForPresentation as r } from 'cad/craft/operationHelper'; import { occ2brep } from 'cad/occ/occ2models'; -import icon from './icon.png'; +import icon from './icon.svg'; export default { id: 'primitive_torus', @@ -11,6 +11,18 @@ export default { info: 'primitive_torus', mutualExclusiveFields: [], paramsInfo: ({ radius, tubeRadius }) => `(${r(radius)} ${r(tubeRadius)} )`, + schema: { + radius: { + type: 'number', + defaultValue: 200, + label: 'radius' + }, + tubeRadius: { + type: 'number', + defaultValue: 50, + label: 'tube radius' + }, + }, run: ({ radius, tubeRadius }, ctx: ApplicationContext) => { const oc = ctx.occService.occContext; @@ -36,17 +48,5 @@ export default { created: [mobject] }; }, - schema: { - radius : { - type: 'number', - defaultValue: 200, - label: 'radius' - }, - tubeRadius: { - type: 'number', - defaultValue: 50, - label: 'tube radius' - }, - } } diff --git a/modules/workbenches/modeler/features/primitive_torus/icon.png b/modules/workbenches/modeler/features/primitive_torus/old.icon.png similarity index 100% rename from modules/workbenches/modeler/features/primitive_torus/icon.png rename to modules/workbenches/modeler/features/primitive_torus/old.icon.png