]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Merge branch 'master' of newgeom:newgeom.git
authorsbh <sergey.belash@opencascade.com>
Tue, 18 Nov 2014 08:53:49 +0000 (11:53 +0300)
committersbh <sergey.belash@opencascade.com>
Tue, 18 Nov 2014 08:53:49 +0000 (11:53 +0300)
14 files changed:
CMakeLists.txt
src/ConstructionPlugin/CMakeLists.txt
src/FeaturesPlugin/CMakeLists.txt
src/GeomData/CMakeLists.txt
src/GeomValidators/CMakeLists.txt
src/Model/CMakeLists.txt
src/PartSetPlugin/CMakeLists.txt
src/SketchPlugin/CMakeLists.txt
src/SketchSolver/CMakeLists.txt
src/SketchSolver/SketchSolver_ConstraintGroup.cpp
src/SketchSolver/SketchSolver_ConstraintGroup.h
src/SketchSolver/SketchSolver_ConstraintManager.cpp
src/XGUI/XGUI_Displayer.cpp
src/XGUI/XGUI_Displayer.h

index ac61b73e91351b4921c509d6fe95ab9003fbf18f..7f94b0fab1d610ac6ab09d88ebe60b5fe89e4f44 100644 (file)
@@ -7,7 +7,6 @@ SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
 INCLUDE(FindEclipse)
 INCLUDE(Common)
 INCLUDE(FindQt)
-INCLUDE(FindBoost)
 INCLUDE(FindPython)
 INCLUDE(FindSalome)
 INCLUDE(FindSolveSpace)
index a5866c2826ce81c2ee2da97fa07a32d9aed81421..53489c8fdf55cab13a5a154a46b1e42571c4dc1b 100644 (file)
@@ -25,7 +25,7 @@ SET(PROJECT_LIBRARIES
     ${CAS_SHAPE}
 )
 
