Include :
- aggiunta EGkCurveByApprox - sistemazioni varie.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2015
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkCurveByApprox.h Data : 23.07.15 Versione : 1.6g7
|
||||
// Contenuto : Dichiarazione della classe CurveByApprox.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 23.07.15 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#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) ;
|
||||
|
||||
public :
|
||||
EGK_EXPORT enum TYPE { BIARCS = 1, CUBIC_BEZIERS = 2} ;
|
||||
|
||||
private :
|
||||
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 ;
|
||||
} ;
|
||||
+3
-3
@@ -30,9 +30,8 @@ class CurveByInterp
|
||||
{
|
||||
|
||||
public :
|
||||
EGK_EXPORT bool Start( void) ;
|
||||
EGK_EXPORT bool Reset( void) ;
|
||||
EGK_EXPORT bool AddPoint( const Point3d& ptP) ;
|
||||
EGK_EXPORT bool End( void) ;
|
||||
EGK_EXPORT ICurve* GetCurve( int nMethod, int nType) ;
|
||||
|
||||
public :
|
||||
@@ -40,7 +39,8 @@ class CurveByInterp
|
||||
EGK_EXPORT enum TYPE { BIARCS = 1, CUBIC_BEZIERS = 2} ;
|
||||
|
||||
private :
|
||||
bool CalcTangents( int nMethod) ;
|
||||
bool CalcAkimaTangents( bool bDetectCorner) ;
|
||||
bool CalcBesselTangents( void) ;
|
||||
|
||||
private :
|
||||
PNTVECTOR m_vPnt ;
|
||||
|
||||
+3
-3
@@ -27,9 +27,9 @@ enum RefType{ RTY_GLOB = 0,
|
||||
const int RTY_DEFAULT = RTY_LOC ;
|
||||
|
||||
//----------------- Costanti tipo di interpolazione ----------------------------
|
||||
enum InterpType{ ITT_AKIMA = 0, // curve risultanti archi
|
||||
ITT_AKIMA_CORNER = 1, // curve risultanti archi
|
||||
ITT_BESSEL = 2} ; // curve risultanti Bezier cubiche
|
||||
enum InterpType{ ITT_ARCS = 0, // stima tg Akima, curve risultanti archi
|
||||
ITT_ARCS_CORNER = 1, // stima tg AkimaCorner, curve risultanti archi
|
||||
ITT_CUBICS = 2} ; // stima tg Bessel, curve risultanti Bezier cubiche
|
||||
|
||||
//----------------- Costanti tipo di approssimazione di curve ------------------
|
||||
enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD
|
||||
|
||||
@@ -174,6 +174,8 @@ EXE_EXPORT int ExeCreateCurveCompo( int nParentId, const INTVECTOR& vIds, bool
|
||||
EXE_EXPORT int ExeCreateCurveCompoByChain( int nParentId, const INTVECTOR& vIds,
|
||||
const Point3d& ptNear, bool bErase, int nRefType, int* pnCount) ;
|
||||
EXE_EXPORT int ExeCreateCurveCompoByInterpolation( int nParentId, const PolyLine& PL, int nType, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateCurveCompoByApproximation( int nParentId, const PolyLine& PL, int nType,
|
||||
double dLinTol, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateCurveCompoFromPoints( int nParentId, const PolyLine& PL, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateCurveCompoFromPointBulges( int nParentId, const PolyArc& PA, int nRefType) ;
|
||||
EXE_EXPORT int ExeCreateRectangle2P( int nParentId, const Point3d& ptIni,
|
||||
|
||||
Reference in New Issue
Block a user