Salome HOME
Update SketchPlugin_Projection feature (issue #1459)
[modules/shaper.git] / src / GeomAPI / GeomAPI_Circ.cpp
index dca0897977df88670c05901bb2d102540c16f65f..c7c4573f0df838d72e73172cc011f5321613762e 100644 (file)
@@ -92,3 +92,11 @@ const bool GeomAPI_Circ::parameter(const std::shared_ptr<GeomAPI_Pnt> thePoint,
   Handle(Geom_Circle) aCurve = new Geom_Circle(*MY_CIRC);
   return GeomLib_Tool::Parameter(aCurve, thePoint->impl<gp_Pnt>(), theTolerance, theParameter) == Standard_True;
 }
+
+//=================================================================================================
+std::shared_ptr<GeomAPI_Dir> GeomAPI_Circ::normal() const
+{
+  const gp_Ax1& anAxis = MY_CIRC->Axis();
+  const gp_Dir& aDir = anAxis.Direction();
+  return std::shared_ptr<GeomAPI_Dir>(new GeomAPI_Dir(aDir.X(), aDir.Y(), aDir.Z()));
+}