// Created on: 2000-01-21
// Created by: data exchange team
// Copyright (c) 2000-2014 OPEN CASCADE SAS
//
// This file is part of Open CASCADE Technology software library.
//
// This library is free software; you can redistribute it and/or modify it under
// the terms of the GNU Lesser General Public License version 2.1 as published
// by the Free Software Foundation, with special exception defined in the file
// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
// distribution for complete text of the license and disclaimer of any warranty.
//
// Alternatively, this file may be used under the terms of Open CASCADE
// commercial license or contractual agreement.

// pdn 05.01.98: renaming method ...Little to ...Small

#include "ShapeExtend.hxx"
#include "ShapeExtend_WireData.hxx"
#include "ShapeAnalysis_Wire.hxx"

//=================================================================================================

inline void ShapeFix_Wire::SetFace(const TopoDS_Face& face)
{
  myAnalyzer->SetFace(face);
}

//=================================================================================================

inline void ShapeFix_Wire::SetSurface(const occ::handle<Geom_Surface>& surf)
{
  myAnalyzer->SetSurface(surf);
}

//=================================================================================================

inline void ShapeFix_Wire::SetFace(const TopoDS_Face&                        theFace,
                                   const occ::handle<ShapeAnalysis_Surface>& theSurfaceAnalysis)
{
  myAnalyzer->SetFace(theFace, theSurfaceAnalysis);
}

//=================================================================================================

inline void ShapeFix_Wire::SetSurface(const occ::handle<ShapeAnalysis_Surface>& theSurfaceAnalysis)
{
  myAnalyzer->SetSurface(theSurfaceAnalysis);
}

//=================================================================================================

inline void ShapeFix_Wire::SetSurface(const occ::handle<Geom_Surface>& surf,
                                      const TopLoc_Location&           loc)
{
  myAnalyzer->SetSurface(surf, loc);
}

//=================================================================================================

inline bool ShapeFix_Wire::IsLoaded() const
{
  return myAnalyzer->IsLoaded();
}

//=================================================================================================

inline bool ShapeFix_Wire::IsReady() const
{
  return myAnalyzer->IsReady();
}

//=================================================================================================

inline TopoDS_Wire ShapeFix_Wire::Wire() const
{
  return myAnalyzer->WireData()->Wire();
}

//=================================================================================================

inline TopoDS_Wire ShapeFix_Wire::WireAPIMake() const
{
  return myAnalyzer->WireData()->WireAPIMake();
}

//=================================================================================================

inline occ::handle<ShapeAnalysis_Wire> ShapeFix_Wire::Analyzer() const
{
  return myAnalyzer;
}

//=================================================================================================

inline const occ::handle<ShapeExtend_WireData>& ShapeFix_Wire::WireData() const
{
  return myAnalyzer->WireData();
}

//=================================================================================================

inline const TopoDS_Face& ShapeFix_Wire::Face() const
{
  return myAnalyzer->Face();
}

//=================================================================================================

inline bool& ShapeFix_Wire::ModifyTopologyMode()
{
  return myTopoMode;
}

//=================================================================================================

inline bool& ShapeFix_Wire::ModifyGeometryMode()
{
  return myGeomMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::ModifyRemoveLoopMode()
{
  return myRemoveLoopMode;
}

//=================================================================================================

inline bool& ShapeFix_Wire::ClosedWireMode()
{
  return myClosedMode;
}

//=================================================================================================

inline bool& ShapeFix_Wire::PreferencePCurveMode()
{
  return myPreference2d;
}

//=================================================================================================

inline bool& ShapeFix_Wire::FixGapsByRangesMode()
{
  return myFixGapsByRanges;
}

//=======================================================================
// function : Fix..Mode for high-level fixes

//=================================================================================================

inline int& ShapeFix_Wire::FixReorderMode()
{
  return myFixReorderMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixSmallMode()
{
  return myFixSmallMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixConnectedMode()
{
  return myFixConnectedMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixEdgeCurvesMode()
{
  return myFixEdgeCurvesMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixDegeneratedMode()
{
  return myFixDegeneratedMode;
}

//=======================================================================
// function : Fix..Mode for low-level fixes

//=================================================================================================

inline int& ShapeFix_Wire::FixReversed2dMode()
{
  return myFixReversed2dMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixRemovePCurveMode()
{
  return myFixRemovePCurveMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixRemoveCurve3dMode()
{
  return myFixRemoveCurve3dMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixAddPCurveMode()
{
  return myFixAddPCurveMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixAddCurve3dMode()
{
  return myFixAddCurve3dMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixSeamMode()
{
  return myFixSeamMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixShiftedMode()
{
  return myFixShiftedMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixSameParameterMode()
{
  return myFixSameParameterMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixVertexToleranceMode()
{
  return myFixVertexToleranceMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixLackingMode()
{
  return myFixLackingMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixSelfIntersectionMode()
{
  return myFixSelfIntersectionMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixGaps3dMode()
{
  return myFixGaps3dMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixGaps2dMode()
{
  return myFixGaps2dMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixNotchedEdgesMode()
{
  return myFixNotchedEdgesMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixSelfIntersectingEdgeMode()
{
  return myFixSelfIntersectingEdgeMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixIntersectingEdgesMode()
{
  return myFixIntersectingEdgesMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixNonAdjacentIntersectingEdgesMode()
{
  return myFixNonAdjacentIntersectingEdgesMode;
}

//=================================================================================================

inline int& ShapeFix_Wire::FixTailMode()
{
  return myFixTailMode;
}

//=======================================================================
// function : Status.. for high-level methods

//=================================================================================================

inline bool ShapeFix_Wire::StatusReorder(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusReorder, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusSmall(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusSmall, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusConnected(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusConnected, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusEdgeCurves(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusEdgeCurves, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusDegenerated(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusDegenerated, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusLacking(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusLacking, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusSelfIntersection(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusSelfIntersection, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusGaps3d(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusGaps3d, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusGaps2d(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusGaps2d, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusClosed(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusClosed, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusNotches(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusNotches, status);
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusFixTails(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myStatusFixTails, status);
}

//=======================================================================
// function : LastFixStatus - Status for low-level methods (common)
// purpose  :
//=======================================================================

inline bool ShapeFix_Wire::LastFixStatus(const ShapeExtend_Status status) const
{
  return ShapeExtend::DecodeStatus(myLastFixStatus, status);
}

//=================================================================================================

inline occ::handle<ShapeFix_Edge> ShapeFix_Wire::FixEdgeTool() const
{
  return myFixEdge;
}

//=================================================================================================

inline bool ShapeFix_Wire::StatusRemovedSegment() const
{
  return myStatusRemovedSegment;
}
