// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _GCPnts_TangentialDeflection_HeaderFile
#define _GCPnts_TangentialDeflection_HeaderFile

#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>

#include <Standard_Real.hxx>
#include <Standard_Integer.hxx>
#include <TColgp_SequenceOfPnt.hxx>
#include <TColStd_SequenceOfReal.hxx>
#include <Standard_Boolean.hxx>
#include <gp_Pnt.hxx>
class Standard_ConstructionError;
class Standard_OutOfRange;
class Adaptor3d_Curve;
class Adaptor2d_Curve2d;
class gp_Pnt;


//! Computes a set of  points on a curve from package
//! Adaptor3d  such  as between  two successive   points
//! P1(u1)and P2(u2) :
//!
//! . ||P1P3^P3P2||/||P1P3||*||P3P2||<AngularDeflection
//! . ||P1P2^P1P3||/||P1P2||*||P1P3||<CurvatureDeflection
//!
//! where P3 is the point of abscissa ((u1+u2)/2), with
//! u1 the abscissa of the point P1 and u2 the abscissa
//! of the point P2.
//!
//! ^ is the cross product of two vectors, and ||P1P2||
//! the magnitude of the vector P1P2.
//!
//! The conditions AngularDeflection > gp::Resolution()
//! and CurvatureDeflection > gp::Resolution() must be
//! satisfied at the construction time.
//!
//! A  minimum  number of points  can  be fixed   for a
//! linear or circular element.
//! Example:
//! Handle(Geom_BezierCurve) C = new Geom_BezierCurve (Poles);
//! GeomAdaptor_Curve Curve (C);
//! Real CDeflect = 0.01;  //Curvature deflection
//! Real ADeflect = 0.09; //Angular deflection
//!
//! GCPnts_TangentialDeflection PointsOnCurve;
//! PointsOnCurve.Initialize (Curve, ADeflect, CDeflect);
//!
//! Real U;
//! gp_Pnt P;
//! for (Integer i=1; i<=PointsOnCurve.NbPoints();i++) {
//! U = PointsOnCurve.Parameter (i);
//! P = PointsOnCurve.Value (i);
//! }
class GCPnts_TangentialDeflection 
{
public:

  DEFINE_STANDARD_ALLOC

  
  Standard_EXPORT GCPnts_TangentialDeflection();
  
  Standard_EXPORT GCPnts_TangentialDeflection(const Adaptor3d_Curve& C, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints = 2, const Standard_Real UTol = 1.0e-9);
  
  Standard_EXPORT GCPnts_TangentialDeflection(const Adaptor3d_Curve& C, const Standard_Real FirstParameter, const Standard_Real LastParameter, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints = 2, const Standard_Real UTol = 1.0e-9);
  
  Standard_EXPORT GCPnts_TangentialDeflection(const Adaptor2d_Curve2d& C, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints = 2, const Standard_Real UTol = 1.0e-9);
  
  Standard_EXPORT GCPnts_TangentialDeflection(const Adaptor2d_Curve2d& C, const Standard_Real FirstParameter, const Standard_Real LastParameter, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints = 2, const Standard_Real UTol = 1.0e-9);
  
  Standard_EXPORT   void Initialize (const Adaptor3d_Curve& C, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints = 2, const Standard_Real UTol = 1.0e-9) ;
  
  Standard_EXPORT   void Initialize (const Adaptor3d_Curve& C, const Standard_Real FirstParameter, const Standard_Real LastParameter, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints = 2, const Standard_Real UTol = 1.0e-9) ;
  
  Standard_EXPORT   void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints = 2, const Standard_Real UTol = 1.0e-9) ;
  
  Standard_EXPORT   void Initialize (const Adaptor2d_Curve2d& C, const Standard_Real FirstParameter, const Standard_Real LastParameter, const Standard_Real AngularDeflection, const Standard_Real CurvatureDeflection, const Standard_Integer MinimumOfPoints = 2, const Standard_Real UTol = 1.0e-9) ;
  
  //! Add point to already calculated points (or replace existing)
  //! Returns index of new added point
  //! or founded with parametric tolerance (replaced if theIsReplace is true)
  Standard_EXPORT   Standard_Integer AddPoint (const gp_Pnt& thePnt, const Standard_Real theParam, const Standard_Boolean theIsReplace = Standard_True) ;
  
      Standard_Integer NbPoints()  const;
  
      Standard_Real Parameter (const Standard_Integer I)  const;
  
      gp_Pnt Value (const Standard_Integer I)  const;




protected:





private:

  
  Standard_EXPORT   void PerformLinear (const Adaptor3d_Curve& C) ;
  
  Standard_EXPORT   void PerformLinear (const Adaptor2d_Curve2d& C) ;
  
  Standard_EXPORT   void PerformCircular (const Adaptor3d_Curve& C) ;
  
  Standard_EXPORT   void PerformCircular (const Adaptor2d_Curve2d& C) ;
  
  Standard_EXPORT   void PerformCurve (const Adaptor3d_Curve& C) ;
  
  Standard_EXPORT   void PerformCurve (const Adaptor2d_Curve2d& C) ;
  
  Standard_EXPORT   void EvaluateDu (const Adaptor3d_Curve& C, const Standard_Real U, gp_Pnt& P, Standard_Real& Du, Standard_Boolean& NotDone)  const;
  
  Standard_EXPORT   void EvaluateDu (const Adaptor2d_Curve2d& C, const Standard_Real U, gp_Pnt& P, Standard_Real& Du, Standard_Boolean& NotDone)  const;


  Standard_Real angularDeflection;
  Standard_Real curvatureDeflection;
  Standard_Real uTol;
  Standard_Integer minNbPnts;
  Standard_Real lastu;
  Standard_Real firstu;
  TColgp_SequenceOfPnt points;
  TColStd_SequenceOfReal parameters;


};


#include <GCPnts_TangentialDeflection.lxx>





#endif // _GCPnts_TangentialDeflection_HeaderFile
