1 // Created on: 2000-01-21
2 // Created by: data exchange team
3 // Copyright (c) 2000-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
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.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 // pdn 05.01.98: renaming method ...Little to ...Small
18 #include <ShapeExtend.hxx>
19 #include <ShapeExtend_WireData.hxx>
20 #include <ShapeAnalysis_Wire.hxx>
22 //=======================================================================
25 //=======================================================================
27 inline void ShapeFix_Wire::SetFace(const TopoDS_Face& face)
29 myAnalyzer->SetFace ( face );
32 //=======================================================================
33 //function : SetSurface
35 //=======================================================================
37 inline void ShapeFix_Wire::SetSurface(const Handle(Geom_Surface)& surf)
39 myAnalyzer->SetSurface ( surf );
42 //=======================================================================
43 //function : SetSurface
45 //=======================================================================
47 inline void ShapeFix_Wire::SetSurface(const Handle(Geom_Surface)& surf,const TopLoc_Location& loc)
49 myAnalyzer->SetSurface ( surf, loc );
52 //=======================================================================
55 //=======================================================================
57 inline Standard_Boolean ShapeFix_Wire::IsLoaded() const
59 return myAnalyzer->IsLoaded();
62 //=======================================================================
65 //=======================================================================
67 inline Standard_Boolean ShapeFix_Wire::IsReady() const
69 return myAnalyzer->IsReady();
72 //=======================================================================
75 //=======================================================================
77 inline TopoDS_Wire ShapeFix_Wire::Wire() const
79 return myAnalyzer->WireData()->Wire();
82 //=======================================================================
83 //function : WireAPIMake
85 //=======================================================================
87 inline TopoDS_Wire ShapeFix_Wire::WireAPIMake() const
89 return myAnalyzer->WireData()->WireAPIMake();
92 //=======================================================================
95 //=======================================================================
97 inline Handle(ShapeAnalysis_Wire) ShapeFix_Wire::Analyzer() const
102 //=======================================================================
103 //function : WireData
105 //=======================================================================
107 inline const Handle(ShapeExtend_WireData)& ShapeFix_Wire::WireData() const
109 return myAnalyzer->WireData();
112 //=======================================================================
115 //=======================================================================
117 inline const TopoDS_Face& ShapeFix_Wire::Face() const
119 return myAnalyzer->Face();
122 //=======================================================================
123 //function : ModifyTopologyMode
125 //=======================================================================
127 inline Standard_Boolean& ShapeFix_Wire::ModifyTopologyMode()
132 //=======================================================================
133 //function : ModifyGeometryMode
135 //=======================================================================
137 inline Standard_Boolean& ShapeFix_Wire::ModifyGeometryMode()
142 //=======================================================================
143 //function : ModifyRemoveLoopMode
145 //=======================================================================
147 inline Standard_Integer& ShapeFix_Wire::ModifyRemoveLoopMode()
149 return myRemoveLoopMode;
152 //=======================================================================
153 //function : ClosedWireMode
155 //=======================================================================
157 inline Standard_Boolean& ShapeFix_Wire::ClosedWireMode()
162 //=======================================================================
163 //function : PreferencePCurveMode
165 //=======================================================================
167 inline Standard_Boolean& ShapeFix_Wire::PreferencePCurveMode()
169 return myPreference2d;
172 //=======================================================================
173 //function : FixGapsByRangesMode
175 //=======================================================================
177 inline Standard_Boolean& ShapeFix_Wire::FixGapsByRangesMode()
179 return myFixGapsByRanges;
182 //=======================================================================
183 //function : Fix..Mode for high-level fixes
185 //=======================================================================
186 //function : FixReorderMode
188 //=======================================================================
190 inline Standard_Integer& ShapeFix_Wire::FixReorderMode()
192 return myFixReorderMode;
195 //=======================================================================
196 //function : FixSmallMode
198 //=======================================================================
200 inline Standard_Integer& ShapeFix_Wire::FixSmallMode()
202 return myFixSmallMode;
205 //=======================================================================
206 //function : FixConnectedMode
208 //=======================================================================
210 inline Standard_Integer& ShapeFix_Wire::FixConnectedMode()
212 return myFixConnectedMode;
215 //=======================================================================
216 //function : FixEdgeCurvesMode
218 //=======================================================================
220 inline Standard_Integer& ShapeFix_Wire::FixEdgeCurvesMode()
222 return myFixEdgeCurvesMode;
225 //=======================================================================
226 //function : FixDegeneratedMode
228 //=======================================================================
230 inline Standard_Integer& ShapeFix_Wire::FixDegeneratedMode()
232 return myFixDegeneratedMode;
235 //=======================================================================
236 //function : Fix..Mode for low-level fixes
238 //=======================================================================
239 //function : FixReversed2dMode
241 //=======================================================================
243 inline Standard_Integer& ShapeFix_Wire::FixReversed2dMode()
245 return myFixReversed2dMode;
248 //=======================================================================
249 //function : FixRemovePCurveMode
251 //=======================================================================
253 inline Standard_Integer& ShapeFix_Wire::FixRemovePCurveMode()
255 return myFixRemovePCurveMode;
258 //=======================================================================
259 //function : FixRemoveCurve3dMode
261 //=======================================================================
263 inline Standard_Integer& ShapeFix_Wire::FixRemoveCurve3dMode()
265 return myFixRemoveCurve3dMode;
268 //=======================================================================
269 //function : FixAddPCurveMode
271 //=======================================================================
273 inline Standard_Integer& ShapeFix_Wire::FixAddPCurveMode()
275 return myFixAddPCurveMode;
278 //=======================================================================
279 //function : FixAddCurve3dMode
281 //=======================================================================
283 inline Standard_Integer& ShapeFix_Wire::FixAddCurve3dMode()
285 return myFixAddCurve3dMode;
288 //=======================================================================
289 //function : FixSeamMode
291 //=======================================================================
293 inline Standard_Integer& ShapeFix_Wire::FixSeamMode()
295 return myFixSeamMode;
298 //=======================================================================
299 //function : FixShiftedMode
301 //=======================================================================
303 inline Standard_Integer& ShapeFix_Wire::FixShiftedMode()
305 return myFixShiftedMode;
308 //=======================================================================
309 //function : CheckMissingEdgesMode
311 //=======================================================================
313 inline Standard_Boolean& ShapeFix_Wire::CheckMissingEdgesMode()
315 return myCheckMissingEdges;
318 //=======================================================================
319 //function : FixSameParameterMode
321 //=======================================================================
323 inline Standard_Integer& ShapeFix_Wire::FixSameParameterMode()
325 return myFixSameParameterMode;
328 //=======================================================================
329 //function : FixVertexToleranceMode
331 //=======================================================================
333 inline Standard_Integer& ShapeFix_Wire::FixVertexToleranceMode()
335 return myFixVertexToleranceMode;
338 //=======================================================================
339 //function : FixLackingMode
341 //=======================================================================
343 inline Standard_Integer& ShapeFix_Wire::FixLackingMode()
345 return myFixLackingMode;
348 //=======================================================================
349 //function : FixSelfIntersectionMode
351 //=======================================================================
353 inline Standard_Integer& ShapeFix_Wire::FixSelfIntersectionMode()
355 return myFixSelfIntersectionMode;
358 //=======================================================================
359 //function : FixGaps3dMode
361 //=======================================================================
363 inline Standard_Integer& ShapeFix_Wire::FixGaps3dMode()
365 return myFixGaps3dMode;
368 //=======================================================================
369 //function : FixGaps2dMode
371 //=======================================================================
373 inline Standard_Integer& ShapeFix_Wire::FixGaps2dMode()
375 return myFixGaps2dMode;
378 //=======================================================================
379 //function : FixNotchedEdgesMode
381 //=======================================================================
383 inline Standard_Integer& ShapeFix_Wire::FixNotchedEdgesMode()
385 return myFixNotchedEdgesMode;
388 //=======================================================================
389 //function : FixSelfIntersectingEdgeMode
391 //=======================================================================
393 inline Standard_Integer& ShapeFix_Wire::FixSelfIntersectingEdgeMode()
395 return myFixSelfIntersectingEdgeMode;
398 //=======================================================================
399 //function : FixIntersectingEdgesMode
401 //=======================================================================
403 inline Standard_Integer& ShapeFix_Wire::FixIntersectingEdgesMode()
405 return myFixIntersectingEdgesMode;
408 //=======================================================================
409 //function : FixNonAdjacentIntersectingEdgesMode
411 //=======================================================================
413 inline Standard_Integer& ShapeFix_Wire::FixNonAdjacentIntersectingEdgesMode()
415 return myFixNonAdjacentIntersectingEdgesMode;
418 //=======================================================================
419 //function : FixTailMode
421 //=======================================================================
422 inline Standard_Integer& ShapeFix_Wire::FixTailMode()
424 return myFixTailMode;
427 //=======================================================================
428 //function : Status.. for high-level methods
430 //=======================================================================
431 //function : StatusReorder
433 //=======================================================================
435 inline Standard_Boolean ShapeFix_Wire::StatusReorder(const ShapeExtend_Status status) const
437 return ShapeExtend::DecodeStatus ( myStatusReorder, status );
440 //=======================================================================
441 //function : StatusSmall
443 //=======================================================================
445 inline Standard_Boolean ShapeFix_Wire::StatusSmall(const ShapeExtend_Status status) const
447 return ShapeExtend::DecodeStatus ( myStatusSmall, status );
450 //=======================================================================
451 //function : StatusConnected
453 //=======================================================================
455 inline Standard_Boolean ShapeFix_Wire::StatusConnected(const ShapeExtend_Status status) const
457 return ShapeExtend::DecodeStatus ( myStatusConnected, status );
460 //=======================================================================
461 //function : StatusEdgeCurves
463 //=======================================================================
465 inline Standard_Boolean ShapeFix_Wire::StatusEdgeCurves(const ShapeExtend_Status status) const
467 return ShapeExtend::DecodeStatus ( myStatusEdgeCurves, status );
470 //=======================================================================
471 //function : StatusDegenerated
473 //=======================================================================
475 inline Standard_Boolean ShapeFix_Wire::StatusDegenerated(const ShapeExtend_Status status) const
477 return ShapeExtend::DecodeStatus ( myStatusDegenerated, status );
480 //=======================================================================
481 //function : StatusLacking
483 //=======================================================================
485 inline Standard_Boolean ShapeFix_Wire::StatusLacking(const ShapeExtend_Status status) const
487 return ShapeExtend::DecodeStatus ( myStatusLacking, status );
490 //=======================================================================
491 //function : StatusSelfIntersection
493 //=======================================================================
495 inline Standard_Boolean ShapeFix_Wire::StatusSelfIntersection(const ShapeExtend_Status status) const
497 return ShapeExtend::DecodeStatus ( myStatusSelfIntersection, status );
500 //=======================================================================
501 //function : StatusGaps3d
503 //=======================================================================
505 inline Standard_Boolean ShapeFix_Wire::StatusGaps3d(const ShapeExtend_Status status) const
507 return ShapeExtend::DecodeStatus ( myStatusGaps3d, status );
510 //=======================================================================
511 //function : StatusGaps2d
513 //=======================================================================
515 inline Standard_Boolean ShapeFix_Wire::StatusGaps2d(const ShapeExtend_Status status) const
517 return ShapeExtend::DecodeStatus ( myStatusGaps2d, status );
520 //=======================================================================
521 //function : StatusClosed
523 //=======================================================================
525 inline Standard_Boolean ShapeFix_Wire::StatusClosed(const ShapeExtend_Status status) const
527 return ShapeExtend::DecodeStatus ( myStatusClosed, status );
529 //=======================================================================
530 //function : StatusNotches
532 //=======================================================================
534 inline Standard_Boolean ShapeFix_Wire::StatusNotches(const ShapeExtend_Status status) const
536 return ShapeExtend::DecodeStatus ( myStatusNotches, status );
539 //=======================================================================
540 //function : StatusFixTails
542 //=======================================================================
543 inline Standard_Boolean ShapeFix_Wire::StatusFixTails(const ShapeExtend_Status status) const
545 return ShapeExtend::DecodeStatus(myStatusFixTails, status);
548 //=======================================================================
549 //function : LastFixStatus - Status for low-level methods (common)
551 //=======================================================================
553 inline Standard_Boolean ShapeFix_Wire::LastFixStatus(const ShapeExtend_Status status) const
555 return ShapeExtend::DecodeStatus ( myLastFixStatus, status );
558 //=======================================================================
559 //function : FixEdgeTool
561 //=======================================================================
563 inline Handle(ShapeFix_Edge) ShapeFix_Wire::FixEdgeTool() const
568 //=======================================================================
569 //function : StatusRemovedSegment
571 //=======================================================================
573 inline Standard_Boolean ShapeFix_Wire::StatusRemovedSegment() const
575 return myStatusRemovedSegment;