Salome HOME
Patch for Boolean feature.
authorszy <szy@opencascade.com>
Fri, 31 Oct 2014 09:26:26 +0000 (12:26 +0300)
committerszy <szy@opencascade.com>
Fri, 31 Oct 2014 09:26:26 +0000 (12:26 +0300)
src/FeaturesPlugin/FeaturesPlugin_Boolean.h
src/FeaturesPlugin/FeaturesPlugin_Extrusion.h
src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp
src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h
src/Model/Model_ResultBody.cpp

index 0fdeb6baeee7901f36a0b3babea4c798687c32f2..2f99dbdf42314c5312b7c5f34e6771c0501a919a 100644 (file)
@@ -39,8 +39,8 @@ class FeaturesPlugin_Boolean : public ModelAPI_Feature
   }
 
   enum {
-    BOOL_FUSE,
        BOOL_CUT,
+       BOOL_FUSE,
     BOOL_COMMON
   };
 
index c6c500fe211a9caaab4ddbd2f1b6852f9a81db32..57c84efde8ef9c3f7c862f41d6efa7ae3552546a 100644 (file)
@@ -53,7 +53,7 @@ class FeaturesPlugin_Extrusion : public ModelAPI_Feature
 
   /// Use plugin manager for features creation
   FeaturesPlugin_Extrusion();
-
+private:
   /// Load Naming data structure of the feature to the document
   void LoadNamingDS(GeomAlgoAPI_Extrusion& theFeature, boost::shared_ptr<ModelAPI_ResultBody> theResultBody,
                        boost::shared_ptr<GeomAPI_Shape> theBasis,
index e75205a02d34d3b7b903636d97f0dc99a91fe6f9..6d2e740be49e473810fe4203ccd0c2dff70b698e 100644 (file)
@@ -11,9 +11,6 @@
 #include <TopExp_Explorer.hxx>
 #include <GeomAlgoAPI_DFLoader.h>
 
-#define  FUSE   0
-#define  CUT    1
-#define  COMMON 2
 boost::shared_ptr<GeomAPI_Shape> GeomAlgoAPI_Boolean::makeCut(
   boost::shared_ptr<GeomAPI_Shape> theShape,
   boost::shared_ptr<GeomAPI_Shape> theTool)
@@ -91,6 +88,7 @@ void GeomAlgoAPI_Boolean::build(boost::shared_ptr<GeomAPI_Shape> theObject,
                myMkShape = new GeomAlgoAPI_MakeShape (mkFuse);
                aResult = mkFuse->Shape();//GeomAlgoAPI_DFLoader::refineResult(aFuse->Shape());      
          }
+         break;
        }
   case BOOL_CUT:
        {
@@ -101,6 +99,7 @@ void GeomAlgoAPI_Boolean::build(boost::shared_ptr<GeomAPI_Shape> theObject,
                myMkShape = new GeomAlgoAPI_MakeShape (mkCut);
                aResult = mkCut->Shape();    
          }
+         break;
        }
   case BOOL_COMMON:
        {
@@ -111,6 +110,7 @@ void GeomAlgoAPI_Boolean::build(boost::shared_ptr<GeomAPI_Shape> theObject,
                myMkShape = new GeomAlgoAPI_MakeShape (mkCom);
                aResult = mkCom->Shape(); 
          }
+         break;
        }       
   }
   if(myDone) {
index d095ae13725587132a3d0194b8705e49e4eabee2..a46ab91a969f902f170e9e6821d1f6e13b7a89ce 100644 (file)
@@ -47,8 +47,8 @@ class GeomAlgoAPI_Boolean : public GeomAPI_Interface
                                               boost::shared_ptr<GeomAPI_Shape> theTool);
 
    enum {
-    BOOL_FUSE,
        BOOL_CUT,
+    BOOL_FUSE,
     BOOL_COMMON
   };
   /// Constructor
index 3c7f7a689cd018483b88d64fbb0ebc1cc7e5dea8..9b3d2cac8dee30a57d47618020e406f0333c5768 100644 (file)
@@ -195,7 +195,7 @@ void Model_ResultBody::loadAndOrientModifiedShapes (
        ListOfShape aList;
        boost::shared_ptr<GeomAPI_Shape> aRShape(new GeomAPI_Shape());
        aRShape->setImpl((new TopoDS_Shape(aRoot)));
-       theMS->generated(aRShape, aList);
+       theMS->modified(aRShape, aList);
        std::list<boost::shared_ptr<GeomAPI_Shape> >::const_iterator anIt = aList.begin(), aLast = aList.end();
     for (; anIt != aLast; anIt++) {
       TopoDS_Shape aNewShape = (*anIt)->impl<TopoDS_Shape>();