b311480e |
1 | // Created on: 1995-06-22 |
2 | // Created by: Christophe MARION |
3 | // Copyright (c) 1995-1999 Matra Datavision |
973c2be1 |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | // |
973c2be1 |
6 | // This file is part of Open CASCADE Technology software library. |
b311480e |
7 | // |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | // |
973c2be1 |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
733a0e55 |
16 | |
7fd59977 |
17 | #ifndef No_Exception |
18 | #define No_Exception |
19 | #endif |
42cf5bc1 |
20 | |
21 | |
22 | #include <HLRAlgo_BiPoint.hxx> |
7fd59977 |
23 | |
24 | #define PntX1 myCoordinates[ 0] |
25 | #define PntY1 myCoordinates[ 1] |
26 | #define PntZ1 myCoordinates[ 2] |
27 | #define PntX2 myCoordinates[ 3] |
28 | #define PntY2 myCoordinates[ 4] |
29 | #define PntZ2 myCoordinates[ 5] |
30 | #define PntXP1 myCoordinates[ 6] |
31 | #define PntYP1 myCoordinates[ 7] |
32 | #define PntZP1 myCoordinates[ 8] |
33 | #define PntXP2 myCoordinates[ 9] |
34 | #define PntYP2 myCoordinates[10] |
35 | #define PntZP2 myCoordinates[11] |
36 | |
37 | #define ShapeIndex myIndices[0] |
38 | #define FaceConex1 myIndices[1] |
39 | #define Face1Pt1 myIndices[2] |
40 | #define Face1Pt2 myIndices[3] |
41 | #define FaceConex2 myIndices[4] |
42 | #define Face2Pt1 myIndices[5] |
43 | #define Face2Pt2 myIndices[6] |
44 | #define MinSeg myIndices[7] |
45 | #define MaxSeg myIndices[8] |
46 | #define SegFlags myIndices[9] |
47 | |
48 | //======================================================================= |
49 | //function : HLRAlgo_BiPoint |
50 | //purpose : |
51 | //======================================================================= |
52 | |
53 | HLRAlgo_BiPoint::HLRAlgo_BiPoint (const Standard_Real X1, |
54 | const Standard_Real Y1, |
55 | const Standard_Real Z1, |
56 | const Standard_Real X2, |
57 | const Standard_Real Y2, |
58 | const Standard_Real Z2, |
59 | const Standard_Real XT1, |
60 | const Standard_Real YT1, |
61 | const Standard_Real ZT1, |
62 | const Standard_Real XT2, |
63 | const Standard_Real YT2, |
64 | const Standard_Real ZT2, |
65 | const Standard_Integer Index, |
66 | const Standard_Boolean reg1, |
67 | const Standard_Boolean regn, |
68 | const Standard_Boolean outl, |
69 | const Standard_Boolean intl) |
70 | { |
71 | PntX1 = X1; |
72 | PntY1 = Y1; |
73 | PntZ1 = Z1; |
74 | PntX2 = X2; |
75 | PntY2 = Y2; |
76 | PntZ2 = Z2; |
77 | PntXP1 = XT1; |
78 | PntYP1 = YT1; |
79 | PntZP1 = ZT1; |
80 | PntXP2 = XT2; |
81 | PntYP2 = YT2; |
82 | PntZP2 = ZT2; |
83 | ShapeIndex = Index; |
84 | FaceConex1 = Face1Pt1 = Face1Pt2 = |
85 | FaceConex2 = Face2Pt1 = Face2Pt2 = 0; |
86 | SegFlags = 0; |
87 | Rg1Line(reg1); |
88 | RgNLine(regn); |
89 | OutLine(outl); |
90 | IntLine(intl); |
91 | Hidden(Standard_False); |
92 | } |
93 | |
94 | //======================================================================= |
95 | //function : HLRAlgo_BiPoint |
96 | //purpose : |
97 | //======================================================================= |
98 | |
99 | HLRAlgo_BiPoint::HLRAlgo_BiPoint (const Standard_Real X1, |
100 | const Standard_Real Y1, |
101 | const Standard_Real Z1, |
102 | const Standard_Real X2, |
103 | const Standard_Real Y2, |
104 | const Standard_Real Z2, |
105 | const Standard_Real XT1, |
106 | const Standard_Real YT1, |
107 | const Standard_Real ZT1, |
108 | const Standard_Real XT2, |
109 | const Standard_Real YT2, |
110 | const Standard_Real ZT2, |
111 | const Standard_Integer Index, |
dde68833 |
112 | const Standard_Integer flag) |
7fd59977 |
113 | { |
114 | PntX1 = X1; |
115 | PntY1 = Y1; |
116 | PntZ1 = Z1; |
117 | PntX2 = X2; |
118 | PntY2 = Y2; |
119 | PntZ2 = Z2; |
120 | PntXP1 = XT1; |
121 | PntYP1 = YT1; |
122 | PntZP1 = ZT1; |
123 | PntXP2 = XT2; |
124 | PntYP2 = YT2; |
125 | PntZP2 = ZT2; |
126 | ShapeIndex = Index; |
127 | FaceConex1 = Face1Pt1 = Face1Pt2 = |
128 | FaceConex2 = Face2Pt1 = Face2Pt2 = 0; |
129 | SegFlags = flag; |
130 | Hidden(Standard_False); |
131 | } |
132 | |
133 | //======================================================================= |
134 | //function : HLRAlgo_BiPoint |
135 | //purpose : |
136 | //======================================================================= |
137 | |
138 | HLRAlgo_BiPoint::HLRAlgo_BiPoint (const Standard_Real X1, |
139 | const Standard_Real Y1, |
140 | const Standard_Real Z1, |
141 | const Standard_Real X2, |
142 | const Standard_Real Y2, |
143 | const Standard_Real Z2, |
144 | const Standard_Real XT1, |
145 | const Standard_Real YT1, |
146 | const Standard_Real ZT1, |
147 | const Standard_Real XT2, |
148 | const Standard_Real YT2, |
149 | const Standard_Real ZT2, |
150 | const Standard_Integer Index, |
151 | const Standard_Integer i1, |
152 | const Standard_Integer i1p1, |
153 | const Standard_Integer i1p2, |
154 | const Standard_Boolean reg1, |
155 | const Standard_Boolean regn, |
156 | const Standard_Boolean outl, |
157 | const Standard_Boolean intl) |
158 | { |
159 | PntX1 = X1; |
160 | PntY1 = Y1; |
161 | PntZ1 = Z1; |
162 | PntX2 = X2; |
163 | PntY2 = Y2; |
164 | PntZ2 = Z2; |
165 | PntXP1 = XT1; |
166 | PntYP1 = YT1; |
167 | PntZP1 = ZT1; |
168 | PntXP2 = XT2; |
169 | PntYP2 = YT2; |
170 | PntZP2 = ZT2; |
171 | ShapeIndex = Index; |
172 | FaceConex1 = i1; |
173 | Face1Pt1 = i1p1; |
174 | Face1Pt2 = i1p2; |
175 | FaceConex2 = Face2Pt1 = Face2Pt2 = 0; |
176 | SegFlags = 0; |
177 | Rg1Line(reg1); |
178 | RgNLine(regn); |
179 | OutLine(outl); |
180 | IntLine(intl); |
181 | Hidden(Standard_False); |
182 | } |
183 | |
184 | //======================================================================= |
185 | //function : HLRAlgo_BiPoint |
186 | //purpose : |
187 | //======================================================================= |
188 | |
189 | HLRAlgo_BiPoint::HLRAlgo_BiPoint (const Standard_Real X1, |
190 | const Standard_Real Y1, |
191 | const Standard_Real Z1, |
192 | const Standard_Real X2, |
193 | const Standard_Real Y2, |
194 | const Standard_Real Z2, |
195 | const Standard_Real XT1, |
196 | const Standard_Real YT1, |
197 | const Standard_Real ZT1, |
198 | const Standard_Real XT2, |
199 | const Standard_Real YT2, |
200 | const Standard_Real ZT2, |
201 | const Standard_Integer Index, |
202 | const Standard_Integer i1, |
203 | const Standard_Integer i1p1, |
204 | const Standard_Integer i1p2, |
dde68833 |
205 | const Standard_Integer flag) |
7fd59977 |
206 | { |
207 | PntX1 = X1; |
208 | PntY1 = Y1; |
209 | PntZ1 = Z1; |
210 | PntX2 = X2; |
211 | PntY2 = Y2; |
212 | PntZ2 = Z2; |
213 | PntXP1 = XT1; |
214 | PntYP1 = YT1; |
215 | PntZP1 = ZT1; |
216 | PntXP2 = XT2; |
217 | PntYP2 = YT2; |
218 | PntZP2 = ZT2; |
219 | ShapeIndex = Index; |
220 | FaceConex1 = i1; |
221 | Face1Pt1 = i1p1; |
222 | Face1Pt2 = i1p2; |
223 | FaceConex2 = Face2Pt1 = Face2Pt2 = 0; |
224 | SegFlags = flag; |
225 | Hidden(Standard_False); |
226 | } |
227 | |
228 | //======================================================================= |
229 | //function : HLRAlgo_BiPoint |
230 | //purpose : |
231 | //======================================================================= |
232 | |
233 | HLRAlgo_BiPoint::HLRAlgo_BiPoint (const Standard_Real X1, |
234 | const Standard_Real Y1, |
235 | const Standard_Real Z1, |
236 | const Standard_Real X2, |
237 | const Standard_Real Y2, |
238 | const Standard_Real Z2, |
239 | const Standard_Real XT1, |
240 | const Standard_Real YT1, |
241 | const Standard_Real ZT1, |
242 | const Standard_Real XT2, |
243 | const Standard_Real YT2, |
244 | const Standard_Real ZT2, |
245 | const Standard_Integer Index, |
246 | const Standard_Integer i1, |
247 | const Standard_Integer i1p1, |
248 | const Standard_Integer i1p2, |
249 | const Standard_Integer i2, |
250 | const Standard_Integer i2p1, |
251 | const Standard_Integer i2p2, |
252 | const Standard_Boolean reg1, |
253 | const Standard_Boolean regn, |
254 | const Standard_Boolean outl, |
255 | const Standard_Boolean intl) |
256 | { |
257 | PntX1 = X1; |
258 | PntY1 = Y1; |
259 | PntZ1 = Z1; |
260 | PntX2 = X2; |
261 | PntY2 = Y2; |
262 | PntZ2 = Z2; |
263 | PntXP1 = XT1; |
264 | PntYP1 = YT1; |
265 | PntZP1 = ZT1; |
266 | PntXP2 = XT2; |
267 | PntYP2 = YT2; |
268 | PntZP2 = ZT2; |
269 | ShapeIndex = Index; |
270 | FaceConex1 = i1; |
271 | Face1Pt1 = i1p1; |
272 | Face1Pt2 = i1p2; |
273 | FaceConex2 = i2; |
274 | Face2Pt1 = i2p1; |
275 | Face2Pt2 = i2p2; |
276 | SegFlags = 0; |
277 | Rg1Line(reg1); |
278 | RgNLine(regn); |
279 | OutLine(outl); |
280 | IntLine(intl); |
281 | Hidden(Standard_False); |
282 | } |
283 | |
284 | //======================================================================= |
285 | //function : HLRAlgo_BiPoint |
286 | //purpose : |
287 | //======================================================================= |
288 | |
289 | HLRAlgo_BiPoint::HLRAlgo_BiPoint (const Standard_Real X1, |
290 | const Standard_Real Y1, |
291 | const Standard_Real Z1, |
292 | const Standard_Real X2, |
293 | const Standard_Real Y2, |
294 | const Standard_Real Z2, |
295 | const Standard_Real XT1, |
296 | const Standard_Real YT1, |
297 | const Standard_Real ZT1, |
298 | const Standard_Real XT2, |
299 | const Standard_Real YT2, |
300 | const Standard_Real ZT2, |
301 | const Standard_Integer Index, |
302 | const Standard_Integer i1, |
303 | const Standard_Integer i1p1, |
304 | const Standard_Integer i1p2, |
305 | const Standard_Integer i2, |
306 | const Standard_Integer i2p1, |
307 | const Standard_Integer i2p2, |
dde68833 |
308 | const Standard_Integer flag) |
7fd59977 |
309 | { |
310 | PntX1 = X1; |
311 | PntY1 = Y1; |
312 | PntZ1 = Z1; |
313 | PntX2 = X2; |
314 | PntY2 = Y2; |
315 | PntZ2 = Z2; |
316 | PntXP1 = XT1; |
317 | PntYP1 = YT1; |
318 | PntZP1 = ZT1; |
319 | PntXP2 = XT2; |
320 | PntYP2 = YT2; |
321 | PntZP2 = ZT2; |
322 | ShapeIndex = Index; |
323 | FaceConex1 = i1; |
324 | Face1Pt1 = i1p1; |
325 | Face1Pt2 = i1p2; |
326 | FaceConex2 = i2; |
327 | Face2Pt1 = i2p1; |
328 | Face2Pt2 = i2p2; |
329 | SegFlags = flag; |
330 | Hidden(Standard_False); |
331 | } |