Salome HOME
Task 2.1. Creation of ellipses and arcs of ellipse.
[modules/shaper.git] / src / GeomAPI / GeomAPI_Ellipse.cpp
index 1eae6445f4e532683b4b5abc36e3ec7d7f3c36ac..2d47a5a6f7a9612d68505f303b05821b8a69bdb3 100644 (file)
@@ -18,6 +18,12 @@ GeomAPI_Ellipse::GeomAPI_Ellipse(const std::shared_ptr<GeomAPI_Ax2>& theAx2,
 {
 }
 
+std::shared_ptr<GeomAPI_Pnt> GeomAPI_Ellipse::center() const
+{
+  const gp_Pnt& aCenter = MY_ELIPS->Location();
+  return std::shared_ptr<GeomAPI_Pnt>(new GeomAPI_Pnt(aCenter.X(), aCenter.Y(), aCenter.Z()));
+}
+
 GeomPointPtr GeomAPI_Ellipse::firstFocus() const
 {
   const gp_Pnt& aFirst = MY_ELIPS->Focus1();