]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Improve translation for Elliptic Arcs
authormpv <mpv@opencascade.com>
Tue, 24 Sep 2019 13:58:32 +0000 (16:58 +0300)
committermpv <mpv@opencascade.com>
Tue, 24 Sep 2019 13:58:32 +0000 (16:58 +0300)
19 files changed:
src/Model/Model_AttributeSelection.cpp
src/Model/Model_AttributeSelection.h
src/ModelAPI/ModelAPI_AttributeSelection.h
src/ModelGeomAlgo/ModelGeomAlgo_Shape.cpp
src/SketchPlugin/SketchPlugin_EllipticArc.h
src/SketchPlugin/SketchPlugin_MacroEllipticArc.h
src/SketchPlugin/SketchPlugin_msg_en.ts
src/SketchPlugin/SketchPlugin_msg_fr.ts
src/SketchPlugin/plugin-Sketch.xml
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Defs.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_EdgeWrapper.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.h
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Tools.cpp
src/SketchSolver/SketchSolver_ConstraintEqual.cpp
src/SketchSolver/SketchSolver_ConstraintFixed.cpp
src/SketchSolver/SketchSolver_ConstraintMovement.cpp
src/SketchSolver/SketchSolver_ConstraintMovement.h
src/SketchSolver/SketchSolver_ConstraintTangent.cpp

index 50f548009481abb88f1771db683831c0bd15ab4a..41df2868ae3046805af2afb7565384ee8c464f20 100644 (file)
@@ -260,7 +260,7 @@ void Model_AttributeSelection::removeTemporaryValues()
   }
 }
 
