Salome HOME
Adding tests for "Box" primitive.
[modules/shaper.git] / src / GeomAlgoAPI / GeomAlgoAPI_ShapeAPI.h
index 5e0ef0ba9e7cc24ba745753a849666b485b6c21d..bbabbf9027dd2653d79f640ef0c3454178219312 100644 (file)
@@ -8,6 +8,7 @@
 #define GEOMALGOAPI_SHAPEAPI_H
 
 #include <GeomAPI_Ax1.h>
+#include <GeomAPI_Ax2.h>
 #include <GeomAPI_Edge.h>
 #include <GeomAPI_Pnt.h>
 #include <GeomAPI_Shape.h>
@@ -38,10 +39,42 @@ public:
   static std::shared_ptr<GeomAPI_Shape> makeBox(std::shared_ptr<GeomAPI_Pnt> theFirstPoint,
                      std::shared_ptr<GeomAPI_Pnt> 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<GeomAPI_Shape> makeCylinder(std::shared_ptr<GeomAPI_Pnt> theBasePoint,
+                     std::shared_ptr<GeomAPI_Edge> 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<GeomAPI_Shape> makeCylinder(std::shared_ptr<GeomAPI_Pnt> theBasePoint,
+                     std::shared_ptr<GeomAPI_Edge> 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<GeomAPI_Shape> 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<GeomAPI_Shape> 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.
+  /// \param theSourceShape Shape to be moved
+  /// \param theAxis Movement axis
+  /// \param theDistance Movement distance
   /// \return a shape
   static std::shared_ptr<GeomAPI_Shape> makeTranslation(
                      std::shared_ptr<GeomAPI_Shape> theSourceShape,
@@ -49,10 +82,10 @@ public:
                      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.
+  /// \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<GeomAPI_Shape> makeTranslation(
                      std::shared_ptr<GeomAPI_Shape> theSourceShape,
@@ -61,14 +94,61 @@ public:
                      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.
+  /// \param theSourceShape Shape to be moved
+  /// \param theStartPoint Movement start point
+  /// \param theEndPoint Movement end point
   /// \return a shape
   static std::shared_ptr<GeomAPI_Shape> makeTranslation(
                      std::shared_ptr<GeomAPI_Shape> theSourceShape,
                      std::shared_ptr<GeomAPI_Pnt>   theStartPoint,
                      std::shared_ptr<GeomAPI_Pnt>   theEndPoint) throw (GeomAlgoAPI_Exception);
+
+  /// Performs a symmetry by a point.
+  /// \param theSourceShape Shape be symmetrized
+  /// \param thePoint Point of symmetry
+  static std::shared_ptr<GeomAPI_Shape> makeSymmetry(
+                     std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                     std::shared_ptr<GeomAPI_Pnt>   thePoint) throw (GeomAlgoAPI_Exception);
+
+  /// Performs a symmetry by an axis.
+  /// \param theSourceShape Shape be symmetrized
+  /// \param theAxis Axis of symmetry
+  static std::shared_ptr<GeomAPI_Shape> makeSymmetry(
+                     std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                     std::shared_ptr<GeomAPI_Ax1>   theAxis) throw (GeomAlgoAPI_Exception);
+
+  /// Performs a symmetry by a plane.
+  /// \param theSourceShape Shape be symmetrized
+  /// \param thePlane Plane of symmetry
+  static std::shared_ptr<GeomAPI_Shape> makeSymmetry(
+                     std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                     std::shared_ptr<GeomAPI_Ax2>   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<GeomAPI_Shape> makeScale(
+                     std::shared_ptr<GeomAPI_Shape> theSourceShape,
+                     std::shared_ptr<GeomAPI_Pnt>   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<GeomAPI_Shape> 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