1 -- Created on: 1995-10-26
2 -- Created by: Yves FRICAUD
3 -- Copyright (c) 1995-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 class Image from BRepAlgo
19 ---Purpose: Stores link between a shape <S> and a shape <NewS>
20 -- obtained from <S>. <NewS> is an image of <S>.
24 ShapeEnum from TopAbs,
25 ListOfShape from TopTools,
26 DataMapOfShapeListOfShape from TopTools,
27 DataMapOfShapeShape from TopTools
30 ConstructionError from Standard
35 SetRoot (me : in out; S : Shape from TopoDS)
39 Bind (me : in out; OldS : Shape from TopoDS;
40 NewS : Shape from TopoDS)
41 ---Purpose: Links <NewS> as image of <OldS>.
43 ConstructionError -- if Olds has image.
47 Bind (me : in out; OldS : Shape from TopoDS;
48 NewS : ListOfShape from TopTools)
49 ---Purpose: Links <NewS> as image of <OldS>.
51 ConstructionError -- if Olds has image.
55 Add (me : in out; OldS : Shape from TopoDS;
56 NewS : Shape from TopoDS)
57 ---Purpose: Add <NewS> to the image of <OldS>.
59 ConstructionError -- if Olds has not image.
63 Add (me : in out; OldS : Shape from TopoDS;
64 NewS : ListOfShape from TopTools)
65 ---Purpose: Add <NewS> to the image of <OldS>.
67 ConstructionError -- if Olds has not image.
73 Remove(me : in out; S : Shape from TopoDS)
74 ---Purpose: Remove <S> to set of images.
76 ConstructionError -- if S is not an image.
80 ---C++: return const &
81 returns ListOfShape from TopTools
84 IsImage (me; S : Shape from TopoDS)
85 returns Boolean from Standard
88 ImageFrom (me; S : Shape from TopoDS)
89 ---Purpose: Returns the generator of <S>
90 ---C++: return const &
91 returns Shape from TopoDS
94 Root (me; S : Shape from TopoDS)
95 ---Purpose: Returns the upper generator of <S>
96 ---C++: return const &
97 returns Shape from TopoDS
100 HasImage (me; S : Shape from TopoDS)
101 returns Boolean from Standard
104 Image (me; S : Shape from TopoDS)
105 ---Purpose: Returns the Image of <S>.
106 -- Returns <S> in the list if HasImage(S) is false.
107 ---C++: return const &
108 returns ListOfShape from TopTools
111 LastImage (me; S : Shape from TopoDS;
112 L : in out ListOfShape from TopTools)
113 ---Purpose: Stores in <L> the images of images of...images of <S>.
114 -- <L> contains only <S> if HasImage(S) is false.
117 Compact (me : in out)
118 ---Purpose: Keeps only the link between roots and lastimage.
122 S : Shape from TopoDS;
123 ShapeType : ShapeEnum from TopAbs);
124 ---Purpose: Deletes in the images the shape of type <ShapeType>
125 -- which are not in <S>.
126 -- Warning: Compact() must be call before.
130 roots : ListOfShape from TopTools;
131 up : DataMapOfShapeShape from TopTools;
132 down : DataMapOfShapeListOfShape from TopTools;