From: azv Date: Fri, 18 Dec 2015 09:15:59 +0000 (+0300) Subject: Avoid dependency of SolveSpaceSolver module from SketchPlugin X-Git-Tag: V_2.1.0~141 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=6b6e53cd63a6172a0d7fb9c63fedeaa7ac0ed156;p=modules%2Fshaper.git Avoid dependency of SolveSpaceSolver module from SketchPlugin --- diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp index 46fc1b20f..34101a991 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_Builder.cpp @@ -311,12 +311,9 @@ EntityWrapperPtr SolveSpaceSolver_Builder::createFeature( if (!aSub) return aDummy; - std::shared_ptr aPointFeature = - std::dynamic_pointer_cast(theFeature); - const Slvs_Entity& aSubEnt = std::dynamic_pointer_cast(aSub)->entity(); - return EntityWrapperPtr(new SolveSpaceSolver_EntityWrapper(aPointFeature, aPoint, aSubEnt)); + return EntityWrapperPtr(new SolveSpaceSolver_EntityWrapper(theFeature, aPoint, aSubEnt)); } // wrong entity diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.cpp b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.cpp index bd6f61676..38ca452a4 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.cpp +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.cpp @@ -21,13 +21,13 @@ SolveSpaceSolver_EntityWrapper::SolveSpaceSolver_EntityWrapper( } SolveSpaceSolver_EntityWrapper::SolveSpaceSolver_EntityWrapper( - const std::shared_ptr 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; } diff --git a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.h b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.h index b006251eb..aee684d6c 100644 --- a/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.h +++ b/src/SketchSolver/SolveSpaceSolver/SolveSpaceSolver_EntityWrapper.h @@ -10,8 +10,6 @@ #include #include -#include - /** * 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 theFeature, - const AttributePtr theAttribute, + SolveSpaceSolver_EntityWrapper(const FeaturePtr thePointFeature, + const AttributePtr thePointAttribute, const Slvs_Entity& theEntity); /// \brief Return SolveSpace entity