Salome HOME
Sketcher: Remove obsolete interfaces. Code cleanup.
authorazv <azv@opencascade.com>
Thu, 16 Mar 2017 12:21:36 +0000 (15:21 +0300)
committerazv <azv@opencascade.com>
Fri, 17 Mar 2017 12:57:43 +0000 (15:57 +0300)
36 files changed:
src/SketchSolver/CMakeLists.txt
src/SketchSolver/PlaneGCSSolver/CMakeLists.txt
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_ConstraintWrapper.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Defs.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EdgeWrapper.cpp [new file with mode: 0644]
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EdgeWrapper.h [new file with mode: 0644]
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityDestroyer.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityWrapper.cpp [deleted file]
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityWrapper.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_FeatureBuilder.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_PointWrapper.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_ScalarWrapper.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Solver.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Tools.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_UpdateCoincidence.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_UpdateCoincidence.h
src/SketchSolver/SketchSolver.h [deleted file]
src/SketchSolver/SketchSolver_Constraint.h
src/SketchSolver/SketchSolver_ConstraintCoincidence.h
src/SketchSolver/SketchSolver_ConstraintCollinear.cpp
src/SketchSolver/SketchSolver_ConstraintDistance.h
src/SketchSolver/SketchSolver_ConstraintEqual.h
src/SketchSolver/SketchSolver_ConstraintFixed.cpp
src/SketchSolver/SketchSolver_ConstraintFixed.h
src/SketchSolver/SketchSolver_ConstraintLength.h
src/SketchSolver/SketchSolver_ConstraintMirror.h
src/SketchSolver/SketchSolver_ConstraintMulti.h
src/SketchSolver/SketchSolver_ConstraintMultiRotation.h
src/SketchSolver/SketchSolver_ConstraintMultiTranslation.h
src/SketchSolver/SketchSolver_ConstraintTangent.h
src/SketchSolver/SketchSolver_IConstraintWrapper.h [deleted file]
src/SketchSolver/SketchSolver_IEntityWrapper.h [deleted file]
src/SketchSolver/SketchSolver_Manager.h
src/SketchSolver/SketchSolver_Storage.h

index d6b370d7935baebed08ec5c1c91ac5286b913329..776221aa0419dcf7f876bb31b2c0d97dd745ffcf 100644 (file)
@@ -16,11 +16,8 @@ ENDFUNCTION(TO_FULL_PATH)
 INCLUDE(Common)
 
 SET(SKETCHSOLVER_HEADERS
-    SketchSolver.h
     SketchSolver_Error.h
     SketchSolver_Group.h
-    SketchSolver_IConstraintWrapper.h
-    SketchSolver_IEntityWrapper.h
     SketchSolver_Manager.h
     SketchSolver_Storage.h
 )
