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 : FixSameParameterMode
311 //=======================================================================
313 inline Standard_Integer& ShapeFix_Wire::FixSameParameterMode()
315 return myFixSameParameterMode;
318 //=======================================================================
319 //function : FixVertexToleranceMode
321 //=======================================================================
323 inline Standard_Integer& ShapeFix_Wire::FixVertexToleranceMode()
325 return myFixVertexToleranceMode;
328 //=======================================================================
329 //function : FixLackingMode
331 //=======================================================================
333 inline Standard_Integer& ShapeFix_Wire::FixLackingMode()
335 return myFixLackingMode;
338 //=======================================================================
339 //function : FixSelfIntersectionMode
341 //=======================================================================
343 inline Standard_Integer& ShapeFix_Wire::FixSelfIntersectionMode()
345 return myFixSelfIntersectionMode;
348 //=======================================================================
349 //function : FixGaps3dMode
351 //=======================================================================
353 inline Standard_Integer& ShapeFix_Wire::FixGaps3dMode()
355 return myFixGaps3dMode;
358 //=======================================================================
359 //function : FixGaps2dMode
361 //=======================================================================
363 inline Standard_Integer& ShapeFix_Wire::FixGaps2dMode()
365 return myFixGaps2dMode;
368 //=======================================================================
369 //function : FixNotchedEdgesMode
371 //=======================================================================
373 inline Standard_Integer& ShapeFix_Wire::FixNotchedEdgesMode()
375 return myFixNotchedEdgesMode;
378 //=======================================================================
379 //function : FixSelfIntersectingEdgeMode
381 //=======================================================================
383 inline Standard_Integer& ShapeFix_Wire::FixSelfIntersectingEdgeMode()
385 return myFixSelfIntersectingEdgeMode;
388 //=======================================================================
389 //function : FixIntersectingEdgesMode
391 //=======================================================================
393 inline Standard_Integer& ShapeFix_Wire::FixIntersectingEdgesMode()
395 return myFixIntersectingEdgesMode;
398 //=======================================================================
399 //function : FixNonAdjacentIntersectingEdgesMode
401 //=======================================================================
403 inline Standard_Integer& ShapeFix_Wire::FixNonAdjacentIntersectingEdgesMode()
405 return myFixNonAdjacentIntersectingEdgesMode;
408 //=======================================================================
409 //function : Status.. for high-level methods
411 //=======================================================================
412 //function : StatusReorder
414 //=======================================================================
416 inline Standard_Boolean ShapeFix_Wire::StatusReorder(const ShapeExtend_Status status) const
418 return ShapeExtend::DecodeStatus ( myStatusReorder, status );
421 //=======================================================================
422 //function : StatusSmall
424 //=======================================================================
426 inline Standard_Boolean ShapeFix_Wire::StatusSmall(const ShapeExtend_Status status) const
428 return ShapeExtend::DecodeStatus ( myStatusSmall, status );
431 //=======================================================================
432 //function : StatusConnected
434 //=======================================================================
436 inline Standard_Boolean ShapeFix_Wire::StatusConnected(const ShapeExtend_Status status) const
438 return ShapeExtend::DecodeStatus ( myStatusConnected, status );
441 //=======================================================================
442 //function : StatusEdgeCurves
444 //=======================================================================
446 inline Standard_Boolean ShapeFix_Wire::StatusEdgeCurves(const ShapeExtend_Status status) const
448 return ShapeExtend::DecodeStatus ( myStatusEdgeCurves, status );
451 //=======================================================================
452 //function : StatusDegenerated
454 //=======================================================================
456 inline Standard_Boolean ShapeFix_Wire::StatusDegenerated(const ShapeExtend_Status status) const
458 return ShapeExtend::DecodeStatus ( myStatusDegenerated, status );
461 //=======================================================================
462 //function : StatusLacking
464 //=======================================================================
466 inline Standard_Boolean ShapeFix_Wire::StatusLacking(const ShapeExtend_Status status) const
468 return ShapeExtend::DecodeStatus ( myStatusLacking, status );
471 //=======================================================================
472 //function : StatusSelfIntersection
474 //=======================================================================
476 inline Standard_Boolean ShapeFix_Wire::StatusSelfIntersection(const ShapeExtend_Status status) const
478 return ShapeExtend::DecodeStatus ( myStatusSelfIntersection, status );
481 //=======================================================================
482 //function : StatusGaps3d
484 //=======================================================================
486 inline Standard_Boolean ShapeFix_Wire::StatusGaps3d(const ShapeExtend_Status status) const
488 return ShapeExtend::DecodeStatus ( myStatusGaps3d, status );
491 //=======================================================================
492 //function : StatusGaps2d
494 //=======================================================================
496 inline Standard_Boolean ShapeFix_Wire::StatusGaps2d(const ShapeExtend_Status status) const
498 return ShapeExtend::DecodeStatus ( myStatusGaps2d, status );
501 //=======================================================================
502 //function : StatusClosed
504 //=======================================================================
506 inline Standard_Boolean ShapeFix_Wire::StatusClosed(const ShapeExtend_Status status) const
508 return ShapeExtend::DecodeStatus ( myStatusClosed, status );
510 //=======================================================================
511 //function : StatusNotches
513 //=======================================================================
515 inline Standard_Boolean ShapeFix_Wire::StatusNotches(const ShapeExtend_Status status) const
517 return ShapeExtend::DecodeStatus ( myStatusNotches, status );
519 //=======================================================================
520 //function : LastFixStatus - Status for low-level methods (common)
522 //=======================================================================
524 inline Standard_Boolean ShapeFix_Wire::LastFixStatus(const ShapeExtend_Status status) const
526 return ShapeExtend::DecodeStatus ( myLastFixStatus, status );
529 //=======================================================================
530 //function : FixEdgeTool
532 //=======================================================================
534 inline Handle(ShapeFix_Edge) ShapeFix_Wire::FixEdgeTool() const
539 //=======================================================================
540 //function : StatusRemovedSegment
542 //=======================================================================
544 inline Standard_Boolean ShapeFix_Wire::StatusRemovedSegment() const
546 return myStatusRemovedSegment;