1599910667
- aggiornamento prototipi.
58 lines
1.9 KiB
C++
58 lines
1.9 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2015-2023
|
|
//----------------------------------------------------------------------------
|
|
// File : EGkCurveByApprox.h Data : 28.07.23 Versione : 2.5g3
|
|
// Contenuto : Dichiarazione della classe CurveByApprox.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 23.07.15 DS Creazione modulo.
|
|
// 28.07.23 DS GetArcs e GetArcsCorner.
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include"/EgtDev/Include/EGkGeoCollection.h"
|
|
|
|
class ICurve ;
|
|
class PolyLine ;
|
|
class PolyArc ;
|
|
|
|
//----------------------- Macro per import/export ----------------------------
|
|
#undef EGK_EXPORT
|
|
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
|
#define EGK_EXPORT __declspec( dllexport)
|
|
#else
|
|
#define EGK_EXPORT __declspec( dllimport)
|
|
#endif
|
|
|
|
//----------------------------------------------------------------------------
|
|
class CurveByApprox
|
|
{
|
|
|
|
public :
|
|
EGK_EXPORT bool Reset( void) ;
|
|
EGK_EXPORT bool AddPoint( const Point3d& ptP) ;
|
|
EGK_EXPORT ICurve* GetCurve( int nType, double dLinTol, double dAngTolDeg, double dLinFea) ;
|
|
EGK_EXPORT bool GetArcs( double dLinTol, double dAngTolDeg, PolyArc& PA) ;
|
|
EGK_EXPORT bool GetArcsCorner( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) ;
|
|
|
|
public :
|
|
enum TYPE { ARCS = 0, ARCS_CORNER = 1, CUBIC_BEZIERS = 2} ;
|
|
|
|
private :
|
|
bool CalcParameterization( void) ;
|
|
bool CalcAkimaTangents( bool bCorner) ;
|
|
bool CalcBesselTangents( void) ;
|
|
bool CalcSplitPoints( double dLinTol, double dAngTolDeg, double dLinFea) ;
|
|
bool BiArcOrSplit( int nLev, PolyLine& PL, double dLinTol, double dAngTolDeg, PolyArc& PA) const ;
|
|
|
|
private :
|
|
PNTVECTOR m_vPnt ;
|
|
DBLVECTOR m_vPar ;
|
|
VCT3DVECTOR m_vPrevDer ;
|
|
VCT3DVECTOR m_vNextDer ;
|
|
INTVECTOR m_vSplits ;
|
|
} ;
|