X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Circ.cpp;h=c7c4573f0df838d72e73172cc011f5321613762e;hb=73502ac782ffc45a3acf665ded34f582b07ec4d5;hp=56a7b6d024a45ec1df6874142b62cd71829b54fe;hpb=caf028355772b8ed5cd35a400a879d009df7968b;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Circ.cpp b/src/GeomAPI/GeomAPI_Circ.cpp index 56a7b6d02..c7c4573f0 100644 --- a/src/GeomAPI/GeomAPI_Circ.cpp +++ b/src/GeomAPI/GeomAPI_Circ.cpp @@ -90,5 +90,13 @@ const bool GeomAPI_Circ::parameter(const std::shared_ptr thePoint, double& theParameter) const { Handle(Geom_Circle) aCurve = new Geom_Circle(*MY_CIRC); - return GeomLib_Tool::Parameter(aCurve, thePoint->impl(), theTolerance, theParameter); + return GeomLib_Tool::Parameter(aCurve, thePoint->impl(), theTolerance, theParameter) == Standard_True; +} + +//================================================================================================= +std::shared_ptr GeomAPI_Circ::normal() const +{ + const gp_Ax1& anAxis = MY_CIRC->Axis(); + const gp_Dir& aDir = anAxis.Direction(); + return std::shared_ptr(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z())); }