index 91bc90b795f7f0eb9c985a61605a203f588f31a1..2891c1209bff6a209f0966f773103cf0e068aac5 100644 (file)
@@ -7,7 +7,8 @@ SET(PLANEGCSSOLVER_HEADERS
     PlaneGCSSolver_Solver.h
     PlaneGCSSolver_Storage.h
     PlaneGCSSolver_ConstraintWrapper.h
-    PlaneGCSSolver_EntityWrapper.h
+    PlaneGCSSolver_EdgeWrapper.h
+    PlaneGCSSolver_EdgeWrapper.h
     PlaneGCSSolver_PointWrapper.h
     PlaneGCSSolver_ScalarWrapper.h
     PlaneGCSSolver_AngleWrapper.h
@@ -18,7 +19,7 @@ SET(PLANEGCSSOLVER_SOURCES
     PlaneGCSSolver_Solver.cpp
     PlaneGCSSolver_Storage.cpp
     PlaneGCSSolver_ConstraintWrapper.cpp
-    PlaneGCSSolver_EntityWrapper.cpp
+    PlaneGCSSolver_EdgeWrapper.cpp
     PlaneGCSSolver_PointWrapper.cpp
     PlaneGCSSolver_ScalarWrapper.cpp
     PlaneGCSSolver_AngleWrapper.cpp
index 216905155dd2e30354da5f05b6b3b77983dd2896..68109420e6d5b58c6e9f6013bcfd111bfbbc7064 100644 (file)
@@ -8,15 +8,12 @@
 #define PlaneGCSSolver_ConstraintWrapper_H_
 
 #include <PlaneGCSSolver_Defs.h>
-#include <PlaneGCSSolver_Solver.h>
 #include <PlaneGCSSolver_ScalarWrapper.h>
-#include <SketchSolver_IConstraintWrapper.h>
-
 
 /**
  *  Wrapper providing operations with PlaneGCS constraints.
  */
-class PlaneGCSSolver_ConstraintWrapper : public SketchSolver_IConstraintWrapper
+class PlaneGCSSolver_ConstraintWrapper
 {
 public:
   PlaneGCSSolver_ConstraintWrapper(const GCSConstraintPtr&            theConstraint,
@@ -31,6 +28,9 @@ public:
   void setConstraints(const std::list<GCSConstraintPtr>& theConstraints)
   { myGCSConstraints = theConstraints; }
 
+  /// \brief Return ID of current constraint
+  const ConstraintID& id() const
+  { return myID; }
   /// \brief Change constraint ID
   virtual void setId(const ConstraintID& theID);
 
@@ -50,9 +50,12 @@ public:
   { return myValueParam; }
 
 private:
+  ConstraintID                myID;
   SketchSolver_ConstraintType myType;
   ScalarWrapperPtr            myValueParam;
   std::list<GCSConstraintPtr> myGCSConstraints;
 };
 
+typedef std::shared_ptr<PlaneGCSSolver_ConstraintWrapper> ConstraintWrapperPtr;
+
 #endif
index 5a22cde9ee0fa75bd88b89a8257bef84d9553a4b..9274c2878907627ce2f9c77fa3551b8126960db7 100644 (file)
@@ -7,8 +7,6 @@
 #ifndef PlaneGCSSolver_Defs_H_
 #define PlaneGCSSolver_Defs_H_
 
-#include <SketchSolver.h>
-
 #include <Constraints.h>
 #include <Geo.h>
 #include <memory>
@@ -17,4 +15,58 @@ typedef std::shared_ptr<GCS::Point>       GCSPointPtr;
 typedef std::shared_ptr<GCS::Curve>       GCSCurvePtr;
 typedef std::shared_ptr<GCS::Constraint>  GCSConstraintPtr;
 
+// Tolerance for value of parameters
+const double tolerance = 1.e-10;
+
+#define PI 3.1415926535897932
+
+// Types for data entities enumeration
+typedef int ConstraintID;
+
+// Predefined values for identifiers
+const ConstraintID CID_UNKNOWN  =  0;
+const ConstraintID CID_MOVEMENT = -1;
+
+/// Types of entities
+enum SketchSolver_EntityType {
+  ENTITY_UNKNOWN = 0,
+  ENTITY_SCALAR,
+  ENTITY_ANGLE,
+  ENTITY_POINT,
+  ENTITY_LINE,
+  ENTITY_CIRCLE,
+  ENTITY_ARC
+};
+
+/// Types of constraints
+enum SketchSolver_ConstraintType {
+  CONSTRAINT_UNKNOWN = 0,
+  CONSTRAINT_COINCIDENCE,      // base coincidence if we don't know exact type yet
+  CONSTRAINT_PT_PT_COINCIDENT,
+  CONSTRAINT_PT_ON_LINE,
+  CONSTRAINT_PT_ON_CIRCLE,
+  CONSTRAINT_MIDDLE_POINT,
+  CONSTRAINT_DISTANCE,         // base distance if we don't know the measured objects yet
+  CONSTRAINT_PT_PT_DISTANCE,
+  CONSTRAINT_PT_LINE_DISTANCE,
+  CONSTRAINT_RADIUS,
+  CONSTRAINT_ANGLE,
+  CONSTRAINT_FIXED,
+  CONSTRAINT_HORIZONTAL,
+  CONSTRAINT_VERTICAL,
+  CONSTRAINT_PARALLEL,
+  CONSTRAINT_PERPENDICULAR,
+  CONSTRAINT_SYMMETRIC,
+  CONSTRAINT_EQUAL,           // base equality if we don't know the measured objects yet
+  CONSTRAINT_EQUAL_LINES,
+  CONSTRAINT_EQUAL_LINE_ARC,
+  CONSTRAINT_EQUAL_RADIUS,
+  CONSTRAINT_TANGENT,         // base tangency if we don't know the measured objects yet
+  CONSTRAINT_TANGENT_CIRCLE_LINE,
+  CONSTRAINT_TANGENT_CIRCLE_CIRCLE,
+  CONSTRAINT_COLLINEAR,
+  CONSTRAINT_MULTI_TRANSLATION,
+  CONSTRAINT_MULTI_ROTATION
+};
+
 #endif
diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EdgeWrapper.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EdgeWrapper.cpp
new file mode 100644 (file)
index 0000000..51cef8c
--- /dev/null
@@ -0,0 +1,22 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:    PlaneGCSSolver_EdgeWrapper.cpp
+// Created: 14 Dec 2015
+// Author:  Artem ZHIDKOV
+
+#include <PlaneGCSSolver_EdgeWrapper.h>
+
+PlaneGCSSolver_EdgeWrapper::PlaneGCSSolver_EdgeWrapper(const GCSCurvePtr theEntity)
+  : myEntity(theEntity)
+{
+  std::shared_ptr<GCS::Line> aLine = std::dynamic_pointer_cast<GCS::Line>(myEntity);
+  if (aLine) myType = ENTITY_LINE;
+  else {
+    std::shared_ptr<GCS::Arc> anArc = std::dynamic_pointer_cast<GCS::Arc>(myEntity);
+    if (anArc) myType = ENTITY_ARC;
+    else {
+      std::shared_ptr<GCS::Circle> aCircle = std::dynamic_pointer_cast<GCS::Circle>(myEntity);
+      if (aCircle) myType = ENTITY_CIRCLE;
+    }
+  }
+}
diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EdgeWrapper.h b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EdgeWrapper.h
new file mode 100644 (file)
index 0000000..dd843e2
--- /dev/null
@@ -0,0 +1,37 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:    PlaneGCSSolver_EdgeWrapper.h
+// Created: 14 Dec 2015
+// Author:  Artem ZHIDKOV
+
+#ifndef PlaneGCSSolver_EdgeWrapper_H_
+#define PlaneGCSSolver_EdgeWrapper_H_
+
+#include <PlaneGCSSolver_Defs.h>
+#include <PlaneGCSSolver_EntityWrapper.h>
+
+/**
+ *  Wrapper providing operations with PlaneGCS entities (lines, circles and arcs).
+ */
+class PlaneGCSSolver_EdgeWrapper : public PlaneGCSSolver_EntityWrapper
+{
+public:
+  PlaneGCSSolver_EdgeWrapper(const GCSCurvePtr theEntity);
+
+  /// \brief Return PlaneGCS geometric entity
+  const GCSCurvePtr& entity() const
+  { return myEntity; }
+  /// \brief Return PlaneGCS geometric entity to change
+  GCSCurvePtr& changeEntity()
+  { return myEntity; }
+
+  /// \brief Return type of current entity
+  virtual SketchSolver_EntityType type() const
+  { return myType; }
+
+private:
+  SketchSolver_EntityType myType;
+  GCSCurvePtr myEntity;
+};
+
+#endif
index 697d2db5c0c6f9a9be17bb49cf073ea2c1318955..97a3b83f05bf067f26295d53d0cf5299c70c04df 100644 (file)
@@ -8,7 +8,7 @@
 
 #include <PlaneGCSSolver_PointWrapper.h>
 #include <PlaneGCSSolver_ScalarWrapper.h>
-#include <PlaneGCSSolver_EntityWrapper.h>
+#include <PlaneGCSSolver_EdgeWrapper.h>
 
 static void destroyScalar(const EntityWrapperPtr& theEntity, GCS::SET_pD& theParams)
 {
@@ -26,8 +26,8 @@ static void destroyPoint(const EntityWrapperPtr& theEntity, GCS::SET_pD& thePara
 
 static void destroyLine(const EntityWrapperPtr& theEntity, GCS::SET_pD& theParams)
 {
-  std::shared_ptr<PlaneGCSSolver_EntityWrapper> anEntity =
-      std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(theEntity);
+  std::shared_ptr<PlaneGCSSolver_EdgeWrapper> anEntity =
+      std::dynamic_pointer_cast<PlaneGCSSolver_EdgeWrapper>(theEntity);
   std::shared_ptr<GCS::Line> aLine = std::dynamic_pointer_cast<GCS::Line>(anEntity->entity());
   theParams.insert(aLine->p1.x);
   theParams.insert(aLine->p1.y);
@@ -37,8 +37,8 @@ static void destroyLine(const EntityWrapperPtr& theEntity, GCS::SET_pD& theParam
 
 static void destroyCircle(const EntityWrapperPtr& theEntity, GCS::SET_pD& theParams)
 {
-  std::shared_ptr<PlaneGCSSolver_EntityWrapper> anEntity =
-      std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(theEntity);
+  std::shared_ptr<PlaneGCSSolver_EdgeWrapper> anEntity =
+      std::dynamic_pointer_cast<PlaneGCSSolver_EdgeWrapper>(theEntity);
   std::shared_ptr<GCS::Circle> aCirc = std::dynamic_pointer_cast<GCS::Circle>(anEntity->entity());
   theParams.insert(aCirc->center.x);
   theParams.insert(aCirc->center.y);
@@ -47,8 +47,8 @@ static void destroyCircle(const EntityWrapperPtr& theEntity, GCS::SET_pD& thePar
 
 static void destroyArc(const EntityWrapperPtr& theEntity, GCS::SET_pD& theParams)
 {
-  std::shared_ptr<PlaneGCSSolver_EntityWrapper> anEntity =
-      std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(theEntity);
+  std::shared_ptr<PlaneGCSSolver_EdgeWrapper> anEntity =
+      std::dynamic_pointer_cast<PlaneGCSSolver_EdgeWrapper>(theEntity);
   std::shared_ptr<GCS::Arc> anArc = std::dynamic_pointer_cast<GCS::Arc>(anEntity->entity());
   theParams.insert(anArc->center.x);
   theParams.insert(anArc->center.y);
diff --git a/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityWrapper.cpp b/src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EntityWrapper.cpp
deleted file mode 100644 (file)
index 907ca61..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:    PlaneGCSSolver_EntityWrapper.cpp
-// Created: 14 Dec 2015
-// Author:  Artem ZHIDKOV
-
-#include <PlaneGCSSolver_EntityWrapper.h>
-
-PlaneGCSSolver_EntityWrapper::PlaneGCSSolver_EntityWrapper(const GCSCurvePtr theEntity)
-  : myEntity(theEntity)
-{
-  std::shared_ptr<GCS::Line> aLine = std::dynamic_pointer_cast<GCS::Line>(myEntity);
-  if (aLine) myType = ENTITY_LINE;
-  else {
-    std::shared_ptr<GCS::Arc> anArc = std::dynamic_pointer_cast<GCS::Arc>(myEntity);
-    if (anArc) myType = ENTITY_ARC;
-    else {
-      std::shared_ptr<GCS::Circle> aCircle = std::dynamic_pointer_cast<GCS::Circle>(myEntity);
-      if (aCircle) myType = ENTITY_CIRCLE;
-    }
-  }
-}
index 38c92198a494a3d8d08476be9bc18a5db407cd5f..b9a3981d075b73570e3bb8b5ccc6f8f70d790c95 100644 (file)
@@ -1,37 +1,41 @@
 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
 // File:    PlaneGCSSolver_EntityWrapper.h
-// Created: 14 Dec 2015
+// Created: 30 Nov 2015
 // Author:  Artem ZHIDKOV
 
 #ifndef PlaneGCSSolver_EntityWrapper_H_
 #define PlaneGCSSolver_EntityWrapper_H_
 
 #include <PlaneGCSSolver_Defs.h>
-#include <SketchSolver_IEntityWrapper.h>
+
+#include <ModelAPI_Attribute.h>
+#include <ModelAPI_Feature.h>
+
+#include <list>
+#include <memory>
 
 /**
- *  Wrapper providing operations with PlaneGCS entities (lines, circles and arcs).
+ *  Wrapper providing operations with entities regardless the solver.
  */
-class PlaneGCSSolver_EntityWrapper : public SketchSolver_IEntityWrapper
+class PlaneGCSSolver_EntityWrapper
 {
 public:
-  PlaneGCSSolver_EntityWrapper(const GCSCurvePtr theEntity);
-
-  /// \brief Return PlaneGCS geometric entity
-  const GCSCurvePtr& entity() const
-  { return myEntity; }
-  /// \brief Return PlaneGCS geometric entity to change
-  GCSCurvePtr& changeEntity()
-  { return myEntity; }
+  PlaneGCSSolver_EntityWrapper() : myExternal(false) {}
+  virtual ~PlaneGCSSolver_EntityWrapper() {}
 
   /// \brief Return type of current entity
-  virtual SketchSolver_EntityType type() const
-  { return myType; }
+  virtual SketchSolver_EntityType type() const = 0;
+
+  /// \brief Change flag indicating the entity cannot be changed in the solver
+  void setExternal(bool theExternal) { myExternal = theExternal; }
+  /// \brief Return the External flag
+  bool isExternal() const { return myExternal; }
 
 private:
-  SketchSolver_EntityType myType;
-  GCSCurvePtr myEntity;
+  bool myExternal;
 };
 
+typedef std::shared_ptr<PlaneGCSSolver_EntityWrapper> EntityWrapperPtr;
+
 #endif
index a0ffc362f8f68ef8f9426a5c588952f137e7981b..e9cf468a9aa7e8c1ab2c9dac0f8b7212172a6634 100644 (file)
@@ -5,7 +5,7 @@
 // Author:  Artem ZHIDKOV
 
 #include <PlaneGCSSolver_FeatureBuilder.h>
-#include <PlaneGCSSolver_EntityWrapper.h>
+#include <PlaneGCSSolver_EdgeWrapper.h>
 #include <PlaneGCSSolver_PointWrapper.h>
 #include <PlaneGCSSolver_ScalarWrapper.h>
 
@@ -117,7 +117,7 @@ EntityWrapperPtr createLine(const AttributeEntityMap& theAttributes)
       aNewLine->p2 = *(aPoint->point());
   }
 
-  return EntityWrapperPtr(new PlaneGCSSolver_EntityWrapper(aNewLine));
+  return EntityWrapperPtr(new PlaneGCSSolver_EdgeWrapper(aNewLine));
 }
 
 EntityWrapperPtr createCircle(const AttributeEntityMap& theAttributes)
@@ -138,7 +138,7 @@ EntityWrapperPtr createCircle(const AttributeEntityMap& theAttributes)
     }
   }
 
-  return EntityWrapperPtr(new PlaneGCSSolver_EntityWrapper(aNewCircle));
+  return EntityWrapperPtr(new PlaneGCSSolver_EdgeWrapper(aNewCircle));
 }
 
 static double* createParameter(PlaneGCSSolver_Storage* theStorage)
@@ -203,7 +203,7 @@ EntityWrapperPtr createArc(const AttributeEntityMap&    theAttributes,
         aNewArc->center, aNewArc->end, aNewArc->endAngle)));
   }
 
-  return EntityWrapperPtr(new PlaneGCSSolver_EntityWrapper(aNewArc));
+  return EntityWrapperPtr(new PlaneGCSSolver_EdgeWrapper(aNewArc));
 }
 
 bool isAttributeApplicable(const std::string& theAttrName, const std::string& theOwnerName)
index 6bb2ade7a7c17fdcdb0c67c334628c4af04392ad..4e536d7a0f55c9c03142f0fa525d612e89a3a07e 100644 (file)
@@ -8,12 +8,12 @@
 #define PlaneGCSSolver_PointWrapper_H_
 
 #include <PlaneGCSSolver_Defs.h>
-#include <SketchSolver_IEntityWrapper.h>
+#include <PlaneGCSSolver_EntityWrapper.h>
 
 /**
  *  Wrapper providing operations with PlaneGCS points.
  */
-class PlaneGCSSolver_PointWrapper : public SketchSolver_IEntityWrapper
+class PlaneGCSSolver_PointWrapper : public PlaneGCSSolver_EntityWrapper
 {
 public:
   PlaneGCSSolver_PointWrapper(const GCSPointPtr thePoint);
index f0907a5882f7909347bb3f696bc901d535638a05..2838bb6afdb433ad9e277f62a68c3b233158255a 100644 (file)
@@ -8,12 +8,12 @@
 #define PlaneGCSSolver_ScalarWrapper_H_
 
 #include <PlaneGCSSolver_Defs.h>
-#include <SketchSolver_IEntityWrapper.h>
+#include <PlaneGCSSolver_EntityWrapper.h>
 
 /**
  *  Wrapper providing operations with PlaneGCS scalars.
  */
-class PlaneGCSSolver_ScalarWrapper : public SketchSolver_IEntityWrapper
+class PlaneGCSSolver_ScalarWrapper : public PlaneGCSSolver_EntityWrapper
 {
 public:
   PlaneGCSSolver_ScalarWrapper(double *const theParam);
index b019a314c0c16327afb1e738cd3cf3d3c5355013..7037b1a5e0bba618837b54bd802cf893853a3175 100644 (file)
@@ -7,8 +7,8 @@
 #ifndef PlaneGCSSolver_Solver_H_
 #define PlaneGCSSolver_Solver_H_
 
-#include <SketchSolver_IConstraintWrapper.h>
 #include <PlaneGCSSolver_Defs.h>
+#include <PlaneGCSSolver_ConstraintWrapper.h>
 
 #include <GCS.h>
 
index 0735867197a867dcca9b13ecdd2e7e4d73bcd476..bec4445be6794ad323e58bdf6cbfba694bff95dd 100644 (file)
@@ -7,7 +7,7 @@
 #include <PlaneGCSSolver_Storage.h>
 #include <PlaneGCSSolver_Solver.h>
 #include <PlaneGCSSolver_ConstraintWrapper.h>
-#include <PlaneGCSSolver_EntityWrapper.h>
+#include <PlaneGCSSolver_EdgeWrapper.h>
 #include <PlaneGCSSolver_PointWrapper.h>
 
 #include <PlaneGCSSolver_AttributeBuilder.h>
@@ -193,8 +193,8 @@ bool PlaneGCSSolver_Storage::update(FeaturePtr theFeature, bool theForce)
   if (aRelated && aRelated->type() == ENTITY_ARC) {
     /// TODO: this code should be shared with FeatureBuilder somehow
 
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> anEntity =
-        std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(aRelated);
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> anEntity =
+        std::dynamic_pointer_cast<PlaneGCSSolver_EdgeWrapper>(aRelated);
     std::shared_ptr<GCS::Arc> anArc = std::dynamic_pointer_cast<GCS::Arc>(anEntity->entity());
 
     static std::shared_ptr<GeomAPI_Dir2d> OX(new GeomAPI_Dir2d(1.0, 0.0));
index 752651d3319895e25c989d5995011b4441c205a9..1855de212ac9a0be336bd95ccb8ab0d80915d7c6 100644 (file)
@@ -8,8 +8,6 @@
 #define PlaneGCSSolver_Storage_H_
 
 #include <PlaneGCSSolver_Defs.h>
-
-#include <SketchSolver.h>
 #include <SketchSolver_Storage.h>
 
 class PlaneGCSSolver_EntityBuilder;
index 3dd68b54b56d78de73ca62459bdaf9c3c1d56703..f90aa3172c8298ba1eedeb9f6e38d621acc652fc 100644 (file)
@@ -5,7 +5,7 @@
 // Author:  Artem ZHIDKOV
 
 #include <PlaneGCSSolver_Tools.h>
-#include <PlaneGCSSolver_EntityWrapper.h>
+#include <PlaneGCSSolver_EdgeWrapper.h>
 #include <PlaneGCSSolver_PointWrapper.h>
 #include <PlaneGCSSolver_ScalarWrapper.h>
 #include <PlaneGCSSolver_ConstraintWrapper.h>
@@ -41,7 +41,7 @@
 #include <cmath>
 
 
-#define GCS_ENTITY_WRAPPER(x) std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(x)
+#define GCS_EDGE_WRAPPER(x)   std::dynamic_pointer_cast<PlaneGCSSolver_EdgeWrapper>(x)
 #define GCS_POINT_WRAPPER(x)  std::dynamic_pointer_cast<PlaneGCSSolver_PointWrapper>(x)
 #define GCS_SCALAR_WRAPPER(x) std::dynamic_pointer_cast<PlaneGCSSolver_ScalarWrapper>(x)
 
@@ -53,7 +53,7 @@ static ConstraintWrapperPtr
 static ConstraintWrapperPtr
   createConstraintPointOnEntity(const SketchSolver_ConstraintType& theType,
                                 std::shared_ptr<PlaneGCSSolver_PointWrapper> thePoint,
-                                std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity);
+                                std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity);
 static ConstraintWrapperPtr
   createConstraintDistancePointPoint(std::shared_ptr<PlaneGCSSolver_ScalarWrapper> theValue,
                                      std::shared_ptr<PlaneGCSSolver_PointWrapper> thePoint1,
@@ -61,36 +61,36 @@ static ConstraintWrapperPtr
 static ConstraintWrapperPtr
   createConstraintDistancePointLine(std::shared_ptr<PlaneGCSSolver_ScalarWrapper> theValue,
                                     std::shared_ptr<PlaneGCSSolver_PointWrapper>  thePoint,
-                                    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity);
+                                    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity);
 static ConstraintWrapperPtr
   createConstraintRadius(std::shared_ptr<PlaneGCSSolver_ScalarWrapper> theValue,
-                         std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity);
+                         std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity);
 static ConstraintWrapperPtr
   createConstraintAngle(ConstraintPtr theConstraint,
                         std::shared_ptr<PlaneGCSSolver_ScalarWrapper> theValue,
-                        std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity1,
-                        std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity2);
+                        std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity1,
+                        std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity2);
 static ConstraintWrapperPtr
   createConstraintHorizVert(const SketchSolver_ConstraintType& theType,
-                            std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity);
+                            std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity);
 static ConstraintWrapperPtr