-// returns the center of the edge: circular or elliptical
+// returns the center of the edge: circular or elliptic
 GeomShapePtr centerByEdge(GeomShapePtr theEdge, ModelAPI_AttributeSelection::CenterType theType)
 {
   if (theType != ModelAPI_AttributeSelection::NOT_CENTER && theEdge.get() != NULL) {
index 0e4c0f2023d87765b9fff2ad8bf391715fc989a0..b7d81ff7406ac5020a369478aa026620c4ec65a2 100644 (file)
@@ -63,7 +63,7 @@ public:
     const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape,
     const bool theTemporarily = false);
 
-  /// Same as SetValue, but it takes an edge (on circular or elliptical curve)
+  /// Same as SetValue, but it takes an edge (on circular or elliptic curve)
   /// and stores the vertex of the central point (for ellipse the first or the second focus point)
   MODEL_EXPORT virtual void setValueCenter(
     const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Edge>& theEdge,
index 0f44acb010c7399b7ec31a293868b51a752e81f7..119485dc495ae4b69e617f1d2b1c04b29e74edc3 100644 (file)
@@ -34,7 +34,7 @@ class GeomAPI_Pnt;
 class ModelAPI_AttributeSelection : public ModelAPI_Attribute
 {
  public:
-   /// Type of the center of the circular of elliptical edge
+   /// Type of the center of the circular of elliptic edge
    enum CenterType {
      NOT_CENTER, ///< this is not a center
      CIRCLE_CENTER, ///< center of the circle
@@ -52,7 +52,7 @@ class ModelAPI_AttributeSelection : public ModelAPI_Attribute
     const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Shape>& theSubShape,
     const bool theTemporarily = false) = 0;
 
-  /// Same as SetValue, but it takes an edge (on circular or elliptical curve)
+  /// Same as SetValue, but it takes an edge (on circular or elliptic curve)
   /// and stores the vertex of the central point (for ellipse the first or the second focus point)
   virtual void setValueCenter(
     const ObjectPtr& theContext, const std::shared_ptr<GeomAPI_Edge>& theEdge,
index 207e4f3aa807ce4c1b861cd4f76df85927b0a26c..2f81c1f3891aae552165d7a04672495d5f0ba7d4 100644 (file)
@@ -84,7 +84,7 @@ namespace ModelGeomAlgo_Shape
     return aFoundSubs;
   }
 
-  // Find circular/elliptical edge, which center/focus coincide with the given point
+  // Find circular/elliptic edge, which center/focus coincide with the given point
   static GeomShapePtr findEdgeByCenter(const GeomShapePtr& theBaseShape,
                                        const GeomPointPtr& theCenter,
                                        const double theTolerance,
index 4b84d3bcfdf018e3c3cac1b3478e3c3e59736fa9..b6c6e1c71e5eee6ae5f620da010f08acee761741 100644 (file)
@@ -25,7 +25,7 @@
 
 /**\class SketchPlugin_EllipticArc
  * \ingroup Plugins
- * \brief Feature for creation of the new elliptical arc in Sketch.
+ * \brief Feature for creation of the new elliptic arc in Sketch.
  */
 class SketchPlugin_EllipticArc: public SketchPlugin_SketchEntity
 {
index 1d6db5ffc1d86f8180afa771833f34c153f663b3..d0c8982c46ab0d6731d6d3f850bffb183774937e 100644 (file)
@@ -30,14 +30,14 @@ class GeomAPI_Shape;
 
 /**\class SketchPlugin_MacroEllipticArc
  * \ingroup Plugins
- * \brief Feature for creation of the new elliptical arc in Sketch.
+ * \brief Feature for creation of the new elliptic arc in Sketch.
  */
 class SketchPlugin_MacroEllipticArc: public SketchPlugin_SketchEntity,
                                      public GeomAPI_IPresentable,
                                      public ModelAPI_IReentrant
 {
  public:
-  /// Elliptical arc feature kind
+  /// Elliptic arc feature kind
   inline static const std::string& ID()
   {
     static const std::string ID("SketchMacroEllipticArc");
index 3872b987e6ad57948085d278334dea97186036fa..da40a971606850a794aa4ab93369a5e204f32606 100644 (file)
     </message>
   </context>
 
+  <context>
+    <name>SketchMacroEllipticArc:Model_FeatureValidator</name>
+    <message>
+      <source>Attribute "%1" is not initialized.</source>
+      <translation>Select a point.</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:center</name>
+    <message>
+      <source>Attribute "%1" is locked by modification value in the viewer.</source>
+      <translation>Select a point.</translation>
+    </message>
+    <message>
+      <source>Attribute "%1" is not initialized.</source>
+      <translation>Select a center point.</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:end_point</name>
+    <message>
+      <source>Attribute "%1" is locked by modification value in the viewer.</source>
+      <translation>Select an end point.</translation>
+    </message>
+    <message>
+      <source>Attribute "%1" is not initialized.</source>
+      <translation>Select an end point.</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:major_axis_point</name>
+    <message>
+      <source>Attribute "%1" is locked by modification value in the viewer.</source>
+      <translation>Select a major axis point.</translation>
+    </message>
+    <message>
+      <source>Attribute "%1" is not initialized.</source>
+      <translation>Select a major axis point.</translation>
+    </message>
+  </context>
+
   <context>
     <name>SketchSplit:Model_FeatureValidator</name>
     <message>
index f1cff73a35d994ca3d7bcbcb6ea5ec13d0edaa25..90e0fbc5ad7204818a7bc4a02da4507de56f78c6 100644 (file)
     </message>
   </context>
 
+  <context>
+    <name>SketchEllipticArc:Auxiliary</name>
+    <message>
+      <source>Auxiliary</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Construction element</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:ellipse_center</name>
+    <message>
+      <source>Center</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:ellipse_first_focus</name>
+    <message>
+      <source>First focus</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:ellipse_major_axis_end_point</name>
+    <message>
+      <source>Major axis end</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:ellipse_major_axis_start_point</name>
+    <message>
+      <source>Major axis start</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:ellipse_major_radius</name>
+    <message>
+      <source>Major radius</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Set major radius</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:ellipse_minor_axis_end_point</name>
+    <message>
+      <source>Minor axis end</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:ellipse_minor_axis_start_point</name>
+    <message>
+      <source>Minor axis start</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:ellipse_minor_radius</name>
+    <message>
+      <source>Minor radius</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Set minor radius</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:ellipse_second_focus</name>
+    <message>
+      <source>Second focus</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:end_point</name>
+    <message>
+      <source>End point</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchEllipticArc:start_point</name>
+    <message>
+      <source>Start point</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc</name>
+    <message>
+      <source>Create elliptic arc</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Elliptic arc</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:Auxiliary</name>
+    <message>
+      <source>Auxiliary</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Construction element</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:Model_FeatureValidator</name>
+    <message>
+      <source>Attribute "%1" is not initialized.</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:center</name>
+    <message>
+      <source>Attribute "%1" is locked by modification value in the viewer.</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Attribute "%1" is not initialized.</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Center point</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:end_point</name>
+    <message>
+      <source>Attribute "%1" is locked by modification value in the viewer.</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Attribute "%1" is not initialized.</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>End point</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:major_axis_point</name>
+    <message>
+      <source>Attribute "%1" is locked by modification value in the viewer.</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Attribute "%1" is not initialized.</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Major axis point</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:major_radius</name>
+    <message>
+      <source>Major radius</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Set major radius</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:major_radius:GeomValidators_Positive</name>
+    <message>
+      <source>Double is not initialized.</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:minor_radius</name>
+    <message>
+      <source>Minor radius</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Set minor radius</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:minor_radius:GeomValidators_Positive</name>
+    <message>
+      <source>Double is not initialized.</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>SketchMacroEllipticArc:start_point</name>
+    <message>
+      <source>Attribute "%1" is locked by modification value in the viewer.</source>
+      <translation>AA</translation>
+    </message>
+    <message>
+      <source>Start point</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+  <context>
+    <name>workshop</name>
+    <message>
+      <source>Elliptic arc</source>
+      <translation>AA</translation>
+    </message>
+  </context>
+
   <context>
     <name>SketchMultiRotation</name>
     <message>
index fe1f4e2a1204f00a4229b3478a6831b1c71b9241..f877ecd8779916b44a4d84d8521d50a68770ac34 100644 (file)
 
       <!-- SketchEllipticArc is a hidden feature. It is created inside SketchMacroEllipse. -->
       <feature id="SketchEllipticArc"
-               title="Elliptic Arc"
+               title="Elliptic arc"
                tooltip="Create elliptic arc"
                icon="icons/Sketch/elliptic_arc.png"
                internal="1">
       <!-- SketchMacroEllipticArc -->
       <feature id="SketchMacroEllipticArc"
                icon="icons/Sketch/elliptic_arc.png"
-               title="Elliptical arc"
-               tooltip="Create elliptical arc"
+               title="Elliptic arc"
+               tooltip="Create elliptic arc"
                helpfile="ellipseFeature.html">
         <sketch-2dpoint_selector id="center"
                                  reference_attribute="center_ref"
index 26419160333086bc08383a9fdfcb2aa0da910f45..b4e0056e2564c2e9c1c03457fc42c1d3464737ec 100644 (file)
@@ -52,7 +52,7 @@ enum SketchSolver_EntityType {
   ENTITY_CIRCLE,
   ENTITY_ARC,
   ENTITY_ELLIPSE,
-  ENTITY_ELLIPTICAL_ARC
+  ENTITY_ELLIPTIC_ARC
 };
 
 /// Types of constraints
index 3a7aa0cb420dbba3d96e996e16a71dca50cf0fc2..f9683203880051e28acbc8a99d0e71ef8d4cf014 100644 (file)
@@ -56,7 +56,7 @@ PlaneGCSSolver_EdgeWrapper::PlaneGCSSolver_EdgeWrapper(const GCSCurvePtr theEnti
   else if (isCircle(myEntity))
     myType = ENTITY_CIRCLE;
   else if (isEllipticArc(myEntity))
-    myType = ENTITY_ELLIPTICAL_ARC;
+    myType = ENTITY_ELLIPTIC_ARC;
   else if (isEllipse(myEntity))
     myType = ENTITY_ELLIPSE;
 }
@@ -94,7 +94,7 @@ bool PlaneGCSSolver_EdgeWrapper::isDegenerated() const
     std::shared_ptr<GCS::Ellipse> anEllipse = std::dynamic_pointer_cast<GCS::Ellipse>(myEntity);
     return *anEllipse->radmin < tolerance || anEllipse->getRadMaj() > THE_MAX_RADIUS;
   }
-  else if (myType == ENTITY_ELLIPTICAL_ARC) {
+  else if (myType == ENTITY_ELLIPTIC_ARC) {
     std::shared_ptr<GCS::ArcOfEllipse> anArc =
         std::dynamic_pointer_cast<GCS::ArcOfEllipse>(myEntity);
     double anAngleDiff = fabs(*anArc->startAngle - *anArc->endAngle);
index 2aff74fb48d75062aa6140be07144d1554ff2181..4a9ae8a5af537c4208e7d1b1afc7f0bc731ea401 100644 (file)
@@ -422,7 +422,7 @@ void PlaneGCSSolver_Storage::createAuxiliaryConstraints(const EntityWrapperPtr&
     createArcConstraints(theEntity, mySketchSolver, ++myConstraintLastID, myAuxConstraintMap);
   else if (theEntity->type() == ENTITY_ELLIPSE)
     createEllipseConstraints(theEntity, mySketchSolver, ++myConstraintLastID, myAuxConstraintMap);
-  else if (theEntity->type() == ENTITY_ELLIPTICAL_ARC) {
+  else if (theEntity->type() == ENTITY_ELLIPTIC_ARC) {
     createEllipticArcConstraints(theEntity, mySketchSolver,
                                  ++myConstraintLastID, myAuxConstraintMap);
   }
index cfa195c5ca3eb616029048513879c090f5388442..eafa686c47620bee46177f3dd8d7568fbf534955 100644 (file)
@@ -113,7 +113,7 @@ private:
 private:
   ConstraintID myConstraintLastID;   ///< identifier of last added constraint
 
-  /// additional constraints for correct processing of the arcs, ellipses, elliptical arcs
+  /// additional constraints for correct processing of the arcs, ellipses, elliptic arcs
   std::map<EntityWrapperPtr, ConstraintWrapperPtr> myAuxConstraintMap;
 
   /// list of removed constraints to notify solver
index 461ae688522325a98afd8801335ccc5556fa0b6a..39b78af57729a6933fb2eeb26289073e9d670456 100644 (file)
@@ -306,7 +306,7 @@ std::shared_ptr<GeomAPI_Circ2d> PlaneGCSSolver_Tools::circle(EntityWrapperPtr th
 
 std::shared_ptr<GeomAPI_Ellipse2d> PlaneGCSSolver_Tools::ellipse(EntityWrapperPtr theEntity)
 {
-  if (theEntity->type() != ENTITY_ELLIPSE && theEntity->type() != ENTITY_ELLIPTICAL_ARC)
+  if (theEntity->type() != ENTITY_ELLIPSE && theEntity->type() != ENTITY_ELLIPTIC_ARC)
     return std::shared_ptr<GeomAPI_Ellipse2d>();
 
   std::shared_ptr<PlaneGCSSolver_EdgeWrapper> anEntity =
@@ -349,7 +349,7 @@ void PlaneGCSSolver_Tools::recalculateArcParameters(EntityWrapperPtr theArc)
 
     OX.reset(new GeomAPI_Dir2d(1.0, 0.0));
   }
-  else if (anEdge->type() == ENTITY_ELLIPTICAL_ARC) {
+  else if (anEdge->type() == ENTITY_ELLIPTIC_ARC) {
     std::shared_ptr<GCS::ArcOfEllipse> aEllArc =
         std::dynamic_pointer_cast<GCS::ArcOfEllipse>(anEdge->entity());
 
@@ -390,7 +390,7 @@ GCS::SET_pD PlaneGCSSolver_Tools::parameters(const EntityWrapperPtr& theEntity)
     return arcParameters(GCS_EDGE_WRAPPER(theEntity));
   case ENTITY_ELLIPSE:
     return ellipseParameters(GCS_EDGE_WRAPPER(theEntity));
-  case ENTITY_ELLIPTICAL_ARC:
+  case ENTITY_ELLIPTIC_ARC:
     return ellipticArcParameters(GCS_EDGE_WRAPPER(theEntity));
   default: break;
   }
@@ -443,7 +443,7 @@ ConstraintWrapperPtr createConstraintPointOnEntity(
     break;
     }
   case ENTITY_ELLIPSE:
-  case ENTITY_ELLIPTICAL_ARC: {
+  case ENTITY_ELLIPTIC_ARC: {
     std::shared_ptr<GCS::Ellipse> anEllipse =
         std::dynamic_pointer_cast<GCS::Ellipse>(theEntity->entity());
     aNewConstr = GCSConstraintPtr(
index 31fcca4a31826cc3d1c0c0f942093da095d9790c..8d3bab21b74ccb56d75e2d8dcf4d6a6ef3c3b38d 100644 (file)
@@ -51,7 +51,7 @@ void SketchSolver_ConstraintEqual::getAttributes(
       ++aNbArcs;
       isArcFirst = (aNbLines == 0);
     }
-    else if (aType == ENTITY_ELLIPSE || aType == ENTITY_ELLIPTICAL_ARC)
+    else if (aType == ENTITY_ELLIPSE || aType == ENTITY_ELLIPTIC_ARC)
       ++aNbEllipses;
   }
 
index 7e7c6aab1c27e8b302aa0d82cfcc78b65d5c6f24..a32e1966f49a200ca6016081b1c8e071062ab166 100644 (file)
@@ -151,7 +151,7 @@ GCS::VEC_pD toParameters(const EntityWrapperPtr& theEntity)
     aParameters.push_back(anEllipse->radmin);
     break;
     }
-  case ENTITY_ELLIPTICAL_ARC: {
+  case ENTITY_ELLIPTIC_ARC: {
     std::shared_ptr<GCS::ArcOfEllipse> anEllArc =
         std::dynamic_pointer_cast<GCS::ArcOfEllipse>(anEntity->entity());
     aParameters.push_back(anEllArc->center.x);
index e4a59127b81d81d5abbe68455087dbb11f401a77..8e38fa6b8303487f7acead82f677d97b0c9b0660 100644 (file)
@@ -136,8 +136,8 @@ ConstraintWrapperPtr SketchSolver_ConstraintMovement::initMovement()
       // arc or circle has been moved
       aConstraint = fixPointOnCircle(anEntity);
     }
-    else if (anEntity->type() == ENTITY_ELLIPSE || anEntity->type() == ENTITY_ELLIPTICAL_ARC) {
-      // ellipse or elliptical arc has been moved
+    else if (anEntity->type() == ENTITY_ELLIPSE || anEntity->type() == ENTITY_ELLIPTIC_ARC) {
+      // ellipse or elliptic arc has been moved
       aConstraint = fixPointOnEllipse(anEntity);
     }
   }
index 4d14eb42d771d1231a41d285e8b8d3462d70fbf1..bfbe1f1ed644f2fc442e11ef918c4cd33275ebcc 100644 (file)
@@ -69,7 +69,7 @@ protected:
   /// \brief Create constraint to fix moved point on circle/arc
   ConstraintWrapperPtr fixPointOnCircle(const EntityWrapperPtr& theCircular);
 
-  /// \brief Create constraint to fix moved point on ellipse/elliptical arc
+  /// \brief Create constraint to fix moved point on ellipse/elliptic arc
   ConstraintWrapperPtr fixPointOnEllipse(const EntityWrapperPtr& theConic);
 
 private:
index 16e6d11da200fd6d0c8acb959b7460cb417fa4b7..c54b01e91608855b7f2d3f855fa9e346ddec4c5e 100644 (file)
@@ -127,7 +127,7 @@ void SketchSolver_ConstraintTangent::rebuild()
       ++aNbLines;
     else if ((*anEntIt)->type() == ENTITY_ARC || (*anEntIt)->type() == ENTITY_CIRCLE)
       ++aNbCircles;
-    else if ((*anEntIt)->type() == ENTITY_ELLIPSE || (*anEntIt)->type() == ENTITY_ELLIPTICAL_ARC)
+    else if ((*anEntIt)->type() == ENTITY_ELLIPSE || (*anEntIt)->type() == ENTITY_ELLIPTIC_ARC)
       ++aNbEllipses;
   }
 
@@ -521,7 +521,7 @@ void calculateTangencyPoint(EntityWrapperPtr theCurve1, EntityWrapperPtr theCurv
     std::shared_ptr<GeomAPI_Circ2d> aCircle = PlaneGCSSolver_Tools::circle(aCurve2);
     anEllipse->distance(aCircle, aP1, aP2);
   }
-  else if (aCurve2->type() == ENTITY_ELLIPSE || aCurve2->type() == ENTITY_ELLIPTICAL_ARC) {
+  else if (aCurve2->type() == ENTITY_ELLIPSE || aCurve2->type() == ENTITY_ELLIPTIC_ARC) {
     std::shared_ptr<GeomAPI_Ellipse2d> anEl2 = PlaneGCSSolver_Tools::ellipse(aCurve2);
     anEllipse->distance(anEl2, aP1, aP2);
   }