blob: 449c7de82fd3c4d6aa693da440d72c273e7a4ffc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to
// this header file considered to be the "object code" form of the original source.
#ifndef _BRepAlgo_Image_HeaderFile
#define _BRepAlgo_Image_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
#ifndef _TopTools_ListOfShape_HeaderFile
#include <TopTools_ListOfShape.hxx>
#endif
#ifndef _TopTools_DataMapOfShapeShape_HeaderFile
#include <TopTools_DataMapOfShapeShape.hxx>
#endif
#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TopAbs_ShapeEnum_HeaderFile
#include <TopAbs_ShapeEnum.hxx>
#endif
class Standard_ConstructionError;
class TopoDS_Shape;
class TopTools_ListOfShape;
//! Stores link between a shape <S> and a shape <NewS> <br>
//! obtained from <S>. <NewS> is an image of <S>. <br>
class BRepAlgo_Image {
public:
void* operator new(size_t,void* anAddress)
{
return anAddress;
}
void* operator new(size_t size)
{
return Standard::Allocate(size);
}
void operator delete(void *anAddress)
{
if (anAddress) Standard::Free((Standard_Address&)anAddress);
}
Standard_EXPORT BRepAlgo_Image();
Standard_EXPORT void SetRoot(const TopoDS_Shape& S) ;
//! Links <NewS> as image of <OldS>. <br>
Standard_EXPORT void Bind(const TopoDS_Shape& OldS,const TopoDS_Shape& NewS) ;
//! Links <NewS> as image of <OldS>. <br>
Standard_EXPORT void Bind(const TopoDS_Shape& OldS,const TopTools_ListOfShape& NewS) ;
//! Add <NewS> to the image of <OldS>. <br>
Standard_EXPORT void Add(const TopoDS_Shape& OldS,const TopoDS_Shape& NewS) ;
//! Add <NewS> to the image of <OldS>. <br>
Standard_EXPORT void Add(const TopoDS_Shape& OldS,const TopTools_ListOfShape& NewS) ;
Standard_EXPORT void Clear() ;
//! Remove <S> to set of images. <br>
Standard_EXPORT void Remove(const TopoDS_Shape& S) ;
Standard_EXPORT const TopTools_ListOfShape& Roots() const;
Standard_EXPORT Standard_Boolean IsImage(const TopoDS_Shape& S) const;
//! Returns the generator of <S> <br>
Standard_EXPORT const TopoDS_Shape& ImageFrom(const TopoDS_Shape& S) const;
//! Returns the upper generator of <S> <br>
Standard_EXPORT const TopoDS_Shape& Root(const TopoDS_Shape& S) const;
Standard_EXPORT Standard_Boolean HasImage(const TopoDS_Shape& S) const;
//! Returns the Image of <S>. <br>
//! Returns <S> in the list if HasImage(S) is false. <br>
Standard_EXPORT const TopTools_ListOfShape& Image(const TopoDS_Shape& S) const;
//! Stores in <L> the images of images of...images of <S>. <br>
//! <L> contains only <S> if HasImage(S) is false. <br>
Standard_EXPORT void LastImage(const TopoDS_Shape& S,TopTools_ListOfShape& L) const;
//! Keeps only the link between roots and lastimage. <br>
Standard_EXPORT void Compact() ;
//! Deletes in the images the shape of type <ShapeType> <br>
//! which are not in <S>. <br>
//! Warning: Compact() must be call before. <br>
Standard_EXPORT void Filter(const TopoDS_Shape& S,const TopAbs_ShapeEnum ShapeType) ;
protected:
private:
TopTools_ListOfShape roots;
TopTools_DataMapOfShapeShape up;
TopTools_DataMapOfShapeListOfShape down;
};
// other Inline functions and methods (like "C++: function call" methods)
#endif
|