diff --git a/EGkMedialAxis.h b/EGkMedialAxis.h new file mode 100644 index 0000000..e39f592 --- /dev/null +++ b/EGkMedialAxis.h @@ -0,0 +1,27 @@ +//---------------------------------------------------------------------------- +// EgalTech 2022-2022 +//---------------------------------------------------------------------------- +// File : MedialAxis.h Data : 22.08.22 Versione : 2.4h2 +// Contenuto : Dichiarazione funzione calcolo MedialAxis principale. +// +// +// +// Modifiche : 22.08.22 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkCurve.h" + +//----------------------- 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 + +//----------------------------------------------------------------------------- +EGK_EXPORT bool CurveSimpleMedialAxis( const ICurve* pCrv, PolyLine& PL) ; diff --git a/EGkPoint3d.h b/EGkPoint3d.h index 2707e24..e0c33a0 100644 --- a/EGkPoint3d.h +++ b/EGkPoint3d.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2013-2014 +// EgalTech 2013-2022 //---------------------------------------------------------------------------- -// File : EGkPoint3d.h Data : 30.05.14 Versione : 1.5e10 +// File : EGkPoint3d.h Data : 22.08.224 Versione : 2.4h2 // Contenuto : Dichiarazione della classe Punto 3d. // // @@ -364,3 +364,36 @@ AreSamePointXYExact( const Point3d& ptP1, const Point3d& ptP2) { return ( SqDistXY( ptP1, ptP2) < SQ_EPS_ZERO) ; } + +//---------------------------------------------------------------------------- +//! Restituisce una copia in locale del punto passato +//---------------------------------------------------------------------------- +inline Point3d +GetToLoc( const Point3d& ptP, const Frame3d& frRef) +{ + Point3d ptQ = ptP ; + ptQ.ToLoc( frRef) ; + return ptQ ; +} + +//---------------------------------------------------------------------------- +//! Restituisce una copia in globale del punto passato +//---------------------------------------------------------------------------- +inline Point3d +GetToGlob( const Point3d& ptP, const Frame3d& frRef) +{ + Point3d ptQ = ptP ; + ptQ.ToGlob( frRef) ; + return ptQ ; +} + +//---------------------------------------------------------------------------- +//! Restituisce una copia dal primo al secondo riferimento del punto passato +//---------------------------------------------------------------------------- +inline Point3d +GetLocToLoc( const Point3d& ptP, const Frame3d& frOri, const Frame3d& frDest) +{ + Point3d ptQ = ptP ; + ptQ.LocToLoc( frOri, frDest) ; + return ptQ ; +} diff --git a/EGkVector3d.h b/EGkVector3d.h index 1c32a40..4dff636 100644 --- a/EGkVector3d.h +++ b/EGkVector3d.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2013-2022 //---------------------------------------------------------------------------- -// File : EGkVector3d.h Data : 18.082.22 Versione : 2.4h2 +// File : EGkVector3d.h Data : 22.08.22 Versione : 2.4h2 // Contenuto : Dichiarazione della classe Vettore 3d. // // @@ -403,3 +403,36 @@ AreOrthoExact( const Vector3d& vtV1, const Vector3d& vtV2) { return ( abs( vtV1 * vtV2) < COS_ORTO_ANG_ZERO) ; } + +//---------------------------------------------------------------------------- +//! Restituisce una copia in locale del vettore passato +//---------------------------------------------------------------------------- +inline Vector3d +GetToLoc( const Vector3d& vtV, const Frame3d& frRef) +{ + Vector3d vtW = vtV ; + vtW.ToLoc( frRef) ; + return vtW ; +} + +//---------------------------------------------------------------------------- +//! Restituisce una copia in globale del vettore passato +//---------------------------------------------------------------------------- +inline Vector3d +GetToGlob( const Vector3d& vtV, const Frame3d& frRef) +{ + Vector3d vtW = vtV ; + vtW.ToGlob( frRef) ; + return vtW ; +} + +//---------------------------------------------------------------------------- +//! Restituisce una copia dal primo al secondo riferimento del vettore passato +//---------------------------------------------------------------------------- +inline Vector3d +GetLocToLoc( const Vector3d& vtV, const Frame3d& frOri, const Frame3d& frDest) +{ + Vector3d vtW = vtV ; + vtW.LocToLoc( frOri, frDest) ; + return vtW ; +} diff --git a/EXeExecutor.h b/EXeExecutor.h index 1ea3964..3752b3b 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -506,6 +506,7 @@ EXE_EXPORT int ExeSplitText( int nId, int* pnCount) ; EXE_EXPORT bool ExeInvertCurve( const INTVECTOR& vIds) ; EXE_EXPORT bool ExeOffsetCurve( int nId, double dDist, int nType) ; EXE_EXPORT int ExeOffsetCurveAdv( int nId, double dDist, int nType, int* pnCount) ; +EXE_EXPORT int ExeCurveMedialAxis( int nId) ; EXE_EXPORT bool ExeApproxCurve( int nId, int nApprType, double dLinTol) ; EXE_EXPORT bool ExeProjectCurveOnPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, int nRefType) ; EXE_EXPORT bool ExeChangeClosedCurveStart( int nId, double dU) ;