+ ListOfShape aBaseShapesList, aBoundaryShapes;
+ ListOfMakeShape aMakeShapesList;
+
+ // Make extrusions.
+ if(!makeExtrusions(aBaseShapesList, aBoundaryShapes, aMakeShapesList)) {
+ return;
+ }
+
+ // Store results.
+ int aResultIndex = 0;
+ ListOfShape::const_iterator aBaseIt = aBaseShapesList.cbegin();
+ ListOfMakeShape::const_iterator anAlgoIt = aMakeShapesList.cbegin();
+ for(; aBaseIt != aBaseShapesList.cend() && anAlgoIt != aMakeShapesList.cend();
+ ++aBaseIt, ++anAlgoIt) {
+ if (aBoundaryShapes.empty())
+ storeResult(*aBaseIt, *anAlgoIt, aResultIndex++);
+ else
+ storeResultWithBoundaries(*aBaseIt, aBoundaryShapes, *anAlgoIt, aResultIndex++);
+ }
+
+ removeResults(aResultIndex);
+}
+
+//=================================================================================================
+bool FeaturesPlugin_Extrusion::makeExtrusions(ListOfShape& theBaseShapes,
+ ListOfShape& theBoundaryShapes,
+ ListOfMakeShape& theMakeShapes)
+{
+ theMakeShapes.clear();
+
+ // Getting base shapes.
+ getBaseShapes(theBaseShapes);
+
+ //Getting direction.
+ std::shared_ptr<GeomAPI_Dir> aDir;
+ getDirection(aDir);