91aea43f5e
- aggiunta PolyArc - aggiornamenti interfacce.
73 lines
2.9 KiB
C++
73 lines
2.9 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2014
|
|
//----------------------------------------------------------------------------
|
|
// File : EGkPolyArc.h Data : 14.08.14 Versione : 1.5h3
|
|
// Contenuto : Dichiarazione della classe PolyArc.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 14.08.14 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkPoint3d.h"
|
|
#include "/EgtDev/Include/EGkGeoCollection.h"
|
|
|
|
class Plane3d ;
|
|
|
|
//----------------------- 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 PolyArc
|
|
{
|
|
public :
|
|
EGK_EXPORT PolyArc( void) ;
|
|
EGK_EXPORT ~PolyArc( void) ;
|
|
EGK_EXPORT bool Clear( void) ;
|
|
EGK_EXPORT bool AddUPoint( double dPar, const Point3d& ptP, double dBulge) ;
|
|
EGK_EXPORT bool EraseFirstUPoint( void) ;
|
|
EGK_EXPORT bool EraseLastUPoint( void) ;
|
|
EGK_EXPORT bool AddOffsetToU( double dOffset) ;
|
|
EGK_EXPORT bool ToGlob( const Frame3d& frRef) ;
|
|
EGK_EXPORT bool ToLoc( const Frame3d& frRef) ;
|
|
EGK_EXPORT bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ;
|
|
EGK_EXPORT bool Splice( PolyArc& PA) ;
|
|
EGK_EXPORT int GetPointNbr( void) const
|
|
{ return m_nCount ; }
|
|
EGK_EXPORT bool GetFirstUPoint( double* pdPar, Point3d* pptP, double* pdBulge) const ;
|
|
EGK_EXPORT bool GetNextUPoint( double* pdPar, Point3d* pptP, double* pdBulge, bool bNotLast = false) const ;
|
|
EGK_EXPORT bool GetFirstU( double& dPar) const
|
|
{ return GetFirstUPoint( &dPar, nullptr, nullptr) ; }
|
|
EGK_EXPORT bool GetNextU( double& dPar, bool bNotLast = false) const
|
|
{ return GetNextUPoint( &dPar, nullptr, nullptr, bNotLast) ; }
|
|
EGK_EXPORT bool GetFirstPoint( Point3d& ptP, double& dBulge) const
|
|
{ return GetFirstUPoint( nullptr, &ptP, &dBulge) ; }
|
|
EGK_EXPORT bool GetNextPoint( Point3d& ptP, double& dBulge, bool bNotLast = false) const
|
|
{ return GetNextUPoint( nullptr, &ptP, &dBulge, bNotLast) ; }
|
|
|
|
private :
|
|
struct UPointB
|
|
{
|
|
double dU ;
|
|
Point3d ptP ;
|
|
double dB ;
|
|
UPointB( double dU_, const Point3d& ptP_, double dB_)
|
|
: dU( dU_), ptP( ptP_), dB( dB_) {}
|
|
} ;
|
|
typedef std::list<UPointB> UPNTBLIST ; // lista di UPointB
|
|
|
|
private :
|
|
int m_nCount ;
|
|
UPNTBLIST m_lUPointBs ;
|
|
mutable UPNTBLIST::const_iterator m_iter ;
|
|
} ;
|