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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
-- File: TopOpeBRep_ShapeIntersector.cdl
-- Created: Fri May 7 17:03:26 1993
-- Author: Jean Yves LEBEY
-- <jyl@topsn3>
---Copyright: Matra Datavision 1993
class ShapeIntersector from TopOpeBRep
---Purpose: Intersect two shapes.
--
-- A GeomShape is a shape with a geometric domain, i.e.
-- a Face or an Edge.
--
-- The purpose of the ShapeIntersector is to find
-- couples of intersecting GeomShape in two Shapes
-- (which can be any kind of topologies : Compound,
-- Solid, Shell, etc... )
--
-- It is in charge of exploration of the shapes and
-- rejection. For this it is provided with two tools :
--
-- - ShapeExplorer from TopOpeBRepTool.
-- - ShapeScanner from TopOpeBRep which implements bounding boxes.
--
-- Let S1,S2 the shapes sent to InitIntersection(S1,S2) method :
-- - S1 is always SCANNED by a ShapeScanner from TopOpeBRep.
-- - S2 is always EXPLORED by a ShapeExplorer from TopOpeBRepTool.
uses
State from TopAbs,
Orientation from TopAbs,
Shape from TopoDS,
Face from TopoDS,
HBoxTool from TopOpeBRepTool,
ShapeTool from TopOpeBRepTool,
ShapeExplorer from TopOpeBRepTool,
ShapeScanner from TopOpeBRep,
FacesIntersector from TopOpeBRep,
EdgesIntersector from TopOpeBRep,
FaceEdgeIntersector from TopOpeBRep,
--modified by NIZNHY-PKV Fri Sep 24 11:02:16 1999 f
ListOfShape from TopTools
--modified by NIZNHY-PKV Fri Sep 24 11:02:19 1999 t
is
-- -------------------------------
-- intersection between two shapes
-- -------------------------------
Create returns ShapeIntersector from TopOpeBRep;
InitIntersection(me : in out; S1,S2 : Shape from TopoDS)
---Purpose: Initialize the intersection of shapes S1,S2.
is static;
InitIntersection(me : in out; S1,S2 : Shape from TopoDS;
F1,F2 : Face from TopoDS)
---Purpose: Initialize the intersection of shapes S1,S2.
is static;
Reset(me : in out) is static private;
Init(me : in out; S1,S2 : Shape from TopoDS) is static private;
Shape(me; Index : Integer from Standard) returns Shape from TopoDS
---Purpose: return the shape <Index> ( = 1 or 2) given to
-- InitIntersection().
-- Index = 1 will return S1, Index = 2 will return S2.
---C++: return const &
is static;
MoreIntersection(me) returns Boolean from Standard
---Purpose: returns True if there are more intersection
-- between two the shapes.
is static;
NextIntersection(me : in out)
---Purpose: search for the next intersection between the two shapes.
is static;
ChangeFacesIntersector(me : in out)
returns FacesIntersector from TopOpeBRep
---Purpose: return the current intersection of two Faces.
---C++: return &
is static;
ChangeEdgesIntersector(me : in out)
returns EdgesIntersector from TopOpeBRep
---Purpose: return the current intersection of two Edges.
---C++: return &
is static;
ChangeFaceEdgeIntersector(me : in out)
returns FaceEdgeIntersector from TopOpeBRep
---Purpose: return the current intersection of a Face and an Edge.
---C++: return &
is static;
-- -----------------------------------------
-- intersection between two geometric shapes
-- -----------------------------------------
CurrentGeomShape(me; Index : Integer from Standard)
returns Shape from TopoDS
---Purpose: return geometric shape <Index> ( = 1 or 2 ) of
-- current intersection.
---C++ : return const &
is static;
GetTolerances(me; tol1,tol2 : in out Real from Standard)
---Purpose: return MAX of intersection tolerances with
-- which FacesIntersector from TopOpeBRep was working.
is static;
SetIntersectionDone(me : in out) is static private;
-- ----------------------------
-- Faces intersection (private)
-- ----------------------------
InitFFIntersection(me : in out)
is static private;
FindFFIntersection(me : in out)
is static private;
MoreFFCouple(me) returns Boolean from Standard
is static private;
NextFFCouple(me : in out)
is static private;
-- ----------------------------
-- Edges intersection on SameDomain faces (private)
-- ----------------------------
InitEEFFIntersection(me : in out)
is static private;
FindEEFFIntersection(me : in out)
is static private;
MoreEEFFCouple(me) returns Boolean from Standard
is static private;
NextEEFFCouple(me : in out)
is static private;
-- ----------------------------
-- Face/Edge intersection (private)
-- ----------------------------
InitFEIntersection(me : in out)
is static private;
FindFEIntersection(me : in out)
is static private;
MoreFECouple(me) returns Boolean from Standard
is static private;
NextFECouple(me : in out)
is static private;
-- ----------------------------
-- Edge/Face intersection (private)
-- ----------------------------
InitEFIntersection(me : in out)
is static private;
FindEFIntersection(me : in out)
is static private;
MoreEFCouple(me) returns Boolean from Standard
is static private;
NextEFCouple(me : in out)
is static private;
-- ---------------------
-- Edge/Edge in 2d space (private)
-- ---------------------
InitEEIntersection(me : in out)
is static private;
FindEEIntersection(me : in out)
is static private;
MoreEECouple(me) returns Boolean from Standard
is static private;
NextEECouple(me : in out)
is static private;
-- debug
DumpCurrent(me; K : Integer from Standard) is static;
Index(me; K : Integer from Standard)
returns Integer from Standard
is static;
--modified by NIZNHY-PKV Fri Sep 24 10:59:59 1999 f
RejectedFaces (me:out;
anObj:Shape from TopoDS;
aReference:Shape from TopoDS;
aListOfShape:out ListOfShape from TopTools) ;
--modified by NIZNHY-PKV Fri Sep 24 11:00:03 1999 t
fields
myShape1 : Shape from TopoDS;
myShape2 : Shape from TopoDS;
myHBoxTool : HBoxTool from TopOpeBRepTool;
myFaceExplorer : ShapeExplorer from TopOpeBRepTool;
myFaceScanner : ShapeScanner from TopOpeBRep;
myFFIntersector : FacesIntersector from TopOpeBRep;
myFFSameDomain : Boolean from Standard;
myEdgeExplorer : ShapeExplorer from TopOpeBRepTool;
myEdgeScanner : ShapeScanner from TopOpeBRep;
myEEIntersector : EdgesIntersector from TopOpeBRep;
myFEIntersector : FaceEdgeIntersector from TopOpeBRep;
myEEFace1,myEEFace2 : Face from TopoDS;
myIntersectionDone : Boolean from Standard;
myTol1 : Real from Standard;
myTol2 : Real from Standard;
myFFDone : Boolean from Standard;
myEEFFDone : Boolean from Standard;
myEFDone : Boolean from Standard;
myFEDone : Boolean from Standard;
myEEDone : Boolean from Standard;
myFFInit : Boolean from Standard;
myEEFFInit : Boolean from Standard;
myEFInit : Boolean from Standard;
myFEInit : Boolean from Standard;
myEEInit : Boolean from Standard;
end ShapeIntersector from TopOpeBRep;
|