Salome HOME
Temporary providing a compound shape type in selection and validation to provide...
[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   /// Creation of empty (null) shape
22   GeomAPI_Shape();
23
24   /// Returns true if the underlied shape is null
25   bool isNull() const;
26
27   /// Returns whether the shapes are equal
28   virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theShape) const;
29
30   /// Returns whether the shape is a vertex
31   virtual bool isVertex() const;
32
33   /// Returns whether the shape is an edge
34   virtual bool isEdge() const;
35
36   /// Returns whether the shape is a face
37   virtual bool isFace() const;
38
39   /// Returns whether the shape is a face
40   virtual bool isCompound() const;
41
42   /// Returns whether the shape is a solid
43   virtual bool isSolid() const;
44
45   /// Computes boundary dimensions of the shape
46   /// Returns False if it is not possible
47   bool computeSize(double& theXmin, double& theYmin, double& theZmin,
48                    double& theXmax, double& theYmax, double& theZmax) const;
49
50   /// Returns the shape as BRep stream
51   std::string getShapeStream() const;
52 };
53
54 //! Pointer on list of shapes
55 typedef std::list<std::shared_ptr<GeomAPI_Shape> > ListOfShape;
56
57 //! Pointer on attribute object
58 typedef std::shared_ptr<GeomAPI_Shape> GeomShapePtr;
59
60 #endif