Compare commits

..

68 Commits

Author SHA1 Message Date
Daniele Bariletti 3d95e582ef Include:
- aggiunta funzione per una trimesh più fine per le bezier.
2025-04-14 11:20:32 +02:00
Daniele Bariletti ced3d3d75c Merge branch 'master' into FasterBezier 2025-04-11 16:03:33 +02:00
Dario Sassi 8f83a54310 Include :
- modifica solo estetica.
2025-04-08 13:07:16 +02:00
Daniele Bariletti 67fa641522 Merge remote-tracking branch 'origin/master' into FasterBezier 2025-04-08 12:55:03 +02:00
SaraP 3349069674 Include :
- aggiunto prototipo.
2025-04-08 08:35:14 +02:00
Dario Sassi 9a89e851d2 Include :
- aggiunto l'operatore == alla struttura SelData (per consentire confronti con funzioni STL direttamente sui contenitori).
2025-04-07 11:49:36 +02:00
Daniele Bariletti ffd321457b Merge branch 'master' into FasterBezier 2025-04-07 10:17:50 +02:00
Dario Sassi eb563b913d Include :
- aggiunte costanti per percorsi di lavorazione MCH_CL_SAFEIN e MCH_CL_SAFEOUT.
2025-04-03 09:12:29 +02:00
SaraP 38cbba2e35 Include :
- aggiornamento mensile codici protezione librerie.
2025-04-02 08:32:17 +02:00
Dario Sassi 36ce862054 Include :
- aggiornamento prototipi.
2025-03-28 20:16:47 +01:00
Dario Sassi c0beda4a1e Include :
- aggiornamento prototipi.
2025-03-27 19:20:18 +01:00
Daniele Bariletti a6ccbb0653 Merge remote-tracking branch 'origin/master' into FasterBezier 2025-03-27 16:01:31 +01:00
Dario Sassi 4fbd8d0b30 Merge branch 'master' of https://gitlab.steamware.net/egaltech/include 2025-03-27 15:23:03 +01:00
Dario Sassi 3db25e173f Include :
- aggiornamento prototipi.
2025-03-27 15:21:54 +01:00
Daniele Bariletti 8d2d58c455 Merge branch 'master' into FasterBezier 2025-03-27 10:24:19 +01:00
Daniele Bariletti 865e6e7090 - aggiunti prototipi per copie di pezzi di curve. 2025-03-27 10:22:20 +01:00
Daniele Bariletti df125db2ae - aggiunte funzioni per le copie di pezzi di curve. 2025-03-27 08:53:41 +01:00
Dario Sassi cf6b8e7572 Include :
- aggiornamento prototipi.
2025-03-26 11:24:48 +01:00
Dario Sassi f5724206d5 Include :
- aggiornamento prototipi.
2025-03-22 18:09:03 +01:00
SaraP 8bac9f6885 Include :
- aggiunto prototipo.
2025-03-13 15:21:53 +01:00
Riccardo Elitropi 3c26cd87cb Include :
- aggiunto parametro a funzione CalcPocketing.
2025-03-13 12:30:59 +01:00
Daniele Bariletti ef1b7e0952 Merge remote-tracking branch 'origin/HEAD' into FasterBezier 2025-03-12 09:40:43 +01:00
Daniele Bariletti 7b09526919 - nuova funzione per il calcolo dei punti di una bezier. 2025-03-11 14:50:02 +01:00
Riccardo Elitropi 9577094c3d Include :
- Semplificazione funzioni per CAvToolSilhouette e CAvToolSurfTm.
2025-03-11 11:16:07 +01:00
Riccardo Elitropi 9de2ae9561 Include :
- aggiunto parametro a CalcPocketing.
2025-03-04 17:41:02 +01:00
Dario Sassi c1a3773e7a Include :
- aggiornamento mensile codici protezione librerie.
2025-03-04 17:14:04 +01:00
Dario Sassi adebd1315b Include :
- aggiunta costante FT_PLY
- aggiornamento prototipi.
2025-03-02 19:48:08 +01:00
Dario Sassi 48c1ed4bcc Include :
- aggiornamento mensile codici protezione librerie.
2025-02-28 12:08:31 +01:00
Riccardo Elitropi 3bcc803f47 Include :
- aggiunto parametro in CalcPocketing
- Aggiunte definizioni in GeoCollection
- Aggiunta funzione per ottenere i Loop dalle Part per le TriMesh
- Aggiunta funzione di Test avanzata per le collisioni in CAvToolSurfTm.
2025-02-21 11:04:39 +01:00
SaraP 52b0802dfb Include :
- piccola correzione.
2025-02-17 14:58:31 +01:00
Daniele Bariletti f912437d87 Merge branch 'master' of https://gitlab.steamware.net/egaltech/Include 2025-02-06 16:57:21 +01:00
Daniele Bariletti 6816497c5e - aggiunta funzione per offset massimo di una curva. 2025-02-06 16:57:17 +01:00
Dario Sassi eb75cfd6e3 Include :
- aggiunta costante per chiave info di uscite attivate in sottogruppo di CL.
2025-02-04 14:53:30 +01:00
Dario Sassi d5fcae0eec Include :
- aggiornamento prototipi per SetFixtureLink.
2025-01-31 08:58:44 +01:00
Riccardo Elitropi d9d4f8c6dc Include :
- Modifiche valori delle costanti per CurveComposite/Curve in CalcPocketing.
2025-01-31 08:43:57 +01:00
Dario Sassi 3ad00a017f Include :
- aggiornamento prototipi.
2025-01-25 12:10:25 +01:00
Dario Sassi 689197717c Include :
- aggiornamento prototipi.
2025-01-23 11:37:45 +01:00
SaraP 34888a1204 Include :
- aggiunti prototipi per camera prospettica.
2025-01-23 10:09:14 +01:00
Dario Sassi d2bc22a9c3 Include :
- aggiunta costante SURFFIN_SUB_PROJECT.
2025-01-20 10:49:57 +01:00
Dario Sassi 34e42aaece Include :
- aggiunte costanti per TYPE utensile (per ora Std o Float).
2025-01-20 08:35:36 +01:00
Dario Sassi d2f7b89b04 Include :
- unificata proiezione di curve su superfici trimesh e bezier.
2025-01-15 15:21:37 +01:00
Dario Sassi c47feff394 Include :
- aggiunta seconda versione di CalcNormal per normale in un punto di un triangolo come media baricentrica di quelle ai vertici.
2025-01-14 08:44:31 +01:00
Dario Sassi 4b73f70232 Include :
- migliorie e ottimizzazioni a ToString con interi.
2025-01-10 16:27:56 +01:00
Dario Sassi 6c57d57be1 Include :
- aggiornamento codici protezione librerie a 27
- aggiornamento ToString con uso std::to_chars.
2025-01-09 17:53:27 +01:00
Dario Sassi 481a86c2fa Include :
- modifiche a FromString con integer per uso libreria fast_float.
2025-01-06 18:12:49 +01:00
Dario Sassi fd4b84807f Include :
- modifiche a FromString con double per uso libreria fast_float.
2025-01-03 12:16:52 +01:00
Dario Sassi 59a4239226 Include :
- aggiornamento prototipi.
2024-12-23 12:02:03 +01:00
SaraP 3ecbb9b55a Include :
- aggiunti prototipi.
2024-12-19 10:50:03 +01:00
Dario Sassi bc0ac3c336 Include :
- aggiornamento prototipi.
2024-12-17 10:20:54 +01:00
SaraP 0dd9b62386 Include :
- aggiornamento prototipi per conservare la gerarchia nell'importazione 3MF.
2024-12-16 10:54:39 +01:00
Riccardo Elitropi 2549d720df Include :
- in CavSilhouette aggiunte funzioni per calcolo silhouette all'interno di una regione piana.
2024-12-12 11:50:56 +01:00
Dario Sassi 9d7e968fb7 Include :
- migliorie e correzioni a funzioni inline per accedere a variabili globali strutturate lua.
2024-12-05 17:38:36 +01:00
Dario Sassi 916c8bf793 Include :
- aggiornamento prototipi.
2024-12-04 15:00:55 +01:00
Dario Sassi a311b4bd0f Include :
- aggiunte costanti SURFFIN_SUB_Z_CONST e SURFFIN_SUB_OPTIMAL per tipo finitura superfici.
2024-12-04 10:07:33 +01:00
Dario Sassi 3b65b5c13a Include :
- aggiunta interfaccia IImportOff
- aggiornamento codici mensili di protezione delle librerie.
2024-11-29 18:56:58 +01:00
Riccardo Elitropi 5aebd3a873 Include:
- in GeoObjSave, aggiunta funzione di salvataggio.
2024-11-27 16:03:05 +01:00
Dario Sassi 32ede62dc8 Include :
- aggiunta costante per entità non lavorate
- aggiornamento prototipi.
2024-11-25 15:01:26 +01:00
Dario Sassi d35b0931e0 Include :
- aggiornamento mensile codici protezione librerie.
2024-11-04 08:29:47 +01:00
Dario Sassi 2fe3f8c68b Merge branch 'master' of https://gitlab.steamware.net/egaltech/include 2024-10-31 18:26:28 +01:00
Dario Sassi b6799c548c Include :
- aggiornamento prototipi
- aggiunte costanti per morse.
2024-10-31 18:25:39 +01:00
Riccardo Elitropi 83a983100a Include :
- in GeoObjSave, aggiunta funzione per salvataggio booleane tra Sfr.
2024-10-28 08:26:22 +01:00
Dario Sassi a9b4243c08 Include :
- aggiornamento prototipi.
2024-10-16 19:54:29 +02:00
SaraP 942b26229f Include :
- aggiunto prototipo.
2024-10-16 16:27:10 +02:00
Dario Sassi e41ede6cf4 Include :
- aggiornamento prototipi.
2024-10-15 17:33:32 +02:00
Dario Sassi 5831ac0c99 Include :
- aggiornamento prototipi.
2024-10-10 15:42:37 +02:00
Riccardo Elitropi 45229d2c52 Include :
in ConvertCurveToComposite vengono copiati anche i tempParams.
2024-10-08 12:54:48 +02:00
Dario Sassi 9ccea92086 Include :
- aggiunti prototipi di EgtBasis.
2024-10-06 18:17:57 +02:00
Daniele Bariletti 15c7bdca64 Merge branch 'MoreBezier' 2024-10-04 15:41:41 +02:00
34 changed files with 502 additions and 242 deletions
+57
View File
@@ -0,0 +1,57 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2025
//----------------------------------------------------------------------------
// File : EBsAPI.h Data : 24.01.25 Versione : 2.7a1
// Contenuto : API (application programming interface).
//
//
//
// Modifiche : 05.10.24 DS Creazione modulo.
// 24.01.25 DS Aggiunta gestione messaggi.
//
//----------------------------------------------------------------------------
#pragma once
#define NOMINMAX
#include <windows.h>
//----------------------- Macro per import/export ----------------------------
#undef EGTBASIS_EXPORT
#if defined( I_AM_EGTBASIS) // da definirsi solo nella DLL
#define EGTBASIS_EXPORT __declspec( dllexport)
#else
#define EGTBASIS_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
// API
// Protezione
EGTBASIS_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* wsKey) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyLevel( int nProd, int nVer, int nLev, int* pnKLev) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyOptions( int nProd, int nVer, int nLev, unsigned int* pnOpt1, unsigned int* pnOpt2) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyLeftDays( int* pnLeftDays) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyAssLeftDays( int* pnAssLeftDays) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays) ;
// Liberazione memoria blocchi dati ritornati (di solito per stringhe)
EGTBASIS_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ;
// Messaggi
EGTBASIS_EXPORT BOOL __stdcall EgtLoadMessages( const wchar_t* wsMsgFilePath) ;
EGTBASIS_EXPORT const wchar_t* __stdcall EgtGetMsg( int nMsg) ;
// Logger
EGTBASIS_EXPORT BOOL __stdcall EgtInitLogger( int nDebug, const wchar_t* wsLogFile) ;
EGTBASIS_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg, int nDebugLevel) ;
// Ini File
EGTBASIS_EXPORT BOOL __stdcall EgtGetStringUtf8FromIni( const wchar_t* wsSec, const wchar_t* wsKey,
const wchar_t* wsDef, wchar_t*& wsVal, const wchar_t* wsIniFile) ;
EGTBASIS_EXPORT BOOL __stdcall EgtWriteStringUtf8ToIni( const wchar_t* wsSec, const wchar_t* wsKey,
const wchar_t* wsVal, const wchar_t* wsIniFile) ;
#ifdef __cplusplus
}
#endif
+4 -1
View File
@@ -29,10 +29,13 @@ class __declspec( novtable) IImport3MF
{
public :
virtual ~IImport3MF( void) {}
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup) = 0 ;
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, int nFlag = 0) = 0 ;
} ;
//-----------------------------------------------------------------------------
extern "C" {
EEX_EXPORT IImport3MF* CreateImport3MF( void) ;
}
enum EIm3MFFlag { EI3FLAG_NONE = 0x0000,
EI3FLAG_KEEP_GROUPS = 0x0001} ;
+1
View File
@@ -37,5 +37,6 @@ class __declspec( novtable) IImportBtl
//-----------------------------------------------------------------------------
extern "C" {
EEX_EXPORT bool SetBtlAuxDir( const std::string& sBtlAuxDir) ;
EEX_EXPORT bool SetBtlLuaData( const std::string& sLuaLibsDir, const std::string& sLuaLastRequire) ;
EEX_EXPORT IImportBtl* CreateImportBtl( void) ;
}
+38
View File
@@ -0,0 +1,38 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EExImportOff.h Data : 28.11.24 Versione : 2.6k2
// Contenuto : Dichiarazione della interfaccia IImportOff.
//
//
//
// Modifiche : 28.11.24 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkGeomDB.h"
#include <string>
//----------------------- Macro per import/export ----------------------------
#undef EEK_EXPORT
#if defined( I_AM_EEX) // da definirsi solo nella DLL
#define EEX_EXPORT __declspec( dllexport)
#else
#define EEX_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
class __declspec( novtable) IImportOff
{
public :
virtual ~IImportOff( void) {}
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1) = 0 ;
} ;
//-----------------------------------------------------------------------------
extern "C" {
EEX_EXPORT IImportOff* CreateImportOff( void) ;
}
+38
View File
@@ -0,0 +1,38 @@
//----------------------------------------------------------------------------
// EgalTech 2025-2025
//----------------------------------------------------------------------------
// File : EExImportPly.h Data : 28.02.25 Versione : 2.7b2
// Contenuto : Dichiarazione della interfaccia IImportPly.
//
//
//
// Modifiche : 28.02.25 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkGeomDB.h"
#include <string>
//----------------------- Macro per import/export ----------------------------
#undef EEK_EXPORT
#if defined( I_AM_EEX) // da definirsi solo nella DLL
#define EEX_EXPORT __declspec( dllexport)
#else
#define EEX_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
class __declspec( novtable) IImportPly
{
public :
virtual ~IImportPly( void) {}
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1) = 0 ;
} ;
//-----------------------------------------------------------------------------
extern "C" {
EEX_EXPORT IImportPly* CreateImportPly( void) ;
}
+3
View File
@@ -32,6 +32,9 @@ class __declspec( novtable) ICAvParSilhouettesSurfTm
public :
virtual ~ICAvParSilhouettesSurfTm( void) {}
virtual bool SetData( const CISURFTMPVECTOR& vpStm, const Frame3d& frPlanes, double dTol) = 0 ;
virtual bool SetData( const CISURFTMPVECTOR& vpStm, const Frame3d& frPlanes, double dTol,
double dSideAng, double dDiam, double dCornRad, double dMaxMat, double dOffsR,
double dMaxDepth) = 0 ;
virtual bool GetSilhouette( double dLevel, POLYLINEVECTOR& vPL) = 0 ;
} ;
+6
View File
@@ -37,10 +37,16 @@ class __declspec( novtable) ICAvToolSurfTm {
virtual bool SetGenTool( const ICurveComposite* pToolOutline) = 0 ;
virtual double GetToolRadius( void) const = 0 ;
virtual double GetToolHeight( void) const = 0 ;
virtual double GetToolTipHeight( void) const = 0 ;
virtual double GetToolTipRadius( void) const = 0 ;
virtual double GetToolCornRadius( void) const = 0 ;
virtual const ICurveComposite& GetToolOutline( bool bApprox = false) const = 0 ;
virtual bool TestPosition( const Point3d& ptT, const Vector3d& vtDir, const Vector3d& vtMove,
double& dTotDist, Vector3d* pvtTriaN = nullptr) const = 0 ;
virtual bool TestPositionAdv( const Point3d& ptT, const Vector3d& vtDir, const Vector3d& vtMove,
double& dTotDist, VCT3DVECTOR& vVtN) const = 0 ;
virtual bool TestSeries( PNTUVECTOR& vPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dProgCoeff = 1) = 0 ;
virtual bool TestSeriesAdv( PNTUVVECTVECTOR& vPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dProgCoeff = 1) = 0 ;
virtual bool TestPath( PNTULIST& lPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dLinTol, double dProgCoeff = 1) = 0 ;
} ;
+39 -14
View File
@@ -26,27 +26,52 @@
//-----------------------------------------------------------------------------
EGK_EXPORT bool CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dRadOffs, double dStep,
double dAngle, int nType, bool bSmooth, bool bInvert, bool bAvoidOpt,
bool bAllowZigZagOneWayBorders, const Point3d& ptEndPrec, const ISurfFlatRegion* pSfrLimit,
ICRVCOMPOPOVECTOR& vCrv) ;
double dAngle, double dOpenMinSafe, int nType, bool bSmooth, bool bInvert, bool bAvoidOpt,
bool bAllowZigZagOneWayBorders, bool bCalcFeed, const Point3d& ptEndPrec, const ISurfFlatRegion* pSfrLimit,
bool bAllOffs, ICRVCOMPOPOVECTOR& vCrv) ;
EGK_EXPORT bool CalcZigZagInfill( const ISurfFlatRegion* pSfr, double dStep, bool bSmooth, bool bRemoveOverlapLink,
ICRVCOMPOPOVECTOR& vCrvCompoRes) ;
//-----------------------------------------------------------------------------
// Sottotipo di lavorazione
enum { POCKET_ZIGZAG = 0,
POCKET_ONEWAY = 1,
POCKET_SPIRALIN = 2,
POCKET_SPIRALOUT = 3,
POCKET_CONFORMAL_ZIGZAG = 4,
POCKET_CONFORMAL_ONEWAY = 5} ;
POCKET_CONFORMAL_ONEWAY = 5
} ;
enum { TEMP_PROP_SMOOTH = -2,
TEMP_PROP_INVALID = -1,
TEMP_PROP_CLOSE_EDGE = 0,
TEMP_PROP_OPEN_EDGE = 1,
TEMP_PROP_OUT_START = 2,
TEMP_PROP_SINGLE_CURVE = 3,
TEMP_PROP_OPT_TRAPEZOID = 4,
TEMP_PROP_BORDER_CURVE = 5,
TEMP_PROP_CURVE_ACTIVE = 6,
TEMP_PROP_CURVE_INACTIVE = 7} ;
// Definizione di lato aperto e lato chiuso
enum {
TEMP_PROP_CLOSE_EDGE = 0,
TEMP_PROP_OPEN_EDGE = 1
} ;
// Definizione di curva invalida
enum {
TEMP_PROP_INVALID = - 1
} ;
// Definizione curva di raccordo per smussi
enum {
TEMP_PROP_SMOOTH = - 2
} ;
// Definizione tipo di curva per casi speciali
enum {
TEMP_PROP_SINGLE_CURVE = - 3,
TEMP_PROP_OPT_TRAPEZOID = - 4,
TEMP_PROP_BORDER_CURVE = - 5,
} ;
// Definizione tipo di curva per entrate da fuori
enum {
TEMP_PROP_OUT_START = - 6
} ;
// Definizione di curva attiva/non attiva
enum {
TEMP_PROP_CURVE_ACTIVE = - 7,
TEMP_PROP_CURVE_INACTIVE = - 8
} ;
+4
View File
@@ -147,6 +147,10 @@ EGK_EXPORT bool CalcCurveFatCurve( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, do
//! Calcola, nel caso di curve chiuse, il valore limite di offset ( in valore assoluto) che fa sparire la curva
EGK_EXPORT bool CalcCurveLimitOffset( const ICurve& crvC, double& dOffs) ;
//----------------------------------------------------------------------------
//! Calcola, se possibile, le curve di offset del valore richiesto come curve singole
EGK_EXPORT bool CalcCurveSingleCurvesOffset( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, double dOffs) ;
//----------------------------------------------------------------------------
//! Resetta l'oggetto voronoi associato alla curva liberandone la memoria
EGK_EXPORT void ResetCurveVoronoi( const ICurve& crvC) ;
+2
View File
@@ -110,6 +110,8 @@ inline ICurveComposite* ConvertCurveToComposite( IGeoObj* pGObj)
int nProp = pCrv->GetTempProp( i) ;
if ( nProp != 0)
pCrvCo->SetTempProp( nProp, i) ;
double dParam = pCrv->GetTempParam( i) ;
pCrvCo->SetTempParam( dParam, i) ;
}
pCrvCo->AddCurve( pCrv) ;
return pCrvCo ;
+12
View File
@@ -70,3 +70,15 @@ typedef std::vector<std::pair<BBox3d,int>> BOXIVECTOR ; // vettore di boundin
typedef std::pair<Point3d,Vector3d> PNTVECT ; // coppia punto, vettore
typedef std::vector<PNTVECT> PNTVECTVECTOR ; // vettore di coppie punto, vettore
typedef std::list<PNTVECT> PNTVECTLIST ; // lista di coppie punto, vettore
//----------------------------------------------------------------------------
// Raccolte di coppie Point3d,Bool
typedef std::pair<Point3d, bool> PNTBOOL ; // coppia punto, bool
typedef std::vector<PNTBOOL> PNTBOOLVECTOR ; // vettore di coppie punto, bool
typedef std::list<PNTBOOL> PNTBOOLLIST ; // lista di coppie punto, bool
//----------------------------------------------------------------------------
// Raccolte di triplette Point3d,dU,vector<Vector3d>
typedef std::tuple<Point3d, double, VCT3DVECTOR> PNTUVVECT ; // tripletta punto, parametro, vettore di Vector3d
typedef std::vector<PNTUVVECT> PNTUVVECTVECTOR ; // vettore di triplette punto, parametro, vettore di Vector3d
typedef std::list<PNTUVVECT> PNTUVVECTLIST ; // lista di triplette punto, parametro, vettore di Vector3d
+81 -72
View File
@@ -15,6 +15,7 @@
#include "/EgtDev/Include/EGkGeomDB.h"
#include "/EgtDev/Include/EgtPointerOwner.h"
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
//----------------------------------------------------------------------------
@@ -112,7 +113,7 @@ SaveGeoObj( std::vector<std::vector<IGeoObj*>> vvpGObj, std::vector<Color> vCol,
nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
pGeomDB->SetMaterial( nLayId, vCol[i]) ;
for ( int j = 0 ; j < int( vvpGObj.size()) ; ++ j) {
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j ) {
// inserisco gli oggetti corrispondenti
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vvpGObj[i][j]) ;
vIds.push_back( nId) ;
@@ -130,71 +131,95 @@ SaveGeoObj( std::vector<std::vector<IGeoObj*>> vvpGObj, std::vector<Color> vCol,
return bOk ;
}
bool SaveSfrBooleans( const ISurfFlatRegion* pSfrA, const ISurfFlatRegion* pSfrB,
const std::string& sFile, int nFlag = GDB_SV_BIN,
Color cColA = Color( 0., .5, .75, .5), Color cColB = Color( 0., .5, 0., .5))
{
// verifico validità superfici
if ( pSfrA == nullptr || ! pSfrA->IsValid() ||
pSfrB == nullptr || ! pSfrB->IsValid())
return false ;
// creo GeomDB temporaneo
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
if ( IsNull( pGeomDB))
return false ;
// inserisco le superfici nel GeomDB (sotto pezzo/layer)
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
int nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
int nIdSfrA = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, static_cast<IGeoObj*>( CloneSurfFlatRegion( pSfrA))) ;
if ( nIdSfrA == GDB_ID_NULL)
return false ;
pGeomDB->SetMaterial( nIdSfrA, cColA) ;
int nIdSfrB = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, static_cast<IGeoObj*>( CloneSurfFlatRegion( pSfrB))) ;
if ( nIdSfrB == GDB_ID_NULL)
return false ;
pGeomDB->SetMaterial( nIdSfrB, cColB) ;
// vettor di indici aggiunti
INTVECTOR vIds = { nIdSfrA, nIdSfrB} ;
// eseguo il salvataggio
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
// rimuovo l'oggetto dal GeomDB
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
return bOk ;
}
//----------------------------------------------------------------------------
bool
SaveCurveCompo( ICRVCOMPOPOVECTOR& vCompo, bool bUniform, const std::string& sFile, int nFlag = GDB_SV_BIN)
SaveGeoObj( std::vector<std::vector<IGeoObj*>> vvpGObj, std::vector<std::vector<Color>> vvCol,
const std::string& sFile, int nFlag = GDB_SV_BIN)
{
// controllo validità delle curve
std::vector<IGeoObj*> vpGObj ;
for ( int i = 0 ; i < int( vCompo.size()) ; ++ i) {
if ( vCompo[i] == nullptr || ! vCompo[i]->IsValid())
return false ;
vpGObj.emplace_back( static_cast<IGeoObj*>( vCompo[i]->Clone())) ;
}
// verifico validità oggetti
for ( int i = 0 ; i < int( vvpGObj.size()) ; ++ i) {
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j) {
if ( vvpGObj[i][j] == nullptr || ! vvpGObj[i][j]->IsValid())
return false ;
}
}
// creo GeomDB temporaneo
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
if ( IsNull( pGeomDB))
return false ;
INTVECTOR vIds ;
// se curve con colore uniforme
if ( bUniform)
return SaveGeoObj( vpGObj, sFile, nFlag) ;
// altrimenti scorro le sottocurve e le coloro in base alle temp prop
// creo il part
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
int nLayId = 0 ;
for ( int i = 0 ; i < int( vCompo.size()) ; ++i) {
// inserisco l'oggetto nel GeomDB (sotto pezzo/layer)
nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
for ( int u = 0 ; u < vCompo[i]->GetCurveCount() ; ++ u) {
const ICurve* pCrv = vCompo[i]->GetCurve( u) ;
if ( pCrv == nullptr)
return false ;
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, pCrv->Clone()) ;
pGeomDB->SetMaterial( nId, ( pCrv->GetTempProp( 0) == 1 ? RED :
( pCrv->GetTempProp( 0)) == 0 ? BLUE : WHITE)) ;
vIds.push_back( nId) ;
// per ogni elemento i-esimo, creo un layer
for ( int i = 0 ; i < int( vvpGObj.size()) ; ++i) {
// creo il layer
int nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j ) {
// inserisco gli oggetti corrispondenti
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vvpGObj[i][j]) ;
if ( nId == GDB_ID_NULL)
return false ;
// setto il colore ( se definito)
if ( i < int( vvCol.size()) && j < int( vvCol[i].size()))
pGeomDB->SetMaterial( nId, vvCol[i][j]) ;
vIds.push_back( nId) ;
}
}
// eseguo il salvataggio
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
// rimuovo l'oggetto dal GeomDB
for ( int i = 0 ; i < int( vIds.size()); ++i)
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
return bOk ;
}
bool SaveVoronoi( const ICRVCOMPOPOVECTOR& vCrvsCompo, const ICURVEPOVECTOR& vBisectors,
bool bUniform, const std::string& sFile, int nFlag = GDB_SV_BIN)
//----------------------------------------------------------------------------
bool
SaveGeoObj( std::vector<IGeoObj*> vpGObj, std::vector<Color> vCol,
const std::string& sFile, int nFlag = GDB_SV_BIN)
{
// controllo validità delle curve
std::vector<IGeoObj*> vpGObj_crv ;
for ( int i = 0 ; i < int( vCrvsCompo.size()) ; ++ i) {
if ( vCrvsCompo[i] == nullptr || ! vCrvsCompo[i]->IsValid())
return false ;
vpGObj_crv.emplace_back( static_cast<IGeoObj*>( vCrvsCompo[i]->Clone())) ;
}
std::vector<IGeoObj*> vpGObj_bisect ;
for ( int i = 0 ; i < int( vBisectors.size()) ; ++ i) {
if ( vBisectors[i] == nullptr || ! vBisectors[i]->IsValid())
return false ;
vpGObj_bisect.emplace_back( static_cast<IGeoObj*>( vBisectors[i]->Clone())) ;
}
// verifico validità oggetti
if ( int( vpGObj.size()) != int( vCol.size()))
return false ;
// creo GeomDB temporaneo
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
@@ -202,45 +227,29 @@ bool SaveVoronoi( const ICRVCOMPOPOVECTOR& vCrvsCompo, const ICURVEPOVECTOR& vBi
return false ;
INTVECTOR vIds ;
// salvo le curve
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
// creo il part
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
// creo il layer
int nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
pGeomDB->SetName( nLayId, "Curves") ;
for ( int i = 0 ; i < int( vpGObj_crv.size()) ; ++i) {
// inserisco l'oggetto nel GeomDB
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vpGObj_crv[i]->Clone()) ;
if ( nId == GDB_ID_NULL)
return false ;
vIds.push_back( nId) ;
pGeomDB->SetMaterial( nId, LIME) ;
}
// salvo i bisettori
nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
pGeomDB->SetName( nLayId, "Bisectors") ;
for ( int i = 0 ; i < int( vpGObj_bisect.size()) ; ++i) {
// inserisco l'oggetto nel GeomDB
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vpGObj_bisect[i]->Clone()) ;
// scorro gli elementi da visualizzare
for ( int i = 0 ; i < int( vpGObj.size()) ; ++ i) {
if ( vpGObj[i] == nullptr || ! vpGObj[i]->IsValid())
continue ;
// inserisco gli oggetti corrispondenti
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vpGObj[i]) ;
if ( nId == GDB_ID_NULL)
return false ;
// setto il colore
pGeomDB->SetMaterial( nId, vCol[i]) ;
// aggiungo l'Id ottenuto
vIds.push_back( nId) ;
if ( bUniform)
pGeomDB->SetMaterial( nId, RED) ;
else {
if ( vBisectors[i]->GetTempParam( 0) < EPS_SMALL ||
vBisectors[i]->GetTempParam( 1) < EPS_SMALL)
pGeomDB->SetMaterial( nId, ORANGE) ;
else
pGeomDB->SetMaterial( nId, RED) ;
}
pGeomDB->SetInfo( nId, "START_PARAM", vBisectors[i]->GetTempParam( 0)) ;
pGeomDB->SetInfo( nId, "END_PARAM", vBisectors[i]->GetTempParam( 1)) ;
}
// eseguo il salvataggio
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
// rimuovo l'oggetto dal GeomDB
for ( int i = 0 ; i < int( vIds.size()); ++i)
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
return bOk ;
+6 -2
View File
@@ -1,12 +1,13 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2019
// EgalTech 2015-2025
//----------------------------------------------------------------------------
// File : EGkOffsetCurve.h Data : 24.06.19 Versione : 2.1f2
// File : EGkOffsetCurve.h Data : 08.04.25 Versione : 2.7d1
// Contenuto : Dichiarazione classe per offset di ICurve.
//
//
// Modifiche : 23.09.15 DS Creazione modulo.
// 24.06.19 DS Agg. GetShorterCurve.
// 08.04.25 SP Agg. GetPointOffset.
//
//----------------------------------------------------------------------------
@@ -37,10 +38,13 @@ class OffsetCurve
EGK_EXPORT ICurve* GetCurve( void) ;
EGK_EXPORT ICurve* GetLongerCurve( void) ;
EGK_EXPORT ICurve* GetShorterCurve( void) ;
EGK_EXPORT bool GetPointOffset( Point3d& ptOffs, Vector3d& vtOut) ;
EGK_EXPORT double GetLinTol( void) const { return m_dLinTol ; }
EGK_EXPORT void SetLinTol( double dTol) { m_dLinTol = dTol ; }
private :
ICURVEPLIST m_CrvLst ;
Point3d m_ptOffs = P_INVALID ;
Vector3d m_vtOut = V_INVALID ;
double m_dLinTol ;
} ;
+2
View File
@@ -113,6 +113,7 @@ class PolyLine
EGK_EXPORT bool MakeConvex( const Vector3d& vtN, bool bLeftSide) ;
EGK_EXPORT bool Invert( bool bInvertU = true) ;
EGK_EXPORT bool Flatten( double dZ = 0) ;
EGK_EXPORT bool FlattenInAutoPlane( double dToler = 10 * EPS_SMALL) ;
EGK_EXPORT bool GetConvexHullXY( PNTVECTOR& vConvHull) const ;
EGK_EXPORT bool GetMinAreaRectangleXY( Point3d& ptCen, Vector3d& vtAx, double& dLen, double& dHeight) const ;
EGK_EXPORT bool Trim( const Plane3d& plPlane, bool bInVsOut = true) ;
@@ -126,6 +127,7 @@ class PolyLine
bool MyChangeStart( int nPos) ;
bool MyApproxOnSide( const Vector3d& vtN, bool bLeftSide, double dToler = EPS_SMALL) ;
bool MyMakeConvex( const Vector3d& vtN, bool bLeftSide) ;
bool MyRemoveSamePoints( double dToler = EPS_SMALL) ;
private :
int m_nRejected ; // numero punti rifiutati perchè coincidenti
@@ -15,7 +15,7 @@
#include "/EgtDev/Include/EGkGeoPoint3d.h"
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h"
#include "/EgtDev/Include/EGkSurf.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
@@ -29,25 +29,28 @@
// Definizione di Punto 5assi e sue raccolte
struct Point5ax {
Point3d ptP ;
Vector3d vtDir ;
Vector3d vtDir1 ;
Vector3d vtDir2 ;
double dPar ;
int nFlag ;
Point5ax( void) : ptP(), vtDir(), vtDir2(), dPar(), nFlag() {} ;
Point5ax( void) : ptP(), vtDir1(), vtDir2(), dPar(), nFlag() {} ;
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, double dU, int nData)
: ptP( ptBase), vtDir( vtTool), vtDir2(), dPar( dU), nFlag( nData) {} ;
: ptP( ptBase), vtDir1( 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) {} ;
: ptP( ptBase), vtDir1( vtTool), vtDir2( vtTool2), dPar( dU), nFlag( nData) {} ;
} ;
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) ;
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const Vector3d& vtDir,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una superficie TriMesh in direzione del punto
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const IGeoPoint3d& gpRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una superficie TriMesh in direzione della curva
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const ICurve& crRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una superficie TriMesh in direzione della superficie
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const ISurf& sfSurf, const ISurf& sfRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
-37
View File
@@ -1,37 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkProjectCurveSurfTm.h Data : 07.05.24 Versione : 2.6e3
// Contenuto : Dichiarazione funzioni proiezione curve su superficie Bezier.
//
//
//
// Modifiche : 07.05.24 DB Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkGeoPoint3d.h"
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurfBezier.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
//----------------------------------------------------------------------------
// Proiezione di una curva su una superficie TriMesh lungo la direzione data.
EGK_EXPORT bool ProjectCurveOnSurfBez( const ICurve& crCrv, const ISurfBezier& surfBez, const Vector3d& vtDir,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfBez( const ICurve& crCrv, const ISurfBezier& surfBez, const IGeoPoint3d& gpRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfBez( const ICurve& crCrv, const ISurfBezier& surfBez, const ICurve& crRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfBez( const ICurve& crCrv, const ISurfBezier& surfBez, const ISurfTriMesh& tmRef,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
+2
View File
@@ -36,6 +36,8 @@ struct SelData {
: nId( nI), nSub( SEL_SUB_ALL) {}
SelData( int nI, int nS)
: nId( nI), nSub( nS) {}
bool operator == ( const SelData& other) const
{ return ( nId == other.nId && nSub == other.nSub) ; }
} ;
//----------------------------------------------------------------------------
+6 -3
View File
@@ -1,13 +1,13 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2015
// EgalTech 2015-2024
//----------------------------------------------------------------------------
// File : EGkStmStandard.h Data : 31.03.15 Versione : 1.6c7
// File : EGkStmStandard.h Data : 04.12.24 Versione : 2.6l2
// Contenuto : Dichiarazione funzioni per creazione superfici Stm
// standard : Box, Pyramid, Cylinder, Sphere, Cone.
//
//
// Modifiche : 31.03.15 DS Creazione modulo.
//
// 04.12.24 DS Aggiunta GetSurfTriMeshEmpty.
//
//----------------------------------------------------------------------------
@@ -24,10 +24,13 @@
#endif
//----------------------------------------------------------------------------
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshEmpty( void) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshBox( double dDimX, double dDimY, double dHeight, bool bRegular = false) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPyramid( double dDimX, double dDimY, double dHeight) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshCylinder( double dRadius, double dHeight, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshCone( double dRadius, double dHeight, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSphere( double dRadius, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPyramidFrustum( double dBaseDimX, double dBaseDimY, double dTopDimX, double dTopDimY, double dHeight) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshConeFrustum( double dBaseRad, double dTopRad, double dHeight, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPlaneInBox( const Plane3d& plPlane, const BBox3d& b3Box, bool bOnEq = false, bool bOnCt = false) ;
+2
View File
@@ -54,6 +54,7 @@ public : // IGeoObj
virtual double GetControlWeight( int nIndU, int nIndV, bool* pbOk) const = 0 ;
virtual double GetControlWeight( int nInd, bool* pbOk) const = 0 ;
virtual bool IsAPoint( void) const = 0 ;
virtual bool GetPoint( double dU, double dV, Side nUs, Side nVs, Point3d& ptPos) const = 0;
virtual bool GetPointD1D2( double dU, double dV, Side nUs, Side nVs,
Point3d& ptPos,
Vector3d* pvtDerU = nullptr, Vector3d* pvtDerV = nullptr,
@@ -68,6 +69,7 @@ public : // IGeoObj
virtual bool GetControlCurveOnU( int nIndV, PolyLine& plCtrlU) const = 0 ;
virtual bool GetControlCurveOnV( int nIndU, PolyLine& plCtrlV) const = 0 ;
virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ;
virtual const ISurfTriMesh* GetAuxSurfRefined( void) const = 0 ;
virtual ISurfTriMesh* GetApproxSurf( double dTol, double dSideMin = 100 * EPS_SMALL) const = 0 ;
virtual bool GetLeaves ( std::vector<std::tuple<int, Point3d, Point3d>>& vLeaves) const = 0 ;
virtual bool GetTriangles2D( std::vector<std::tuple<int,Point3d, Point3d, Point3d>>& vTria2D) const = 0 ;
+4 -3
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2024
// EgalTech 2014-2025
//----------------------------------------------------------------------------
// File : EGkSurfTriMesh.h Data : 05.03.24 Versione : 2.6c2
// File : EGkSurfTriMesh.h Data : 28.03.25 Versione : 2.7c4
// Contenuto : Dichiarazione della interfaccia ISurfTriMesh.
//
//
@@ -50,7 +50,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
virtual bool RemoveTriangle( int nId) = 0 ;
virtual bool AdjustTopology( void) = 0 ;
virtual bool CreateByFlatContour( const PolyLine& PL) = 0 ;
virtual bool CreateByRegion( const POLYLINEVECTOR& vPL, const INTMATRIX& vnPLIndMat) = 0 ;
virtual bool CreateByPolygonWithHoles( const POLYLINEVECTOR& vPL) = 0 ;
virtual bool CreateByExtrusion( const PolyLine& PL, const Vector3d& vtExtr) = 0 ;
virtual bool CreateByPointCurve( const Point3d& ptP, const PolyLine& PL) = 0 ;
virtual bool CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2, int nRuledType) = 0 ;
@@ -131,6 +131,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
virtual int GetPartCount( void) const = 0 ;
virtual bool GetPartArea( int nPart, double& dArea) const = 0 ;
virtual bool GetPartVolume( int nPart, double& dVolume) const = 0 ;
virtual bool GetPartLoops( int nPart, POLYLINEVECTOR& vPL) const = 0 ;
virtual bool RemovePart( int nPart) = 0 ;
virtual ISurfTriMesh* ClonePart( int nPart) const = 0 ;
virtual bool SetTFlag( int nId, int nTFlag) = 0 ;
+7
View File
@@ -455,6 +455,13 @@ CalcNormal( const Point3d& ptP, const Triangle3d& Tria, const TriNormals3d& Tnor
return vtNorm.Normalize( EPS_ZERO) ;
}
//----------------------------------------------------------------------------
inline bool
CalcNormal( const Point3d& ptP, const Triangle3dEx& Tria, Vector3d& vtNorm)
{
return CalcNormal( ptP, Tria, Tria.GetTriNormals(), vtNorm) ;
}
//----------------------------------------------------------------------------
enum TriangleType { OPEN = -1, EXACT = 0, CLOSED = 1 };
+19 -5
View File
@@ -528,13 +528,21 @@ LuaGetGlobVar( lua_State* L, const std::string& sVar, T& Val)
int nTokenCnt = int( vsTokens.size()) ;
if ( nTokenCnt < 2)
return false ;
lua_getglobal( L, vsTokens[0].c_str()) ;
if ( lua_getglobal( L, vsTokens[0].c_str()) != LUA_TTABLE) {
lua_pop( L, 1) ;
return false ;
}
for ( int nInd = 1 ; nInd <= nTokenCnt - 2 ; ++ nInd) {
bool bOk ;
int nField ;
if ( FromString( vsTokens[nInd], nField))
lua_rawgeti( L, -1, nField) ;
bOk = ( lua_rawgeti( L, -1, nField) == LUA_TTABLE) ;
else
lua_getfield( L, -1, vsTokens[nInd].c_str()) ;
bOk = ( lua_getfield( L, -1, vsTokens[nInd].c_str()) == LUA_TTABLE) ;
if ( ! bOk) {
lua_pop( L, nInd + 1) ;
return false ;
}
}
bool bOk = LuaGetTabFieldParam( L, -1, vsTokens[nTokenCnt-1].c_str(), Val) ;
lua_pop( L, nTokenCnt - 1) ;
@@ -563,7 +571,10 @@ LuaSetGlobVar( lua_State* L, const std::string& sVar, const T& Val)
int nTokenCnt = int( vsTokens.size()) ;
if ( nTokenCnt < 2)
return false ;
lua_getglobal( L, vsTokens[0].c_str()) ;
if ( lua_getglobal( L, vsTokens[0].c_str()) != LUA_TTABLE) {
lua_pop( L, 1) ;
return false ;
}
for ( int nInd = 1 ; nInd <= nTokenCnt - 2 ; ++ nInd) {
int nField ;
bool bNumber = FromString( vsTokens[nInd], nField) ;
@@ -603,7 +614,10 @@ LuaResetGlobVar( lua_State* L, const std::string& sVar)
int nTokenCnt = int( vsTokens.size()) ;
if ( nTokenCnt < 2)
return false ;
lua_getglobal( L, vsTokens[0].c_str()) ;
if ( lua_getglobal( L, vsTokens[0].c_str()) != LUA_TTABLE) {
lua_pop( L, 1) ;
return false ;
}
for ( int nInd = 1 ; nInd <= nTokenCnt - 2 ; ++ nInd) {
int nField ;
bool bNumber = FromString( vsTokens[nInd], nField) ;
+55 -64
View File
@@ -15,8 +15,10 @@
#include "/EgtDev/Include/EgtStringBase.h"
#include "/EgtDev/Include/EgtNumCollection.h"
#include "/EgtDev/Extern/fast_float/fast_float.h"
#include <algorithm>
#include <array>
#include <charconv>
//----------------------- Macro per import/export -----------------------------
#undef EGN_EXPORT
@@ -123,20 +125,16 @@ ValidateDxfName( std::string& sName, bool bAdvanced)
}
//----------------------------------------------------------------------------
#define FAST_FLOAT_FMT fast_float::chars_format::general | fast_float::chars_format::allow_leading_plus | fast_float::chars_format::skip_white_space
#define FAST_FLOAT_OPTS fast_float::parse_options( FAST_FLOAT_FMT)
inline bool
FromString( const std::string& sVal, int& nVal)
{ const char* pStart = sVal.c_str() ;
char* pStop ;
errno = 0 ;
nVal = strtol( pStart, &pStop, 10) ;
return ( pStop != pStart && errno == 0) ; }
{ auto answer = fast_float::from_chars_advanced( sVal.data(), sVal.data() + sVal.size(), nVal, FAST_FLOAT_OPTS) ;
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; }
inline bool
FromString( const std::string& sVal, unsigned int& nVal)
{ const char* pStart = sVal.c_str() ;
char* pStop ;
errno = 0 ;
nVal = strtoul( pStart, &pStop, 10) ;
return ( pStop != pStart && errno == 0) ; }
{ auto answer = fast_float::from_chars_advanced( sVal.data(), sVal.data() + sVal.size(), nVal, FAST_FLOAT_OPTS) ;
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; }
inline bool
FromString( const std::string& sVal, bool& bVal)
{ int nTmp ;
@@ -146,94 +144,87 @@ FromString( const std::string& sVal, bool& bVal)
return true ; }
inline bool
FromString( const std::string& sVal, double& dVal)
{ const char* pStart = sVal.c_str() ;
char* pStop ;
errno = 0 ;
dVal = strtod( pStart, &pStop) ;
return ( pStop != pStart && errno == 0) ; }
{ auto answer = fast_float::from_chars( sVal.data(), sVal.data() + sVal.size(), dVal, FAST_FLOAT_FMT) ;
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; }
template <size_t size>
bool FromString( const std::string& sVal, int (&nVal)[size])
{ const char* pStart = sVal.c_str() ;
char* pStop ;
errno = 0 ;
{ const char* pFirst = sVal.data() ;
for ( int i = 0 ; i < size ; ++ i) {
nVal[i] = strtol( pStart, &pStop, 10) ;
if ( ( i < size - 1 && *pStop != ',') || errno != 0)
auto answer = fast_float::from_chars_advanced( pFirst, sVal.data() + sVal.size(), nVal[i], FAST_FLOAT_OPTS) ;
if ( answer.ec != std::errc() || ( i < size - 1 && answer.ptr[0] != ','))
return false ;
pStart = pStop + 1 ;
pFirst = answer.ptr + 1 ;
}
return ( errno == 0) ;
return true ;
}
template <size_t size>
bool FromString( const std::string& sVal, double (&dVal)[size])
{ const char* pStart = sVal.c_str() ;
char* pStop ;
errno = 0 ;
{ const char* pFirst = sVal.data() ;
for ( int i = 0 ; i < size ; ++ i) {
dVal[i] = strtod( pStart, &pStop) ;
if ( ( i < size - 1 && *pStop != ',') || errno != 0)
auto answer = fast_float::from_chars( pFirst, sVal.data() + sVal.size(), dVal[i], FAST_FLOAT_FMT) ;
if ( answer.ec != std::errc() || ( i < size - 1 && answer.ptr[0] != ','))
return false ;
pStart = pStop + 1 ;
pFirst = answer.ptr + 1 ;
}
return ( errno == 0) ;
return true ;
}
template <size_t size>
bool FromString( const std::string& sVal, std::array<double,size>& dVal)
{ const char* pStart = sVal.c_str() ;
char* pStop ;
errno = 0 ;
{ const char* pFirst = sVal.data() ;
for ( int i = 0 ; i < size ; ++ i) {
dVal[i] = strtod( pStart, &pStop) ;
if ( ( i < size - 1 && *pStop != ',') || errno != 0)
auto answer = fast_float::from_chars( pFirst, sVal.data() + sVal.size(), dVal[i], FAST_FLOAT_FMT) ;
if ( answer.ec != std::errc() || ( i < size - 1 && answer.ptr[0] != ','))
return false ;
pStart = pStop + 1 ;
pFirst = answer.ptr + 1 ;
}
return ( errno == 0) ;
return true ;
}
EGN_EXPORT bool FromString( const std::string& sVal, INTVECTOR& vnVal) ;
EGN_EXPORT bool FromString( const std::string& sVal, DBLVECTOR& vdVal) ;
EGN_EXPORT bool FromString( const std::string& sVal, STRVECTOR& vsVal) ;
//----------------------------------------------------------------------------
EGN_EXPORT const std::string ToStringAdv( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ;
inline const std::string
ToString( int nVal, int nPrec = 1, int nRadix = 10)
ToString( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
{
// se necessario processing avanzato
if ( nPrec > 1 || nRadix < 6)
return ToStringAdv( nVal, nPrec, nRadix, pnErr) ;
// eseguo conversione
char szBuff[24] ;
int nErr = _itoa_s( nVal, szBuff, nRadix) ;
// se errore, ritorno stringa opportuna
if ( nErr != 0) {
_ASSERT( 0) ;
const int nBuffSize = 16 ;
char szBuff[nBuffSize]{} ;
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
if ( Res.ec != std::errc()) {
if ( pnErr != nullptr)
*pnErr = int( Res.ec) ;
return "#Error" ;
}
// verifico lunghezza minima
int nLen = (int) strlen( szBuff) ;
if ( nLen >= nPrec)
return szBuff ;
// porto la stringa alla minima lunghezza
std::string sBuff( szBuff) ;
sBuff.insert( 0, ( nPrec - nLen), '0') ;
return sBuff ;
// gestione codice di errore
if ( pnErr != nullptr)
*pnErr = 0 ;
return szBuff ;
}
EGN_EXPORT const std::string ToStringAdv( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ;
inline const std::string
ToString( unsigned int nVal, int nPrec = 1, int nRadix = 10)
ToString( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr)
{
// se necessario processing avanzato
if ( nPrec > 1 || nRadix < 6)
return ToStringAdv( nVal, nPrec, nRadix, pnErr) ;
// eseguo conversione
char szBuff[24] ;
int nErr = _ultoa_s( nVal, szBuff, nRadix) ;
// se errore, ritorno stringa opportuna
if ( nErr != 0) {
_ASSERT( 0) ;
const int nBuffSize = 16 ;
char szBuff[nBuffSize]{} ;
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
if ( Res.ec != std::errc()) {
if ( pnErr != nullptr)
*pnErr = int( Res.ec) ;
return "#Error" ;
}
// verifico lunghezza minima
int nLen = (int) strlen( szBuff) ;
if ( nLen >= nPrec)
return szBuff ;
// porto la stringa alla minima lunghezza
std::string sBuff( szBuff) ;
sBuff.insert( 0, ( nPrec - nLen), '0') ;
return sBuff ;
// gestione codice di errore
if ( pnErr != nullptr)
*pnErr = 0 ;
return szBuff ;
}
template <size_t size>
const std::string ToString( const int (&nVal)[size], int nPrec = 1)
+5
View File
@@ -75,6 +75,8 @@ class IEGrScene
virtual bool ZoomChange( double dCoeff) = 0 ;
virtual bool ZoomOnPoint( const Point3d& ptWin, double dCoeff) = 0 ;
virtual bool ZoomWin( const Point3d& ptWin1, const Point3d& ptWin2) = 0 ;
virtual bool SetCameraType( bool bOrthoOrPersp) = 0 ;
virtual bool SetZoomType( int nZoomMode) = 0 ;
// ShowMode
virtual bool SetShowMode( int nShowMode) = 0 ;
virtual int GetShowMode( void) const = 0 ;
@@ -171,6 +173,9 @@ enum CameraDir { CT_NONE = 0,
CT_ISO_NE = 9,
CT_ISO_NW = 10,
CT_CPLANE = 11} ;
//------------------------ Costanti per tipologia di zoom nel caso prospettico ---------------------
enum PerspZoom { ZT_STD = 0,
ZT_DOLLY = 1} ;
//------------------------ Costanti per tipo di visualizzazione --------------
enum ShowMode { SM_WIREFRAME = 0,
SM_HIDDENLINE = 1,
+19 -5
View File
@@ -116,7 +116,9 @@ EIN_EXPORT BOOL __stdcall EgtImportCsf( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtImportDxf( const wchar_t* wsFilePath, double dScaleFactor) ;
EIN_EXPORT BOOL __stdcall EgtImportPnt( const wchar_t* wsFilePath, int nFlag) ;
EIN_EXPORT BOOL __stdcall EgtImportStl( const wchar_t* wsFilePath, double dScaleFactor) ;
EIN_EXPORT BOOL __stdcall EgtImport3MF( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtImportOff( const wchar_t* wsFilePath, double dScaleFactor) ;
EIN_EXPORT BOOL __stdcall EgtImportPly( const wchar_t* wsFilePath, double dScaleFactor) ;
EIN_EXPORT BOOL __stdcall EgtImport3MF( const wchar_t* wsFilePath, int nFlag) ;
EIN_EXPORT BOOL __stdcall EgtImport3dm( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtAdvancedImportIsEnabled( void) ;
EIN_EXPORT BOOL __stdcall EgtAdvancedImport( const wchar_t* wsFilePath, double dLinToler, int nFlag) ;
@@ -447,6 +449,7 @@ EIN_EXPORT BOOL __stdcall EgtGetInfoBBox( int nId, const wchar_t* wsKey,
double ptMin[3], double ptMax[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetInfoFrame( int nId, const wchar_t* wsKey, double ptOrig[3],
double vtX[3], double vtY[3], double vtZ[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetAllInfo( int nId, wchar_t*& wsInfos) ;
EIN_EXPORT BOOL __stdcall EgtExistsInfo( int nId, const wchar_t* wsKey) ;
EIN_EXPORT BOOL __stdcall EgtRemoveInfo( int nId, const wchar_t* wsKey) ;
EIN_EXPORT BOOL __stdcall EgtSetTextureName( int nId, const wchar_t* wsTxrName) ;
@@ -593,6 +596,8 @@ EIN_EXPORT BOOL __stdcall EgtArcAngCenter( int nId, double* pdAngDeg) ;
EIN_EXPORT BOOL __stdcall EgtArcDeltaN( int nId, double* pdDeltaN) ;
EIN_EXPORT BOOL __stdcall EgtArcNormVersor( int nId, int nRefId, double vtNorm[3]) ;
EIN_EXPORT BOOL __stdcall EgtCurveCompoCenter( int nId, int nSimpCrv, int nRefId, double ptCen[3]) ;
EIN_EXPORT BOOL __stdcall EgtCopyCompoSubCurve( int nId, int nSubCrvToCopy, int nParentId) ;
EIN_EXPORT BOOL __stdcall EgtCopyParamRange( int nId, double dUStart, double dUEnd, int nParentId) ;
// GeomDb Surf Get
EIN_EXPORT BOOL __stdcall EgtSurfArea( int nId, double* pdArea) ;
@@ -800,7 +805,10 @@ EIN_EXPORT BOOL __stdcall EgtGetTableArea( int nInd, double ptMin[3], double ptM
EIN_EXPORT BOOL __stdcall EgtGetTableAreaOffset( int nInd, double ptMinOffs[3], double ptMaxOffs[3]) ;
EIN_EXPORT BOOL __stdcall EgtChangeTable( const wchar_t* wsTable, BOOL bUpdateDisp) ;
EIN_EXPORT BOOL __stdcall EgtShowOnlyTable( BOOL bVal) ;
EIN_EXPORT BOOL __stdcall EgtMoveDispAxis( const wchar_t* wsName, double dPos) ;
EIN_EXPORT BOOL __stdcall EgtRemoveDispAxis( const wchar_t* wsName) ;
EIN_EXPORT int __stdcall EgtAddFixture( const wchar_t* wsName, const double ptPos[3], double dAngRotDeg, double dMov) ;
EIN_EXPORT BOOL __stdcall EgtKeepAllDispAxes( int nSouPhase) ;
EIN_EXPORT BOOL __stdcall EgtKeepFixture( int nFxtId, int nSouPhase) ;
EIN_EXPORT BOOL __stdcall EgtRemoveFixture( int nFxtId) ;
EIN_EXPORT BOOL __stdcall EgtVerifyFixture( int nFxtId) ;
@@ -808,7 +816,9 @@ EIN_EXPORT int __stdcall EgtGetFirstFixture( void) ;
EIN_EXPORT int __stdcall EgtGetNextFixture( int nFxtId) ;
EIN_EXPORT BOOL __stdcall EgtMoveFixture( int nFxtId, const double vtMove[3]) ;
EIN_EXPORT BOOL __stdcall EgtRotateFixture( int nFxtId, double dDeltaAngDeg) ;
EIN_EXPORT BOOL __stdcall EgtSetFixtureLink( int nFxtId, const wchar_t* wsTaLink) ;
EIN_EXPORT BOOL __stdcall EgtMoveFixtureMobile( int nFxtId, double dDeltaMov) ;
EIN_EXPORT BOOL __stdcall EgtSetFixtureMobile( int nFxtId, double dMov) ;
// Tools DataBase
EIN_EXPORT BOOL __stdcall EgtTdbGetToolNewName( const wchar_t* wsName, wchar_t*& wsNewName) ;
EIN_EXPORT BOOL __stdcall EgtTdbAddTool( const wchar_t* wsName, int nType) ;
@@ -965,8 +975,14 @@ EIN_EXPORT int __stdcall EgtGetTableId( const wchar_t* wsTable) ;
EIN_EXPORT int __stdcall EgtGetAxisId( const wchar_t* wsAxis) ;
EIN_EXPORT int __stdcall EgtGetHeadId( const wchar_t* wsHead) ;
EIN_EXPORT int __stdcall EgtGetHeadExitCount( const wchar_t* wsHead) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisType( const wchar_t* wsAxis, BOOL* pbLinear) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisDir( const wchar_t* wsAxis, double vtDir[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisInvert( const wchar_t* wsAxis, BOOL* pbInvert) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisOffset( const wchar_t* wsAxis, double* pdOffset) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisPos( const wchar_t* wsAxis, double* pdVal) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisMin( const wchar_t* wsAxis, double* pdMin) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisMax( const wchar_t* wsAxis, double* pdMax) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisHomePos( const wchar_t* wsAxis, double* pdHome) ;
EIN_EXPORT BOOL __stdcall EgtGetAllHeadsNames( wchar_t*& wsNames) ;
EIN_EXPORT BOOL __stdcall EgtGetAllTablesNames( wchar_t*& wsNames) ;
// Machine Calc
@@ -985,10 +1001,6 @@ EIN_EXPORT BOOL __stdcall EgtVerifyOutstroke( double dX, double dY, double dZ, d
EIN_EXPORT BOOL __stdcall EgtGetOutstrokeInfo( wchar_t*& wsInfo) ;
// Machine Move
EIN_EXPORT BOOL __stdcall EgtSetAxisPos( const wchar_t* wsAxis, double dVal) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisPos( const wchar_t* wsAxis, double* pdVal) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisMin( const wchar_t* wsAxis, double* pdMin) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisMax( const wchar_t* wsAxis, double* pdMax) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisHomePos( const wchar_t* wsAxis, double* pdHome) ;
EIN_EXPORT BOOL __stdcall EgtLoadTool( const wchar_t* wsHead, int nExit, const wchar_t* wsTool) ;
EIN_EXPORT BOOL __stdcall EgtResetHeadSet( const wchar_t* wsHead) ;
EIN_EXPORT BOOL __stdcall EgtSetMachineLook( int nFlag) ;
@@ -1063,6 +1075,8 @@ EIN_EXPORT BOOL __stdcall EgtGetTextureDimensions( const wchar_t* wsName, double
EIN_EXPORT BOOL __stdcall EgtChangeTextureDimensions( const wchar_t* wsName, double dDimX, double dDimY) ;
EIN_EXPORT BOOL __stdcall EgtGetImage( int nShowMode, const int TopCol[4], const int BottomCol[4],
int nWidth, int nHeight, const wchar_t* wsName) ;
EIN_EXPORT BOOL __stdcall EgtSetCameraType( BOOL bOrthoOrPersp, BOOL bRedraw) ;
EIN_EXPORT BOOL __stdcall EgtSetZoomType( int nZoomType, BOOL bRedraw) ;
// Image
EIN_EXPORT BOOL __stdcall EgtGetImagePixels( const wchar_t* wsFile, int* pnPixelX, int* pnPixelY) ;
+2
View File
@@ -30,5 +30,7 @@ enum RawPartCenterPos { MCH_CE_TC = 1, // top center
//------------------------ Costanti per fixtures ------------------------------
static std::string FXT_MOBILE = "MOBILE" ; // gruppo parte mobile
static std::string FXT_MOB_MINPOS = "MINPOS" ; // posizione minima della parte mobile
static std::string FXT_MOB_MAXPOS = "MAXPOS" ; // posizione massima della parte mobile
static std::string FXT_MOB_CPOS = "CPOS" ; // posizione corrente della parte mobile
static std::string FXT_MOB_MOVEDIR = "MDIR" ; // direzione di movimento della parte mobile (default Z di gruppo)
+11 -1
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
//----------------------------------------------------------------------------
// File : EMkMachMgr.h Data : 22.04.24 Versione : 2.6d4
// File : EMkMachMgr.h Data : 25.11.24 Versione : 2.6k5
// Contenuto : Dichiarazione della interfaccia IMachMgr.
//
//
@@ -18,6 +18,7 @@
// 30.03.24 DS Aggiunte in interfaccia GetAllAxesNames e GetCalcTable.
// 02.04.24 DS Aggiunta in interfaccia GetClEntAxesMask.
// 22.04.24 DS Aggiunta in interfaccia GetExitId.
// 25.11.24 DS Aggiunta in interfaccia GetMachiningSkippedGeometry.
//
//----------------------------------------------------------------------------
@@ -117,6 +118,9 @@ class __declspec( novtable) IMachMgr
virtual bool GetTableAreaOffset( int nInd, BBox3d& b3Area) const = 0 ;
virtual bool ChangeTable( const std::string& sTable, bool bUpdateDisp) = 0 ;
virtual bool ShowOnlyTable( bool bVal) = 0 ;
virtual bool MoveDispAxis( const std::string& sName, double dPos) = 0 ;
virtual bool RemoveDispAxis( const std::string& sName) = 0 ;
virtual bool KeepAllDispAxes( int nSouPhase) = 0 ;
virtual int AddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg, double dMov) = 0 ;
virtual bool KeepFixture( int nFxtId, int nSouPhase) = 0 ;
virtual bool RemoveFixture( int nFxtId) = 0 ;
@@ -125,7 +129,9 @@ class __declspec( novtable) IMachMgr
virtual int GetNextFixture( int nFxtId) const = 0 ;
virtual bool MoveFixture( int nId, const Vector3d& vtMove) = 0 ;
virtual bool RotateFixture( int nId, double dDeltaAngDeg) = 0 ;
virtual bool SetFixtureLink( int nId, const std::string& sTaLink) = 0 ;
virtual bool MoveFixtureMobile( int nId, double dDeltaMov) = 0 ;
virtual bool SetFixtureMobile( int nId, double dMov) = 0 ;
// Tools DataBase
virtual bool TdbGetToolNewName( std::string& sName) const = 0 ;
virtual bool TdbAddTool( const std::string& sName, int nType) = 0 ;
@@ -240,6 +246,7 @@ class __declspec( novtable) IMachMgr
virtual int GetPhaseDisposition( int nPhase) const = 0 ;
virtual bool DispositionSpecialApply( int nId, bool bRecalc) = 0 ;
virtual bool DispositionSpecialUpdate( int nId) = 0 ;
virtual bool GetDispositionToolData( int nId, std::string& sName, std::string& sHead, int& nExit, std::string& sTcPos) = 0 ;
// Operations : machinings
virtual int AddMachining( const std::string& sName, const std::string& sMachining) = 0 ;
virtual int AddMachining( const std::string& sName, int nMchType, const std::string& sTool) = 0 ;
@@ -266,6 +273,7 @@ class __declspec( novtable) IMachMgr
virtual bool GetMachiningParam( int nType, double& dVal) const = 0 ;
virtual bool GetMachiningParam( int nType, std::string& sVal) const = 0 ;
virtual bool GetMachiningGeometry( SELVECTOR& vIds) const = 0 ;
virtual bool GetMachiningSkippedGeometry( SELVECTOR& vIds) const = 0 ;
virtual bool IsMachiningEmpty( void) const = 0 ;
virtual bool GetMachiningStartPoint( Point3d& ptStart) const = 0 ;
virtual bool GetMachiningEndPoint( Point3d& ptEnd) const = 0 ;
@@ -273,6 +281,7 @@ class __declspec( novtable) IMachMgr
virtual bool GetClEntMove( int nEntId, int& nMove) const = 0 ;
virtual bool GetClEntFlag( int nEntId, int& nFlag, int& nFlag2) const = 0 ;
virtual bool GetClEntIndex( int nEntId, int& nIndex) const = 0 ;
virtual bool GetClEntAxesStatus( int nEntId, int& nStatus) const = 0 ;
virtual bool GetClEntAxesMask( int nEntId, int& nMask) const = 0 ;
virtual bool GetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) const = 0 ;
// Simulation
@@ -328,6 +337,7 @@ class __declspec( novtable) IMachMgr
virtual int GetTcPosId( const std::string& sTcPos) const = 0 ;
virtual bool GetAxisToken( const std::string& sAxis, std::string& sToken) const = 0 ;
virtual bool GetAxisType( const std::string& sAxis, bool& bLinear) const = 0 ;
virtual bool GetAxisDir( const std::string& sAxis, Vector3d& vtDir) const = 0 ;
virtual bool GetAxisInvert( const std::string& sAxis, bool& bInvert) const = 0 ;
virtual bool GetAxisOffset( const std::string& sAxis, double& dOffset) const = 0 ;
virtual bool SetAxisPos( const std::string& sAxis, double dVal, double* pdNewVal = nullptr) = 0 ;
+8 -3
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
// EgalTech 2015-2025
//----------------------------------------------------------------------------
// File : EmkMachiningConst.h Data : 29.03.24 Versione : 2.6di1
// File : EmkMachiningConst.h Data : 20.01.25 Versione : 2.7a1
// Contenuto : Costanti delle lavorazioni.
//
//
@@ -14,6 +14,8 @@
// 04.02.22 DS Agg. MPA_EPICYCLESRAD e MPA_EPICYCLESDIST.
// 06.09.23 DS Agg. 5AxMachining.
// 29.03.24 DS Agg. MGP_APPROXLINTOL.
// 04.12.24 ES Agg. SURFFIN_SUB_Z_CONST e SURFFIN_SUB_OPTIMAL.
// 20.01.25 ES Agg. SURFFIN_SUB_PROJECT.
//
//----------------------------------------------------------------------------
@@ -390,7 +392,10 @@ enum { SURFROU_LO_NONE = 0,
enum { SURFFIN_SUB_ZIGZAG = 0,
SURFFIN_SUB_ONEWAY = 1,
SURFFIN_SUB_SPIRALIN = 2,
SURFFIN_SUB_SPIRALOUT = 3} ;
SURFFIN_SUB_SPIRALOUT = 3,
SURFFIN_SUB_Z_CONST = 4,
SURFFIN_SUB_OPTIMAL = 5,
SURFFIN_SUB_PROJECT = 6} ;
// Tipo di attacco
enum { SURFFIN_LI_NONE = 0,
SURFFIN_LI_LINEAR = 1,
+8 -2
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2016-2016
// EgalTech 2016-2024
//----------------------------------------------------------------------------
// File : EmkMachiningGeoConst.h Data : 06.01.16 Versione : 1.6l6
// File : EmkMachiningGeoConst.h Data : 25.11.24 Versione : 2.6k5
// Contenuto : Costanti per le geometrie delle lavorazioni.
//
//
@@ -26,6 +26,8 @@ static std::string KEY_STRAIGHT = "STR" ;
static std::string KEY_NUM = "NUM" ;
// Chiave per stato di aggiornamento di lavorazione
static std::string KEY_STAT = "STAT" ;
// Chiave per elenco identificativi non lavorati
static std::string KEY_SKIPS = "SKIPS" ;
// Sottogruppi delle lavorazioni
static std::string MCH_AUX = "AUX" ;
static std::string MCH_AUXVIEW = "AVIEW" ;
@@ -39,8 +41,10 @@ static std::string MCH_PATH = "P" ;
static std::string MCH_CL_CLIMB = "CLIMB" ;
static std::string MCH_CL_RISE = "RISE" ;
static std::string MCH_CL_HOME = "HOME" ;
static std::string MCH_CL_SAFEIN = "SI" ;
static std::string MCH_CL_LEADIN = "LI" ;
static std::string MCH_CL_LEADOUT = "LO" ;
static std::string MCH_CL_SAFEOUT = "SO" ;
static std::string MCH_CL_AGB_DWN = "AGBD" ;
static std::string MCH_CL_AGB_IN = "AGBI" ;
static std::string MCH_CL_AGB_OUT = "AGBO" ;
@@ -108,6 +112,8 @@ static std::string KEY_MMAX = "MMAX" ;
// Chiavi info in gruppo CL per punti assi minimo e massimo di ingombro di tutta la lavorazione
static std::string KEY_MAXMIN = "MAXMIN" ;
static std::string KEY_MAXMAX = "MAXMAX" ;
// Chiave info in sottogruppo di CL per uscite attivate (per forature con gang drill)
static std::string KEY_DRACEX = "DRACEX" ;
// Chiave info in sottogruppo di testa per abilitarne visualizzazione in Preview (0/1 default)
static std::string KEY_PREVIEWSHOW = "PreviewShow" ;
+3
View File
@@ -122,6 +122,9 @@ const std::string TTH_BASE = "B" ; // posizione base portau
const std::string TTH_LEN = "H" ; // lunghezza portautensile da naso mandrino
const std::string TTH_DIAM = "D" ; // diametro massimo portautensile
const std::string TTH_STEM_DIAM = "D_STEM" ; // diametro massimo gambo utensile
const std::string TTH_TYPE = "TYPE" ; // stringa tipo di portautensile
const std::string TTH_TYPE_STD = "Std" ; // tipo standard (default)
const std::string TTH_TYPE_FLOAT = "Float" ; // tipo flottante
//----------------------------------------------------------------------------
// Costanti per nomi di parti di utensile
+5 -2
View File
@@ -13,6 +13,7 @@
#pragma once
#include <string>
//----------------- Costanti per tipo di file ----------------------------------
enum FileType { FT_NULL = 0,
@@ -28,8 +29,10 @@ enum FileType { FT_NULL = 0,
FT_SVG = 18,
FT_BTLX = 19,
FT_3MF = 20,
FT_OBJ = 21,
FT_3DM = 22 ,
FT_OBJ = 21,
FT_3DM = 22,
FT_OFF = 23,
FT_PLY = 24,
FT_IGES = 31,
FT_STEP = 32,
FT_ACIS = 33,
+30 -9
View File
@@ -124,7 +124,9 @@ EXE_EXPORT bool ExeImportCsf( const std::string& sFilePath) ;
EXE_EXPORT bool ExeImportDxf( const std::string& sFilePath, double dScaleFactor) ;
EXE_EXPORT bool ExeImportPnt( const std::string& sFilePath, int nFlag) ;
EXE_EXPORT bool ExeImportStl( const std::string& sFilePath, double dScaleFactor) ;
EXE_EXPORT bool ExeImport3MF( const std::string& sFilePath) ;
EXE_EXPORT bool ExeImportOff( const std::string& sFilePath, double dScaleFactor) ;
EXE_EXPORT bool ExeImportPly( const std::string& sFilePath, double dScaleFactor) ;
EXE_EXPORT bool ExeImport3MF( const std::string& sFilePath, int nFlag = 0) ;
EXE_EXPORT bool ExeImport3dm( const std::string& sFilePath) ;
EXE_EXPORT bool ExeAdvancedImportIsEnabled( void) ;
EXE_EXPORT bool ExeAdvancedImport( const std::string& sFilePath, double dToler = 0.1, int nFlag = 0) ;
@@ -333,6 +335,7 @@ EXE_EXPORT int ExeCreateSurfFrRectangle3P( int nParentId, const Point3d& ptIni,
const Point3d& ptCross, const Point3d& ptDir, int nRefType) ;
EXE_EXPORT int ExeCreateSurfFrStadium( int nParentId, const Point3d& ptIni, const Point3d& ptCross, int nRefType) ;
EXE_EXPORT int ExeCreateSurfFrDisk( int nParentId, const Point3d& ptOrig, double dRad, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmEmpty( int nParentId) ;
EXE_EXPORT int ExeCreateSurfTmPlaneInBBox( int nParentId, const Point3d& ptP, const Vector3d& vtN, const BBox3d& b3Box, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmConvexHullInBBox( int nParentId, int nId, const BBox3d& b3Box, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmBBox( int nParentId, const BBox3d& b3Box, bool bRegular, int nRefType) ;
@@ -346,8 +349,13 @@ EXE_EXPORT int ExeCreateSurfTmCone( int nParentId, const Point3d& ptOrig, const
double dRad, double dHeight, double dLinTol, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmSphere( int nParentId, const Point3d& ptOrig,
double dRad, double dLinTol, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmPyramidFrustum( int nParentId, double dBaseDimX, double dBaseDimY,
double dTopDimX, double dTopDimY, double dHeight) ;
EXE_EXPORT int ExeCreateSurfTmConeFrustum( int nParentId, double dBaseRad, double dTopRad, double dHeight, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmTriangle( int nParentId, const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptP3, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmRectangle( int nParentId, const Point3d& ptO, const Point3d& ptL, const Point3d& ptT, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmByPolygon( int nParentId, const PolyLine& PL, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmByPolygonWithHoles( int nParentId, const POLYLINEVECTOR& vPL, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmByFlatContour( int nParentId, int nCrvId, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmByRegion( int nParentId, const INTVECTOR& vCrvIds, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmByExtrusion( int nParentId, const INTVECTOR& vCrvIds, const Vector3d& vtExtr,
@@ -460,6 +468,8 @@ EXE_EXPORT int ExeGetFirstNameInGroup( int nGroupId, const std::string& sName)
EXE_EXPORT int ExeGetNextName( int nId, const std::string& sName) ;
EXE_EXPORT int ExeGetLastNameInGroup( int nGroupId, const std::string& sName) ;
EXE_EXPORT int ExeGetPrevName( int nId, const std::string& sName) ;
EXE_EXPORT bool ExeGetNameInGroup( int nGroupId, const std::string& sName, INTVECTOR& vIds) ;
EXE_EXPORT bool ExeGetInfoInGroup( int nGroupId, const std::string& sKey, INTVECTOR& vIds) ;
EXE_EXPORT bool ExeGetBBox( int nId, int nFlag, BBox3d& b3Box) ;
EXE_EXPORT bool ExeGetBBoxGlob( int nId, int nFlag, BBox3d& b3Box) ;
EXE_EXPORT bool ExeGetBBoxRef( int nId, int nFlag, const Frame3d& frRef, BBox3d& b3Box) ;
@@ -535,6 +545,7 @@ EXE_EXPORT bool ExeSetTextureFrame( int nId, const Frame3d& frTxrRef, int nRefTy
EXE_EXPORT bool ExeRemoveTextureData( int nId) ;
EXE_EXPORT bool ExeGetTextureName( int nId, std::string& sTxrName) ;
EXE_EXPORT bool ExeGetTextureFrame( int nId, int nRefId, Frame3d& frTxrRef) ;
EXE_EXPORT bool ExeSetStipple( int nId, int nFactor, int nPattern) ;
// GeomDb Obj Selection
EXE_EXPORT bool ExeSetObjFilterForSelect( bool bZerodim, bool bCurve, bool bSurf, bool bVolume, bool bExtra) ;
@@ -626,14 +637,10 @@ EXE_EXPORT bool ExeCurveCompoSetTempProp( int nId, int nCrv, int nProp, int nPro
EXE_EXPORT bool ExeCurveCompoSetTempParam( int nId, int nCrv, double dParam, int nParamInd = 0) ;
EXE_EXPORT bool ExeChainCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType) ;
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 bool ExeProjectCurveOnSurfBz( int nCurveId, int nSurfBzId, const Vector3d& vtDir, int nDestGrpId,
double dLinTol, double dMaxSegmLen, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurfBzExt( int nCurveId, int nSurfBzId, int nGuideId, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromGuide) ;
EXE_EXPORT bool ExeProjectCurveOnSurf( int nCurveId, int nSurfTmId, const Vector3d& vtProj, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromProj, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurfExt( int nCurveId, int nSurfTmId, int nGuideId, int nDestGrpId,
double dLinTol, double dMaxSegmLen, bool bDirFromGuide) ;
EXE_EXPORT int ExeCurveGetVoronoi( const INTVECTOR& vIds, int nDestGrpId, int nBound, int* pnCount) ;
EXE_EXPORT int ExeCurveGetMedialAxis( const INTVECTOR& vIds, int nDestGrpId, int nSide, int* pnCount) ;
EXE_EXPORT int ExeCurveGetFatCurve( int nId, int nDestGrpId, double dRad, bool bSquareEnds, bool bSquareMids, int* pnCount) ;
@@ -730,6 +737,7 @@ EXE_EXPORT bool ExeCurveIsARectangle( int nId, Point3d& ptP, Vector3d& vtL1, Vec
EXE_EXPORT bool ExeCurveIsATrapezoid( int nId, Point3d& ptP, Vector3d& vtB1, Vector3d& vtL1, Vector3d& vtB2, double dToler = EPS_SMALL) ;
EXE_EXPORT bool ExeCurveAreaXY( int nId, double& dArea) ;
EXE_EXPORT bool ExeCurveArea( int nId, Plane3d& Plane, double& dArea) ;
EXE_EXPORT bool ExeCurveMaxOffset( int nId, double& dMaxOffset) ;
EXE_EXPORT bool ExeCurveNearestExtremityToPoint( int nId, const Point3d& ptP, bool& bStart) ;
EXE_EXPORT bool ExeCurveExtrusion( int nId, int nRefId, Vector3d& vtExtr) ;
EXE_EXPORT bool ExeCurveThickness( int nId, double* pdThick) ;
@@ -749,6 +757,8 @@ EXE_EXPORT bool ExeCurveCompoNormVersor( int nId, int nSimpCrv, int nRefId, Vect
EXE_EXPORT bool ExeCurveCompoGetTempProp( int nId, INTVECTOR& vProp, int nPropInd) ;
EXE_EXPORT bool ExeCurveCompoGetTempParam( int nId, DBLVECTOR& vParam, int nParamInd) ;
EXE_EXPORT int ExeShowCurveBezierControlPoints( int nCrvId, int nDestGrpId, int* pnCount) ;
EXE_EXPORT int ExeCopyCompoSubCurve( int nCrvId, int nSubCrvToCopy, int nDestGrpId) ;
EXE_EXPORT int ExeCopyParamRange( int nCrvId, double dUStart, double dUEnd, int nDestGrpId) ;
// GeomDb Surf Get
EXE_EXPORT bool ExeSurfArea( int nId, double& dArea) ;
@@ -1070,6 +1080,9 @@ EXE_EXPORT bool ExeGetTableArea( int nInd, BBox3d& b3Area) ;
EXE_EXPORT bool ExeGetTableAreaOffset( int nInd, BBox3d& b3AreaOffs) ;
EXE_EXPORT bool ExeChangeTable( const std::string& sTable, bool bUpdateDisp) ;
EXE_EXPORT bool ExeShowOnlyTable( bool bVal) ;
EXE_EXPORT bool ExeMoveDispAxis( const std::string& sName, double dPos) ;
EXE_EXPORT bool ExeRemoveDispAxis( const std::string& sName) ;
EXE_EXPORT bool ExeKeepAllDispAxes( int nSouPhase) ;
EXE_EXPORT int ExeAddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg, double dMov) ;
EXE_EXPORT bool ExeKeepFixture( int nFxtId, int nSouPhase) ;
EXE_EXPORT bool ExeRemoveFixture( int nFxtId) ;
@@ -1078,7 +1091,9 @@ EXE_EXPORT int ExeGetFirstFixture( void) ;
EXE_EXPORT int ExeGetNextFixture( int nFxtId) ;
EXE_EXPORT bool ExeMoveFixture( int nFxtId, const Vector3d& vtMove) ;
EXE_EXPORT bool ExeRotateFixture( int nFxtId, double dDeltaAngDeg) ;
EXE_EXPORT bool ExeSetFixtureLink( int nFxtId, const std::string& sTaLink) ;
EXE_EXPORT bool ExeMoveFixtureMobile( int nFxtId, double dDeltaMove) ;
EXE_EXPORT bool ExeSetFixtureMobile( int nFxtId, double dMove) ;
// Tools Database
EXE_EXPORT bool ExeTdbGetToolNewName( std::string& sName) ;
EXE_EXPORT bool ExeTdbAddTool( const std::string& sName, int nType) ;
@@ -1192,6 +1207,7 @@ EXE_EXPORT bool ExeRemoveOperationHome( int nId) ;
EXE_EXPORT int ExeGetPhaseDisposition( int nPhase) ;
EXE_EXPORT bool ExeSpecialApplyDisposition( int nId, bool bRecalc) ;
EXE_EXPORT bool ExeSpecialUpdateDisposition( int nId) ;
EXE_EXPORT bool ExeGetDispositionToolData( int nId, std::string& sName, std::string& sHead, int& nExit, std::string& sTcPos) ;
// Machinings
EXE_EXPORT int ExeAddMachining( const std::string& sName, const std::string& sMachining) ;
EXE_EXPORT int ExeAddMachining( const std::string& sName, int nMchType, const std::string& sTool) ;
@@ -1216,6 +1232,7 @@ EXE_EXPORT bool ExeGetMachiningParam( int nType, int& nVal) ;
EXE_EXPORT bool ExeGetMachiningParam( int nType, double& dVal) ;
EXE_EXPORT bool ExeGetMachiningParam( int nType, std::string& sVal) ;
EXE_EXPORT bool ExeGetMachiningGeometry( SELVECTOR& vIds) ;
EXE_EXPORT bool ExeGetMachiningSkippedGeometry( SELVECTOR& vIds) ;
EXE_EXPORT bool ExeIsMachiningEmpty( void) ;
EXE_EXPORT bool ExeGetMachiningStartPoint( Point3d& ptStart) ;
EXE_EXPORT bool ExeGetMachiningEndPoint( Point3d& ptEnd) ;
@@ -1227,6 +1244,7 @@ EXE_EXPORT bool ExeUpdateAllMachiningsEx( bool bStopOnFirstErr, std::string& sEr
EXE_EXPORT bool ExeGetClEntMove( int nEntId, int& nMove) ;
EXE_EXPORT bool ExeGetClEntFlag( int nEntId, int& nFlag, int& nFlag2) ;
EXE_EXPORT bool ExeGetClEntIndex( int nEntId, int& nIndex) ;
EXE_EXPORT bool ExeGetClEntAxesStatus( int nEntId, int& nStatus) ;
EXE_EXPORT bool ExeGetClEntAxesMask( int nEntId, int& nMask) ;
EXE_EXPORT bool ExeGetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) ;
@@ -1256,6 +1274,7 @@ EXE_EXPORT int ExeGetExitId( const std::string& sHead, int nExit) ;
EXE_EXPORT int ExeGetTcPosId( const std::string& sTcPos) ;
EXE_EXPORT bool ExeGetAxisToken( const std::string& sAxis, std::string& sToken) ;
EXE_EXPORT bool ExeGetAxisType( const std::string& sAxis, bool& bLinear) ;
EXE_EXPORT bool ExeGetAxisDir( const std::string& sAxis, Vector3d& vtDir) ;
EXE_EXPORT bool ExeGetAxisInvert( const std::string& sAxis, bool& bInvert) ;
EXE_EXPORT bool ExeGetAxisOffset( const std::string& sAxis, double& dOffset) ;
EXE_EXPORT bool ExeGetAllTablesNames( STRVECTOR& vNames) ;
@@ -1373,6 +1392,8 @@ EXE_EXPORT bool ExeGetTextureDimensions( const std::string& sName, double& dDimX
EXE_EXPORT bool ExeChangeTextureDimensions( const std::string& sName, double dDimX, double dDimY) ;
EXE_EXPORT bool ExeGetImage( int nShowMode, Color colBackTop, Color colBackBottom,
int nWidth, int nHeight, const std::string& sFile) ;
EXE_EXPORT bool ExeSetCameraType( bool bOrthoOrPersp, bool bRedraw) ;
EXE_EXPORT bool ExeSetZoomType( int nMode, bool bRedraw) ;
// Image
EXE_EXPORT bool ExeGetImagePixels( const std::string& sFile, int& nPixelX, int& nPixelY) ;
+3 -3
View File
@@ -101,9 +101,9 @@ B64Decode( const std::string& sB64Sou, std::string& sDest)
if ( p != nullptr)
nVal = char( p - EncB64) ;
in[phase] = (( c < 43 || c > 122) ? -1 : (int) DecB64[ c - 43]) ;
if ( in[phase] != 0 )
in[phase] = ((in[phase] == (int)'$') ? -1 : in[phase] - 62) ;
if ( in[phase] != -1 ) {
if ( in[phase] != 0 )
in[phase] = ((in[phase] == (int)'$') ? -1 : in[phase] - 62) ;
if ( in[phase] != -1 ) {
phase = (phase + 1) % 4 ;
if ( phase == 0) {
decodeblock( in, sDest) ;
+4 -3
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
// EgalTech 2015-2025
//----------------------------------------------------------------------------
// File : EgtKeyCodes.h Data : 16.01.24 Versione : 2.6a1
// File : EgtKeyCodes.h Data : 04.03.25 Versione : 2.7a3
// Contenuto : Costanti per codici di protezione librerie di base.
//
//
@@ -18,6 +18,7 @@
// 01.01.22 DS Passaggio a versione 24.
// 01.01.23 DS Passaggio a versione 25.
// 16.01.24 DS Passaggio a versione 26.
// 07.01.25 DS Passaggio a versione 27.
//
//----------------------------------------------------------------------------
@@ -25,7 +26,7 @@
//----------------------------------------------------------------------------
const int KEY_BASELIB_PROD = 207 ;
const int KEY_BASELIB_VER = 2610 ;
const int KEY_BASELIB_VER = 2704 ;
const int KEY_BASELIB_LEV = 1 ;
//----------------------------------------------------------------------------