1 // Created on: 1990-12-13
2 // Created by: Remi Lequette
3 // Copyright (c) 1990-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _TopoDS_TShape_HeaderFile
18 #define _TopoDS_TShape_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <TopoDS_ListOfShape.hxx>
24 #include <Standard_Integer.hxx>
25 #include <Standard_Transient.hxx>
26 #include <Standard_Boolean.hxx>
27 #include <TopAbs_ShapeEnum.hxx>
29 class TopoDS_Iterator;
32 // resolve name collisions with X11 headers
38 DEFINE_STANDARD_HANDLE(TopoDS_TShape, Standard_Transient)
40 //! A TShape is a topological structure describing a
41 //! set of points in a 2D or 3D space.
43 //! A topological shape is a structure made from other
44 //! shapes. This is a deferred class used to support
45 //! topological objects.
47 //! TShapes are defined by their optional domain
48 //! (geometry) and their components (other TShapes
49 //! with Locations and Orientations). The components
50 //! are stored in a List of Shapes.
52 //! A TShape contains the following boolean flags :
54 //! - Free : Free or Frozen.
55 //! - Modified : Has been modified.
56 //! - Checked : Has been checked.
57 //! - Orientable : Can be oriented.
58 //! - Closed : Is closed (note that only Wires and Shells may be closed).
59 //! - Infinite : Is infinite.
60 //! - Convex : Is convex.
62 //! Users have no direct access to the classes derived
63 //! from TShape. They handle them with the classes
64 //! derived from Shape.
65 class TopoDS_TShape : public Standard_Transient
71 //! Returns the free flag.
72 Standard_Boolean Free() const;
74 //! Sets the free flag.
75 void Free (const Standard_Boolean F);
77 //! Returns the locked flag.
78 Standard_Boolean Locked() const;
80 //! Sets the locked flag.
81 void Locked (const Standard_Boolean F);
83 //! Returns the modification flag.
84 Standard_Boolean Modified() const;
86 //! Sets the modification flag.
87 void Modified (const Standard_Boolean M);
89 //! Returns the checked flag.
90 Standard_Boolean Checked() const;
92 //! Sets the checked flag.
93 void Checked (const Standard_Boolean C);
95 //! Returns the orientability flag.
96 Standard_Boolean Orientable() const;
98 //! Sets the orientability flag.
99 void Orientable (const Standard_Boolean C);
101 //! Returns the closedness flag.
102 Standard_Boolean Closed() const;
104 //! Sets the closedness flag.
105 void Closed (const Standard_Boolean C);
107 //! Returns the infinity flag.
108 Standard_Boolean Infinite() const;
110 //! Sets the infinity flag.
111 void Infinite (const Standard_Boolean C);
113 //! Returns the convexness flag.
114 Standard_Boolean Convex() const;
116 //! Sets the convexness flag.
117 void Convex (const Standard_Boolean C);
119 //! Returns the type as a term of the ShapeEnum enum :
120 //! VERTEX, EDGE, WIRE, FACE, ....
121 Standard_EXPORT virtual TopAbs_ShapeEnum ShapeType() const = 0;
123 //! Returns a copy of the TShape with no sub-shapes.
124 Standard_EXPORT virtual Handle(TopoDS_TShape) EmptyCopy() const = 0;
127 friend class TopoDS_Iterator;
128 friend class TopoDS_Builder;
131 DEFINE_STANDARD_RTTIEXT(TopoDS_TShape,Standard_Transient)
136 //! Constructs an empty TShape.
140 //! Orientable : True
151 const TopoDS_ListOfShape& Shapes() const;
153 TopoDS_ListOfShape& ChangeShapes();
155 TopoDS_ListOfShape myShapes;
156 Standard_Integer myFlags;
162 #include <TopoDS_TShape.lxx>
168 #endif // _TopoDS_TShape_HeaderFile