X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_ShapeAPI.h;h=fe1f86f2b54b8aa4bdbff503ecd8ccf5a105248a;hb=d5d78920316491975a67f76578982b401cdfe71d;hp=22b57629d5a08bd3cd4756cc76d0e4819877a550;hpb=87b6a30a3afb8fb32e7e43ade8d9c947d9eb1684;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h index 22b57629d..fe1f86f2b 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2017 CEA/DEN, EDF R&D +// Copyright (C) 2014-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 @@ -12,10 +12,9 @@ // // 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 +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or -// email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // #ifndef GEOMALGOAPI_SHAPEAPI_H @@ -85,6 +84,49 @@ public: static std::shared_ptr makeCylinder(double theRadius, double theHeight, double theAngle) throw (GeomAlgoAPI_Exception); + /// Creates a sphere using a center and a radius. + /// \param theCenterPoint The center of the sphere + /// \param theRadius The radius of the sphere + static std::shared_ptr makeSphere(std::shared_ptr theCenterPoint, + double theRadius) throw (GeomAlgoAPI_Exception); + + /// Creates a sphere using the origin and a radius. + /// \param theRadius The radius of the sphere + static std::shared_ptr makeSphere(double theRadius) + throw (GeomAlgoAPI_Exception); + + /// Creates a torus using a base point, an axis, a radius and a ring radius. + /// \param theBasePoint The center of the torus + /// \param theEdge The axis of the torus + /// \param theRadius The radius of the torus + /// \param theRingRadius The ring radius of the torus + static std::shared_ptr makeTorus(std::shared_ptr theBasePoint, + std::shared_ptr theEdge, double theRadius, double theRingRadius) + throw (GeomAlgoAPI_Exception); + + /// Creates a torus using a radius and a ring radius. + /// \param theRadius The radius of the torus + /// \param theRingRadius The ring radius of the torus + static std::shared_ptr makeTorus(double theRadius, double theRingRadius) + throw (GeomAlgoAPI_Exception); + + /// Creates a cone using a base point, an axis, a base radius, a top radius and a height. + /// \param theBasePoint The center of the lower base of the cone + /// \param theEdge The axis of the cone + /// \param theBaseRadius The base radius of the cone + /// \param theTopRadius The top radius of the cone + /// \param theHeight The height of the cone + static std::shared_ptr makeCone(std::shared_ptr theBasePoint, + std::shared_ptr theEdge, double theBaseRadius, + double theTopRadius, double theHeight) throw (GeomAlgoAPI_Exception); + + /// Creates a cone using a base radius, a top radius and a height. + /// \param theBaseRadius The base radius of the cone + /// \param theTopRadius The top radius of the cone + /// \param theHeight The height of the cone + static std::shared_ptr makeCone(double theBaseRadius, double theTopRadius, + double theHeight) throw (GeomAlgoAPI_Exception); + /// Performs a translation from an axis and a distance. /// \param theSourceShape Shape to be moved /// \param theAxis Movement axis @@ -213,6 +255,26 @@ public: const double theSecondStep, const int theSecondNumber) throw (GeomAlgoAPI_Exception); + /// Performs a multi rotation along one axis and a number of times + /// \param[in] theSourceShape Shape to be rotated + /// \param[in] theAxis Axis for the rotation + /// \param[in] theNumber Number of copies + static std::shared_ptr makeMultiRotation( + std::shared_ptr theSourceShape, + std::shared_ptr theAxis, + const int theNumber) throw (GeomAlgoAPI_Exception); + + /// Performs a multi rotation along one axis, at a step and a number of times + /// \param theSourceShape Shape to be moved + /// \param[in] theAxis Axis for the rotation + /// \param[in] theStep Angle for each rotation + /// \param[in] theNumber Number of copies + static std::shared_ptr makeMultiRotation( + std::shared_ptr theSourceShape, + std::shared_ptr theAxis, + const double theStep, + const int theNumber) throw (GeomAlgoAPI_Exception); + /// Creates a cone segment using standard GDML parameters. /// \param theRMin1 Inner radius at base of cone /// \param theRMax1 Outer radius at base of cone