-  createConstraintParallel(std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity1,
-                           std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity2);
+  createConstraintParallel(std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity1,
+                           std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity2);
 static ConstraintWrapperPtr
-  createConstraintPerpendicular(std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity1,
-                                std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity2);
+  createConstraintPerpendicular(std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity1,
+                                std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity2);
 static ConstraintWrapperPtr
   createConstraintEqual(const SketchSolver_ConstraintType& theType,
-                        std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity1,
-                        std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity2,
+                        std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity1,
+                        std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity2,
                         std::shared_ptr<PlaneGCSSolver_ScalarWrapper> theIntermed);
 static ConstraintWrapperPtr
   createConstraintTangent(const SketchSolver_ConstraintType& theType,
-                          std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity1,
-                          std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity2);
+                          std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity1,
+                          std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity2);
 static ConstraintWrapperPtr
   createConstraintMiddlePoint(std::shared_ptr<PlaneGCSSolver_PointWrapper> thePoint,
-                              std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity);
+                              std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity);
 
 
 
@@ -155,10 +155,10 @@ ConstraintWrapperPtr PlaneGCSSolver_Tools::createConstraint(
     break;
   case CONSTRAINT_PT_ON_LINE:
   case CONSTRAINT_PT_ON_CIRCLE:
-    aResult = createConstraintPointOnEntity(theType, aPoint1, GCS_ENTITY_WRAPPER(theEntity1));
+    aResult = createConstraintPointOnEntity(theType, aPoint1, GCS_EDGE_WRAPPER(theEntity1));
     break;
   case CONSTRAINT_MIDDLE_POINT:
-    aResult = createConstraintMiddlePoint(aPoint1, GCS_ENTITY_WRAPPER(theEntity1));
+    aResult = createConstraintMiddlePoint(aPoint1, GCS_EDGE_WRAPPER(theEntity1));
     break;
   case CONSTRAINT_PT_PT_DISTANCE:
     aResult = createConstraintDistancePointPoint(GCS_SCALAR_WRAPPER(theValue), aPoint1, aPoint2);
@@ -166,45 +166,45 @@ ConstraintWrapperPtr PlaneGCSSolver_Tools::createConstraint(
   case CONSTRAINT_PT_LINE_DISTANCE:
     aResult = createConstraintDistancePointLine(GCS_SCALAR_WRAPPER(theValue),
                                                 aPoint1,
-                                                GCS_ENTITY_WRAPPER(theEntity1));
+                                                GCS_EDGE_WRAPPER(theEntity1));
     break;
   case CONSTRAINT_RADIUS:
     aResult = createConstraintRadius(GCS_SCALAR_WRAPPER(theValue),
-                                     GCS_ENTITY_WRAPPER(theEntity1));
+                                     GCS_EDGE_WRAPPER(theEntity1));
     break;
   case CONSTRAINT_ANGLE:
     aResult = createConstraintAngle(theConstraint,
                   GCS_SCALAR_WRAPPER(theValue),
-                  GCS_ENTITY_WRAPPER(theEntity1), GCS_ENTITY_WRAPPER(theEntity2));
+                  GCS_EDGE_WRAPPER(theEntity1), GCS_EDGE_WRAPPER(theEntity2));
     break;
   case CONSTRAINT_FIXED:
     break;
   case CONSTRAINT_HORIZONTAL:
   case CONSTRAINT_VERTICAL:
