X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_Curve.h;h=70bafd8299240d441fea44ac9f4d8de6a0a73b2c;hb=23119d0e90b60ad1157658b29a23052f7c13d0c3;hp=f09f1d375e22af89b48a0d4c43dfda11b9002126;hpb=4783f146b71a48c651523fcf0e12367bcf3d1fa8;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_Curve.h b/src/GeomAPI/GeomAPI_Curve.h index f09f1d375..70bafd829 100644 --- a/src/GeomAPI/GeomAPI_Curve.h +++ b/src/GeomAPI/GeomAPI_Curve.h @@ -1,6 +1,22 @@ -// File: GeomAPI_Curve.hxx -// Created: 04 Sep 2014 -// Author: Mikhail PONIKAROV +// Copyright (C) 2014-2017 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_Curve_H_ #define GeomAPI_Curve_H_ @@ -8,29 +24,55 @@ #include #include +class GeomAPI_Pnt; + /**\class GeomAPI_Curve * \ingroup DataModel * \brief Interface to the generic curve object */ -class GEOMAPI_EXPORT GeomAPI_Curve : public GeomAPI_Interface +class GeomAPI_Curve : public GeomAPI_Interface { public: /// Creation of empty (null) shape + GEOMAPI_EXPORT GeomAPI_Curve(); /// Creates a curve from the shape (edge) + GEOMAPI_EXPORT GeomAPI_Curve(const std::shared_ptr& theShape); /// Returns true if curve is not initialized + GEOMAPI_EXPORT bool isNull() const; /// Returns whether the curve is linear + GEOMAPI_EXPORT virtual bool isLine() const; /// Returns whether the curve is circular + GEOMAPI_EXPORT virtual bool isCircle() const; + /// Returns start parameter of the curve + GEOMAPI_EXPORT + double startParam() const { return myStart; } + + /// Returns end parameter of the curve + GEOMAPI_EXPORT + double endParam() const { return myEnd; } + + /// Returns point on the curve by parameter + /// \param theParam parameter on the curve + GEOMAPI_EXPORT + std::shared_ptr getPoint(double theParam); + +private: + double myStart; + double myEnd; }; +//! Pointer on the object +typedef std::shared_ptr GeomCurvePtr; + #endif