X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAlgoAPI%2FGeomAlgoAPI_ShapeAPI.h;h=bbabbf9027dd2653d79f640ef0c3454178219312;hb=6ebb9744bc16a770e3189b691632a32f25a09f92;hp=e016a3c942bcd87367fc9953b4f04c770e7c94db;hpb=423c10234142d14d0d5de89383f2f96a4ec5930f;p=modules%2Fshaper.git diff --git a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h index e016a3c94..bbabbf902 100644 --- a/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h +++ b/src/GeomAlgoAPI/GeomAlgoAPI_ShapeAPI.h @@ -7,9 +7,11 @@ #ifndef GEOMALGOAPI_SHAPEAPI_H #define GEOMALGOAPI_SHAPEAPI_H -#include -#include +#include +#include #include +#include +#include #include @@ -36,6 +38,117 @@ public: /// \return a shape static std::shared_ptr makeBox(std::shared_ptr theFirstPoint, std::shared_ptr theSecondPoint) throw (GeomAlgoAPI_Exception); + + /// Creates a cylinder using a center, an axis, a radius and a height. + /// \param theBasePoint The center of the lower base of the cylinder + /// \param theEdge The axis of the cylinder + /// \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); + + /// 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 + /// \param theEdge The axis of the cylinder + /// \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(std::shared_ptr theBasePoint, + std::shared_ptr theEdge, double theRadius, double theHeight, + double theAngle) throw (GeomAlgoAPI_Exception); + + /// 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); + + /// 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); + + /// Performs a translation from an axis and a distance. + /// \param theSourceShape Shape to be moved + /// \param theAxis Movement axis + /// \param theDistance Movement distance + /// \return a shape + static std::shared_ptr makeTranslation( + std::shared_ptr theSourceShape, + std::shared_ptr theAxis, + const double theDistance) throw (GeomAlgoAPI_Exception); + + /// Performs a translation from dimensions. + /// \param theSourceShape Shape to be moved + /// \param theDx Movement dimension on X + /// \param theDy Movement dimension on Y + /// \param theDz Movement dimension on Z + /// \return a shape + static std::shared_ptr makeTranslation( + std::shared_ptr theSourceShape, + const double theDx, + const double theDy, + const double theDz) throw (GeomAlgoAPI_Exception); + + /// Performs a translation from two points. + /// \param theSourceShape Shape to be moved + /// \param theStartPoint Movement start point + /// \param theEndPoint Movement end point + /// \return a shape + static std::shared_ptr makeTranslation( + std::shared_ptr theSourceShape, + std::shared_ptr theStartPoint, + std::shared_ptr theEndPoint) throw (GeomAlgoAPI_Exception); + + /// 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); + + /// 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); + + /// 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); + + /// Performs a scale by a scale factor. + /// \param theSourceShape Shape be scaled + /// \param theCenterPoint Point of scale + /// \param theScaleFactor Factor of scale + static std::shared_ptr makeScale( + std::shared_ptr theSourceShape, + std::shared_ptr theCenterPoint, + const double theScaleFactor) 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 + /// \param theRMin2 Inner radius at top of cone + /// \param theRMax2 Outer radius at top of cone + /// \param theZ Height of cone segment + /// \param theStartPhi Start angle of the segment + /// \param theDeltaPhi Angle of the segment + static std::shared_ptr makeConeSegment( + const double theRMin1, + const double theRMax1, + const double theRMin2, + const double theRMax2, + const double theZ, + const double theStartPhi, + const double theDeltaPhi) throw (GeomAlgoAPI_Exception); }; } #endif