// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-// File: FeaturesPlugin_ExtrusionBoolean.h
+// File: FeaturesPlugin_ExtrusionBoolean.cpp
// Created: 11 June 2015
// Author: Dmitry Bobylev
}
//=================================================================================================
-ListOfShape FeaturesPlugin_ExtrusionBoolean::MakeSolids(const ListOfShape& theFaces)
+void FeaturesPlugin_ExtrusionBoolean::makeSolids(const ListOfShape& theFaces,
+ ListOfShape& theResults,
+ ListOfMakeShape& theAlgos)
{
// Getting extrusion sizes.
double aToSize = 0.0;
}
// Extrude faces.
- ListOfShape anExtrusionList;
+ theResults.clear();
for(ListOfShape::const_iterator aFacesIt = theFaces.begin(); aFacesIt != theFaces.end(); aFacesIt++) {
std::shared_ptr<GeomAPI_Shape> aBaseShape = *aFacesIt;
- GeomAlgoAPI_Prism aPrismAlgo(aBaseShape, aToShape, aToSize, aFromShape, aFromSize);
+ std::shared_ptr<GeomAlgoAPI_Prism> aPrismAlgo = std::shared_ptr<GeomAlgoAPI_Prism>(new GeomAlgoAPI_Prism(aBaseShape, aToShape, aToSize, aFromShape, aFromSize));
// Checking that the algorithm worked properly.
- if(!aPrismAlgo.isDone() || aPrismAlgo.shape()->isNull() || !aPrismAlgo.isValid()) {
+ if(!aPrismAlgo->isDone() || !aPrismAlgo->shape().get() || aPrismAlgo->shape()->isNull() ||
+ !aPrismAlgo->isValid()) {
setError("Extrusion algorithm failed");
- return ListOfShape();
+ theResults.clear();
+ return;
}
- anExtrusionList.push_back(aPrismAlgo.shape());
+ theResults.push_back(aPrismAlgo->shape());
+ theAlgos.push_back(aPrismAlgo);
}
-
- return anExtrusionList;
-}
\ No newline at end of file
+}