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