summaryrefslogtreecommitdiff
path: root/inc/TopOpeBRep_DSFiller.hxx
blob: fe3d6e1250942d174d0ac60adcccc86e65c63b50 (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
// 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 _TopOpeBRep_DSFiller_HeaderFile
#define _TopOpeBRep_DSFiller_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _TopOpeBRep_ShapeIntersector_HeaderFile
#include <TopOpeBRep_ShapeIntersector.hxx>
#endif
#ifndef _TopOpeBRep_ShapeIntersector2d_HeaderFile
#include <TopOpeBRep_ShapeIntersector2d.hxx>
#endif
#ifndef _TopOpeBRep_FacesFiller_HeaderFile
#include <TopOpeBRep_FacesFiller.hxx>
#endif
#ifndef _TopOpeBRep_EdgesFiller_HeaderFile
#include <TopOpeBRep_EdgesFiller.hxx>
#endif
#ifndef _TopOpeBRep_FaceEdgeFiller_HeaderFile
#include <TopOpeBRep_FaceEdgeFiller.hxx>
#endif
#ifndef _TopOpeBRepTool_PShapeClassifier_HeaderFile
#include <TopOpeBRepTool_PShapeClassifier.hxx>
#endif
#ifndef _Handle_TopOpeBRepDS_HDataStructure_HeaderFile
#include <Handle_TopOpeBRepDS_HDataStructure.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
class TopoDS_Shape;
class TopOpeBRepDS_HDataStructure;
class TopoDS_Face;
class TopOpeBRep_ShapeIntersector;
class TopOpeBRep_ShapeIntersector2d;
class TopOpeBRep_FacesFiller;
class TopOpeBRep_EdgesFiller;
class TopOpeBRep_FaceEdgeFiller;


//! Provides class  methods  to  fill  a datastructure <br>
//!          with  results  of intersections. <br>
//! <br>
//!          1.  Use  an    Intersector  to   find    pairs  of <br>
//!          intersecting GeomShapes <br>
//! <br>
//!          2. For each  pair fill the DataStructure using the <br>
//!          appropriate Filler. <br>
//! <br>
//!          3. Complete the  DataStructure to record shapes to <br>
//!          rebuild (shells, wires ) <br>
class TopOpeBRep_DSFiller  {
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   TopOpeBRep_DSFiller();
  
  Standard_EXPORT     void Destroy() ;
Standard_EXPORT ~TopOpeBRep_DSFiller() {Destroy();}
  //! return field myPShapeClassifier. <br>//! set field myPShapeClassifier. <br>
  Standard_EXPORT     TopOpeBRepTool_PShapeClassifier PShapeClassifier() const;
  //! Stores in <DS> the intersections of <S1> and <S2>. <br>
//!          if orientFORWARD = True <br>
//!               S FORWARD,REVERSED   --> FORWARD <br>
//!               S EXTERNAL,INTERNAL --> EXTERNAL,INTERNAL <br>
  Standard_EXPORT     void Insert(const TopoDS_Shape& S1,const TopoDS_Shape& S2,const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Boolean orientFORWARD = Standard_True) ;
  //! Stores in <DS> the intersections of <S1> and <S2>. <br>
//!          if orientFORWARD = True <br>
//!               S FORWAR,REVERSED   --> FORWARD <br>
//!               S EXTERNAL,INTERNAL --> EXTERNAL,INTERNAL <br>
  Standard_EXPORT     void InsertIntersection(const TopoDS_Shape& S1,const TopoDS_Shape& S2,const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Boolean orientFORWARD = Standard_True) ;
  
  Standard_EXPORT     void Complete(const Handle(TopOpeBRepDS_HDataStructure)& HDS) ;
  //! Stores in <DS> the intersections of <S1> and <S2>. <br>
//!          S1 et S2 contain only SameDomain Face <br>
  Standard_EXPORT     void Insert2d(const TopoDS_Shape& S1,const TopoDS_Shape& S2,const Handle(TopOpeBRepDS_HDataStructure)& HDS) ;
  //! S1, S2 set of tangent face <br>
//!          lance les intersections 2d pour coder correctement <br>
//!          les faces SameDomain. <br>
  Standard_EXPORT     void InsertIntersection2d(const TopoDS_Shape& S1,const TopoDS_Shape& S2,const Handle(TopOpeBRepDS_HDataStructure)& HDS) ;
  
  Standard_EXPORT     Standard_Boolean IsMadeOf1d(const TopoDS_Shape& S) const;
  
  Standard_EXPORT     Standard_Boolean IsContext1d(const TopoDS_Shape& S) const;
  //! Stores in <DS> the intersections of <S1> and <S2>. <br>
//!          S1 and S2 are edges or wires. <br>
//!          S1 edges have a 2d representation in face F1 <br>
//!          S2 edges have a 2d representation in face F2 <br>
//!          F1 is the face which surface is taken as reference <br>
//!          for 2d description of S1 and S2 edges. <br>
//!          if orientFORWARD = True <br>
//!               S FORWARD,REVERSED  --> FORWARD <br>
//!               S EXTERNAL,INTERNAL --> EXTERNAL,INTERNAL <br>
  Standard_EXPORT     void Insert1d(const TopoDS_Shape& S1,const TopoDS_Shape& S2,const TopoDS_Face& F1,const TopoDS_Face& F2,const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Boolean orientFORWARD = Standard_False) ;
  
  Standard_EXPORT     TopOpeBRep_ShapeIntersector& ChangeShapeIntersector() ;
  
  Standard_EXPORT     TopOpeBRep_ShapeIntersector2d& ChangeShapeIntersector2d() ;
  
  Standard_EXPORT     TopOpeBRep_FacesFiller& ChangeFacesFiller() ;
  
  Standard_EXPORT     TopOpeBRep_EdgesFiller& ChangeEdgesFiller() ;
  
  Standard_EXPORT     TopOpeBRep_FaceEdgeFiller& ChangeFaceEdgeFiller() ;
  
  Standard_EXPORT     void GapFiller(const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
  //! Update   the  data      structure  with   relevant <br>
//!          informations deduced from the intersections. <br>
//! <br>
//!          Shells containing an intersected face. <br>
//!          Wires  containing an intersected edge. <br>
//! <br>
  Standard_EXPORT     void CompleteDS(const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
  
  Standard_EXPORT     void Filter(const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
  
  Standard_EXPORT     void Reducer(const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
  
  Standard_EXPORT     void RemoveUnsharedGeometry(const Handle(TopOpeBRepDS_HDataStructure)& HDS) ;
  
  Standard_EXPORT     void Checker(const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
  //! Update   the  data      structure  with   relevant <br>
//!          informations deduced from the intersections 2d. <br>
//! <br>
//!          Shells containing an intersected face. <br>
//!          Wires  containing an intersected edge. <br>
//! <br>//! search for interference identity using edge connexity //NYI <br>
  Standard_EXPORT     void CompleteDS2d(const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;





protected:





private:

  
  Standard_EXPORT     Standard_Boolean CheckInsert(const TopoDS_Shape& S1,const TopoDS_Shape& S2) const;
  
  Standard_EXPORT     Standard_Boolean ClearShapeSameDomain(const TopoDS_Shape& S1,const TopoDS_Shape& S2,const Handle(TopOpeBRepDS_HDataStructure)& HDS) ;


TopOpeBRep_ShapeIntersector myShapeIntersector;
TopOpeBRep_ShapeIntersector2d myShapeIntersector2d;
TopOpeBRep_FacesFiller myFacesFiller;
TopOpeBRep_EdgesFiller myEdgesFiller;
TopOpeBRep_FaceEdgeFiller myFaceEdgeFiller;
TopOpeBRepTool_PShapeClassifier myPShapeClassifier;


};





// other Inline functions and methods (like "C++: function call" methods)


#endif