Merge branch 'master' of https://gitlab.steamware.net/egaltech/Include
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2024-2024
|
||||
// EgalTech 2024-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EBsAPI.h Data : 05.10.24 Versione : 2.6j1
|
||||
// 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.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -30,12 +30,27 @@ 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
|
||||
}
|
||||
|
||||
+4
-1
@@ -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} ;
|
||||
|
||||
@@ -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) ;
|
||||
}
|
||||
|
||||
@@ -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) ;
|
||||
}
|
||||
@@ -31,8 +31,14 @@ class __declspec( novtable) ICAvParSilhouettesSurfTm
|
||||
{
|
||||
public :
|
||||
virtual ~ICAvParSilhouettesSurfTm( void) {}
|
||||
// generica
|
||||
virtual bool SetData( const CISURFTMPVECTOR& vpStm, const Frame3d& frPlanes, double dTol) = 0 ;
|
||||
virtual bool GetSilhouette( double dLevel, POLYLINEVECTOR& vPL) = 0 ;
|
||||
// con regione piana
|
||||
virtual bool SetDataForRegion( const CISURFTMPVECTOR& vpStm, const ISurfFlatRegion* pSfr, double dSideAng,
|
||||
double dDiam, double dCornRad, double dMaxMat, double dOffsR,
|
||||
double dSampleTol = 10 * EPS_SMALL, double dSharpedAngTol = 15.) = 0 ;
|
||||
virtual bool GetSilhouetteInsideRegion( double dLevel, POLYLINEVECTOR& vPL) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -37,6 +37,9 @@ 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 ;
|
||||
|
||||
+36
-11
@@ -33,20 +33,45 @@ EGK_EXPORT bool CalcZigZagInfill( const ISurfFlatRegion* pSfr, double dStep, boo
|
||||
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
|
||||
} ;
|
||||
|
||||
+91
-116
@@ -15,6 +15,7 @@
|
||||
|
||||
#include "/EgtDev/Include/EGkGeomDB.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -130,122 +131,6 @@ SaveGeoObj( std::vector<std::vector<IGeoObj*>> vvpGObj, std::vector<Color> vCol,
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SaveCurveCompo( ICRVCOMPOPOVECTOR& vCompo, bool bUniform, 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())) ;
|
||||
}
|
||||
// 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
|
||||
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) ;
|
||||
if ( nId == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
// 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 SaveVoronoi( const ICRVCOMPOPOVECTOR& vCrvsCompo, const ICURVEPOVECTOR& vBisectors,
|
||||
bool bUniform, 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())) ;
|
||||
}
|
||||
|
||||
// creo GeomDB temporaneo
|
||||
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
|
||||
if ( IsNull( pGeomDB))
|
||||
return false ;
|
||||
INTVECTOR vIds ;
|
||||
|
||||
// salvo le curve
|
||||
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
|
||||
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()) ;
|
||||
if ( nId == GDB_ID_NULL)
|
||||
return false ;
|
||||
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)
|
||||
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
|
||||
|
||||
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))
|
||||
@@ -277,5 +162,95 @@ bool SaveSfrBooleans( const ISurfFlatRegion* pSfrA, const ISurfFlatRegion* pSfrB
|
||||
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
|
||||
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
|
||||
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SaveGeoObj( std::vector<std::vector<IGeoObj*>> vvpGObj, std::vector<std::vector<Color>> vvCol,
|
||||
const std::string& sFile, int nFlag = GDB_SV_BIN)
|
||||
{
|
||||
// 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 ;
|
||||
|
||||
// creo il part
|
||||
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
|
||||
|
||||
// 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)
|
||||
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
|
||||
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
SaveGeoObj( std::vector<IGeoObj*> vpGObj, std::vector<Color> vCol,
|
||||
const std::string& sFile, int nFlag = GDB_SV_BIN)
|
||||
{
|
||||
// verifico validità oggetti
|
||||
if ( int( vpGObj.size()) != int( vCol.size()))
|
||||
return false ;
|
||||
|
||||
// creo GeomDB temporaneo
|
||||
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
|
||||
if ( IsNull( pGeomDB))
|
||||
return false ;
|
||||
INTVECTOR vIds ;
|
||||
|
||||
// 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()) ;
|
||||
|
||||
// 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) ;
|
||||
}
|
||||
|
||||
// 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 ;
|
||||
}
|
||||
@@ -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
|
||||
@@ -43,11 +43,16 @@ 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, 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, 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, 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, PNT5AXVECTOR& vPt5ax) ;
|
||||
// Eliminazione punti proiettati in eccesso
|
||||
EGK_EXPORT bool RemovePointsInExcess( PNT5AXVECTOR& vMyPt5ax, double dLinTol, double dMaxSegmLen, bool bTestDir = true) ;
|
||||
@@ -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) ;
|
||||
+4
-3
@@ -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,6 +24,7 @@
|
||||
#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) ;
|
||||
|
||||
@@ -50,7 +50,6 @@ 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 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 ;
|
||||
|
||||
@@ -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
@@ -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
@@ -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)
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -116,7 +116,8 @@ 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 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) ;
|
||||
@@ -811,6 +812,7 @@ 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
|
||||
@@ -1069,6 +1071,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) ;
|
||||
|
||||
@@ -129,6 +129,7 @@ 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
|
||||
@@ -280,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
|
||||
|
||||
+8
-3
@@ -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,
|
||||
|
||||
@@ -110,6 +110,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" ;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
+3
-2
@@ -28,8 +28,9 @@ 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_IGES = 31,
|
||||
FT_STEP = 32,
|
||||
FT_ACIS = 33,
|
||||
|
||||
+13
-9
@@ -124,7 +124,8 @@ 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 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 +334,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) ;
|
||||
@@ -460,6 +462,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) ;
|
||||
@@ -626,14 +630,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) ;
|
||||
@@ -1082,6 +1082,7 @@ 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
|
||||
@@ -1234,6 +1235,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) ;
|
||||
|
||||
@@ -1381,6 +1383,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
@@ -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
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2015-2024
|
||||
// EgalTech 2015-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EgtKeyCodes.h Data : 16.01.24 Versione : 2.6a1
|
||||
// File : EgtKeyCodes.h Data : 07.01.25 Versione : 2.7a1
|
||||
// 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 = 2611 ;
|
||||
const int KEY_BASELIB_VER = 2701 ;
|
||||
const int KEY_BASELIB_LEV = 1 ;
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user