X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_ShapeAPI.h;h=bbf98d40ebc16938b2c494c609f986665cd5ddf2;hb=77ce6d35ac8d2f0fdaecb4f23e0870bf74e36103;hp=22b57629d5a08bd3cd4756cc76d0e4819877a550;hpb=a94fc319f2aa64b43c9a73b5ff7063923648faec;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h index 22b57629d..bbf98d40e 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-2024 CEA, EDF // // 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 @@ -29,6 +28,10 @@ #include +#ifdef WIN32 +#pragma warning(disable : 4290) +#endif + namespace GeomAlgoAPI_ShapeAPI { /**\class GeomAlgoAPI_ShapeAPI @@ -44,14 +47,14 @@ public: /// \param theDz The dimension on Z /// \return a shape static std::shared_ptr makeBox(const double theDx, const double theDy, - const double theDz) throw (GeomAlgoAPI_Exception); + const double theDz); /// Creates a box using the two points that defined a diagonal. /// \param theFirstPoint One extermity of the diagonal /// \param theSecondPoint The other extremity of the diagonal /// \return a shape static std::shared_ptr makeBox(std::shared_ptr theFirstPoint, - std::shared_ptr theSecondPoint) throw (GeomAlgoAPI_Exception); + std::shared_ptr theSecondPoint); /// Creates a cylinder using a center, an axis, a radius and a height. /// \param theBasePoint The center of the lower base of the cylinder @@ -59,8 +62,7 @@ public: /// \param theRadius The radius of the cylinder /// \param theHeight The heigth of the cylinder static std::shared_ptr makeCylinder(std::shared_ptr theBasePoint, - std::shared_ptr theEdge, double theRadius, double theHeight) - throw (GeomAlgoAPI_Exception); + std::shared_ptr theEdge, double theRadius, double theHeight); /// Creates a portion of cylinder using a center, an axis, a radius, a height and an angle. /// \param theBasePoint The center of the lower base of the cylinder @@ -70,20 +72,59 @@ public: /// \param theAngle The angle defining the portion static std::shared_ptr makeCylinder(std::shared_ptr theBasePoint, std::shared_ptr theEdge, double theRadius, double theHeight, - double theAngle) throw (GeomAlgoAPI_Exception); + double theAngle); /// Creates a cylinder using the origin, the OZ axis, a radius and a height. /// \param theRadius The radius of the cylinder /// \param theHeight The heigth of the cylinder - static std::shared_ptr makeCylinder(double theRadius, double theHeight) - throw (GeomAlgoAPI_Exception); + static std::shared_ptr makeCylinder(double theRadius, double theHeight); /// Creates a portion of cylinder using the origin, the OZ axis, a radius, a height and an angle. /// \param theRadius The radius of the cylinder /// \param theHeight The heigth of the cylinder /// \param theAngle The angle defining the portion static std::shared_ptr makeCylinder(double theRadius, double theHeight, - double theAngle) throw (GeomAlgoAPI_Exception); + double theAngle); + + /// 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); + + /// Creates a sphere using the origin and a radius. + /// \param theRadius The radius of the sphere + static std::shared_ptr makeSphere(double theRadius); + + /// 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); + + /// 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); + + /// 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); + + /// 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); /// Performs a translation from an axis and a distance. /// \param theSourceShape Shape to be moved @@ -93,7 +134,7 @@ public: static std::shared_ptr makeTranslation( std::shared_ptr theSourceShape, std::shared_ptr theAxis, - const double theDistance) throw (GeomAlgoAPI_Exception); + const double theDistance); /// Performs a translation from dimensions. /// \param theSourceShape Shape to be moved @@ -105,7 +146,7 @@ public: std::shared_ptr theSourceShape, const double theDx, const double theDy, - const double theDz) throw (GeomAlgoAPI_Exception); + const double theDz); /// Performs a translation from two points. /// \param theSourceShape Shape to be moved @@ -115,7 +156,7 @@ public: static std::shared_ptr makeTranslation( std::shared_ptr theSourceShape, std::shared_ptr theStartPoint, - std::shared_ptr theEndPoint) throw (GeomAlgoAPI_Exception); + std::shared_ptr theEndPoint); /// Performs a rotation from an axis and an angle. /// \param theSourceShape Shape to be rotated @@ -125,7 +166,7 @@ public: static std::shared_ptr makeRotation( std::shared_ptr theSourceShape, std::shared_ptr theAxis, - const double theAngle) throw (GeomAlgoAPI_Exception); + const double theAngle); /// Performs a rotation from three points. /// \param theSourceShape Shape to be rotated @@ -137,28 +178,28 @@ public: std::shared_ptr theSourceShape, std::shared_ptr theCenterPoint, std::shared_ptr theStartPoint, - std::shared_ptr theEndPoint) throw (GeomAlgoAPI_Exception); + std::shared_ptr theEndPoint); /// Performs a symmetry by a point. /// \param theSourceShape Shape be symmetrized /// \param thePoint Point of symmetry static std::shared_ptr makeSymmetry( std::shared_ptr theSourceShape, - std::shared_ptr thePoint) throw (GeomAlgoAPI_Exception); + std::shared_ptr thePoint); /// Performs a symmetry by an axis. /// \param theSourceShape Shape be symmetrized /// \param theAxis Axis of symmetry static std::shared_ptr makeSymmetry( std::shared_ptr theSourceShape, - std::shared_ptr theAxis) throw (GeomAlgoAPI_Exception); + std::shared_ptr theAxis); /// Performs a symmetry by a plane. /// \param theSourceShape Shape be symmetrized /// \param thePlane Plane of symmetry static std::shared_ptr makeSymmetry( std::shared_ptr theSourceShape, - std::shared_ptr thePlane) throw (GeomAlgoAPI_Exception); + std::shared_ptr thePlane); /// Performs a scale by a scale factor. /// \param theSourceShape Shape be scaled @@ -167,7 +208,7 @@ public: static std::shared_ptr makeScale( std::shared_ptr theSourceShape, std::shared_ptr theCenterPoint, - const double theScaleFactor) throw (GeomAlgoAPI_Exception); + const double theScaleFactor); /// Performs a scale by dimensions. /// \param theSourceShape Shape be scaled @@ -180,7 +221,7 @@ public: std::shared_ptr theCenterPoint, const double theScaleFactorX, const double theScaleFactorY, - const double theScaleFactorZ) throw (GeomAlgoAPI_Exception); + const double theScaleFactorZ); /// Performs a multi translation along one axis, at a distance and a number of times /// \param theSourceShape Shape to be moved @@ -192,7 +233,7 @@ public: std::shared_ptr theSourceShape, std::shared_ptr theAxis, const double theStep, - const int theNumber) throw (GeomAlgoAPI_Exception); + const int theNumber); /// Performs a multi translation along two axis : a different distance on each axis /// and a different number of times for each axis @@ -211,7 +252,27 @@ public: const int theFirstNumber, std::shared_ptr theSecondAxis, const double theSecondStep, - const int theSecondNumber) throw (GeomAlgoAPI_Exception); + const int theSecondNumber); + + /// 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); + + /// 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); /// Creates a cone segment using standard GDML parameters. /// \param theRMin1 Inner radius at base of cone @@ -228,7 +289,7 @@ public: const double theRMax2, const double theZ, const double theStartPhi, - const double theDeltaPhi) throw (GeomAlgoAPI_Exception); + const double theDeltaPhi); }; } #endif