From d2a18e80b8c5895237fcb24da6d134173e42a230 Mon Sep 17 00:00:00 2001 From: szy Date: Fri, 31 Oct 2014 12:26:26 +0300 Subject: [PATCH] Patch for Boolean feature. --- src/FeaturesPlugin/FeaturesPlugin_Boolean.h | 2 +- src/FeaturesPlugin/FeaturesPlugin_Extrusion.h | 2 +- src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp | 6 +++--- src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h | 2 +- src/Model/Model_ResultBody.cpp | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/FeaturesPlugin/FeaturesPlugin_Boolean.h b/src/FeaturesPlugin/FeaturesPlugin_Boolean.h index 0fdeb6bae..2f99dbdf4 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Boolean.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Boolean.h @@ -39,8 +39,8 @@ class FeaturesPlugin_Boolean : public ModelAPI_Feature } enum { - BOOL_FUSE, BOOL_CUT, + BOOL_FUSE, BOOL_COMMON }; diff --git a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h index c6c500fe2..57c84efde 100644 --- a/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h +++ b/src/FeaturesPlugin/FeaturesPlugin_Extrusion.h @@ -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 theResultBody, boost::shared_ptr theBasis, diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp b/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp index e75205a02..6d2e740be 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.cpp @@ -11,9 +11,6 @@ #include #include -#define FUSE 0 -#define CUT 1 -#define COMMON 2 boost::shared_ptr GeomAlgoAPI_Boolean::makeCut( boost::shared_ptr theShape, boost::shared_ptr theTool) @@ -91,6 +88,7 @@ void GeomAlgoAPI_Boolean::build(boost::shared_ptr 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 theObject, myMkShape = new GeomAlgoAPI_MakeShape (mkCut); aResult = mkCut->Shape(); } + break; } case BOOL_COMMON: { @@ -111,6 +110,7 @@ void GeomAlgoAPI_Boolean::build(boost::shared_ptr theObject, myMkShape = new GeomAlgoAPI_MakeShape (mkCom); aResult = mkCom->Shape(); } + break; } } if(myDone) { diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h b/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h index d095ae137..a46ab91a9 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_Boolean.h @@ -47,8 +47,8 @@ class GeomAlgoAPI_Boolean : public GeomAPI_Interface boost::shared_ptr theTool); enum { - BOOL_FUSE, BOOL_CUT, + BOOL_FUSE, BOOL_COMMON }; /// Constructor diff --git a/src/Model/Model_ResultBody.cpp b/src/Model/Model_ResultBody.cpp index 3c7f7a689..9b3d2cac8 100644 --- a/src/Model/Model_ResultBody.cpp +++ b/src/Model/Model_ResultBody.cpp @@ -195,7 +195,7 @@ void Model_ResultBody::loadAndOrientModifiedShapes ( ListOfShape aList; boost::shared_ptr aRShape(new GeomAPI_Shape()); aRShape->setImpl((new TopoDS_Shape(aRoot))); - theMS->generated(aRShape, aList); + theMS->modified(aRShape, aList); std::list >::const_iterator anIt = aList.begin(), aLast = aList.end(); for (; anIt != aLast; anIt++) { TopoDS_Shape aNewShape = (*anIt)->impl(); -- 2.39.2