blob: cfe9af11156111cd622d5c64425eb73fc8acc783 (
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
122
|
// 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 _TopOpeBRepTool_PurgeInternalEdges_HeaderFile
#define _TopOpeBRepTool_PurgeInternalEdges_HeaderFile
#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif
#ifndef _TopoDS_Shape_HeaderFile
#include <TopoDS_Shape.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TopTools_DataMapOfShapeListOfShape_HeaderFile
#include <TopTools_DataMapOfShapeListOfShape.hxx>
#endif
#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
class Standard_ConstructionError;
class Standard_NullObject;
class TopoDS_Shape;
class TopTools_DataMapOfShapeListOfShape;
//! remove from a shape, the internal edges that are <br>
//! not connected to any face in the shape. We can <br>
//! get the list of the edges as a <br>
//! DataMapOfShapeListOfShape with a Face of the Shape <br>
//! as the key and a list of internal edges as the <br>
//! value. The list of internal edges means edges <br>
//! that are not connected to any face in the shape. <br>
//! <br>
//! Example of use : <br>
//! TopTools_DataMapOfShapeListOfShape mymap; <br>
//! TopOpeBRepTool_PurgeInternalEdges <br>
//! mypurgealgo(mysolid); mypurgealgo.GetFaces(mymap); <br>
//! <br>
class TopOpeBRepTool_PurgeInternalEdges {
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);
}
//! Initialize members and begin exploration of shape <br>
//! depending of the value of PerformNow <br>
Standard_EXPORT TopOpeBRepTool_PurgeInternalEdges(const TopoDS_Shape& theShape,const Standard_Boolean PerformNow = Standard_True);
//! returns the list internal edges associated with <br>
//! the faces of the myShape. If PerformNow was False <br>
//! when created, then call the private Perform method <br>
//! that do the main job. <br>
Standard_EXPORT void Faces(TopTools_DataMapOfShapeListOfShape& theMapFacLstEdg) ;
//! returns myShape modified with the list of internal <br>
//! edges removed from it. <br>
Standard_EXPORT TopoDS_Shape& Shape() ;
//! returns the number of edges candidate to be removed <br>
Standard_EXPORT const Standard_Integer NbEdges() const;
//! returns False if the list of internal edges has <br>
//! not been extracted <br>
Standard_Boolean IsDone() const;
//! Using the list of internal edge from each face, <br>
//! rebuild myShape by removing thoses edges. <br>
//! <br>
Standard_EXPORT void Perform() ;
protected:
TopTools_IndexedDataMapOfShapeListOfShape myMapEdgLstFac;
private:
//! Do the main job. Explore all the edges of myShape and <br>
//! build a map with faces as a key and list of internal <br>
//! edges(without connected faces) as value. <br>
//! <br>
Standard_EXPORT void BuildList() ;
TopoDS_Shape myShape;
Standard_Boolean myIsDone;
TopTools_DataMapOfShapeListOfShape myMapFacLstEdg;
};
#include <TopOpeBRepTool_PurgeInternalEdges.lxx>
// other Inline functions and methods (like "C++: function call" methods)
#endif
|