0022048: Visualization, AIS_InteractiveContext - single object selection should alway...
[occt.git] / src / TopoDS / TopoDS_TShape.hxx
CommitLineData
42cf5bc1 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
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _TopoDS_TShape_HeaderFile
18#define _TopoDS_TShape_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <TopoDS_ListOfShape.hxx>
24#include <Standard_Integer.hxx>
25e59720 25#include <Standard_Transient.hxx>
42cf5bc1 26#include <Standard_Boolean.hxx>
27#include <TopAbs_ShapeEnum.hxx>
9fd2d2c3 28
42cf5bc1 29class TopoDS_Iterator;
30class TopoDS_Builder;
31
9fd2d2c3 32// resolve name collisions with X11 headers
33#ifdef Convex
34 #undef Convex
35#endif
42cf5bc1 36
37class TopoDS_TShape;
25e59720 38DEFINE_STANDARD_HANDLE(TopoDS_TShape, Standard_Transient)
42cf5bc1 39
40//! A TShape is a topological structure describing a
41//! set of points in a 2D or 3D space.
42//!
43//! A topological shape is a structure made from other
44//! shapes. This is a deferred class used to support
45//! topological objects.
46//!
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.
51//!
52//! A TShape contains the following boolean flags :
53//!
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.
61//!
62//! Users have no direct access to the classes derived
63//! from TShape. They handle them with the classes
64//! derived from Shape.
25e59720 65class TopoDS_TShape : public Standard_Transient
42cf5bc1 66{
67
68public:
69
70
71 //! Returns the free flag.
72 Standard_Boolean Free() const;
73
74 //! Sets the free flag.
75 void Free (const Standard_Boolean F);
76
77 //! Returns the locked flag.
78 Standard_Boolean Locked() const;
79
80 //! Sets the locked flag.
81 void Locked (const Standard_Boolean F);
82
83 //! Returns the modification flag.
84 Standard_Boolean Modified() const;
85
86 //! Sets the modification flag.
87 void Modified (const Standard_Boolean M);
88
89 //! Returns the checked flag.
90 Standard_Boolean Checked() const;
91
92 //! Sets the checked flag.
93 void Checked (const Standard_Boolean C);
94
95 //! Returns the orientability flag.
96 Standard_Boolean Orientable() const;
97
98 //! Sets the orientability flag.
99 void Orientable (const Standard_Boolean C);
100
101 //! Returns the closedness flag.
102 Standard_Boolean Closed() const;
103
104 //! Sets the closedness flag.
105 void Closed (const Standard_Boolean C);
106
107 //! Returns the infinity flag.
108 Standard_Boolean Infinite() const;
109
110 //! Sets the infinity flag.
111 void Infinite (const Standard_Boolean C);
112
113 //! Returns the convexness flag.
114 Standard_Boolean Convex() const;
115
116 //! Sets the convexness flag.
117 void Convex (const Standard_Boolean C);
118
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;
122
123 //! Returns a copy of the TShape with no sub-shapes.
124 Standard_EXPORT virtual Handle(TopoDS_TShape) EmptyCopy() const = 0;
125
126
127friend class TopoDS_Iterator;
128friend class TopoDS_Builder;
129
130
25e59720 131 DEFINE_STANDARD_RTTIEXT(TopoDS_TShape,Standard_Transient)
42cf5bc1 132
133protected:
134
135
136 //! Constructs an empty TShape.
137 //! Free : True
138 //! Modified : True
139 //! Checked : False
140 //! Orientable : True
141 //! Closed : False
142 //! Infinite : False
143 //! Convex : False
144 TopoDS_TShape();
145
146
147
148private:
149
150
151 const TopoDS_ListOfShape& Shapes() const;
152
153 TopoDS_ListOfShape& ChangeShapes();
154
155 TopoDS_ListOfShape myShapes;
156 Standard_Integer myFlags;
157
158
159};
160
161
162#include <TopoDS_TShape.lxx>
163
164
165
166
167
168#endif // _TopoDS_TShape_HeaderFile