Salome HOME
Task 2.12. New entities: ellipses and arcs of ellipses (issue #3003)
[modules/shaper.git] / src / GeomAPI / GeomAPI_Ellipse.cpp
index 86a0391cb87990d1406ba34be886cb46b8666644..75a25477cf7474d90e148a6f8412a52696d697a8 100644 (file)
@@ -41,7 +41,8 @@ GeomAPI_Ellipse::GeomAPI_Ellipse(const std::shared_ptr<GeomAPI_Ax2>& theAx2,
 
 GeomAPI_Ellipse::GeomAPI_Ellipse(GeomCurvePtr theCurve)
 {
-  Handle(Geom_Curve) aCurve = theCurve->impl<Handle(Geom_Curve)>();
+  GeomCurvePtr anUntrimmedCurve = theCurve->basisCurve();
+  Handle(Geom_Curve) aCurve = anUntrimmedCurve->impl<Handle(Geom_Curve)>();
   Handle(Geom_Ellipse) anEllipse = Handle(Geom_Ellipse)::DownCast(aCurve);
   if (anEllipse.IsNull())
     throw Standard_ConstructionError("GeomAPI_Ellipse: Curve is not an ellipse");