From 6ca89d13593d999379e795d98fa97c48f1cb7574 Mon Sep 17 00:00:00 2001 From: Mike Molinari Date: Fri, 1 Jul 2022 22:09:53 +0000 Subject: [PATCH] Cone face ordering now stable. cylinder updated to match. --- .../primitiveCone/PrimitiveCone.operation.ts | 49 +++++++++++-------- .../PrimitiveCylinder.operation.ts | 12 ++--- 2 files changed, 34 insertions(+), 27 deletions(-) diff --git a/modules/workbenches/modeler/features/primitiveCone/PrimitiveCone.operation.ts b/modules/workbenches/modeler/features/primitiveCone/PrimitiveCone.operation.ts index 840e3693..133508cd 100644 --- a/modules/workbenches/modeler/features/primitiveCone/PrimitiveCone.operation.ts +++ b/modules/workbenches/modeler/features/primitiveCone/PrimitiveCone.operation.ts @@ -83,28 +83,35 @@ export const PrimitiveConeOperation: OperationDescriptor = oci.pcone("cone", "csys", params.diameterA / 2, params.diameterB / 2, params.height); - const cone = occ.io.getShell("cone", new ExpectedOrderProductionAnalyzer( - [ - { - id: 'F:SIDE', - productionInfo: { - role: 'sweep' - } - }, - { - id: 'F:LID', - productionInfo: { - role: 'lid' - } - }, - { - id: 'F:BASE', - productionInfo: { - role: 'base' - } - }, - ], + let newFacesIds = [ + { + id: 'F:SIDE', + productionInfo: { + role: 'sweep' + } + }, + ]; + + if (params.diameterB > 0) { + newFacesIds.push({ + id: 'F:BASE', + productionInfo: { + role: 'base' + } + }) + } + + if (params.diameterA > 0) { + newFacesIds.push({ + id: 'F:LID', + productionInfo: { + role: 'lid' + } + }); + } + + const cone = occ.io.getShell("cone", new ExpectedOrderProductionAnalyzer(newFacesIds, [], [] )); diff --git a/modules/workbenches/modeler/features/primitiveCylinder/PrimitiveCylinder.operation.ts b/modules/workbenches/modeler/features/primitiveCylinder/PrimitiveCylinder.operation.ts index 42ee60be..c8dfe5c5 100644 --- a/modules/workbenches/modeler/features/primitiveCylinder/PrimitiveCylinder.operation.ts +++ b/modules/workbenches/modeler/features/primitiveCylinder/PrimitiveCylinder.operation.ts @@ -84,18 +84,18 @@ export const PrimitiveCylinderOperation: OperationDescriptor