From 01d0eece164928286e98e036d8825bddb0b5d3ce Mon Sep 17 00:00:00 2001 From: Mike Molinari Date: Sat, 2 Jul 2022 01:38:48 +0000 Subject: [PATCH] Added masking for boolean commands --- .../features/boolean/boolean.operation.ts | 36 +++++++++++++++++++ modules/workbenches/modeler/index.ts | 2 +- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/modules/workbenches/modeler/features/boolean/boolean.operation.ts b/modules/workbenches/modeler/features/boolean/boolean.operation.ts index e8df6a73..e86a03f3 100644 --- a/modules/workbenches/modeler/features/boolean/boolean.operation.ts +++ b/modules/workbenches/modeler/features/boolean/boolean.operation.ts @@ -63,4 +63,40 @@ export const BooleanOperation: OperationDescriptor = { defaultValue: "UNION", }, ], + + masking: [ + { + id: 'UNION', + label: 'Union', + icon: 'img/cad/union', + info: 'makes a cut based on 2D sketch', + maskingParams: { + boolean: { + kind: 'UNION' + } + } + }, + { + id: 'SUBTRACT', + label: 'Subtract', + icon: 'img/cad/subtract', + info: 'makes a cut based on 2D sketch', + maskingParams: { + boolean: { + kind: 'SUBTRACT' + } + } + }, + { + id: 'INTERSECT', + label: 'Intersect', + icon: 'img/cad/intersection', + info: 'makes a cut based on 2D sketch', + maskingParams: { + boolean: { + kind: 'INTERSECT' + } + } + } + ] } diff --git a/modules/workbenches/modeler/index.ts b/modules/workbenches/modeler/index.ts index 8e090cec..f619f65b 100644 --- a/modules/workbenches/modeler/index.ts +++ b/modules/workbenches/modeler/index.ts @@ -50,7 +50,7 @@ export const ModelerWorkspace: WorkbenchConfig = { toolbar: [ 'DATUM_CREATE', 'PLANE', 'EditFace', '-', "EXTRUDE", "CUT", "REVOLVE", "LOFT", "SWEEP", "-", - "BOOLEAN", "-", + "BOOLEAN", "UNION", "SUBTRACT", "INTERSECT", "-", "SHELL_TOOL", "FILLET_TOOL", "SCALE_BODY","-", "MIRROR_BODY", "PATTERN_LINEAR", "PATTERN_RADIAL", "-", "CYLINDER", "BOX", "CONE", "SPHERE", "TORUS", "-",