X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FFeaturesPlugin%2FFeaturesPlugin_CompositeBoolean.cpp;h=50343a5ba00722d23b997eb804c9a2f460fb6129;hb=c8759835f4eabfde25497d8b6189dda62dba78e8;hp=6bc4ae5d04d19406d8c93891cb7b4fe164f1ba14;hpb=82d3fff7d0ed2c089da5aa6b106789be076081f3;p=modules%2Fshaper.git diff --git a/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp b/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp index 6bc4ae5d0..50343a5ba 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp +++ b/src/FeaturesPlugin/FeaturesPlugin_CompositeBoolean.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include //================================================================================================= void FeaturesPlugin_CompositeBoolean::initAttributes() @@ -162,7 +162,7 @@ void FeaturesPlugin_CompositeBoolean::execute() return; } - if(GeomAlgoAPI_ShapeProps::volume(aBoolAlgo.shape()) > 1.e-7) { + if(GeomAlgoAPI_ShapeTools::volume(aBoolAlgo.shape()) > 1.e-7) { std::shared_ptr aResultBody = document()->createBody(data(), aResultIndex); loadNamingDS(aResultBody, anObject, aSketchFacesList, theSolidsAlgos, aBooleanTools, aBoolAlgo); setResult(aResultBody, aResultIndex); @@ -205,10 +205,9 @@ void FeaturesPlugin_CompositeBoolean::loadNamingDS(std::shared_ptrgetBodyBuilder(); //load result if(theBaseShape->isEqual(theAlgo.shape())) { - aResultBuilder->store(theAlgo.shape()); + theResultBody->store(theAlgo.shape()); } else { const int aGenTag = 1; const int aFrTag = 2; @@ -222,7 +221,7 @@ void FeaturesPlugin_CompositeBoolean::loadNamingDS(std::shared_ptrstoreModified(theBaseShape, theAlgo.shape(), aSubsolidsTag); + theResultBody->storeModified(theBaseShape, theAlgo.shape(), aSubsolidsTag); ListOfShape::const_iterator aFaceIter = theFaces.begin(); std::list>::const_iterator aSolidsAlgosIter = theSolidsAlgos.begin(); @@ -235,25 +234,27 @@ void FeaturesPlugin_CompositeBoolean::loadNamingDS(std::shared_ptr(*aSolidsAlgosIter)) { std::shared_ptr aPrismAlgo = std::dynamic_pointer_cast(*aSolidsAlgosIter); aSubShapes = aPrismAlgo->mapOfShapes(); - aResultBuilder->loadAndOrientGeneratedShapes(aPrismAlgo->makeShape().get(), *aFaceIter, GeomAPI_Shape::EDGE, aGenTag, + theResultBody->loadAndOrientGeneratedShapes(aPrismAlgo->makeShape().get(), *aFaceIter, GeomAPI_Shape::EDGE, aGenTag, aLatName, *aSubShapes.get()); - aFromFace = aPrismAlgo->firstShape(); - aToFace = aPrismAlgo->lastShape(); + //TODO:fix + //aFromFace = aPrismAlgo->firstShape(); + //aToFace = aPrismAlgo->lastShape(); } else if(std::dynamic_pointer_cast(*aSolidsAlgosIter)) { std::shared_ptr aRevolAlgo = std::dynamic_pointer_cast(*aSolidsAlgosIter); aSubShapes = aRevolAlgo->mapOfShapes(); - aResultBuilder->loadAndOrientGeneratedShapes(aRevolAlgo->makeShape().get(), *aFaceIter, GeomAPI_Shape::EDGE, aGenTag, + theResultBody->loadAndOrientGeneratedShapes(aRevolAlgo->makeShape().get(), *aFaceIter, GeomAPI_Shape::EDGE, aGenTag, aLatName, *aSubShapes.get()); aFromFace = aRevolAlgo->firstShape(); aToFace = aRevolAlgo->lastShape(); } + /* //Insert bottom face if(!aFromFace->isNull()) { if(aSubShapes->isBound(aFromFace)) { aFromFace = aSubShapes->find(aFromFace); } - aResultBuilder->generated(aFromFace, aFrName, aFrTag); + theResultBody->generated(aFromFace, aFrName, aFrTag); } //Insert top face @@ -261,18 +262,19 @@ void FeaturesPlugin_CompositeBoolean::loadNamingDS(std::shared_ptrisBound(aToFace)) { aToFace = aSubShapes->find(aToFace); } - aResultBuilder->generated(aToFace, aToName, aToTag); + theResultBody->generated(aToFace, aToName, aToTag); } + */ } - aResultBuilder->loadAndOrientModifiedShapes(theAlgo.makeShape().get(), theBaseShape, GeomAPI_Shape::FACE, + theResultBody->loadAndOrientModifiedShapes(theAlgo.makeShape().get(), theBaseShape, GeomAPI_Shape::FACE, aModTag, aModName, *theAlgo.mapOfShapes().get()); - aResultBuilder->loadDeletedShapes(theAlgo.makeShape().get(), theBaseShape, GeomAPI_Shape::FACE, aDelTag); + theResultBody->loadDeletedShapes(theAlgo.makeShape().get(), theBaseShape, GeomAPI_Shape::FACE, aDelTag); for(ListOfShape::const_iterator anIter = theTools.begin(); anIter != theTools.end(); anIter++) { - aResultBuilder->loadAndOrientModifiedShapes(theAlgo.makeShape().get(), *anIter, GeomAPI_Shape::FACE, + theResultBody->loadAndOrientModifiedShapes(theAlgo.makeShape().get(), *anIter, GeomAPI_Shape::FACE, aModTag, aModName, *theAlgo.mapOfShapes().get()); - aResultBuilder->loadDeletedShapes(theAlgo.makeShape().get(), *anIter, GeomAPI_Shape::FACE, aDelTag); + theResultBody->loadDeletedShapes(theAlgo.makeShape().get(), *anIter, GeomAPI_Shape::FACE, aDelTag); } } }