Integration of OCCT 6.5.0 from SVN
[occt.git] / src / BinTools / BinTools_ShapeSet.cdl
CommitLineData
7fd59977 1-- File: BinTools_ShapeSet.cdl
2-- Created: Tue May 11 18:04:54 2004
3-- Author: Sergey ZARITCHNY <szy@opencascade.com>
4-- Copyright: Open CasCade S.A. 2004
5
6
7class ShapeSet from BinTools
8
9 ---Purpose: Writes topology in OStream in binary format
10
11uses
12 Shape from TopoDS,
13 IndexedMapOfShape from TopTools,
14 ShapeEnum from TopAbs,
15 Builder from BRep,
16 ShapeEnum from TopAbs,
17 LocationSet from BinTools,
18 SurfaceSet from BinTools,
19 CurveSet from BinTools,
20 Curve2dSet from BinTools,
21 IndexedMapOfTransient from TColStd
22
23
24is
25
26
27 Create(isWithTriangles: Boolean from Standard = Standard_False)
28 returns ShapeSet from BinTools;
29 ---Purpose: Builds an empty ShapeSet.
30 -- Parameter <isWithTriangles> is added for XML Persistence
31
32 Delete(me:out) is virtual;
33 ---C++: alias "Standard_EXPORT virtual ~BinTools_ShapeSet(){Delete() ; }"
34
35 SetFormatNb(me : out; theFormatNb : Integer) is static;
36
37 FormatNb(me) returns Integer is static;
38 ---Purpose: two formats available for the moment:
39 -- First: does not write CurveOnSurface UV Points into the file
40 -- on reading calls Check() method.
41 -- Second: stores CurveOnSurface UV Points.
42 -- On reading format is recognized from Version string.
43
44 Clear(me : in out)
45 ---Purpose: Clears the content of the set.
46 is virtual;
47
48 Add(me : in out; S : Shape from TopoDS) returns Integer
49 ---Purpose: Stores <S> and its sub-shape. Returns the index of <S>.
50 -- The method AddGeometry is called on each sub-shape.
51 is static;
52
53 Shape(me; I : Integer) returns Shape from TopoDS
54 ---Purpose: Returns the sub-shape of index <I>.
55 --
56 ---C++: return const &
57 is static;
58
59 Index(me; S : Shape from TopoDS) returns Integer
60 ---Purpose: Returns the index of <S>.
61 is static;
62
63 Locations(me) returns LocationSet from BinTools
64 ---C++: return const &
65 is static;
66
67 ChangeLocations(me : in out) returns LocationSet from BinTools
68 ---C++: return &
69 is static;
70
71 NbShapes(me) returns Integer;
72 ---Purpose:Returns number of shapes read from file.
73
74 Write(me; OS : in out OStream)
75 ---Purpose: Writes the content of me on the stream <OS> in binary
76 -- format that can be read back by Read.
77 --
78 -- Writes the locations.
79 --
80 -- Writes the geometry calling WriteGeometry.
81 --
82 -- Dumps the shapes from last to first.
83 -- For each shape :
84 -- Write the type.
85 -- calls WriteGeometry(S).
86 -- Write the flags, the subshapes.
87 is virtual;
88
89 Read(me : in out; IS : in out IStream)
90 ---Purpose: Reads the content of me from the binary stream <IS>. me
91 -- is first cleared.
92 --
93 -- Reads the locations.
94 --
95 -- Reads the geometry calling ReadGeometry.
96 --
97 -- Reads the shapes.
98 -- For each shape
99 -- Reads the type.
100 -- calls ReadGeometry(T,S).
101 -- Reads the flag, the subshapes.
102 is virtual;
103
104 Write(me; S : Shape from TopoDS; OS : in out OStream)
105 ---Purpose: Writes on <OS> the shape <S>. Writes the
106 -- orientation, the index of the TShape and the index
107 -- of the Location.
108 is virtual;
109
110 WriteGeometry(me; OS : in out OStream)
111 ---Purpose: Writes the geometry of me on the stream <OS> in a
112 -- binary format that can be read back by Read.
113 is virtual;
114
115 ReadGeometry(me : in out; IS : in out IStream)
116 ---Purpose: Reads the geometry of me from the stream <IS>.
117 is virtual;
118
119 Read(me; S : in out Shape from TopoDS; IS : in out IStream;
120 NbShapes : Integer)
121 ---Purpose: Reads from <IS> a shape and returns it in S.
122 -- <NbShapes> is the number of tshapes in the set.
123 is virtual;
124
125 WriteGeometry(me; S : Shape from TopoDS; OS : in out OStream)
126 ---Purpose: Writes the geometry of <S> on the stream <OS> in a
127 -- binary format that can be read back by Read.
128 is virtual;
129
130 ReadGeometry(me : in out; T : ShapeEnum from TopAbs;
131 IS : in out IStream;
132 S : out Shape from TopoDS)
133 ---Purpose: Reads the geometry of a shape of type <T> from the
134 -- stream <IS> and returns it in <S>.
135 is virtual;
136
137 AddGeometry(me : in out; S : Shape from TopoDS)
138 ---Purpose: Stores the goemetry of <S>.
139 is virtual;
140
141-- WriteLocations(me; OS: in out OStream from Standard) is static;
142
143-- ReadLocations(me: in out; OS: in out IStream from Standard) is static;
144
145 AddShapes(me : in out; S1 : in out Shape from TopoDS;
146 S2 : Shape from TopoDS)
147 ---Purpose: Inserts the shape <S2> in the shape <S1>.
148 is virtual;
149
150 ReadPolygon3D(me: in out; IS: in out IStream)
151 ---Purpose: Reads the 3d polygons of me
152 -- from the stream <IS>.
153 is static;
154
155 WritePolygon3D(me; OS: in out OStream)
156 ---Purpose: Writes the 3d polygons
157 -- on the stream <OS> in a format that can
158 -- be read back by Read.
159 is static;
160
161 ReadTriangulation(me: in out; IS: in out IStream)
162 ---Purpose: Reads the triangulation of me
163 -- from the stream <IS>.
164 is static;
165
166 WriteTriangulation(me; OS: in out OStream)
167 ---Purpose: Writes the triangulation
168 -- on the stream <OS> in a format that can
169 -- be read back by Read.
170 is static;
171
172 ReadPolygonOnTriangulation(me: in out; IS: in out IStream)
173 ---Purpose: Reads the polygons on triangulation of me
174 -- from the stream <IS>.
175 is static;
176
177 WritePolygonOnTriangulation(me; OS: in out OStream)
178 ---Purpose: Writes the polygons on triangulation
179 -- on the stream <OS> in a format that can
180 -- be read back by Read.
181 is static;
182
183 fields
184 myShapes : IndexedMapOfShape from TopTools;
185 myLocations : LocationSet from BinTools;
186 myFormatNb : Integer from Standard; -- jfa 26.09.2001
187 myBuilder : Builder from BRep;
188 mySurfaces : SurfaceSet from BinTools;
189 myCurves : CurveSet from BinTools;
190 myCurves2d : Curve2dSet from BinTools;
191 myPolygons2D: IndexedMapOfTransient from TColStd;
192 myPolygons3D: IndexedMapOfTransient from TColStd;
193 myTriangulations: IndexedMapOfTransient from TColStd;
194 myNodes : IndexedMapOfTransient from TColStd;
195 myWithTriangles: Boolean from Standard;
196end ShapeSet;