-    aResult = createConstraintHorizVert(theType, GCS_ENTITY_WRAPPER(theEntity1));
+    aResult = createConstraintHorizVert(theType, GCS_EDGE_WRAPPER(theEntity1));
     break;
   case CONSTRAINT_PARALLEL:
-    aResult = createConstraintParallel(GCS_ENTITY_WRAPPER(theEntity1),
-                                       GCS_ENTITY_WRAPPER(theEntity2));
+    aResult = createConstraintParallel(GCS_EDGE_WRAPPER(theEntity1),
+                                       GCS_EDGE_WRAPPER(theEntity2));
     break;
   case CONSTRAINT_PERPENDICULAR:
-    aResult = createConstraintPerpendicular(GCS_ENTITY_WRAPPER(theEntity1),
-                                            GCS_ENTITY_WRAPPER(theEntity2));
+    aResult = createConstraintPerpendicular(GCS_EDGE_WRAPPER(theEntity1),
+                                            GCS_EDGE_WRAPPER(theEntity2));
     break;
   case CONSTRAINT_EQUAL_LINES:
     anIntermediate = GCS_SCALAR_WRAPPER(theValue); // parameter is used to store length of lines
   case CONSTRAINT_EQUAL_LINE_ARC:
   case CONSTRAINT_EQUAL_RADIUS:
     aResult = createConstraintEqual(theType,
-                                    GCS_ENTITY_WRAPPER(theEntity1),
-                                    GCS_ENTITY_WRAPPER(theEntity2),
+                                    GCS_EDGE_WRAPPER(theEntity1),
+                                    GCS_EDGE_WRAPPER(theEntity2),
                                     anIntermediate);
     break;
   case CONSTRAINT_TANGENT_CIRCLE_LINE:
   case CONSTRAINT_TANGENT_CIRCLE_CIRCLE:
     aResult = createConstraintTangent(theType,
-                                      GCS_ENTITY_WRAPPER(theEntity1),
-                                      GCS_ENTITY_WRAPPER(theEntity2));
+                                      GCS_EDGE_WRAPPER(theEntity1),
+                                      GCS_EDGE_WRAPPER(theEntity2));
     break;
   case CONSTRAINT_MULTI_TRANSLATION:
   case CONSTRAINT_MULTI_ROTATION:
