diff --git a/modules/workbenches/modeler/features/loft/loft.operation.ts b/modules/workbenches/modeler/features/loft/loft.operation.ts index 0fb8b2db..90795658 100644 --- a/modules/workbenches/modeler/features/loft/loft.operation.ts +++ b/modules/workbenches/modeler/features/loft/loft.operation.ts @@ -28,7 +28,7 @@ export const LoftOperation: OperationDescriptor = { if (params.loftType == "smooth") loftType = 0; if (params.loftType == "sharp") loftType = 1; - console.log(params.loops); + //console.log(params.loops); let sketches = []; @@ -39,21 +39,28 @@ export const LoftOperation: OperationDescriptor = { return occ.io.sketchLoader.pushContourAsWire(loop.contour, shapeName, loop.face.csys).wire }); - console.log("This is the info you are looking for", sketches); - - + //console.log("This is the info you are looking for", sketches); let sweepSources = []; - sketches.forEach(await async function (item, index) { - console.log(item, index); - await sweepSources.concat(await occ.utils.sketchToFaces(ctx.sketchStorageService.readSketch(item.id), item.csys)) + let indexOfMostSegments = 0; + let longestPath = 0; + let primarySketch = {}; + + sketches.forEach(function (item, index) { + //console.log(item, index); + if(params.loops[index].contour.segments.length > longestPath){ + longestPath = params.loops[index].contour.segments.length; + + primarySketch = params.loops[index].parent; + } + const face = occ.utils.sketchToFaces(ctx.sketchStorageService.readSketch(item.id), item.csys); + sweepSources = face; }); + const productionAnalyzer = new FromSketchProductionAnalyzer(sweepSources); - - oci.thrusections("th", "1", loftType, ...wires); let tools = [];