X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Angle.h;h=678c7510f801486b51eebe027f3dd381399a85eb;hb=b06cf1477fb1ee46d7ae260c234cac5d0000abf2;hp=8d87433519904b43f70e5afeba94cc63c25e1e9f;hpb=87474d56199326bace66da349e9dc2c44e02d3a7;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Angle.h b/src/GeomAPI/GeomAPI_Angle.h index 8d8743351..678c7510f 100644 --- a/src/GeomAPI/GeomAPI_Angle.h +++ b/src/GeomAPI/GeomAPI_Angle.h @@ -1,56 +1,53 @@ -// Copyright (C) 2016-20xx CEA/DEN, EDF R&D - -// File: GeomAPI_Angle.h -// Created: 19 April 2016 -// Author: Artem ZHIDKOV +// Copyright (C) 2018-20xx 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 -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& theStartLine1, - const std::shared_ptr& theEndLine1, - const std::shared_ptr& theStartLine2, - const std::shared_ptr& theEndLine2); - /// Creation of an angle defined by two lines taking into account their orientation - GEOMAPI_EXPORT - GeomAPI_Angle(const std::shared_ptr& theLine1, bool theReversed1, - const std::shared_ptr& 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& theCenter, - const std::shared_ptr& thePoint1, - const std::shared_ptr& thePoint2); + GeomAPI_Angle(const std::shared_ptr& theEdge1, + const std::shared_ptr& theEdge2, + const std::shared_ptr& thePoint); - /// Returns central point of the angle - GEOMAPI_EXPORT std::shared_ptr center(); - /// Returns point on the first edge - GEOMAPI_EXPORT std::shared_ptr firstPoint(); - /// Returns point on the second edge - GEOMAPI_EXPORT std::shared_ptr 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& thePoint1, + const std::shared_ptr& thePoint2, + const std::shared_ptr& 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 -