ae139489f5f5e071b4c035ef72ff101cf8762c10
[occt.git] / src / ShapeFix / ShapeFix_Wire.lxx
1 // Created on: 2000-01-21
2 // Created by: data exchange team
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 // pdn 05.01.98: renaming method ...Little to ...Small
17
18 #include <ShapeExtend.hxx>
19 #include <ShapeExtend_WireData.hxx>
20 #include <ShapeAnalysis_Wire.hxx>
21
22 //=======================================================================
23 //function : SetFace
24 //purpose  : 
25 //=======================================================================
26
27 inline  void ShapeFix_Wire::SetFace(const TopoDS_Face& face) 
28 {
29   myAnalyzer->SetFace ( face );
30 }
31  
32 //=======================================================================
33 //function : SetSurface
34 //purpose  : 
35 //=======================================================================
36
37 inline  void ShapeFix_Wire::SetSurface(const Handle(Geom_Surface)& surf) 
38 {
39   myAnalyzer->SetSurface ( surf );
40 }
41  
42 //=======================================================================
43 //function : SetSurface
44 //purpose  : 
45 //=======================================================================
46
47 inline  void ShapeFix_Wire::SetSurface(const Handle(Geom_Surface)& surf,const TopLoc_Location& loc) 
48 {
49   myAnalyzer->SetSurface ( surf, loc );
50 }
51  
52 //=======================================================================
53 //function : IsLoaded
54 //purpose  : 
55 //=======================================================================
56
57 inline  Standard_Boolean ShapeFix_Wire::IsLoaded() const
58 {
59   return myAnalyzer->IsLoaded();
60 }
61  
62 //=======================================================================
63 //function : IsReady
64 //purpose  : 
65 //=======================================================================
66
67 inline  Standard_Boolean ShapeFix_Wire::IsReady() const
68 {
69   return myAnalyzer->IsReady();
70 }
71
72 //=======================================================================
73 //function : Wire
74 //purpose  : 
75 //=======================================================================
76
77 inline  TopoDS_Wire ShapeFix_Wire::Wire() const
78 {
79   return myAnalyzer->WireData()->Wire();
80 }
81
82 //=======================================================================
83 //function : WireAPIMake
84 //purpose  : 
85 //=======================================================================
86
87 inline  TopoDS_Wire ShapeFix_Wire::WireAPIMake() const
88 {
89   return myAnalyzer->WireData()->WireAPIMake();
90 }
91  
92 //=======================================================================
93 //function : Analyzer
94 //purpose  : 
95 //=======================================================================
96
97 inline Handle(ShapeAnalysis_Wire) ShapeFix_Wire::Analyzer() const
98 {
99   return myAnalyzer;
100 }
101
102 //=======================================================================
103 //function : WireData
104 //purpose  : 
105 //=======================================================================
106
107 inline const Handle(ShapeExtend_WireData)& ShapeFix_Wire::WireData() const
108 {
109   return myAnalyzer->WireData();
110 }
111
112 //=======================================================================
113 //function : Face
114 //purpose  : 
115 //=======================================================================
116
117 inline const TopoDS_Face& ShapeFix_Wire::Face() const
118 {
119   return myAnalyzer->Face();
120 }
121  
122 //=======================================================================
123 //function : ModifyTopologyMode
124 //purpose  : 
125 //=======================================================================
126
127 inline  Standard_Boolean& ShapeFix_Wire::ModifyTopologyMode() 
128 {
129   return myTopoMode;
130 }
131
132 //=======================================================================
133 //function : ModifyGeometryMode
134 //purpose  : 
135 //=======================================================================
136
137 inline  Standard_Boolean& ShapeFix_Wire::ModifyGeometryMode() 
138 {
139   return myGeomMode;
140 }
141
142 //=======================================================================
143 //function : ModifyRemoveLoopMode
144 //purpose  : 
145 //=======================================================================
146
147 inline  Standard_Integer& ShapeFix_Wire::ModifyRemoveLoopMode() 
148 {
149   return myRemoveLoopMode;
150 }
151
152 //=======================================================================
153 //function : ClosedWireMode
154 //purpose  : 
155 //=======================================================================
156
157 inline  Standard_Boolean& ShapeFix_Wire::ClosedWireMode() 
158 {
159   return myClosedMode;
160 }
161
162 //=======================================================================
163 //function : PreferencePCurveMode
164 //purpose  : 
165 //=======================================================================
166
167 inline  Standard_Boolean& ShapeFix_Wire::PreferencePCurveMode() 
168 {
169   return myPreference2d;
170 }
171
172 //=======================================================================
173 //function : FixGapsByRangesMode
174 //purpose  : 
175 //=======================================================================
176
177 inline  Standard_Boolean& ShapeFix_Wire::FixGapsByRangesMode() 
178 {
179   return myFixGapsByRanges;
180 }
181
182 //=======================================================================
183 //function : Fix..Mode for high-level fixes
184
185 //=======================================================================
186 //function : FixReorderMode
187 //purpose  : 
188 //=======================================================================
189
190 inline  Standard_Integer& ShapeFix_Wire::FixReorderMode()
191 {
192   return myFixReorderMode;
193 }
194  
195 //=======================================================================
196 //function : FixSmallMode
197 //purpose  : 
198 //=======================================================================
199
200 inline  Standard_Integer& ShapeFix_Wire::FixSmallMode()
201 {
202   return myFixSmallMode;
203 }
204
205 //=======================================================================
206 //function : FixConnectedMode
207 //purpose  : 
208 //=======================================================================
209
210 inline  Standard_Integer& ShapeFix_Wire::FixConnectedMode()
211 {
212   return myFixConnectedMode;
213 }
214  
215 //=======================================================================
216 //function : FixEdgeCurvesMode
217 //purpose  : 
218 //=======================================================================
219
220 inline  Standard_Integer& ShapeFix_Wire::FixEdgeCurvesMode()
221 {
222   return myFixEdgeCurvesMode;
223 }
224  
225 //=======================================================================
226 //function : FixDegeneratedMode
227 //purpose  : 
228 //=======================================================================
229
230 inline  Standard_Integer& ShapeFix_Wire::FixDegeneratedMode()
231 {
232   return myFixDegeneratedMode;
233 }
234  
235 //=======================================================================
236 //function : Fix..Mode for low-level fixes
237  
238 //=======================================================================
239 //function : FixReversed2dMode
240 //purpose  : 
241 //=======================================================================
242
243 inline  Standard_Integer& ShapeFix_Wire::FixReversed2dMode()
244 {
245   return myFixReversed2dMode;
246 }
247  
248 //=======================================================================
249 //function : FixRemovePCurveMode
250 //purpose  : 
251 //=======================================================================
252
253 inline  Standard_Integer& ShapeFix_Wire::FixRemovePCurveMode()
254 {
255   return myFixRemovePCurveMode;
256 }
257  
258 //=======================================================================
259 //function : FixRemoveCurve3dMode
260 //purpose  : 
261 //=======================================================================
262
263 inline  Standard_Integer& ShapeFix_Wire::FixRemoveCurve3dMode()
264 {
265   return myFixRemoveCurve3dMode;
266 }
267  
268 //=======================================================================
269 //function : FixAddPCurveMode
270 //purpose  : 
271 //=======================================================================
272
273 inline  Standard_Integer& ShapeFix_Wire::FixAddPCurveMode()
274 {
275   return myFixAddPCurveMode;
276 }
277  
278 //=======================================================================
279 //function : FixAddCurve3dMode
280 //purpose  : 
281 //=======================================================================
282
283 inline  Standard_Integer& ShapeFix_Wire::FixAddCurve3dMode()
284 {
285   return myFixAddCurve3dMode;
286 }
287  
288 //=======================================================================
289 //function : FixSeamMode
290 //purpose  : 
291 //=======================================================================
292
293 inline  Standard_Integer& ShapeFix_Wire::FixSeamMode()
294 {
295   return myFixSeamMode;
296 }
297
298 //=======================================================================
299 //function : FixShiftedMode
300 //purpose  : 
301 //=======================================================================
302
303 inline  Standard_Integer& ShapeFix_Wire::FixShiftedMode()
304 {
305   return myFixShiftedMode;
306 }
307  
308 //=======================================================================
309 //function : CheckMissingEdgesMode
310 //purpose  : 
311 //=======================================================================
312
313 inline  Standard_Boolean& ShapeFix_Wire::CheckMissingEdgesMode()
314 {
315   return myCheckMissingEdges;
316 }
317  
318 //=======================================================================
319 //function : FixSameParameterMode
320 //purpose  : 
321 //=======================================================================
322
323 inline  Standard_Integer& ShapeFix_Wire::FixSameParameterMode()
324 {
325   return myFixSameParameterMode;
326 }
327  
328 //=======================================================================
329 //function : FixVertexToleranceMode
330 //purpose  : 
331 //=======================================================================
332
333 inline  Standard_Integer& ShapeFix_Wire::FixVertexToleranceMode()
334 {
335   return myFixVertexToleranceMode;
336 }
337  
338 //=======================================================================
339 //function : FixLackingMode
340 //purpose  : 
341 //=======================================================================
342
343 inline  Standard_Integer& ShapeFix_Wire::FixLackingMode()
344 {
345   return myFixLackingMode;
346 }
347
348 //=======================================================================
349 //function : FixSelfIntersectionMode
350 //purpose  : 
351 //=======================================================================
352
353 inline  Standard_Integer& ShapeFix_Wire::FixSelfIntersectionMode()
354 {
355   return myFixSelfIntersectionMode;
356 }
357  
358 //=======================================================================
359 //function : FixGaps3dMode
360 //purpose  : 
361 //=======================================================================
362
363 inline  Standard_Integer& ShapeFix_Wire::FixGaps3dMode() 
364 {
365   return myFixGaps3dMode;
366 }
367
368 //=======================================================================
369 //function : FixGaps2dMode
370 //purpose  : 
371 //=======================================================================
372
373 inline  Standard_Integer& ShapeFix_Wire::FixGaps2dMode() 
374 {
375   return myFixGaps2dMode;
376 }
377
378 //=======================================================================
379 //function : FixNotchedEdgesMode
380 //purpose  : 
381 //=======================================================================
382
383 inline Standard_Integer& ShapeFix_Wire::FixNotchedEdgesMode()
384 {
385   return myFixNotchedEdgesMode;
386 }
387
388 //=======================================================================
389 //function : FixSelfIntersectingEdgeMode
390 //purpose  : 
391 //=======================================================================
392
393 inline  Standard_Integer& ShapeFix_Wire::FixSelfIntersectingEdgeMode()
394 {
395   return myFixSelfIntersectingEdgeMode;
396 }
397  
398 //=======================================================================
399 //function : FixIntersectingEdgesMode
400 //purpose  : 
401 //=======================================================================
402
403 inline  Standard_Integer& ShapeFix_Wire::FixIntersectingEdgesMode()
404 {
405   return myFixIntersectingEdgesMode;
406 }
407
408 //=======================================================================
409 //function : FixNonAdjacentIntersectingEdgesMode
410 //purpose  : 
411 //=======================================================================
412
413 inline  Standard_Integer& ShapeFix_Wire::FixNonAdjacentIntersectingEdgesMode()
414 {
415   return myFixNonAdjacentIntersectingEdgesMode;
416 }
417
418 //=======================================================================
419 //function : FixTailMode
420 //purpose  :
421 //=======================================================================
422 inline Standard_Integer& ShapeFix_Wire::FixTailMode()
423 {
424   return myFixTailMode;
425 }
426
427 //=======================================================================
428 //function : Status.. for high-level methods
429
430 //=======================================================================
431 //function : StatusReorder
432 //purpose  : 
433 //=======================================================================
434
435 inline  Standard_Boolean ShapeFix_Wire::StatusReorder(const ShapeExtend_Status status) const
436 {
437   return ShapeExtend::DecodeStatus ( myStatusReorder, status ); 
438 }
439  
440 //=======================================================================
441 //function : StatusSmall
442 //purpose  : 
443 //=======================================================================
444
445 inline  Standard_Boolean ShapeFix_Wire::StatusSmall(const ShapeExtend_Status status) const
446 {
447   return ShapeExtend::DecodeStatus ( myStatusSmall, status ); 
448 }
449
450 //=======================================================================
451 //function : StatusConnected
452 //purpose  : 
453 //=======================================================================
454
455 inline  Standard_Boolean ShapeFix_Wire::StatusConnected(const ShapeExtend_Status status) const
456 {
457   return ShapeExtend::DecodeStatus ( myStatusConnected, status ); 
458 }
459
460 //=======================================================================
461 //function : StatusEdgeCurves
462 //purpose  : 
463 //=======================================================================
464
465 inline  Standard_Boolean ShapeFix_Wire::StatusEdgeCurves(const ShapeExtend_Status status) const
466 {
467   return ShapeExtend::DecodeStatus ( myStatusEdgeCurves, status ); 
468 }
469
470 //=======================================================================
471 //function : StatusDegenerated
472 //purpose  : 
473 //=======================================================================
474
475 inline  Standard_Boolean ShapeFix_Wire::StatusDegenerated(const ShapeExtend_Status status) const
476 {
477   return ShapeExtend::DecodeStatus ( myStatusDegenerated, status ); 
478 }
479  
480 //=======================================================================
481 //function : StatusLacking
482 //purpose  : 
483 //=======================================================================
484
485 inline  Standard_Boolean ShapeFix_Wire::StatusLacking(const ShapeExtend_Status status) const
486 {
487   return ShapeExtend::DecodeStatus ( myStatusLacking, status ); 
488 }
489  
490 //=======================================================================
491 //function : StatusSelfIntersection
492 //purpose  : 
493 //=======================================================================
494
495 inline  Standard_Boolean ShapeFix_Wire::StatusSelfIntersection(const ShapeExtend_Status status) const
496 {
497   return ShapeExtend::DecodeStatus ( myStatusSelfIntersection, status ); 
498 }
499
500 //=======================================================================
501 //function : StatusGaps3d
502 //purpose  : 
503 //=======================================================================
504
505 inline  Standard_Boolean ShapeFix_Wire::StatusGaps3d(const ShapeExtend_Status status) const
506 {
507   return ShapeExtend::DecodeStatus ( myStatusGaps3d, status );
508 }
509
510 //=======================================================================
511 //function : StatusGaps2d
512 //purpose  : 
513 //=======================================================================
514
515 inline  Standard_Boolean ShapeFix_Wire::StatusGaps2d(const ShapeExtend_Status status) const
516 {
517   return ShapeExtend::DecodeStatus ( myStatusGaps2d, status );
518 }
519  
520 //=======================================================================
521 //function : StatusClosed
522 //purpose  : 
523 //=======================================================================
524
525 inline  Standard_Boolean ShapeFix_Wire::StatusClosed(const ShapeExtend_Status status) const
526 {
527   return ShapeExtend::DecodeStatus ( myStatusClosed, status ); 
528 }
529 //=======================================================================
530 //function : StatusNotches
531 //purpose  : 
532 //=======================================================================
533
534 inline  Standard_Boolean ShapeFix_Wire::StatusNotches(const ShapeExtend_Status status) const
535 {
536   return ShapeExtend::DecodeStatus ( myStatusNotches, status ); 
537
538
539 //=======================================================================
540 //function : StatusFixTails
541 //purpose  :
542 //=======================================================================
543 inline Standard_Boolean ShapeFix_Wire::StatusFixTails(const ShapeExtend_Status status) const
544 {
545   return ShapeExtend::DecodeStatus(myStatusFixTails, status);
546 }
547
548 //=======================================================================
549 //function : LastFixStatus - Status for low-level methods (common)
550 //purpose  : 
551 //=======================================================================
552
553 inline  Standard_Boolean ShapeFix_Wire::LastFixStatus(const ShapeExtend_Status status) const
554 {
555   return ShapeExtend::DecodeStatus ( myLastFixStatus, status ); 
556 }
557
558 //=======================================================================
559 //function : FixEdgeTool
560 //purpose  : 
561 //=======================================================================
562
563 inline  Handle(ShapeFix_Edge) ShapeFix_Wire::FixEdgeTool() const
564 {
565   return myFixEdge;
566 }
567
568 //=======================================================================
569 //function : StatusRemovedSegment
570 //purpose  : 
571 //=======================================================================
572
573 inline  Standard_Boolean ShapeFix_Wire::StatusRemovedSegment() const
574 {
575   return myStatusRemovedSegment;
576 }