-ADD_DEFINITIONS(-DCONSTRUCTIONPLUGIN_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DCONSTRUCTIONPLUGIN_EXPORTS)
 ADD_LIBRARY(ConstructionPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
 TARGET_LINK_LIBRARIES(ConstructionPlugin ${PROJECT_LIBRARIES})
 
index a0886cbb16364a482cb4e6d544dab887deaa9362..5b8f1c075187a52ff21bde41de6ed6ea1547479c 100644 (file)
@@ -36,7 +36,7 @@ SET(PROJECT_LIBRARIES
     GeomAlgoAPI
 )
 
-ADD_DEFINITIONS(-DFEATURESPLUGIN_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DFEATURESPLUGIN_EXPORTS)
 ADD_LIBRARY(FeaturesPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
 TARGET_LINK_LIBRARIES(FeaturesPlugin ${PROJECT_LIBRARIES})
 
index af7aa575ab0da041641953599a47e29fe88a3ce1..c63c256c78fd2b9de84583b5d4cc01ab5f52482a 100644 (file)
@@ -21,7 +21,7 @@ SET(PROJECT_LIBRARIES
     ${CAS_SHAPE}
 )
 
-ADD_DEFINITIONS(-DGEOMDATA_EXPORTS ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DGEOMDATA_EXPORTS ${CAS_DEFINITIONS})
 ADD_LIBRARY(GeomData SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
 TARGET_LINK_LIBRARIES(GeomData ${PROJECT_LIBRARIES})
 
index efb0b10e7b760d1eb574a0f4066dfaa390e626b9..9a1b97c1371a51886ac7ad3e4dd193f8ae1ee288 100644 (file)
@@ -16,7 +16,7 @@ SET(PROJECT_LIBRARIES
 
 
 
-ADD_DEFINITIONS(-DGEOMVALIDATORS_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DGEOMVALIDATORS_EXPORTS)
 ADD_LIBRARY(GeomValidators SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
 TARGET_LINK_LIBRARIES(GeomValidators ${PROJECT_LIBRARIES})
 
index 3d7716827fd526888c7f9a57d31c866e9b176e7c..c5cf96007803720c5cccf9fd8b732cb6eda87fe8 100644 (file)
@@ -66,7 +66,7 @@ SET(PROJECT_LIBRARIES
 
 
 
-ADD_DEFINITIONS(-DMODEL_EXPORTS ${CAS_DEFINITIONS} ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DMODEL_EXPORTS ${CAS_DEFINITIONS})
 ADD_LIBRARY(Model MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS})
 TARGET_LINK_LIBRARIES(Model ${PROJECT_LIBRARIES})
 
index 3cad36fe02fefebb1ab4037b20d369f0e20bab6e..e115ab9db5433d23f261f48b55a0d7a0b81badbe 100644 (file)
@@ -15,7 +15,7 @@ SET(PROJECT_SOURCES
     PartSetPlugin_Remove.cpp
 )
 
-ADD_DEFINITIONS(-DPARTSETPLUGIN_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DPARTSETPLUGIN_EXPORTS)
 ADD_LIBRARY(PartSetPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS})
 TARGET_LINK_LIBRARIES(PartSetPlugin ${PROJECT_LIBRARIES} ModelAPI)
 
index 4d4097d12ecef3780d3fab78a8ab6c7b8355c1b6..4d46a62719e876360eba8b1bdee3536ac91e8e07 100644 (file)
@@ -56,7 +56,7 @@ SET(XML_RESOURCES
   plugin-Sketch.xml
 )
 
-ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DSKETCHPLUGIN_EXPORTS)
 ADD_LIBRARY(SketchPlugin MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${XML_RESOURCES})
 TARGET_LINK_LIBRARIES(SketchPlugin ${PROJECT_LIBRARIES})
 
index 46ffb3d91bfac013a695cff41ab363681e9630cc..6a57baa74886c9f76954b620a722ea652d3b6ef3 100644 (file)
@@ -32,7 +32,7 @@ INCLUDE_DIRECTORIES(
     ${PROJECT_SOURCE_DIR}/src/Events
 )
 
-ADD_DEFINITIONS(-DSKETCHSOLVER_EXPORTS ${BOOST_DEFINITIONS})
+ADD_DEFINITIONS(-DSKETCHSOLVER_EXPORTS)
 
 ADD_LIBRARY(SketchSolver MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
 )
index 050c262b53cf04746afce0a2d9eae8c5ddde9cb8..46caaa45dbdbe98414fb6001a00a526c453e0b1f 100644 (file)
@@ -287,7 +287,7 @@ bool SketchSolver_ConstraintGroup::changeConstraint(
     // For the length constraint the start and end points of the line should be added to the entities list instead of line
     if (aConstrType == SLVS_C_PT_PT_DISTANCE
         && theConstraint->getKind().compare(SketchPlugin_ConstraintLength::ID()) == 0) {
-      Slvs_hEntity aLineEnt = changeEntity(aFeature);
+      Slvs_hEntity aLineEnt = changeEntityFeature(aFeature);
       int aEntPos = Search(aLineEnt, myEntities);
       aConstrEnt[indAttr++] = myEntities[aEntPos].point[0];
       aConstrEnt[indAttr++] = myEntities[aEntPos].point[1];
@@ -295,7 +295,7 @@ bool SketchSolver_ConstraintGroup::changeConstraint(
         aConstrEnt[indAttr++] = 0;
       break;  // there should be no other entities
     } else if (aConstrAttr->isObject())
-      aConstrEnt[indAttr] = changeEntity(aFeature);
+      aConstrEnt[indAttr] = changeEntityFeature(aFeature);
     else
       aConstrEnt[indAttr] = changeEntity(aConstrAttr->attr());
   }
@@ -432,7 +432,7 @@ bool SketchSolver_ConstraintGroup::changeRigidConstraint(
     aFeature = aDoc->feature(aRC);
   }
 
-  aConstrEnt = aConstrAttr->isObject() ? changeEntity(aFeature) : changeEntity(aConstrAttr->attr());
+  aConstrEnt = aConstrAttr->isObject() ? changeEntityFeature(aFeature) : changeEntity(aConstrAttr->attr());
 
   if (aConstrMapIter == myConstraintMap.end()) { // Add new constraint
     // Check the fixed entity is not a point.
@@ -646,7 +646,7 @@ Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(
 //  Class:    SketchSolver_ConstraintGroup
 //  Purpose:  create/update the element defined by the feature affected by any constraint
 // ============================================================================
-Slvs_hEntity SketchSolver_ConstraintGroup::changeEntity(FeaturePtr theEntity)
+Slvs_hEntity SketchSolver_ConstraintGroup::changeEntityFeature(FeaturePtr theEntity)
 {
   if (!theEntity->data()->isValid())
     return SLVS_E_UNKNOWN;
@@ -1527,7 +1527,7 @@ void SketchSolver_ConstraintGroup::updateRelatedConstraints(
   }
 }
 
-void SketchSolver_ConstraintGroup::updateRelatedConstraints(
+void SketchSolver_ConstraintGroup::updateRelatedConstraintsFeature(
     std::shared_ptr<ModelAPI_Feature> theFeature) const
 {
   ConstraintMap::const_iterator aConstrIter = myConstraintMap.begin();
index 46dbd9e0e281024c599f5154ef1bf5a8e784eb09..4d9a2d7698bb0d28b52aabbd6ec4adefd0a9b2bd 100644 (file)
 
 #include <SketchPlugin_Constraint.h>
 #include <ModelAPI_Data.h>
+#include <ModelAPI_Feature.h>
 
+
+#include <memory>
 #include <list>
 #include <map>
 #include <vector>
@@ -110,7 +113,7 @@ class SketchSolver_ConstraintGroup
    *  \param[in] theEntity attribute of the constraint
    */
   void updateRelatedConstraints(std::shared_ptr<ModelAPI_Attribute> theEntity) const;
-  void updateRelatedConstraints(std::shared_ptr<ModelAPI_Feature> theFeature) const;
+  void updateRelatedConstraintsFeature(std::shared_ptr<ModelAPI_Feature> theFeature) const;
 
   /** \brief Adds or updates an entity in the group
    *
@@ -121,7 +124,7 @@ class SketchSolver_ConstraintGroup
    *  \return identifier of changed entity or 0 if entity could not be changed
    */
   Slvs_hEntity changeEntity(std::shared_ptr<ModelAPI_Attribute> theEntity);
-  Slvs_hEntity changeEntity(FeaturePtr theEntity);
+  Slvs_hEntity changeEntityFeature(std::shared_ptr<ModelAPI_Feature> theEntity);
 
 protected:
   /** \brief Adds or updates a normal in the group
index 6cad183e4525abf4cba2cfb13a08b91d88fac7db..24c6572c42d2893c500d9032cc371c66ffbd3913 100644 (file)
@@ -3,6 +3,7 @@
 // Author:  Artem ZHIDKOV
 
 #include "SketchSolver_ConstraintManager.h"
+#include <SketchSolver_ConstraintGroup.h>
 
 #include <Events_Loop.h>
 #include <ModelAPI_AttributeDouble.h>
@@ -11,6 +12,7 @@
 #include <ModelAPI_Events.h>
 #include <ModelAPI_Object.h>
 #include <ModelAPI_ResultConstruction.h>
+#include <ModelAPI_Attribute.h>
 
 #include <SketchPlugin_Constraint.h>
 
 #include <SketchPlugin_Line.h>
 #include <SketchPlugin_Point.h>
 #include <SketchPlugin_Sketch.h>
+#include <SketchPlugin_Feature.h>
 
 #include <list>
+#include <set>
+#include <memory>
 
 // Initialization of constraint manager self pointer
 SketchSolver_ConstraintManager* SketchSolver_ConstraintManager::_self = 0;
@@ -210,7 +215,7 @@ bool SketchSolver_ConstraintManager::changeConstraintOrEntity(
       if ((*aGroupIter)->getId() == aGroupId) {
         // If the group is empty, the feature is not added (the constraint only)
         if (!aConstraint && !(*aGroupIter)->isEmpty())
-          return (*aGroupIter)->changeEntity(theFeature) != SLVS_E_UNKNOWN;
+          return (*aGroupIter)->changeEntityFeature(theFeature) != SLVS_E_UNKNOWN;
         return (*aGroupIter)->changeConstraint(aConstraint);
       }
   } else if (aGroups.size() > 1) {  // Several groups applicable for this feature => need to merge them
@@ -246,7 +251,7 @@ bool SketchSolver_ConstraintManager::changeConstraintOrEntity(
 
     if (aConstraint)
       return (*aFirstGroupIter)->changeConstraint(aConstraint);
-    return (*aFirstGroupIter)->changeEntity(theFeature) != SLVS_E_UNKNOWN;
+    return (*aFirstGroupIter)->changeEntityFeature(theFeature) != SLVS_E_UNKNOWN;
   }
 
   // Something goes wrong
@@ -301,7 +306,7 @@ void SketchSolver_ConstraintManager::updateEntity(
   std::vector<SketchSolver_ConstraintGroup*>::iterator aGroupIter;
   for (aGroupIter = myGroups.begin(); aGroupIter != myGroups.end(); aGroupIter++)
     if (!(*aGroupIter)->isEmpty())
-      (*aGroupIter)->updateRelatedConstraints(theFeature);
+      (*aGroupIter)->updateRelatedConstraintsFeature(theFeature);
 }
 
 // ============================================================================
@@ -335,8 +340,8 @@ void SketchSolver_ConstraintManager::findGroups(
 //  Class:    SketchSolver_Session
 //  Purpose:  search workplane containing given feature
 // ============================================================================
-std::shared_ptr<ModelAPI_CompositeFeature> SketchSolver_ConstraintManager::findWorkplane(
-    std::shared_ptr<SketchPlugin_Feature> theFeature) const
+std::shared_ptr<ModelAPI_CompositeFeature> SketchSolver_ConstraintManager
+::findWorkplane(std::shared_ptr<SketchPlugin_Feature> theFeature) const
 {
   // Already verified workplanes
   std::set<std::shared_ptr<ModelAPI_CompositeFeature> > aVerified;
index a37d228ebd5ec83e00ca454ed8d77348571789c6..0d0f6e384e3c6e21197237272ab2152bef0a4273 100644 (file)
@@ -394,7 +394,7 @@ Handle(AIS_InteractiveContext) XGUI_Displayer::AISContext() const
   return myWorkshop->viewer()->AISContext();
 }
 
-void XGUI_Displayer::display(AISObjectPtr theAIS, bool isUpdate)
+void XGUI_Displayer::displayAIS(AISObjectPtr theAIS, bool isUpdate)
 {
   Handle(AIS_InteractiveContext) aContext = AISContext();
   Handle(AIS_InteractiveObject) anAISIO = theAIS->impl<Handle(AIS_InteractiveObject)>();
@@ -414,7 +414,7 @@ void XGUI_Displayer::display(AISObjectPtr theAIS, bool isUpdate)
   }
 }
 
-void XGUI_Displayer::erase(AISObjectPtr theAIS, const bool isUpdate)
+void XGUI_Displayer::eraseAIS(AISObjectPtr theAIS, const bool isUpdate)
 {
   Handle(AIS_InteractiveContext) aContext = AISContext();
   Handle(AIS_InteractiveObject) anAISIO = theAIS->impl<Handle(AIS_InteractiveObject)>();
index 575dba31f78f764ef7cbe72179d8e1575ad1676e..5d770e85ee5b2dd9ae95072d492f4ed6c3911e71 100644 (file)
@@ -56,7 +56,7 @@ class XGUI_EXPORT XGUI_Displayer
   void display(ObjectPtr theObject, bool isUpdateViewer = true);
 
   /// Display the given AIS object. To hide this object use corresponde erase method
-  void display(AISObjectPtr theAIS, bool isUpdate = true);
+  void displayAIS(AISObjectPtr theAIS, bool isUpdate = true);
 
   /// Stop the current selection and color the given features to the selection color
   /// \param theFeatures a list of features to be disabled
@@ -82,7 +82,7 @@ class XGUI_EXPORT XGUI_Displayer
   void erase(ObjectPtr theObject, const bool isUpdateViewer = true);
 
   /// Erase the given AIS object displayed by corresponded display method
-  void erase(AISObjectPtr theAIS, const bool isUpdate = true);
+  void eraseAIS(AISObjectPtr theAIS, const bool isUpdate = true);
 
   /// Erase all presentations
   /// \param isUpdateViewer the parameter whether the viewer should be update immediatelly