]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Avoid dependency of SolveSpaceSolver module from SketchPlugin
authorazv <azv@opencascade.com>
Fri, 18 Dec 2015 09:15:59 +0000 (12:15 +0300)
committerazv <azv@opencascade.com>
Fri, 18 Dec 2015 09:15:59 +0000 (12:15 +0300)
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.cpp
src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.h

index 46fc1b20f0d1ae6dd2da18782b05d260bb447285..34101a99145a96cf43b62a31764305f468db371a 100644 (file)
@@ -311,12 +311,9 @@ EntityWrapperPtr SolveSpaceSolver_Builder::createFeature(
     if (!aSub)
       return aDummy;
 
-    std::shared_ptr<SketchPlugin_Point> aPointFeature = 
-        std::dynamic_pointer_cast<SketchPlugin_Point>(theFeature);
-
     const Slvs_Entity& aSubEnt =
         std::dynamic_pointer_cast<SolveSpaceSolver_EntityWrapper>(aSub)->entity();
-    return EntityWrapperPtr(new SolveSpaceSolver_EntityWrapper(aPointFeature, aPoint, aSubEnt));
+    return EntityWrapperPtr(new SolveSpaceSolver_EntityWrapper(theFeature, aPoint, aSubEnt));
   }
 
   // wrong entity
index bd6f616764c35dd0d3ed9bae0c6ee02380861783..38ca452a447b52009fdbae1c793537fbbe5cba8e 100644 (file)
@@ -21,13 +21,13 @@ SolveSpaceSolver_EntityWrapper::SolveSpaceSolver_EntityWrapper(
 }
 
 SolveSpaceSolver_EntityWrapper::SolveSpaceSolver_EntityWrapper(
-    const std::shared_ptr<SketchPlugin_Point> theFeature,
-    const AttributePtr theAttribute,
+    const FeaturePtr thePointFeature,
+    const AttributePtr thePointAttribute,
     const Slvs_Entity& theEntity)
   : myEntity(theEntity)
 {
-  myBaseFeature = FeaturePtr(theFeature);
-  myBaseAttribute = theAttribute;
+  myBaseFeature = thePointFeature;
+  myBaseAttribute = thePointAttribute;
 }
 
 
index b006251ebb329a746c47164a4496673f4d7a1742..aee684d6caa2bd7498a6d331ee8e469136004e20 100644 (file)
@@ -10,8 +10,6 @@
 #include <SketchSolver_IEntityWrapper.h>
 #include <SolveSpaceSolver_Solver.h>
 
-#include <SketchPlugin_Point.h>
-
 /**
  *  Wrapper providing operations with SolveSpace entities.
  */
@@ -22,8 +20,8 @@ public:
   SolveSpaceSolver_EntityWrapper(const AttributePtr theAttribute, const Slvs_Entity& theEntity);
 
   /// \brief Constructor useful for SketchPlugin_Point only
-  SolveSpaceSolver_EntityWrapper(const std::shared_ptr<SketchPlugin_Point> theFeature,
-                                 const AttributePtr theAttribute,
+  SolveSpaceSolver_EntityWrapper(const FeaturePtr thePointFeature,
+                                 const AttributePtr thePointAttribute,
                                  const Slvs_Entity& theEntity);
 
   /// \brief Return SolveSpace entity