SHAPER  9.12.0
GeomAlgoAPI_Prism.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_Prism_H_
21 #define GeomAlgoAPI_Prism_H_
22 
23 #include "GeomAlgoAPI_MakeSweep.h"
24 
25 #include <GeomAPI_Shape.h>
26 
27 #include <memory>
28 
29 class GeomAPI_Dir;
30 class GeomAPI_Pln;
31 
38 {
39 public:
50  GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape,
51  const std::shared_ptr<GeomAPI_Dir> theDirection,
52  const GeomShapePtr theToShape,
53  const double theToSize,
54  const GeomShapePtr theFromShape,
55  const double theFromSize);
56 
57 private:
59  void buildBySizes(const GeomShapePtr theBaseShape,
60  const std::shared_ptr<GeomAPI_Dir> theDirection,
61  const double theToSize,
62  const double theFromSize,
63  const GeomAPI_Shape::ShapeType theTypeToExp);
64 
66  void buildByPlanes(const GeomShapePtr theBaseShape,
67  const std::shared_ptr<GeomAPI_Dir> theDirection,
68  const std::shared_ptr<GeomAPI_Pln> theToPlane,
69  const double theToSize,
70  const std::shared_ptr<GeomAPI_Pln> theFromPlane,
71  const double theFromSize,
72  const GeomAPI_Shape::ShapeType theTypeToExp);
73 
75  void buildByFaces(const GeomShapePtr theBaseShape,
76  const std::shared_ptr<GeomAPI_Dir> theDirection,
77  const GeomShapePtr theToShape,
78  const double theToSize,
79  const bool theToIsPlanar,
80  const GeomShapePtr theFromShape,
81  const double theFromSize,
82  const bool theFromIsPlanar,
83  const GeomAPI_Shape::ShapeType theTypeToExp);
84 };
85 
86 #endif
3D direction defined by three normalized coordinates
Definition: GeomAPI_Dir.h:34
3D point defined by three coordinates
Definition: GeomAPI_Pln.h:37
ShapeType
Shape type enum.
Definition: GeomAPI_Shape.h:46
The abstract class MakeSweep is the root class of swept primitives.
Definition: GeomAlgoAPI_MakeSweep.h:41
Allows to create the prism based on a given face and bounding planes.
Definition: GeomAlgoAPI_Prism.h:38
GEOMALGOAPI_EXPORT GeomAlgoAPI_Prism(const GeomShapePtr theBaseShape, const std::shared_ptr< GeomAPI_Dir > theDirection, const GeomShapePtr theToShape, const double theToSize, const GeomShapePtr theFromShape, const double theFromSize)
Creates extrusion for the given shape along the normal for this shape.
Definition: GeomAlgoAPI_Prism.cpp:133