Warning, /include/opencascade/ShapeFix_Wire.lxx is written in an unsupported language. File is not indexed.
0001 // Created on: 2000-01-21
0002 // Created by: data exchange team
0003 // Copyright (c) 2000-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015
0016 // pdn 05.01.98: renaming method ...Little to ...Small
0017
0018 #include <ShapeExtend.hxx>
0019 #include <ShapeExtend_WireData.hxx>
0020 #include <ShapeAnalysis_Wire.hxx>
0021
0022 //=======================================================================
0023 // function : SetFace
0024 // purpose :
0025 //=======================================================================
0026
0027 inline void ShapeFix_Wire::SetFace(const TopoDS_Face& face)
0028 {
0029 myAnalyzer->SetFace(face);
0030 }
0031
0032 //=======================================================================
0033 // function : SetSurface
0034 // purpose :
0035 //=======================================================================
0036
0037 inline void ShapeFix_Wire::SetSurface(const Handle(Geom_Surface)& surf)
0038 {
0039 myAnalyzer->SetSurface(surf);
0040 }
0041
0042 //=======================================================================
0043 // function : SetSurface
0044 // purpose :
0045 //=======================================================================
0046
0047 inline void ShapeFix_Wire::SetSurface(const Handle(Geom_Surface)& surf, const TopLoc_Location& loc)
0048 {
0049 myAnalyzer->SetSurface(surf, loc);
0050 }
0051
0052 //=======================================================================
0053 // function : IsLoaded
0054 // purpose :
0055 //=======================================================================
0056
0057 inline Standard_Boolean ShapeFix_Wire::IsLoaded() const
0058 {
0059 return myAnalyzer->IsLoaded();
0060 }
0061
0062 //=======================================================================
0063 // function : IsReady
0064 // purpose :
0065 //=======================================================================
0066
0067 inline Standard_Boolean ShapeFix_Wire::IsReady() const
0068 {
0069 return myAnalyzer->IsReady();
0070 }
0071
0072 //=======================================================================
0073 // function : Wire
0074 // purpose :
0075 //=======================================================================
0076
0077 inline TopoDS_Wire ShapeFix_Wire::Wire() const
0078 {
0079 return myAnalyzer->WireData()->Wire();
0080 }
0081
0082 //=======================================================================
0083 // function : WireAPIMake
0084 // purpose :
0085 //=======================================================================
0086
0087 inline TopoDS_Wire ShapeFix_Wire::WireAPIMake() const
0088 {
0089 return myAnalyzer->WireData()->WireAPIMake();
0090 }
0091
0092 //=======================================================================
0093 // function : Analyzer
0094 // purpose :
0095 //=======================================================================
0096
0097 inline Handle(ShapeAnalysis_Wire) ShapeFix_Wire::Analyzer() const
0098 {
0099 return myAnalyzer;
0100 }
0101
0102 //=======================================================================
0103 // function : WireData
0104 // purpose :
0105 //=======================================================================
0106
0107 inline const Handle(ShapeExtend_WireData)& ShapeFix_Wire::WireData() const
0108 {
0109 return myAnalyzer->WireData();
0110 }
0111
0112 //=======================================================================
0113 // function : Face
0114 // purpose :
0115 //=======================================================================
0116
0117 inline const TopoDS_Face& ShapeFix_Wire::Face() const
0118 {
0119 return myAnalyzer->Face();
0120 }
0121
0122 //=======================================================================
0123 // function : ModifyTopologyMode
0124 // purpose :
0125 //=======================================================================
0126
0127 inline Standard_Boolean& ShapeFix_Wire::ModifyTopologyMode()
0128 {
0129 return myTopoMode;
0130 }
0131
0132 //=======================================================================
0133 // function : ModifyGeometryMode
0134 // purpose :
0135 //=======================================================================
0136
0137 inline Standard_Boolean& ShapeFix_Wire::ModifyGeometryMode()
0138 {
0139 return myGeomMode;
0140 }
0141
0142 //=======================================================================
0143 // function : ModifyRemoveLoopMode
0144 // purpose :
0145 //=======================================================================
0146
0147 inline Standard_Integer& ShapeFix_Wire::ModifyRemoveLoopMode()
0148 {
0149 return myRemoveLoopMode;
0150 }
0151
0152 //=======================================================================
0153 // function : ClosedWireMode
0154 // purpose :
0155 //=======================================================================
0156
0157 inline Standard_Boolean& ShapeFix_Wire::ClosedWireMode()
0158 {
0159 return myClosedMode;
0160 }
0161
0162 //=======================================================================
0163 // function : PreferencePCurveMode
0164 // purpose :
0165 //=======================================================================
0166
0167 inline Standard_Boolean& ShapeFix_Wire::PreferencePCurveMode()
0168 {
0169 return myPreference2d;
0170 }
0171
0172 //=======================================================================
0173 // function : FixGapsByRangesMode
0174 // purpose :
0175 //=======================================================================
0176
0177 inline Standard_Boolean& ShapeFix_Wire::FixGapsByRangesMode()
0178 {
0179 return myFixGapsByRanges;
0180 }
0181
0182 //=======================================================================
0183 // function : Fix..Mode for high-level fixes
0184
0185 //=======================================================================
0186 // function : FixReorderMode
0187 // purpose :
0188 //=======================================================================
0189
0190 inline Standard_Integer& ShapeFix_Wire::FixReorderMode()
0191 {
0192 return myFixReorderMode;
0193 }
0194
0195 //=======================================================================
0196 // function : FixSmallMode
0197 // purpose :
0198 //=======================================================================
0199
0200 inline Standard_Integer& ShapeFix_Wire::FixSmallMode()
0201 {
0202 return myFixSmallMode;
0203 }
0204
0205 //=======================================================================
0206 // function : FixConnectedMode
0207 // purpose :
0208 //=======================================================================
0209
0210 inline Standard_Integer& ShapeFix_Wire::FixConnectedMode()
0211 {
0212 return myFixConnectedMode;
0213 }
0214
0215 //=======================================================================
0216 // function : FixEdgeCurvesMode
0217 // purpose :
0218 //=======================================================================
0219
0220 inline Standard_Integer& ShapeFix_Wire::FixEdgeCurvesMode()
0221 {
0222 return myFixEdgeCurvesMode;
0223 }
0224
0225 //=======================================================================
0226 // function : FixDegeneratedMode
0227 // purpose :
0228 //=======================================================================
0229
0230 inline Standard_Integer& ShapeFix_Wire::FixDegeneratedMode()
0231 {
0232 return myFixDegeneratedMode;
0233 }
0234
0235 //=======================================================================
0236 // function : Fix..Mode for low-level fixes
0237
0238 //=======================================================================
0239 // function : FixReversed2dMode
0240 // purpose :
0241 //=======================================================================
0242
0243 inline Standard_Integer& ShapeFix_Wire::FixReversed2dMode()
0244 {
0245 return myFixReversed2dMode;
0246 }
0247
0248 //=======================================================================
0249 // function : FixRemovePCurveMode
0250 // purpose :
0251 //=======================================================================
0252
0253 inline Standard_Integer& ShapeFix_Wire::FixRemovePCurveMode()
0254 {
0255 return myFixRemovePCurveMode;
0256 }
0257
0258 //=======================================================================
0259 // function : FixRemoveCurve3dMode
0260 // purpose :
0261 //=======================================================================
0262
0263 inline Standard_Integer& ShapeFix_Wire::FixRemoveCurve3dMode()
0264 {
0265 return myFixRemoveCurve3dMode;
0266 }
0267
0268 //=======================================================================
0269 // function : FixAddPCurveMode
0270 // purpose :
0271 //=======================================================================
0272
0273 inline Standard_Integer& ShapeFix_Wire::FixAddPCurveMode()
0274 {
0275 return myFixAddPCurveMode;
0276 }
0277
0278 //=======================================================================
0279 // function : FixAddCurve3dMode
0280 // purpose :
0281 //=======================================================================
0282
0283 inline Standard_Integer& ShapeFix_Wire::FixAddCurve3dMode()
0284 {
0285 return myFixAddCurve3dMode;
0286 }
0287
0288 //=======================================================================
0289 // function : FixSeamMode
0290 // purpose :
0291 //=======================================================================
0292
0293 inline Standard_Integer& ShapeFix_Wire::FixSeamMode()
0294 {
0295 return myFixSeamMode;
0296 }
0297
0298 //=======================================================================
0299 // function : FixShiftedMode
0300 // purpose :
0301 //=======================================================================
0302
0303 inline Standard_Integer& ShapeFix_Wire::FixShiftedMode()
0304 {
0305 return myFixShiftedMode;
0306 }
0307
0308 //=======================================================================
0309 // function : FixSameParameterMode
0310 // purpose :
0311 //=======================================================================
0312
0313 inline Standard_Integer& ShapeFix_Wire::FixSameParameterMode()
0314 {
0315 return myFixSameParameterMode;
0316 }
0317
0318 //=======================================================================
0319 // function : FixVertexToleranceMode
0320 // purpose :
0321 //=======================================================================
0322
0323 inline Standard_Integer& ShapeFix_Wire::FixVertexToleranceMode()
0324 {
0325 return myFixVertexToleranceMode;
0326 }
0327
0328 //=======================================================================
0329 // function : FixLackingMode
0330 // purpose :
0331 //=======================================================================
0332
0333 inline Standard_Integer& ShapeFix_Wire::FixLackingMode()
0334 {
0335 return myFixLackingMode;
0336 }
0337
0338 //=======================================================================
0339 // function : FixSelfIntersectionMode
0340 // purpose :
0341 //=======================================================================
0342
0343 inline Standard_Integer& ShapeFix_Wire::FixSelfIntersectionMode()
0344 {
0345 return myFixSelfIntersectionMode;
0346 }
0347
0348 //=======================================================================
0349 // function : FixGaps3dMode
0350 // purpose :
0351 //=======================================================================
0352
0353 inline Standard_Integer& ShapeFix_Wire::FixGaps3dMode()
0354 {
0355 return myFixGaps3dMode;
0356 }
0357
0358 //=======================================================================
0359 // function : FixGaps2dMode
0360 // purpose :
0361 //=======================================================================
0362
0363 inline Standard_Integer& ShapeFix_Wire::FixGaps2dMode()
0364 {
0365 return myFixGaps2dMode;
0366 }
0367
0368 //=======================================================================
0369 // function : FixNotchedEdgesMode
0370 // purpose :
0371 //=======================================================================
0372
0373 inline Standard_Integer& ShapeFix_Wire::FixNotchedEdgesMode()
0374 {
0375 return myFixNotchedEdgesMode;
0376 }
0377
0378 //=======================================================================
0379 // function : FixSelfIntersectingEdgeMode
0380 // purpose :
0381 //=======================================================================
0382
0383 inline Standard_Integer& ShapeFix_Wire::FixSelfIntersectingEdgeMode()
0384 {
0385 return myFixSelfIntersectingEdgeMode;
0386 }
0387
0388 //=======================================================================
0389 // function : FixIntersectingEdgesMode
0390 // purpose :
0391 //=======================================================================
0392
0393 inline Standard_Integer& ShapeFix_Wire::FixIntersectingEdgesMode()
0394 {
0395 return myFixIntersectingEdgesMode;
0396 }
0397
0398 //=======================================================================
0399 // function : FixNonAdjacentIntersectingEdgesMode
0400 // purpose :
0401 //=======================================================================
0402
0403 inline Standard_Integer& ShapeFix_Wire::FixNonAdjacentIntersectingEdgesMode()
0404 {
0405 return myFixNonAdjacentIntersectingEdgesMode;
0406 }
0407
0408 //=======================================================================
0409 // function : FixTailMode
0410 // purpose :
0411 //=======================================================================
0412 inline Standard_Integer& ShapeFix_Wire::FixTailMode()
0413 {
0414 return myFixTailMode;
0415 }
0416
0417 //=======================================================================
0418 // function : Status.. for high-level methods
0419
0420 //=======================================================================
0421 // function : StatusReorder
0422 // purpose :
0423 //=======================================================================
0424
0425 inline Standard_Boolean ShapeFix_Wire::StatusReorder(const ShapeExtend_Status status) const
0426 {
0427 return ShapeExtend::DecodeStatus(myStatusReorder, status);
0428 }
0429
0430 //=======================================================================
0431 // function : StatusSmall
0432 // purpose :
0433 //=======================================================================
0434
0435 inline Standard_Boolean ShapeFix_Wire::StatusSmall(const ShapeExtend_Status status) const
0436 {
0437 return ShapeExtend::DecodeStatus(myStatusSmall, status);
0438 }
0439
0440 //=======================================================================
0441 // function : StatusConnected
0442 // purpose :
0443 //=======================================================================
0444
0445 inline Standard_Boolean ShapeFix_Wire::StatusConnected(const ShapeExtend_Status status) const
0446 {
0447 return ShapeExtend::DecodeStatus(myStatusConnected, status);
0448 }
0449
0450 //=======================================================================
0451 // function : StatusEdgeCurves
0452 // purpose :
0453 //=======================================================================
0454
0455 inline Standard_Boolean ShapeFix_Wire::StatusEdgeCurves(const ShapeExtend_Status status) const
0456 {
0457 return ShapeExtend::DecodeStatus(myStatusEdgeCurves, status);
0458 }
0459
0460 //=======================================================================
0461 // function : StatusDegenerated
0462 // purpose :
0463 //=======================================================================
0464
0465 inline Standard_Boolean ShapeFix_Wire::StatusDegenerated(const ShapeExtend_Status status) const
0466 {
0467 return ShapeExtend::DecodeStatus(myStatusDegenerated, status);
0468 }
0469
0470 //=======================================================================
0471 // function : StatusLacking
0472 // purpose :
0473 //=======================================================================
0474
0475 inline Standard_Boolean ShapeFix_Wire::StatusLacking(const ShapeExtend_Status status) const
0476 {
0477 return ShapeExtend::DecodeStatus(myStatusLacking, status);
0478 }
0479
0480 //=======================================================================
0481 // function : StatusSelfIntersection
0482 // purpose :
0483 //=======================================================================
0484
0485 inline Standard_Boolean ShapeFix_Wire::StatusSelfIntersection(const ShapeExtend_Status status) const
0486 {
0487 return ShapeExtend::DecodeStatus(myStatusSelfIntersection, status);
0488 }
0489
0490 //=======================================================================
0491 // function : StatusGaps3d
0492 // purpose :
0493 //=======================================================================
0494
0495 inline Standard_Boolean ShapeFix_Wire::StatusGaps3d(const ShapeExtend_Status status) const
0496 {
0497 return ShapeExtend::DecodeStatus(myStatusGaps3d, status);
0498 }
0499
0500 //=======================================================================
0501 // function : StatusGaps2d
0502 // purpose :
0503 //=======================================================================
0504
0505 inline Standard_Boolean ShapeFix_Wire::StatusGaps2d(const ShapeExtend_Status status) const
0506 {
0507 return ShapeExtend::DecodeStatus(myStatusGaps2d, status);
0508 }
0509
0510 //=======================================================================
0511 // function : StatusClosed
0512 // purpose :
0513 //=======================================================================
0514
0515 inline Standard_Boolean ShapeFix_Wire::StatusClosed(const ShapeExtend_Status status) const
0516 {
0517 return ShapeExtend::DecodeStatus(myStatusClosed, status);
0518 }
0519
0520 //=======================================================================
0521 // function : StatusNotches
0522 // purpose :
0523 //=======================================================================
0524
0525 inline Standard_Boolean ShapeFix_Wire::StatusNotches(const ShapeExtend_Status status) const
0526 {
0527 return ShapeExtend::DecodeStatus(myStatusNotches, status);
0528 }
0529
0530 //=======================================================================
0531 // function : StatusFixTails
0532 // purpose :
0533 //=======================================================================
0534 inline Standard_Boolean ShapeFix_Wire::StatusFixTails(const ShapeExtend_Status status) const
0535 {
0536 return ShapeExtend::DecodeStatus(myStatusFixTails, status);
0537 }
0538
0539 //=======================================================================
0540 // function : LastFixStatus - Status for low-level methods (common)
0541 // purpose :
0542 //=======================================================================
0543
0544 inline Standard_Boolean ShapeFix_Wire::LastFixStatus(const ShapeExtend_Status status) const
0545 {
0546 return ShapeExtend::DecodeStatus(myLastFixStatus, status);
0547 }
0548
0549 //=======================================================================
0550 // function : FixEdgeTool
0551 // purpose :
0552 //=======================================================================
0553
0554 inline Handle(ShapeFix_Edge) ShapeFix_Wire::FixEdgeTool() const
0555 {
0556 return myFixEdge;
0557 }
0558
0559 //=======================================================================
0560 // function : StatusRemovedSegment
0561 // purpose :
0562 //=======================================================================
0563
0564 inline Standard_Boolean ShapeFix_Wire::StatusRemovedSegment() const
0565 {
0566 return myStatusRemovedSegment;
0567 }