diff --git a/modules/workbenches/modeler/features/fillet/fillet.operation.ts b/modules/workbenches/modeler/features/fillet/fillet.operation.ts index e99ae836..f986f12d 100644 --- a/modules/workbenches/modeler/features/fillet/fillet.operation.ts +++ b/modules/workbenches/modeler/features/fillet/fillet.operation.ts @@ -7,9 +7,10 @@ import {FromMObjectProductionAnalyzer} from "cad/craft/production/productionAnal import {MEdge} from "cad/model/medge"; import {MObject} from "cad/model/mobject"; import {MShell} from "cad/model/mshell"; +import { MBrepFace } from 'cad/model/mface'; interface FilletParams { - edges: MEdge[], + edges: MEdge[] | MBrepFace[], size: number opperationType: 'Champher'|'Fillet' } @@ -25,13 +26,23 @@ export const FilletOperation: OperationDescriptor = { const occ = ctx.occService; const oci = occ.commandInterface; + let edgeList = []; + //check if input contains faces and if a face is an input add all adjacent edges to list for processing. + params.edges.forEach((edge) => { + if(edge.TYPE === EntityKind.FACE){ + edgeList = edgeList.concat(edge.edges); + } + if(edge.TYPE === EntityKind.EDGE){ + edgeList.push(edge); + } + }); + + //add all the edges and size to seperate arrays for each shell that edges are selected from - const groups = new Map() - params.edges.forEach((edge) => { - + edgeList.forEach((edge) => { let shellArgs = groups.get(edge.shell); if (!shellArgs) { shellArgs = []; @@ -74,7 +85,7 @@ export const FilletOperation: OperationDescriptor = { { type: 'selection', name: 'edges', - capture: [EntityKind.EDGE], + capture: [EntityKind.EDGE,EntityKind.FACE], label: 'edges', multi: true, defaultValue: {