#include <ModelAPI_AttributeSelectionList.h>
#include <ModelAPI_AttributeReference.h>
+#include <ModelAPI_BodyBuilder.h>
#include <ModelAPI_ResultBody.h>
#include <ModelAPI_ResultConstruction.h>
const ListOfShape& theTools,
const GeomAlgoAPI_Boolean& theAlgo)
{
+ ModelAPI_BodyBuilder* aResultBuilder = theResultBody->getBodyBuilder();
//load result
if(theBaseShape->isEqual(theAlgo.shape())) {
- theResultBody->store(theAlgo.shape());
+ aResultBuilder->store(theAlgo.shape());
} else {
const int aGenTag = 1;
const int aFrTag = 2;
const std::string aFrName = "FromFace";
const std::string aToName = "ToFace";
- theResultBody->storeModified(theBaseShape, theAlgo.shape(), aSubsolidsTag);
+ aResultBuilder->storeModified(theBaseShape, theAlgo.shape(), aSubsolidsTag);
ListOfShape::const_iterator aFaceIter = theFaces.begin();
std::list<std::shared_ptr<GeomAPI_Interface>>::const_iterator aSolidsAlgosIter = theSolidsAlgos.begin();
if(std::dynamic_pointer_cast<GeomAlgoAPI_Prism>(*aSolidsAlgosIter)) {
std::shared_ptr<GeomAlgoAPI_Prism> aPrismAlgo = std::dynamic_pointer_cast<GeomAlgoAPI_Prism>(*aSolidsAlgosIter);
aSubShapes = aPrismAlgo->mapOfShapes();
- theResultBody->loadAndOrientGeneratedShapes(aPrismAlgo->makeShape().get(), *aFaceIter, GeomAPI_Shape::EDGE, aGenTag,
+ aResultBuilder->loadAndOrientGeneratedShapes(aPrismAlgo->makeShape().get(), *aFaceIter, GeomAPI_Shape::EDGE, aGenTag,
aLatName, *aSubShapes.get());
aFromFace = aPrismAlgo->firstShape();
aToFace = aPrismAlgo->lastShape();
} else if(std::dynamic_pointer_cast<GeomAlgoAPI_Revolution>(*aSolidsAlgosIter)) {
std::shared_ptr<GeomAlgoAPI_Revolution> aRevolAlgo = std::dynamic_pointer_cast<GeomAlgoAPI_Revolution>(*aSolidsAlgosIter);
aSubShapes = aRevolAlgo->mapOfShapes();
- theResultBody->loadAndOrientGeneratedShapes(aRevolAlgo->makeShape().get(), *aFaceIter, GeomAPI_Shape::EDGE, aGenTag,
+ aResultBuilder->loadAndOrientGeneratedShapes(aRevolAlgo->makeShape().get(), *aFaceIter, GeomAPI_Shape::EDGE, aGenTag,
aLatName, *aSubShapes.get());
aFromFace = aRevolAlgo->firstShape();
aToFace = aRevolAlgo->lastShape();
if(aSubShapes->isBound(aFromFace)) {
aFromFace = aSubShapes->find(aFromFace);
}
- theResultBody->generated(aFromFace, aFrName, aFrTag);
+ aResultBuilder->generated(aFromFace, aFrName, aFrTag);
}
//Insert top face
if (aSubShapes->isBound(aToFace)) {
aToFace = aSubShapes->find(aToFace);
}
- theResultBody->generated(aToFace, aToName, aToTag);
+ aResultBuilder->generated(aToFace, aToName, aToTag);
}
}
- theResultBody->loadAndOrientModifiedShapes(theAlgo.makeShape().get(), theBaseShape, GeomAPI_Shape::FACE,
+ aResultBuilder->loadAndOrientModifiedShapes(theAlgo.makeShape().get(), theBaseShape, GeomAPI_Shape::FACE,
aModTag, aModName, *theAlgo.mapOfShapes().get());
- theResultBody->loadDeletedShapes(theAlgo.makeShape().get(), theBaseShape, GeomAPI_Shape::FACE, aDelTag);
+ aResultBuilder->loadDeletedShapes(theAlgo.makeShape().get(), theBaseShape, GeomAPI_Shape::FACE, aDelTag);
for(ListOfShape::const_iterator anIter = theTools.begin(); anIter != theTools.end(); anIter++) {
- theResultBody->loadAndOrientModifiedShapes(theAlgo.makeShape().get(), *anIter, GeomAPI_Shape::FACE,
+ aResultBuilder->loadAndOrientModifiedShapes(theAlgo.makeShape().get(), *anIter, GeomAPI_Shape::FACE,
aModTag, aModName, *theAlgo.mapOfShapes().get());
- theResultBody->loadDeletedShapes(theAlgo.makeShape().get(), *anIter, GeomAPI_Shape::FACE, aDelTag);
+ aResultBuilder->loadDeletedShapes(theAlgo.makeShape().get(), *anIter, GeomAPI_Shape::FACE, aDelTag);
}
}
}