This commit is contained in:
Daniele Bariletti
2024-04-10 09:24:50 +02:00
10 changed files with 161 additions and 11 deletions
+7
View File
@@ -15,6 +15,7 @@
#include "/EgtDev/Include/EGkPoint3d.h"
#include "/EgtDev/Include/EGkBBox3d.h"
#include "/EgtDev/Include/EGkFrame3d.h"
#include "/EgtDev/Include/EGkCurvePointDiffGeom.h"
#include "/EgtDev/Include/EgtNumCollection.h"
@@ -52,6 +53,12 @@ typedef std::list<CrvPointDiffGeom> CPDGLIST ; // lista di CrvPointDiffGe
typedef std::vector<Vector3d> VCT3DVECTOR ; // vettore di vettori 3d
typedef std::list<Vector3d> VCT3DLIST ; // lista di vettori 3d
//----------------------------------------------------------------------------
// Raccolte di Frame3d
typedef std::vector<Frame3d> FRAME3DVECTOR ; // vettore di riferimenti 3d
typedef std::list<Frame3d> FRAME3DLIST ; // lista di riferimenti 3d
typedef std::vector<std::pair<Frame3d,int>> FRAME3DIVECTOR ; // vettore di riferimenti 3d e Id
//----------------------------------------------------------------------------
// Raccolte di BBox3d
typedef std::vector<BBox3d> BOXVECTOR ; // vettore di bounding box 3d
+12 -2
View File
@@ -13,6 +13,7 @@
#pragma once
#include "/EgtDev/Include/EGkGeoPoint3d.h"
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h"
@@ -29,11 +30,14 @@
struct Point5ax {
Point3d ptP ;
Vector3d vtDir ;
Vector3d vtDir2 ;
double dPar ;
int nFlag ;
Point5ax( void) : ptP(), vtDir(), dPar(), nFlag() {} ;
Point5ax( void) : ptP(), vtDir(), vtDir2(), dPar(), nFlag() {} ;
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, double dU, int nData)
: ptP( ptBase), vtDir( vtTool), dPar( dU), nFlag( nData) {} ;
: ptP( ptBase), vtDir( vtTool), vtDir2(), dPar( dU), nFlag( nData) {} ;
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, const Vector3d& vtTool2, double dU, int nData)
: ptP( ptBase), vtDir( vtTool), vtDir2( vtTool2), dPar( dU), nFlag( nData) {} ;
} ;
typedef std::vector<Point5ax> PNT5AXVECTOR ; // vettore di Punti 5assi
@@ -41,3 +45,9 @@ typedef std::vector<Point5ax> PNT5AXVECTOR ; // vettore di Punti 5assi
// Proiezione di una curva su una superficie TriMesh lungo la direzione data.
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const Vector3d& vtDir,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const IGeoPoint3d& gpRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const ICurve& crRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const ISurfTriMesh& tmRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
+50
View File
@@ -0,0 +1,50 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkRotationMinimizingFrame.h Data : 05.04.24 Versione : 2.6d1
// Contenuto : Dichiarazione della classe RotationMinimizingFrame.
//
//
//
// Modifiche : 05.04.24 RE Creazione modulo.
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkGeoCollection.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
//----------------------------------------------------------------------------
class EGK_EXPORT RotationMinimizingFrame
{
public :
RotationMinimizingFrame( void)
: m_pCrv( nullptr), m_Frame0() {}
~RotationMinimizingFrame( void)
{ Clear() ; }
bool Set( const ICurve* pCrv, const Frame3d& fr_Start) ;
public :
bool GetFramesByStep( double dStep, bool bUniform, FRAME3DVECTOR& vRMFrames) ;
bool GetFramesBySplit( int nIntervals, FRAME3DVECTOR& vRMFrames) ;
bool GetFramesByTolerance( double dTol, FRAME3DVECTOR& vRMFrames) ;
private :
bool Clear( void) ;
bool IsValid( void) ;
bool GetFrameAtParam( const Frame3d& frAct, const double dParNext, Frame3d& frNext) ;
private :
ICurve* m_pCrv ; // curva per il calcolo del rotation Xplane frame
Frame3d m_Frame0 ; // frame iniziale della curva
} ;
+51
View File
@@ -0,0 +1,51 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkRotationXplaneFrame.h Data : 05.04.24 Versione : 2.6d1
// Contenuto : Dichiarazione della classe RotationXplaneFrame.
//
//
//
// Modifiche : 05.04.24 DS Creazione modulo.
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkGeoCollection.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
//----------------------------------------------------------------------------
class EGK_EXPORT RotationXplaneFrame
{
public :
RotationXplaneFrame( void)
: m_pCrv( nullptr), m_vtNorm(), m_vtNearX() {}
~RotationXplaneFrame( void)
{ Clear() ; }
bool Set( const ICurve* pCrv, const Vector3d& vtNorm, const Vector3d& vtNearX = V_NULL) ;
public :
bool GetFramesByStep( double dStep, bool bUniform, FRAME3DVECTOR& vRXFrames) ;
bool GetFramesBySplit( int nIntervals, FRAME3DVECTOR& vRXFrames) ;
bool GetFramesByTolerance( double dTol, FRAME3DVECTOR& vRXFrames) ;
private :
bool Clear( void) ;
bool IsValid( void) ;
bool GetFrameAtParam( const Frame3d& frAct, const double dParNext, Frame3d& frNext) ;
private :
ICurve* m_pCrv ; // curva per il calcolo del rotation Xplane frame
Vector3d m_vtNorm ; // vettore normale al piano in cui deve sempre giacere l'asse X
Vector3d m_vtNearX ; // vettore a cui deve essere il più vicino possibile la direzione X iniziale
} ;
+7 -3
View File
@@ -1,8 +1,8 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
//----------------------------------------------------------------------------
// File : EGkStmFromCurves.h Data : 27.02.24 Versione : 2.6b4
// Contenuto : Dichiarazione della classe StmFromTriangleSoup.
// File : EGkStmFromCurves.h Data : 27.02.24 Versione : 2.6d1
// Contenuto : Prototipi funzioni di creazione TriMesh a partire da curve.
//
//
//
@@ -14,6 +14,7 @@
#pragma once
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h"
//----------------------- Macro per import/export ----------------------------
@@ -40,7 +41,10 @@ EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByScrewing( const ICurve* pCurve, const P
double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRectSwept( double dDimH, double dDimV, double dBevelH, double dBevelV,
const ICurve* pGuide, int nCapType, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ICurve* pSect, const ICurve* pGuide, const Vector3d& vtAx,
bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ISurfFlatRegion* pSfrSect, const ICurve* pGuide, const Vector3d& vtAx,
bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshTransSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const ICurve* pCurve1, const ICurve* pCurve2, int nType, double dLinTol = 10 * EPS_SMALL) ;
+21 -2
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2017-2017
// EgalTech 2017-2024
//----------------------------------------------------------------------------
// File : EGkSurfLocal.h Data : 29.03.17 Versione : 1.8c3
// File : EGkSurfLocal.h Data : 08.04.24 Versione : 2.6d2
// Contenuto : Classe gestione superfici nel locale desiderato.
//
//
@@ -45,6 +45,25 @@ class SurfLocal
m_pCopy->LocToLoc( frSrf, frLoc) ;
m_pSrf = m_pCopy ;
}
SurfLocal( const ISurf* pSurf, const Frame3d& frSrf, const Frame3d& frLoc)
: m_pSrf( nullptr), m_pCopy( nullptr)
{ // verifica dei parametri
if ( pSurf == nullptr || &frSrf == nullptr || &frLoc == nullptr)
return ;
// assegno la superficie originale
m_pSrf = pSurf ;
// se i riferimenti coincidono non devo fare altro
if ( AreSameFrame( frSrf, frLoc))
return ;
// copio la superficie e la porto in locale
m_pCopy = m_pSrf->Clone() ;
if ( m_pCopy == nullptr) {
m_pSrf = nullptr ;
return ;
}
m_pCopy->LocToLoc( frSrf, frLoc) ;
m_pSrf = m_pCopy ;
}
SurfLocal( const SurfLocal& Other)
: m_pSrf( nullptr), m_pCopy( nullptr)
{ // se non devo clonare
+5 -3
View File
@@ -59,6 +59,7 @@ EIN_EXPORT BOOL __stdcall EgtGetKeyOptions( int nProd, int nVer, int nLev, unsig
EIN_EXPORT BOOL __stdcall EgtGetKeyLeftDays( int* pnLeftDays) ;
EIN_EXPORT BOOL __stdcall EgtGetKeyAssLeftDays( int* pnAssLeftDays) ;
EIN_EXPORT BOOL __stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays) ;
EIN_EXPORT BOOL __stdcall EgtGetNetHwKey( void) ;
EIN_EXPORT BOOL __stdcall EgtGetOsInfo( wchar_t*& wsOs) ;
EIN_EXPORT BOOL __stdcall EgtGetCpuInfo( wchar_t*& wsCpu) ;
EIN_EXPORT BOOL __stdcall EgtGetMemoryInfo( wchar_t*& wsMem) ;
@@ -315,9 +316,10 @@ EIN_EXPORT int __stdcall EgtCreateSurfTmByRevolve( int nParentId, int nCrvId,
const double ptAx[3], const double vtAx[3],
BOOL bCapEnds, double dLinTol, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmByScrewing( int nParentId, int nCrvId,
const double ptAx[3], const double vtAx[3],
double dAngRotDeg, double dMove, BOOL bCapEnds, double dLinTol, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, BOOL bCapEnds, double dLinTol) ;
const double ptAx[3], const double vtAx[3],
double dAngRotDeg, double dMove, BOOL bCapEnds, double dLinTol, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, const double vtAx[3],
BOOL bCapEnds, double dLinTol, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmRuled( int nParentId, int nPntOrCrvId1, int nCrvId2, int nType, double dLinTol) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmByTriangles( int nParentId, int nNumId, const int nIds[], BOOL bErase) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmBySewing( int nParentId, int nNumId, const int nIds[], BOOL bErase) ;
+5 -1
View File
@@ -64,6 +64,7 @@ EXE_EXPORT bool ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& n
EXE_EXPORT bool ExeGetKeyLeftDays( int& nLeftDays) ;
EXE_EXPORT bool ExeGetKeyAssLeftDays( int& nAssLeftDays) ;
EXE_EXPORT bool ExeGetKeyOptLeftDays( int& nOptLeftDays) ;
EXE_EXPORT bool ExeGetNetHwKey( void) ;
EXE_EXPORT bool ExeGetOsInfo( std::string& sOs) ;
EXE_EXPORT bool ExeGetCpuInfo( std::string& sCpu) ;
EXE_EXPORT bool ExeGetMemoryInfo( std::string& sMem) ;
@@ -357,7 +358,8 @@ EXE_EXPORT int ExeCreateSurfTmByScrewing( int nParentId, int nCrvId,
double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmRectSwept( int nParentId, double dDimH, double dDimV, double dBevelH, double dBevelV,
int nGuideId, int nCapType, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, const Vector3d& vtAx,
bool bCapEnds, double dLinTol, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmTransSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmRuled( int nParentId, int nPtOrCrvId1, int nPtOrCrvId2, int nType, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmByTriangles( int nParentId, const INTVECTOR& vIds, bool bErase) ;
@@ -600,6 +602,8 @@ EXE_EXPORT bool ExeChainCurvesInGroup( int nGroupId, const Point3d& ptNear, int
EXE_EXPORT bool ExeReorderCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurfTm( int nCurveId, int nSurfTmId, const Vector3d& vtDir, int nDestGrpId,
double dLinTol, double dMaxSegmLen, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurfTmExt( int nCurveId, int nSurfTmId, int nGuideId, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromGuide) ;
EXE_EXPORT int ExeCurveGetVoronoi( int nId, int nDestGrpId, int nBound, int* pnCount) ;
EXE_EXPORT int ExeCurveGetMedialAxis( int nId, int nDestGrpId, int nSide, int* pnCount) ;
EXE_EXPORT int ExeCurveGetFatCurve( int nId, int nDestGrpId, double dRad, bool bSquareEnds, bool bSquareMids, int* pnCount) ;
+1
View File
@@ -44,3 +44,4 @@ const int KEY_ERR_VER = 5 ;
const int KEY_ERR_LEV = 6 ;
const int KEY_ERR_WRONG_TIME = 7 ;
const int KEY_ERR_TIME = 8 ;
const int KEY_ERR_NETKEY_NOTFOUND = 9 ;
+2
View File
@@ -23,6 +23,8 @@ bool SetLockType( int nType) ;
bool SetNetHwKey( bool bNetHwKey, int nUserId, const std::string& sAddrPort) ;
// Libero chiave di rete (da eseguire al termine del programma)
bool CloseNetHwKey( void) ;
// Chiave di rete non trovata (il dispositivo non risponde)
bool NotFoundNetHwKey( void) ;
// Recupero l'identificativo in chiaro della protezione
bool GetLockId( std::string& sLockId) ;
// Recupero l'identificativo cifrato della protezione