]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomAPI/GeomAPI_Shape.h
Salome HOME
Revolution tests.
[modules/shaper.git] / src / GeomAPI / GeomAPI_Shape.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        GeomAPI_Shape.hxx
4 // Created:     23 Apr 2014
5 // Author:      Mikhail PONIKAROV
6
7 #ifndef GeomAPI_Shape_H_
8 #define GeomAPI_Shape_H_
9
10 #include <GeomAPI_Interface.h>
11 #include <memory>
12 #include <list>
13
14 /**\class GeomAPI_Shape
15  * \ingroup DataModel
16  * \brief Interface to the topological shape object
17  */
18 class GEOMAPI_EXPORT GeomAPI_Shape : public GeomAPI_Interface
19 {
20 public:
21   /// Shape type enum
22   enum ShapeType {
23     COMPOUND, COMPSOLID, SOLID, SHELL,
24     FACE, WIRE, EDGE, VERTEX,
25     SHAPE
26   };
27
28  public:
29   /// Creation of empty (null) shape
30   GeomAPI_Shape();
31
32   /// Returns true if the underlied shape is null
33   bool isNull() const;
34
35   /// Returns whether the shapes are equal
36   virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theShape) const;
37
38   /// Returns whether the shape is a vertex
39   virtual bool isVertex() const;
40
41   /// Returns whether the shape is an edge
42   virtual bool isEdge() const;
43
44   /// Returns whether the shape is a face
45   virtual bool isFace() const;
46
47   /// Returns whether the shape is a face
48   virtual bool isCompound() const;
49
50   /// Returns whether the shape is a solid
51   virtual bool isSolid() const;
52
53   /// Computes boundary dimensions of the shape
54   /// Returns False if it is not possible
55   bool computeSize(double& theXmin, double& theYmin, double& theZmin,
56                    double& theXmax, double& theYmax, double& theZmax) const;
57
58   /// Returns the shape as BRep stream
59   std::string getShapeStream() const;
60 };
61
62 //! Pointer on list of shapes
63 typedef std::list<std::shared_ptr<GeomAPI_Shape> > ListOfShape;
64
65 //! Pointer on attribute object
66 typedef std::shared_ptr<GeomAPI_Shape> GeomShapePtr;
67
68 #endif