// 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 _BRepMesh_ShapeTool_HeaderFile
#define _BRepMesh_ShapeTool_HeaderFile

#ifndef _TopExp_Explorer_HeaderFile
#include <TopExp_Explorer.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TopAbs_Orientation_HeaderFile
#include <TopAbs_Orientation.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _gp_Pnt_HeaderFile
#include <gp_Pnt.hxx>
#endif
#ifndef _Handle_Poly_Triangulation_HeaderFile
#include <Handle_Poly_Triangulation.hxx>
#endif
class Standard_NoSuchObject;
class TopoDS_Shape;
class TopoDS_Face;
class TopoDS_Edge;
class TopoDS_Vertex;
class Bnd_Box;
class gp_Pnt2d;
class BRepAdaptor_Curve;
class gp_Pnt;
class Poly_Triangulation;


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


class BRepMesh_ShapeTool  {

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
 // 


Standard_EXPORT BRepMesh_ShapeTool();

  void Init(const TopoDS_Shape& S) ;

  Standard_Boolean MoreFace() ;

  void NextFace() ;

 const TopoDS_Face& CurrentFace() ;

  void Init(const TopoDS_Face& F) ;

  Standard_Boolean MoreEdge() ;

  void NextEdge() ;

 const TopoDS_Edge& CurrentEdge() ;

  void Init(const TopoDS_Edge& E) ;


Standard_EXPORT   Standard_Boolean MoreInternalVertex() ;

  void NextInternalVertex() ;

 const TopoDS_Vertex& CurrentInternalVertex() ;

static  TopAbs_Orientation Orientation(const TopoDS_Face& F) ;

static  TopAbs_Orientation Orientation(const TopoDS_Edge& E) ;


Standard_EXPORT static  Bnd_Box Bound(const TopoDS_Face& F) ;


Standard_EXPORT static  Bnd_Box Bound(const TopoDS_Edge& E) ;


Standard_EXPORT static  TopoDS_Vertex FirstVertex(const TopoDS_Edge& E) ;


Standard_EXPORT static  TopoDS_Vertex LastVertex(const TopoDS_Edge& E) ;

//! If there is  not First or Last vertex (infinite or <br>
//!          semi-infinite edge) return null shapes. <br>
Standard_EXPORT static  void Vertices(const TopoDS_Edge& E,TopoDS_Vertex& Vfirst,TopoDS_Vertex& Vlast) ;

static  void Range(const TopoDS_Edge& E,const TopoDS_Face& F,Standard_Real& wFirst,Standard_Real& wLast) ;

static  void UVPoints(const TopoDS_Edge& E,const TopoDS_Face& F,gp_Pnt2d& uvFirst,gp_Pnt2d& uvLast) ;

static  Standard_Boolean Degenerated(const TopoDS_Edge& E) ;

static  Standard_Real Tolerance(const TopoDS_Vertex& V) ;

static  Standard_Real Parameter(const TopoDS_Vertex& V,const TopoDS_Edge& E,const TopoDS_Face& F) ;


Standard_EXPORT static  void Parameters(const TopoDS_Edge& E,const TopoDS_Face& F,const Standard_Real W,gp_Pnt2d& UV) ;


Standard_EXPORT static  void Locate(const BRepAdaptor_Curve& C,const Standard_Real W,Standard_Real& WFound,const gp_Pnt& p3d,gp_Pnt2d& UV) ;

static  gp_Pnt Pnt(const TopoDS_Vertex& V) ;


Standard_EXPORT static  void AddInFace(const TopoDS_Face& F,Handle(Poly_Triangulation)& T) ;





protected:

 // Methods PROTECTED
 // 


 // Fields PROTECTED
 //


private: 

 // Methods PRIVATE
 // 


 // Fields PRIVATE
 //
TopExp_Explorer theFIterator;
TopExp_Explorer theEIterator;
TopExp_Explorer theVIterator;


};


#include <BRepMesh_ShapeTool.lxx>



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


#endif
