SHAPER  9.12.0
GeomAlgoAPI_ShapeAPI.h
1 // Copyright (C) 2014-2023 CEA, EDF
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef GEOMALGOAPI_SHAPEAPI_H
21 #define GEOMALGOAPI_SHAPEAPI_H
22 
23 #include <GeomAPI_Ax1.h>
24 #include <GeomAPI_Ax2.h>
25 #include <GeomAPI_Edge.h>
26 #include <GeomAPI_Pnt.h>
27 #include <GeomAPI_Shape.h>
28 
29 #include <GeomAlgoAPI_Exception.h>
30 
31 #ifdef WIN32
32 #pragma warning(disable : 4290)
33 #endif
34 
35 namespace GeomAlgoAPI_ShapeAPI
36 {
41 class GEOMALGOAPI_EXPORT GeomAlgoAPI_ShapeAPI
42 {
43 public:
49  static std::shared_ptr<GeomAPI_Shape> makeBox(const double theDx, const double theDy,
50  const double theDz);
51 
56  static std::shared_ptr<GeomAPI_Shape> makeBox(std::shared_ptr<GeomAPI_Pnt> theFirstPoint,
57  std::shared_ptr<GeomAPI_Pnt> theSecondPoint);
58 
64  static std::shared_ptr<GeomAPI_Shape> makeCylinder(std::shared_ptr<GeomAPI_Pnt> theBasePoint,
65  std::shared_ptr<GeomAPI_Edge> theEdge, double theRadius, double theHeight);
66 
73  static std::shared_ptr<GeomAPI_Shape> makeCylinder(std::shared_ptr<GeomAPI_Pnt> theBasePoint,
74  std::shared_ptr<GeomAPI_Edge> theEdge, double theRadius, double theHeight,
75  double theAngle);
76 
80  static std::shared_ptr<GeomAPI_Shape> makeCylinder(double theRadius, double theHeight);
81 
86  static std::shared_ptr<GeomAPI_Shape> makeCylinder(double theRadius, double theHeight,
87  double theAngle);
88 
92  static std::shared_ptr<GeomAPI_Shape> makeSphere(std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
93  double theRadius);
94 
97  static std::shared_ptr<GeomAPI_Shape> makeSphere(double theRadius);
98 
104  static std::shared_ptr<GeomAPI_Shape> makeTorus(std::shared_ptr<GeomAPI_Pnt> theBasePoint,
105  std::shared_ptr<GeomAPI_Edge> theEdge, double theRadius, double theRingRadius);
106 
110  static std::shared_ptr<GeomAPI_Shape> makeTorus(double theRadius, double theRingRadius);
111 
118  static std::shared_ptr<GeomAPI_Shape> makeCone(std::shared_ptr<GeomAPI_Pnt> theBasePoint,
119  std::shared_ptr<GeomAPI_Edge> theEdge, double theBaseRadius,
120  double theTopRadius, double theHeight);
121 
126  static std::shared_ptr<GeomAPI_Shape> makeCone(double theBaseRadius, double theTopRadius,
127  double theHeight);
128 
134  static std::shared_ptr<GeomAPI_Shape> makeTranslation(
135  std::shared_ptr<GeomAPI_Shape> theSourceShape,
136  std::shared_ptr<GeomAPI_Ax1> theAxis,
137  const double theDistance);
138 
145  static std::shared_ptr<GeomAPI_Shape> makeTranslation(
146  std::shared_ptr<GeomAPI_Shape> theSourceShape,
147  const double theDx,
148  const double theDy,
149  const double theDz);
150 
156  static std::shared_ptr<GeomAPI_Shape> makeTranslation(
157  std::shared_ptr<GeomAPI_Shape> theSourceShape,
158  std::shared_ptr<GeomAPI_Pnt> theStartPoint,
159  std::shared_ptr<GeomAPI_Pnt> theEndPoint);
160 
166  static std::shared_ptr<GeomAPI_Shape> makeRotation(
167  std::shared_ptr<GeomAPI_Shape> theSourceShape,
168  std::shared_ptr<GeomAPI_Ax1> theAxis,
169  const double theAngle);
170 
177  static std::shared_ptr<GeomAPI_Shape> makeRotation(
178  std::shared_ptr<GeomAPI_Shape> theSourceShape,
179  std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
180  std::shared_ptr<GeomAPI_Pnt> theStartPoint,
181  std::shared_ptr<GeomAPI_Pnt> theEndPoint);
182 
186  static std::shared_ptr<GeomAPI_Shape> makeSymmetry(
187  std::shared_ptr<GeomAPI_Shape> theSourceShape,
188  std::shared_ptr<GeomAPI_Pnt> thePoint);
189 
193  static std::shared_ptr<GeomAPI_Shape> makeSymmetry(
194  std::shared_ptr<GeomAPI_Shape> theSourceShape,
195  std::shared_ptr<GeomAPI_Ax1> theAxis);
196 
200  static std::shared_ptr<GeomAPI_Shape> makeSymmetry(
201  std::shared_ptr<GeomAPI_Shape> theSourceShape,
202  std::shared_ptr<GeomAPI_Ax2> thePlane);
203 
208  static std::shared_ptr<GeomAPI_Shape> makeScale(
209  std::shared_ptr<GeomAPI_Shape> theSourceShape,
210  std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
211  const double theScaleFactor);
212 
219  static std::shared_ptr<GeomAPI_Shape> makeScale(
220  std::shared_ptr<GeomAPI_Shape> theSourceShape,
221  std::shared_ptr<GeomAPI_Pnt> theCenterPoint,
222  const double theScaleFactorX,
223  const double theScaleFactorY,
224  const double theScaleFactorZ);
225 
232  static std::shared_ptr<GeomAPI_Shape> makeMultiTranslation(
233  std::shared_ptr<GeomAPI_Shape> theSourceShape,
234  std::shared_ptr<GeomAPI_Ax1> theAxis,
235  const double theStep,
236  const int theNumber);
237 
248  static std::shared_ptr<GeomAPI_Shape> makeMultiTranslation(
249  std::shared_ptr<GeomAPI_Shape> theSourceShape,
250  std::shared_ptr<GeomAPI_Ax1> theFirstAxis,
251  const double theFirstStep,
252  const int theFirstNumber,
253  std::shared_ptr<GeomAPI_Ax1> theSecondAxis,
254  const double theSecondStep,
255  const int theSecondNumber);
256 
261  static std::shared_ptr<GeomAPI_Shape> makeMultiRotation(
262  std::shared_ptr<GeomAPI_Shape> theSourceShape,
263  std::shared_ptr<GeomAPI_Ax1> theAxis,
264  const int theNumber);
265 
271  static std::shared_ptr<GeomAPI_Shape> makeMultiRotation(
272  std::shared_ptr<GeomAPI_Shape> theSourceShape,
273  std::shared_ptr<GeomAPI_Ax1> theAxis,
274  const double theStep,
275  const int theNumber);
276 
285  static std::shared_ptr<GeomAPI_Shape> makeConeSegment(
286  const double theRMin1,
287  const double theRMax1,
288  const double theRMin2,
289  const double theRMax2,
290  const double theZ,
291  const double theStartPhi,
292  const double theDeltaPhi);
293 };
294 }
295 #endif
Definition: GeomAlgoAPI_ShapeAPI.h:42
Allows to access the direct API.