@@ -232,8 +232,8 @@ std::shared_ptr<GeomAPI_Lin2d> PlaneGCSSolver_Tools::line(EntityWrapperPtr theEn
   if (theEntity->type() != ENTITY_LINE)
     return std::shared_ptr<GeomAPI_Lin2d>();
 
-  std::shared_ptr<PlaneGCSSolver_EntityWrapper> anEntity =
-      std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(theEntity);
+  std::shared_ptr<PlaneGCSSolver_EdgeWrapper> anEntity =
+      std::dynamic_pointer_cast<PlaneGCSSolver_EdgeWrapper>(theEntity);
   std::shared_ptr<GCS::Line> aLine = std::dynamic_pointer_cast<GCS::Line>(anEntity->entity());
   return std::shared_ptr<GeomAPI_Lin2d>(
       new GeomAPI_Lin2d(*(aLine->p1.x), *(aLine->p1.y), *(aLine->p2.x), *(aLine->p2.y)));
@@ -278,7 +278,7 @@ ConstraintWrapperPtr createConstraintCoincidence(
 ConstraintWrapperPtr createConstraintPointOnEntity(
     const SketchSolver_ConstraintType& theType,
     std::shared_ptr<PlaneGCSSolver_PointWrapper> thePoint,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity)
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity)
 {
   GCSConstraintPtr aNewConstr;
 
@@ -305,7 +305,7 @@ ConstraintWrapperPtr createConstraintPointOnEntity(
 
 ConstraintWrapperPtr createConstraintMiddlePoint(
     std::shared_ptr<PlaneGCSSolver_PointWrapper> thePoint,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity)
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity)
 {
   GCSPointPtr aPoint = thePoint->point();
   std::shared_ptr<GCS::Line> aLine = std::dynamic_pointer_cast<GCS::Line>(theEntity->entity());
@@ -338,7 +338,7 @@ ConstraintWrapperPtr createConstraintDistancePointPoint(
 ConstraintWrapperPtr createConstraintDistancePointLine(
     std::shared_ptr<PlaneGCSSolver_ScalarWrapper> theValue,
     std::shared_ptr<PlaneGCSSolver_PointWrapper>  thePoint,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity)
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity)
 {
   std::shared_ptr<GCS::Line> aLine = std::dynamic_pointer_cast<GCS::Line>(theEntity->entity());
   GCSConstraintPtr aNewConstr(new GCS::ConstraintP2LDistance(
@@ -351,7 +351,7 @@ ConstraintWrapperPtr createConstraintDistancePointLine(
 
 ConstraintWrapperPtr createConstraintRadius(
     std::shared_ptr<PlaneGCSSolver_ScalarWrapper> theValue,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity)
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity)
 {
   std::shared_ptr<GCS::Circle> aCircle =
     std::dynamic_pointer_cast<GCS::Circle>(theEntity->entity());
@@ -365,8 +365,8 @@ ConstraintWrapperPtr createConstraintRadius(
 ConstraintWrapperPtr createConstraintAngle(
     ConstraintPtr theConstraint,
     std::shared_ptr<PlaneGCSSolver_ScalarWrapper> theValue,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity1,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity2)
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity1,
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity2)
 {
   std::shared_ptr<GCS::Line> aLine1 = std::dynamic_pointer_cast<GCS::Line>(theEntity1->entity());
   bool isLine1Rev = theConstraint->boolean(
@@ -391,7 +391,7 @@ ConstraintWrapperPtr createConstraintAngle(
 
 ConstraintWrapperPtr createConstraintHorizVert(
     const SketchSolver_ConstraintType& theType,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity)
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity)
 {
   std::shared_ptr<GCS::Line> aLine = std::dynamic_pointer_cast<GCS::Line>(theEntity->entity());
   GCSConstraintPtr aNewConstr;
@@ -404,8 +404,8 @@ ConstraintWrapperPtr createConstraintHorizVert(
 }
 
 ConstraintWrapperPtr createConstraintParallel(
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity1,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity2)
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity1,
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity2)
 {
   std::shared_ptr<GCS::Line> aLine1 = std::dynamic_pointer_cast<GCS::Line>(theEntity1->entity());
   std::shared_ptr<GCS::Line> aLine2 = std::dynamic_pointer_cast<GCS::Line>(theEntity2->entity());
@@ -416,8 +416,8 @@ ConstraintWrapperPtr createConstraintParallel(
 }
 
 ConstraintWrapperPtr createConstraintPerpendicular(
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity1,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity2)
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity1,
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity2)
 {
   std::shared_ptr<GCS::Line> aLine1 = std::dynamic_pointer_cast<GCS::Line>(theEntity1->entity());
   std::shared_ptr<GCS::Line> aLine2 = std::dynamic_pointer_cast<GCS::Line>(theEntity2->entity());
@@ -429,8 +429,8 @@ ConstraintWrapperPtr createConstraintPerpendicular(
 
 ConstraintWrapperPtr createConstraintEqual(
     const SketchSolver_ConstraintType& theType,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity1,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity2,
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity1,
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity2,
     std::shared_ptr<PlaneGCSSolver_ScalarWrapper> theIntermed)
 {
   if (theType == CONSTRAINT_EQUAL_LINE_ARC)
@@ -468,8 +468,8 @@ ConstraintWrapperPtr createConstraintEqual(
 
 ConstraintWrapperPtr createConstraintTangent(
     const SketchSolver_ConstraintType& theType,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity1,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theEntity2)
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity1,
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theEntity2)
 {
   GCSConstraintPtr aNewConstr;
   if (theType == CONSTRAINT_TANGENT_CIRCLE_LINE) {
@@ -509,9 +509,9 @@ bool PlaneGCSSolver_Tools::isArcArcTangencyInternal(
     EntityWrapperPtr theArc1, EntityWrapperPtr theArc2)
 {
   std::shared_ptr<GCS::Circle> aCirc1 = std::dynamic_pointer_cast<GCS::Circle>(
-      GCS_ENTITY_WRAPPER(theArc1)->entity());
+      GCS_EDGE_WRAPPER(theArc1)->entity());
   std::shared_ptr<GCS::Circle> aCirc2 = std::dynamic_pointer_cast<GCS::Circle>(
-      GCS_ENTITY_WRAPPER(theArc2)->entity());
+      GCS_EDGE_WRAPPER(theArc2)->entity());
 
   if (!aCirc1 || !aCirc2)
     return false;
index 6e66ae26e36aecda630584ac3a0bea60b5db40e1..6b1d358cb6725c8e09b4b2e4e4b3d9584415fe8a 100644 (file)
@@ -5,7 +5,7 @@
 // Author:  Artem ZHIDKOV
 
 #include <PlaneGCSSolver_UpdateCoincidence.h>
-#include <PlaneGCSSolver_EntityWrapper.h>
+#include <PlaneGCSSolver_EdgeWrapper.h>
 #include <PlaneGCSSolver_PointWrapper.h>
 #include <SketchSolver_Constraint.h>
 
@@ -108,7 +108,7 @@ bool PlaneGCSSolver_UpdateCoincidence::isPointOnEntity(
 
   if (theEntity->type() == ENTITY_LINE) {
     std::shared_ptr<GCS::Line> aLine = std::dynamic_pointer_cast<GCS::Line>(
-        std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(theEntity)->entity());
+        std::dynamic_pointer_cast<PlaneGCSSolver_EdgeWrapper>(theEntity)->entity());
     return anIt->isExist(aLine->p1) || anIt->isExist(aLine->p2);
   }
   return false;
index 9d3b0eb99b1d2a26afe9bd530fcf1165ae7eb38f..558756492fa68c7406ad86e8ab59d57bf65dd04b 100644 (file)
@@ -8,7 +8,7 @@
 #define PlaneGCSSolver_UpdateCoincidence_H_
 
 #include <PlaneGCSSolver_Update.h>
-#include <SketchSolver_IEntityWrapper.h>
+#include <PlaneGCSSolver_EntityWrapper.h>
 
 #include <GCS.h>
 
diff --git a/src/SketchSolver/SketchSolver.h b/src/SketchSolver/SketchSolver.h
deleted file mode 100644 (file)
index 7757023..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-#ifndef SKETCHSOLVER_H
-#define SKETCHSOLVER_H
-
-#include <stdlib.h>
-
-/// Tolerance for value of parameters
-const double tolerance = 1.e-10;
-
-#define PI 3.1415926535897932
-
-// Types for data entities enumeration
-typedef int ConstraintID;
-
-// Predefined values for identifiers
-const ConstraintID CID_UNKNOWN  =  0;
-const ConstraintID CID_MOVEMENT = -1;
-
-#endif
index 5c06e0aa5434f268cfd35570011e0375cb26e696..c0545a520aae4e97cbd94cc3b8e9d0f356129a30 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_Constraint_H_
 #define SketchSolver_Constraint_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Storage.h>
 #include <PlaneGCSSolver_Update.h>
 
index 59061a302973179f667a3d7ae9e6d9ac5a76d019..83ec15b408714b155ffb7e20eb4cc9ff55743876 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintCoincidence_H_
 #define SketchSolver_ConstraintCoincidence_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Constraint.h>
 
 /** \class   SketchSolver_ConstraintCoincidence
index 0d35cf485945a1562d2c51f404b6d001a0a4b740..32ec0721d2b74809e6aaf0282efb1a2366d8ab9b 100644 (file)
@@ -4,7 +4,7 @@
 #include <SketchSolver_Error.h>
 
 #include <PlaneGCSSolver_ConstraintWrapper.h>
-#include <PlaneGCSSolver_EntityWrapper.h>
+#include <PlaneGCSSolver_EdgeWrapper.h>
 #include <PlaneGCSSolver_PointWrapper.h>
 #include <PlaneGCSSolver_UpdateCoincidence.h>
 
@@ -13,7 +13,7 @@
 static ConstraintWrapperPtr createPointsOnLine(
     std::shared_ptr<PlaneGCSSolver_PointWrapper>  thePoint1,
     std::shared_ptr<PlaneGCSSolver_PointWrapper>  thePoint2,
-    std::shared_ptr<PlaneGCSSolver_EntityWrapper> theLine)
+    std::shared_ptr<PlaneGCSSolver_EdgeWrapper> theLine)
 {
   std::shared_ptr<GCS::Line> aGCSLine = std::dynamic_pointer_cast<GCS::Line>(theLine->entity());
 
@@ -82,7 +82,7 @@ void SketchSolver_ConstraintCollinear::notify(const FeaturePtr&      theFeature,
   bool aConstraintToApply[4] = {false, false, false, false};
   ConstraintWrapperPtr aNewConstraint;
   std::shared_ptr<PlaneGCSSolver_PointWrapper> aPoints[2];
-  std::shared_ptr<PlaneGCSSolver_EntityWrapper> aLine;
+  std::shared_ptr<PlaneGCSSolver_EdgeWrapper> aLine;
 
   if (isPointOnOppositeLine[0] || isPointOnOppositeLine[1]) {
     // one of points of first line is already on the second line,
@@ -95,7 +95,7 @@ void SketchSolver_ConstraintCollinear::notify(const FeaturePtr&      theFeature,
         aPoints[i] = std::dynamic_pointer_cast<PlaneGCSSolver_PointWrapper>(myPoints[i]);
       aConstraintToApply[i] = true;
     }
-    aLine = std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(myAttributes.back());
+    aLine = std::dynamic_pointer_cast<PlaneGCSSolver_EdgeWrapper>(myAttributes.back());
   } else {
     // verify second line and add necessary constraints
     for (int i = 0; i < 2; ++i) {
@@ -106,7 +106,7 @@ void SketchSolver_ConstraintCollinear::notify(const FeaturePtr&      theFeature,
         aPoints[i] = std::dynamic_pointer_cast<PlaneGCSSolver_PointWrapper>(myPoints[i + 2]);
       aConstraintToApply[i+2] = true;
     }
-    aLine = std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(myAttributes.front());
+    aLine = std::dynamic_pointer_cast<PlaneGCSSolver_EdgeWrapper>(myAttributes.front());
   }
 
   bool isNew = false;
index 85d540ff7a324702ab1c67796bbd76d7868fd6e9..5dc192a7f1dc74e5eee5a82a0527bae78cba70a5 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintDistance_H_
 #define SketchSolver_ConstraintDistance_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Constraint.h>
 
 /** \class   SketchSolver_ConstraintDistance
index 3741f93dd9a7083aa9f78169ab6d4abc920bca4b..3fd677db35d873a5304185505927a146f0b4ce2e 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintEqual_H_
 #define SketchSolver_ConstraintEqual_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Constraint.h>
 
 /** \class   SketchSolver_ConstraintEqual
index 73f9808ebc454a638efbfa79b6aa0be77a5cf119..68200eb2e0d11eb8c13fda82118b5800486ad844 100644 (file)
@@ -4,7 +4,7 @@
 #include <SketchSolver_Error.h>
 
 #include <PlaneGCSSolver_ConstraintWrapper.h>
-#include <PlaneGCSSolver_EntityWrapper.h>
+#include <PlaneGCSSolver_EdgeWrapper.h>
 #include <PlaneGCSSolver_PointWrapper.h>
 
 
@@ -56,8 +56,8 @@ void SketchSolver_ConstraintFixed::process()
 
 void SketchSolver_ConstraintFixed::fixFeature(EntityWrapperPtr theFeature)
 {
-  std::shared_ptr<PlaneGCSSolver_EntityWrapper> anEntity =
-      std::dynamic_pointer_cast<PlaneGCSSolver_EntityWrapper>(theFeature);
+  std::shared_ptr<PlaneGCSSolver_EdgeWrapper> anEntity =
+      std::dynamic_pointer_cast<PlaneGCSSolver_EdgeWrapper>(theFeature);
 
   GCS::VEC_pD aParameters; // parameters of entity to be fixed
 
index 35fc651be42899e3d0440ef8d227bb8dbaaeba53..61b5ec82483bad51b982364866e236892a978e9d 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintFixed_H_
 #define SketchSolver_ConstraintFixed_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Constraint.h>
 
 /** \class   SketchSolver_ConstraintFixed
index 3934b59ff18acbcbc8ec8cc91955207e16f33820..689f4478a3988a811ceb75d7d4b3a3d3b5b94b41 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintLength_H_
 #define SketchSolver_ConstraintLength_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Constraint.h>
 
 /** \class   SketchSolver_ConstraintLength
index fe0ea2e9cfbecf751fad7e6856181d3bd87dd461..8840a3bffc2e6d3700d1682e94392a538e09cd45 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintMirror_H_
 #define SketchSolver_ConstraintMirror_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Constraint.h>
 
 /** \class   SketchSolver_ConstraintMirror
index b317fc1dc342b97ad44e1160a0e5e32c862e05dd..969b4ae0d6f2ac5abc0d2424aef20ca854b4813a 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintMulti_H_
 #define SketchSolver_ConstraintMulti_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Constraint.h>
 
 #include <vector>
index faffd938012b73e7f8fdf4bd19e1ac9d5a36330a..48f367deb459576de96d5eae418d534ab6595482 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintMultiRotation_H_
 #define SketchSolver_ConstraintMultiRotation_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_ConstraintMulti.h>
 
 #include "GeomDataAPI_Point2D.h"
index 6b71d30db6ef173889e74204355b27584aa889c5..eeeb15f518e3e9563abff05669fc525579d544d5 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintMultiTranslation_H_
 #define SketchSolver_ConstraintMultiTranslation_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_ConstraintMulti.h>
 
 #include "GeomDataAPI_Point2D.h"
index 221450083730a2949a98e59e79f7fa7b132aca8c..96428b47fcce2ee688a2d4b9f49c0fd00b0fb267 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_ConstraintTangent_H_
 #define SketchSolver_ConstraintTangent_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Constraint.h>
 
 /** \class   SketchSolver_ConstraintTangent
diff --git a/src/SketchSolver/SketchSolver_IConstraintWrapper.h b/src/SketchSolver/SketchSolver_IConstraintWrapper.h
deleted file mode 100644 (file)
index 5215705..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:    SketchSolver_IConstraintWrapper.h
-// Created: 30 Nov 2015
-// Author:  Artem ZHIDKOV
-
-#ifndef SketchSolver_IConstraintWrapper_H_
-#define SketchSolver_IConstraintWrapper_H_
-
-#include <SketchSolver_IEntityWrapper.h>
-
-#include <SketchPlugin_Constraint.h>
-
-#include <list>
-#include <memory>
-
-/// Types of constraints
-enum SketchSolver_ConstraintType {
-  CONSTRAINT_UNKNOWN = 0,
-  CONSTRAINT_COINCIDENCE,      // base coincidence if we don't know exact type yet
-  CONSTRAINT_PT_PT_COINCIDENT,
-  CONSTRAINT_PT_ON_LINE,
-  CONSTRAINT_PT_ON_CIRCLE,
-  CONSTRAINT_MIDDLE_POINT,
-  CONSTRAINT_DISTANCE,         // base distance if we don't know the measured objects yet
-  CONSTRAINT_PT_PT_DISTANCE,
-  CONSTRAINT_PT_LINE_DISTANCE,
-  CONSTRAINT_RADIUS,
-  CONSTRAINT_ANGLE,
-  CONSTRAINT_FIXED,
-  CONSTRAINT_HORIZONTAL,
-  CONSTRAINT_VERTICAL,
-  CONSTRAINT_PARALLEL,
-  CONSTRAINT_PERPENDICULAR,
-  CONSTRAINT_SYMMETRIC,
-  CONSTRAINT_EQUAL,           // base equality if we don't know the measured objects yet
-  CONSTRAINT_EQUAL_LINES,
-  CONSTRAINT_EQUAL_LINE_ARC,
-  CONSTRAINT_EQUAL_RADIUS,
-  CONSTRAINT_TANGENT,         // base tangency if we don't know the measured objects yet
-  CONSTRAINT_TANGENT_CIRCLE_LINE,
-  CONSTRAINT_TANGENT_CIRCLE_CIRCLE,
-  CONSTRAINT_COLLINEAR,
-  CONSTRAINT_MULTI_TRANSLATION,
-  CONSTRAINT_MULTI_ROTATION
-};
-
-/**
- *  Wrapper providing operations with constraints regardless the solver.
- */
-class SketchSolver_IConstraintWrapper
-{
-public:
-  virtual ~SketchSolver_IConstraintWrapper() {}
-
-  /// \brief Return ID of current constraint
-  const ConstraintID& id() const
-  { return myID; }
-  /// \brief Change constraint ID
-  virtual void setId( const ConstraintID& theID) = 0;
-
-  /// \brief Return type of current entity
-  virtual SketchSolver_ConstraintType type() const = 0;
-
-  /// \brief Assign numeric parameter of constraint
-  virtual void setValue(const double& theValue) = 0;
-  /// \brief Return numeric parameter of constraint
-  virtual double value() const = 0;
-
-protected:
-  ConstraintID myID;
-};
-
-typedef std::shared_ptr<SketchSolver_IConstraintWrapper> ConstraintWrapperPtr;
-
-#endif
diff --git a/src/SketchSolver/SketchSolver_IEntityWrapper.h b/src/SketchSolver/SketchSolver_IEntityWrapper.h
deleted file mode 100644 (file)
index 41f561a..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-
-// File:    SketchSolver_IEntityWrapper.h
-// Created: 30 Nov 2015
-// Author:  Artem ZHIDKOV
-
-#ifndef SketchSolver_IEntityWrapper_H_
-#define SketchSolver_IEntityWrapper_H_
-
-#include <SketchSolver.h>
-
-#include <ModelAPI_Attribute.h>
-#include <ModelAPI_Feature.h>
-
-#include <list>
-#include <memory>
-
-/// Types of entities
-enum SketchSolver_EntityType {
-  ENTITY_UNKNOWN = 0,
-  ENTITY_SCALAR,
-  ENTITY_ANGLE,
-  ENTITY_POINT,
-  ENTITY_LINE,
-  ENTITY_CIRCLE,
-  ENTITY_ARC
-};
-
-/**
- *  Wrapper providing operations with entities regardless the solver.
- */
-class SketchSolver_IEntityWrapper
-{
-public:
-  SketchSolver_IEntityWrapper() : myExternal(false) {}
-  virtual ~SketchSolver_IEntityWrapper() {}
-
-  /// \brief Return type of current entity
-  virtual SketchSolver_EntityType type() const = 0;
-
-  /// \brief Change flag indicating the entity cannot be changed in the solver
-  void setExternal(bool theExternal) { myExternal = theExternal; }
-  /// \brief Return the External flag
-  bool isExternal() const { return myExternal; }
-
-private:
-  bool myExternal;
-};
-
-typedef std::shared_ptr<SketchSolver_IEntityWrapper> EntityWrapperPtr;
-
-#endif
index 7d227dee456c044ce79e803b12c37b098ff7ffd9..d69cccbfd4a8e5c8a1926aded8091b0a3fbb75a6 100644 (file)
@@ -7,7 +7,6 @@
 #ifndef SketchSolver_Manager_H_
 #define SketchSolver_Manager_H_
 
-#include "SketchSolver.h"
 #include <SketchSolver_Group.h>
 
 #include <Events_Listener.h>
index 50d30987c21812edb0d2750c1fd40e41b94688c8..bfd8bc62001f731733e7f03843b19f1d8832bd31 100644 (file)
@@ -7,9 +7,8 @@
 #ifndef SketchSolver_Storage_H_
 #define SketchSolver_Storage_H_
 
-#include <SketchSolver.h>
-#include <SketchSolver_IConstraintWrapper.h>
-#include <SketchSolver_IEntityWrapper.h>
+#include <PlaneGCSSolver_ConstraintWrapper.h>
+#include <PlaneGCSSolver_EntityWrapper.h>
 
 #include <PlaneGCSSolver_Solver.h>
 #include <PlaneGCSSolver_UpdateFeature.h>