-// Copyright (C) 2016-20xx CEA/DEN, EDF R&D
-
-// File: GeomAPI_Angle.h
-// Created: 19 April 2016
-// Author: Artem ZHIDKOV
+// Copyright (C) 2018-2019 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
#ifndef GeomAPI_Angle_H_
#define GeomAPI_Angle_H_
#include <GeomAPI_Interface.h>
-class GeomAPI_Lin;
+class GeomAPI_Edge;
class GeomAPI_Pnt;
/// \class GeomAPI_Angle
/// \ingroup DataModel
-/// \brief Build an angle in 3D
+/// \brief Build an angle
class GeomAPI_Angle : public GeomAPI_Interface
{
public:
- /// Creation of an angle defined by two lines' start, end points
- GEOMAPI_EXPORT
- GeomAPI_Angle(const std::shared_ptr<GeomAPI_Pnt>& theStartLine1,
- const std::shared_ptr<GeomAPI_Pnt>& theEndLine1,
- const std::shared_ptr<GeomAPI_Pnt>& theStartLine2,
- const std::shared_ptr<GeomAPI_Pnt>& theEndLine2);
- /// Creation of an angle defined by two lines taking into account their orientation
- GEOMAPI_EXPORT
- GeomAPI_Angle(const std::shared_ptr<GeomAPI_Lin>& theLine1, bool theReversed1,
- const std::shared_ptr<GeomAPI_Lin>& theLine2, bool theReversed2);
- /// Creation of an angle defined by three points
+ /// Creation of an angle defined by two edges in the given intersection point.
GEOMAPI_EXPORT
- GeomAPI_Angle(const std::shared_ptr<GeomAPI_Pnt>& theCenter,
- const std::shared_ptr<GeomAPI_Pnt>& thePoint1,
- const std::shared_ptr<GeomAPI_Pnt>& thePoint2);
+ GeomAPI_Angle(const std::shared_ptr<GeomAPI_Edge>& theEdge1,
+ const std::shared_ptr<GeomAPI_Edge>& theEdge2,
+ const std::shared_ptr<GeomAPI_Pnt>& thePoint);
- /// Returns central point of the angle
- GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> center();
- /// Returns point on the first edge
- GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> firstPoint();
- /// Returns point on the second edge
- GEOMAPI_EXPORT std::shared_ptr<GeomAPI_Pnt> secondPoint();
+ /// Creation of an angle defined by 3 points (the second point is an apex of an angle).
+ GEOMAPI_EXPORT
+ GeomAPI_Angle(const std::shared_ptr<GeomAPI_Pnt>& thePoint1,
+ const std::shared_ptr<GeomAPI_Pnt>& thePoint2,
+ const std::shared_ptr<GeomAPI_Pnt>& thePoint3);
/// Returns value of the angle in degrees
GEOMAPI_EXPORT double angleDegree();
/// Returns value of the angle in radians
GEOMAPI_EXPORT double angleRadian();
-
- /// Returns \c true if the line is reversed during angle calculation.
- /// If theIndex = 0, the result corresponds to the first line, if theIndex = 1, the to the second line
- GEOMAPI_EXPORT bool isReversed(int theIndex);
};
#endif
-