b311480e |
1 | -- Created on: 1993-07-19 |
2 | -- Created by: Remi LEQUETTE |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class ShapeSet from BRepTools inherits ShapeSet from TopTools |
18 | |
19 | ---Purpose: Contains a Shape and all its subshapes, locations |
20 | -- and geometries. |
21 | -- |
22 | -- The topology is inherited from TopTools. |
23 | |
24 | uses |
25 | Shape from TopoDS, |
26 | Builder from BRep, |
27 | ShapeEnum from TopAbs, |
28 | SurfaceSet from GeomTools, |
29 | CurveSet from GeomTools, |
30 | Curve2dSet from GeomTools, |
31 | IndexedMapOfTransient from TColStd |
32 | |
33 | is |
34 | |
35 | Create(isWithTriangles: Boolean from Standard = Standard_True) |
36 | returns ShapeSet from BRepTools; |
37 | ---Purpose: Builds an empty ShapeSet. |
38 | -- Parameter <isWithTriangles> is added for XML Persistence |
39 | |
40 | Create(B : Builder from BRep; |
41 | isWithTriangles: Boolean from Standard = Standard_True) |
42 | returns ShapeSet from BRepTools; |
43 | ---Purpose: Builds an empty ShapeSet. |
44 | -- Parameter <isWithTriangles> is added for XML Persistence |
45 | |
46 | Clear(me : in out) |
47 | ---Purpose: Clears the content of the set. |
48 | is redefined; |
49 | |
50 | AddGeometry(me : in out; S : Shape from TopoDS) |
51 | ---Purpose: Stores the goemetry of <S>. |
52 | is redefined; |
53 | |
54 | DumpGeometry(me; OS : in out OStream) |
55 | ---Purpose: Dumps the geometry of me on the stream <OS>. |
56 | is redefined; |
57 | |
58 | WriteGeometry(me : in out; OS : in out OStream) |
59 | ---Purpose: Writes the geometry of me on the stream <OS> in a |
60 | -- format that can be read back by Read. |
61 | is redefined; |
62 | |
63 | ReadGeometry(me : in out; IS : in out IStream) |
64 | ---Purpose: Reads the geometry of me from the stream <IS>. |
65 | is redefined; |
66 | |
67 | DumpGeometry(me; S : Shape from TopoDS; OS : in out OStream) |
68 | ---Purpose: Dumps the geometry of <S> on the stream <OS>. |
69 | is redefined; |
70 | |
71 | WriteGeometry(me; S : Shape from TopoDS; OS : in out OStream) |
72 | ---Purpose: Writes the geometry of <S> on the stream <OS> in a |
73 | -- format that can be read back by Read. |
74 | is redefined; |
75 | |
76 | ReadGeometry(me : in out; T : ShapeEnum from TopAbs; |
77 | IS : in out IStream; |
78 | S : out Shape from TopoDS) |
79 | ---Purpose: Reads the geometry of a shape of type <T> from the |
80 | -- stream <IS> and returns it in <S>. |
81 | is redefined; |
82 | |
83 | |
84 | AddShapes(me : in out; S1 : in out Shape from TopoDS; |
85 | S2 : Shape from TopoDS) |
86 | ---Purpose: Inserts the shape <S2> in the shape <S1>. This |
87 | -- method must be redefined to use the correct |
88 | -- builder. |
89 | is redefined; |
90 | |
91 | Check(me : in out; T : ShapeEnum from TopAbs; |
92 | S : in out Shape from TopoDS) |
93 | is redefined; |
94 | |
95 | |
96 | ReadPolygon3D(me: in out; IS: in out IStream) |
97 | ---Purpose: Reads the 3d polygons of me |
98 | -- from the stream <IS>. |
99 | is static; |
100 | |
101 | WritePolygon3D(me; OS: in out OStream; |
102 | Compact: Boolean=Standard_True) |
103 | ---Purpose: Writes the 3d polygons |
104 | -- on the stream <OS> in a format that can |
105 | -- be read back by Read. |
106 | is static; |
107 | |
108 | DumpPolygon3D(me; OS: in out OStream) |
109 | ---Purpose: Dumps the 3d polygons |
110 | -- on the stream <OS>. |
111 | is static; |
112 | |
113 | ReadTriangulation(me: in out; IS: in out IStream) |
114 | ---Purpose: Reads the triangulation of me |
115 | -- from the stream <IS>. |
116 | is static; |
117 | |
118 | WriteTriangulation(me; OS: in out OStream; |
119 | Compact: Boolean=Standard_True) |
120 | ---Purpose: Writes the triangulation |
121 | -- on the stream <OS> in a format that can |
122 | -- be read back by Read. |
123 | is static; |
124 | |
125 | DumpTriangulation(me; OS: in out OStream) |
126 | ---Purpose: Dumps the triangulation |
127 | -- on the stream <OS>. |
128 | is static; |
129 | |
130 | ReadPolygonOnTriangulation(me: in out; IS: in out IStream) |
131 | ---Purpose: Reads the polygons on triangulation of me |
132 | -- from the stream <IS>. |
133 | is static; |
134 | |
135 | WritePolygonOnTriangulation(me; OS: in out OStream; |
136 | Compact: Boolean=Standard_True) |
137 | ---Purpose: Writes the polygons on triangulation |
138 | -- on the stream <OS> in a format that can |
139 | -- be read back by Read. |
140 | is static; |
141 | |
142 | DumpPolygonOnTriangulation(me; OS: in out OStream) |
143 | ---Purpose: Dumps the polygons on triangulation |
144 | -- on the stream <OS>. |
145 | is static; |
146 | |
147 | |
148 | fields |
149 | |
150 | myBuilder : Builder from BRep; |
151 | mySurfaces : SurfaceSet from GeomTools; |
152 | myCurves : CurveSet from GeomTools; |
153 | myCurves2d : Curve2dSet from GeomTools; |
154 | myPolygons2D: IndexedMapOfTransient from TColStd; |
155 | myPolygons3D: IndexedMapOfTransient from TColStd; |
156 | myTriangulations: IndexedMapOfTransient from TColStd; |
157 | myNodes : IndexedMapOfTransient from TColStd; |
158 | myWithTriangles: Boolean from Standard; -- for XML Persistence |
159 | |
160 | end ShapeSet; |