1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: GeomAPI_Shape.hxx
4 // Created: 23 Apr 2014
5 // Author: Mikhail PONIKAROV
7 #ifndef GeomAPI_Shape_H_
8 #define GeomAPI_Shape_H_
10 #include <GeomAPI_Interface.h>
14 /**\class GeomAPI_Shape
16 * \brief Interface to the topological shape object
18 class GeomAPI_Shape : public GeomAPI_Interface
23 COMPOUND, COMPSOLID, SOLID, SHELL,
24 FACE, WIRE, EDGE, VERTEX,
29 /// Creation of empty (null) shape
33 /// Returns true if the underlied shape is null
37 /// Returns whether the shapes are equal
39 virtual bool isEqual(const std::shared_ptr<GeomAPI_Shape> theShape) const;
41 /// Returns whether the shape is a vertex
43 virtual bool isVertex() const;
45 /// Returns whether the shape is an edge
47 virtual bool isEdge() const;
49 /// Returns whether the shape is a face
51 virtual bool isFace() const;
53 /// Returns whether the shape is a compound
55 virtual bool isCompound() const;
57 /// Returns whether the shape is a compound of solids
59 virtual bool isCompoundOfSolids() const;
61 /// Returns whether the shape is a solid
63 virtual bool isSolid() const;
65 /// Returns whether the shape is a compsolid
67 virtual bool isCompSolid() const;
69 /// Returns whether the shape is planar
71 virtual bool isPlanar() const;
73 /// Returns the shape type
75 virtual ShapeType shapeType() const;
77 /// \return the shape type as string.
79 virtual std::string shapeTypeStr() const;
81 /// \return true if passed shape is a sub-shape of this shape.
82 /// \param theShape shape to search.
83 GEOMAPI_EXPORT virtual bool isSubShape(const std::shared_ptr<GeomAPI_Shape> theShape) const;
86 /// Computes boundary dimensions of the shape
87 /// Returns False if it is not possible
89 bool computeSize(double& theXmin, double& theYmin, double& theZmin,
90 double& theXmax, double& theYmax, double& theZmax) const;
92 /// Returns the shape as BRep stream
94 std::string getShapeStream() const;
97 //! Pointer on list of shapes
98 typedef std::list<std::shared_ptr<GeomAPI_Shape> > ListOfShape;
100 //! Pointer on attribute object
101 typedef std::shared_ptr<GeomAPI_Shape> GeomShapePtr;