1 // Copyright (C) 2014-2016 CEA/DEN, EDF R&D
3 // File: GeomAlgoAPI_ShapeAPI.h
4 // Created: 17 Mar 2016
5 // Author: Clarisse Genrault (CEA)
7 #ifndef GEOMALGOAPI_SHAPEAPI_H
8 #define GEOMALGOAPI_SHAPEAPI_H
10 #include <GeomAPI_Ax1.h>
11 #include <GeomAPI_Edge.h>
12 #include <GeomAPI_Pnt.h>
13 #include <GeomAPI_Shape.h>
15 #include <GeomAlgoAPI_Exception.h>
17 namespace GeomAlgoAPI_ShapeAPI
19 /**\class GeomAlgoAPI_ShapeAPI
21 * \brief Allows to access the direct API
23 class GEOMALGOAPI_EXPORT GeomAlgoAPI_ShapeAPI
26 /// Creates a box using the dimensions.
27 /// \param theDx The dimension on X
28 /// \param theDy The dimension on Y
29 /// \param theDz The dimension on Z
31 static std::shared_ptr<GeomAPI_Shape> makeBox(const double theDx, const double theDy,
32 const double theDz) throw (GeomAlgoAPI_Exception);
34 /// Creates a box using the two points that defined a diagonal.
35 /// \param theFirstPoint One extermity of the diagonal
36 /// \param theSecondPoint The other extremity of the diagonal
38 static std::shared_ptr<GeomAPI_Shape> makeBox(std::shared_ptr<GeomAPI_Pnt> theFirstPoint,
39 std::shared_ptr<GeomAPI_Pnt> theSecondPoint) throw (GeomAlgoAPI_Exception);
41 /// Performs a translation from an axis and a distance.
42 /// \param theSourceShape Shape to be moved.
43 /// \param theAxis Movement axis.
44 /// \param theDistance Movement distance.
46 static std::shared_ptr<GeomAPI_Shape> makeTranslation(
47 std::shared_ptr<GeomAPI_Shape> theSourceShape,
48 std::shared_ptr<GeomAPI_Ax1> theAxis,
49 const double theDistance) throw (GeomAlgoAPI_Exception);
51 /// Performs a translation from dimensions.
52 /// \param theSourceShape Shape to be moved.
53 /// \param theDx Movement dimension on X.
54 /// \param theDy Movement dimension on Y.
55 /// \param theDz Movement dimension on Z.
57 static std::shared_ptr<GeomAPI_Shape> makeTranslation(
58 std::shared_ptr<GeomAPI_Shape> theSourceShape,
61 const double theDz) throw (GeomAlgoAPI_Exception);