// File generated by CPPExt (Value)
//
//                     Copyright (C) 1991 - 2000 by  
//                      Matra Datavision SA.  All rights reserved.
//  
//                     Copyright (C) 2001 - 2004 by
//                     Open CASCADE SA.  All rights reserved.
// 
// This file is part of the Open CASCADE Technology software.
//
// This software may be distributed and/or modified under the terms and
// conditions of the Open CASCADE Public License as defined by Open CASCADE SA
// and appearing in the file LICENSE included in the packaging of this file.
//  
// This software is distributed on an "AS IS" basis, without warranty of any
// kind, and Open CASCADE SA hereby disclaims all such warranties,
// including without limitation, any warranties of merchantability, fitness
// for a particular purpose or non-infringement. Please see the License for
// the specific terms and conditions governing rights and limitations under the
// License.

#ifndef _ShapeFix_HeaderFile
#define _ShapeFix_HeaderFile

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Handle_ShapeBuild_ReShape_HeaderFile
#include <Handle_ShapeBuild_ReShape.hxx>
#endif
class TopoDS_Shape;
class ShapeBuild_ReShape;
class ShapeFix_Root;
class ShapeFix_EdgeProjAux;
class ShapeFix_Edge;
class ShapeFix_Wire;
class ShapeFix_Face;
class ShapeFix_FixSmallFace;
class ShapeFix_WireVertex;
class ShapeFix_Wireframe;
class ShapeFix_FreeBounds;
class ShapeFix_FaceConnect;
class ShapeFix_Shell;
class ShapeFix_Solid;
class ShapeFix_ShapeTolerance;
class ShapeFix_Shape;
class ShapeFix_EdgeConnect;
class ShapeFix_ComposeShell;
class ShapeFix_SplitCommonVertex;
class ShapeFix_WireSegment;
class ShapeFix_IntersectionTool;
class ShapeFix_SplitTool;
class ShapeFix_SequenceOfWireSegment;
class ShapeFix_DataMapOfShapeBox2d;
class ShapeFix_SequenceNodeOfSequenceOfWireSegment;
class ShapeFix_DataMapNodeOfDataMapOfShapeBox2d;
class ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d;


#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

//!  This package provides algorithms for fixing <br>
//! problematic (violating Open CASCADE requirements) shapes. <br>
//! Tools from package ShapeAnalysis are used for detecting the problems. The <br>
//! detecting and fixing is done taking in account various <br>
//! criteria implemented in BRepCheck package. <br>
//! Each class of package ShapeFix deals with one <br>
//! certain type of shapes or with some family of problems. <br>
class ShapeFix  {

public:

    void* operator new(size_t,void* anAddress) 
      {
        return anAddress;
      }
    void* operator new(size_t size) 
      { 
        return Standard::Allocate(size); 
      }
    void  operator delete(void *anAddress) 
      { 
        if (anAddress) Standard::Free((Standard_Address&)anAddress); 
      }
 // Methods PUBLIC
 // 

//! Runs SameParameter from BRepLib with these adaptations : <br>
//!           <enforce> forces computations, else they are made only on <br>
//!             Edges with flag SameParameter false <br>
//!           <preci>, if not precised, is taken for each EDge as its own <br>
//!           Tolerance <br>
//!           Returns True when done, False if an exception has been raised <br>
//!           In case of exception anyway, as many edges as possible have <br>
//!           been processed <br>
Standard_EXPORT static  Standard_Boolean SameParameter(const TopoDS_Shape& shape,const Standard_Boolean enforce,const Standard_Real preci = 0.0) ;

//! Runs EncodeRegularity from BRepLib taking into account <br>
//!           shared components of assemblies, so that each component <br>
//!           is processed only once <br>
Standard_EXPORT static  void EncodeRegularity(const TopoDS_Shape& shape,const Standard_Real tolang = 1.0e-10) ;

//! Removes edges which are less than given tolerance from shape <br>
//!          with help of ShapeFix_Wire::FixSmall() <br>
Standard_EXPORT static  TopoDS_Shape RemoveSmallEdges(TopoDS_Shape& shape,const Standard_Real Tolerance,Handle(ShapeBuild_ReShape)& context) ;

//! Fix position of the vertices having tolerance more tnan specified one.; <br>
Standard_EXPORT static  Standard_Boolean FixVertexPosition(TopoDS_Shape& theshape,const Standard_Real theTolerance,const Handle(ShapeBuild_ReShape)& thecontext) ;





protected:

 // Methods PROTECTED
 // 


 // Fields PROTECTED
 //


private: 

 // Methods PRIVATE
 // 


 // Fields PRIVATE
 //

friend class ShapeFix_Root;
friend class ShapeFix_EdgeProjAux;
friend class ShapeFix_Edge;
friend class ShapeFix_Wire;
friend class ShapeFix_Face;
friend class ShapeFix_FixSmallFace;
friend class ShapeFix_WireVertex;
friend class ShapeFix_Wireframe;
friend class ShapeFix_FreeBounds;
friend class ShapeFix_FaceConnect;
friend class ShapeFix_Shell;
friend class ShapeFix_Solid;
friend class ShapeFix_ShapeTolerance;
friend class ShapeFix_Shape;
friend class ShapeFix_EdgeConnect;
friend class ShapeFix_ComposeShell;
friend class ShapeFix_SplitCommonVertex;
friend class ShapeFix_WireSegment;
friend class ShapeFix_IntersectionTool;
friend class ShapeFix_SplitTool;
friend class ShapeFix_SequenceOfWireSegment;
friend class ShapeFix_DataMapOfShapeBox2d;
friend class ShapeFix_SequenceNodeOfSequenceOfWireSegment;
friend class ShapeFix_DataMapNodeOfDataMapOfShapeBox2d;
friend class ShapeFix_DataMapIteratorOfDataMapOfShapeBox2d;

};





// other Inline functions and methods (like "C++: function call" methods)
//


#endif
