From e2295d25025581da9357a4c7f806c0371063f191 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Wed, 21 Jun 2023 09:39:09 +0200 Subject: [PATCH 01/51] Include : - aggiunte funzioni per superfici di bezier. --- EGkSurfBezier.h | 2 ++ EXeExecutor.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/EGkSurfBezier.h b/EGkSurfBezier.h index d53d306..6ebf797 100644 --- a/EGkSurfBezier.h +++ b/EGkSurfBezier.h @@ -37,6 +37,7 @@ class __declspec( novtable) ISurfBezier : public ISurf virtual bool SetControlPoint( int nIndU, int nIndV, const Point3d& ptCtrl, double dW) = 0 ; virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl, double dW) = 0 ; virtual bool SetTrimRegion( const ISurfFlatRegion& sfrTrimReg) = 0 ; + virtual ISurfFlatRegion* GetTrimRegion( void) const = 0 ; virtual bool GetInfo( int& nDegU, int& nDegV, int& nSpanU, int& nSpanV, bool& bIsRat, bool& bTrimmed) const = 0 ; virtual const Point3d& GetControlPoint( int nIndU, int nIndV, bool* pbOk) const = 0 ; virtual const Point3d& GetControlPoint( int nInd, bool* pbOk) const = 0 ; @@ -57,6 +58,7 @@ class __declspec( novtable) ISurfBezier : public ISurf 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 bool GetLeaves ( std::vector>& vLeaves) const = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EXeExecutor.h b/EXeExecutor.h index 3246be2..3cd861e 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -352,6 +352,7 @@ EXE_EXPORT int ExeCreateSurfTmBySurfBezier( int nParentId, int nSbezId) ; EXE_EXPORT int ExeCreateSurfTmByVolZmap( int nParentId, int nZmapId, int nPart) ; EXE_EXPORT int ExeCreateSurfBezier( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTVECTOR& vPnt, int nRefType) ; EXE_EXPORT int ExeCreateSurfBezierRational( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTUVECTOR& vPntW, int nRefType) ; +EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight) ; // GeomDB Create Volume EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX, @@ -601,6 +602,7 @@ EXE_EXPORT bool ExeSurfTmIntersect( int nId1, int nId2, bool bTwoColors = false) EXE_EXPORT bool ExeSurfTmResetTwoColors( int nId) ; EXE_EXPORT int ExeSurfTmSplit( int nId, int nSplitterId, int* pnCount) ; EXE_EXPORT bool ExeSurfTmCut( int nId, int nCutterId, bool bInVsOut, bool bSaveOnEq) ; +EXE_EXPORT bool ExeSurfBzTrim( int nId, int nCutterId) ; // GeomDb Volume Modify EXE_EXPORT int ExeExplodeVolume( int nId, int* pnCount) ; From 53a5e52d472f255ad2b35796d7ed220ce4d08434 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 3 Aug 2023 11:17:50 +0200 Subject: [PATCH 02/51] Include: - aggiunta importazione di file 3dm. --- EExImport3dm.h | 37 +++++++++++++++++++++++++++++++++++++ EXeConst.h | 1 + EXeExecutor.h | 1 + 3 files changed, 39 insertions(+) create mode 100644 EExImport3dm.h diff --git a/EExImport3dm.h b/EExImport3dm.h new file mode 100644 index 0000000..caed097 --- /dev/null +++ b/EExImport3dm.h @@ -0,0 +1,37 @@ +//---------------------------------------------------------------------------- +// EgalTech 2023 +//---------------------------------------------------------------------------- +// File : EExImport3dm.h Data : 26.06.23 Versione : 2.5f1 +// Contenuto : Dichiarazione della interfaccia IImport3dm. +// +// +// +// Modifiche : 26.06.23 DB Creazione modulo. +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkGeomDB.h" +#include + +//----------------------- 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) IImport3dm +{ +public : + virtual ~IImport3dm( void) {} + virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1) = 0 ; +} ; + +//----------------------------------------------------------------------------- +extern "C" { + EEX_EXPORT IImport3dm* CreateImport3dm( void) ; +} diff --git a/EXeConst.h b/EXeConst.h index 446021e..46695c7 100644 --- a/EXeConst.h +++ b/EXeConst.h @@ -29,6 +29,7 @@ enum FileType { FT_NULL = 0, FT_BTLX = 19, FT_3MF = 20, FT_OBJ = 21, + FT_3DM = 22 , FT_IGES = 31, FT_STEP = 32, FT_ACIS = 33, diff --git a/EXeExecutor.h b/EXeExecutor.h index d82c2f4..8c0c15c 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -121,6 +121,7 @@ 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 ExeImport3dm( const std::string& sFilePath, double dScaleFactor) ; EXE_EXPORT bool ExeAdvancedImportIsEnabled( void) ; EXE_EXPORT bool ExeAdvancedImport( const std::string& sFilePath, double dToler = 0.1) ; EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath, int nFlag = 1, int nFilter = 393) ; From 76d9ed12de2001a02357b28d6b320e4441b4cda1 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Tue, 29 Aug 2023 09:58:32 +0200 Subject: [PATCH 03/51] Include : - aggiunta funzione per la conversione da superfici NURBS a Bezier. --- EGkSurfAux.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 EGkSurfAux.h diff --git a/EGkSurfAux.h b/EGkSurfAux.h new file mode 100644 index 0000000..ef510b4 --- /dev/null +++ b/EGkSurfAux.h @@ -0,0 +1,54 @@ +//---------------------------------------------------------------------------- +// EgalTech 2023-2023 +//---------------------------------------------------------------------------- +// File : EGkSurfAux.h Data : 09.08.23 Versione : +// Contenuto : Dichiarazione funzioni ausiliarie per ISurf. +// +// +// +// Modifiche : 09.08.23 DB Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkCurveComposite.h" +#include "/EgtDev/Include/EGkSurf.h" +#include "/EgtDev/Include/EGkGeoCollection.h" + + +//----------------------- Macro per import/export ---------------------------- +#undef EGK_EXPORT +#if defined( I_AM_EGK) // da definirsi solo nella DLL +#define EGK_EXPORT __declspec( dllexport) +#else +#define EGK_EXPORT __declspec( dllimport) +#endif + +//---------------------------------------------------------------------------- +//! Struttura dati per curva Nurbs +struct CNurbsSurfData +{ + int nDegU ; // grado in U + int nDegV ; // grado in V + bool bRat ; // flag di curva razionale (pesi non tutti unitari) + bool bPeriodicU ; // flag per segnalare vettore dei nodi periodico in U + bool bPeriodicV ; // flag per segnalare vettore dei nodi periodico in V + bool bClosedU ; // flag di superficie chiusa sul parametro U + bool bClosedV ; // flag di superficie chiusa sul parametro V + bool bExtraKnotes ; // flag per segnalare presenza di nodi extra all'inizio e fine (totale 2) + DBLVECTOR vU ; // vettore dei nodi in U + DBLVECTOR vV ; // vettore dei nodi in V + int nCPU ; // numero di punti di controllo in U + int nCPV ; // numero di punti di controllo in V + PNTVECTOR vCP ; // vettore dei punti di controllo + PNTMATRIX mCP ; // matrice dei punti di controllo + DBLMATRIX mW ; // matrice dei pesi + + CNurbsSurfData( void) : nDegU( 0), nDegV( 0), bRat( false), bPeriodicU( false), bPeriodicV( false), bClosedU( false), bClosedV( false), bExtraKnotes( false) {} +} ; + +//---------------------------------------------------------------------------- +//! Trasforma una curva Nurbs standard in una nuova curva di Bezier semplice o composta +EGK_EXPORT ISurf* NurbsToBezierSurface( const CNurbsSurfData& cnData) ; From 2425304b2eb69bb8e3192f4ecd1b42469dc0761b Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 21 Sep 2023 14:44:44 +0200 Subject: [PATCH 04/51] Include : - introdotto l'uso della grafica di default per le ExtDim importate da 3dm. --- EExImport3dm.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/EExImport3dm.h b/EExImport3dm.h index caed097..5465f8a 100644 --- a/EExImport3dm.h +++ b/EExImport3dm.h @@ -28,7 +28,9 @@ class __declspec( novtable) IImport3dm { public : virtual ~IImport3dm( void) {} - virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1) = 0 ; + virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1, + double dTextHeight = 2.0, double dExtLine = 5.0, double dArrLen = 5.0, double dTextDist = 2.0, + bool bLenIsMM = true, int nDecDig = -2, std::string sFont = "ModernPropS.Nfe") = 0 ; } ; //----------------------------------------------------------------------------- From 5eb4c65db4db3aba10cdad3a687e7a0c937be56b Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 21 Sep 2023 17:07:18 +0200 Subject: [PATCH 05/51] Include : - aggiunta del 3dm Export. --- EExExport3dm.h | 40 ++++++++++++++++++++++++++++++++++++++++ EXeExecutor.h | 1 + 2 files changed, 41 insertions(+) create mode 100644 EExExport3dm.h diff --git a/EExExport3dm.h b/EExExport3dm.h new file mode 100644 index 0000000..3164f4a --- /dev/null +++ b/EExExport3dm.h @@ -0,0 +1,40 @@ +//---------------------------------------------------------------------------- +// EgalTech 2023 +//---------------------------------------------------------------------------- +// File : EExExport3dm.h Data : 21.09.23 Versione : +// Contenuto : Dichiarazione della interfaccia IExport3dm. +// +// +// +// Modifiche : 21.09.23 DB Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkGeomDB.h" +#include "/EgtDev/Include/EExExportConst.h" +#include + +//----------------------- 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) IExport3dm +{ +public : + virtual ~IExport3dm( void) {} + virtual bool SetOptions( int nFilter) = 0 ; + virtual bool Export( IGeomDB* pGDB, int nId, const std::string& sFile) = 0 ; +} ; + +//----------------------------------------------------------------------------- +extern "C" { + EEX_EXPORT IExport3dm* CreateExport3dm(void) ; +} diff --git a/EXeExecutor.h b/EXeExecutor.h index c23b20c..c695400 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -127,6 +127,7 @@ EXE_EXPORT bool ExeAdvancedImport( const std::string& sFilePath, double dToler = EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath, int nFlag = 1, int nFilter = 393) ; EXE_EXPORT bool ExeExportStl( int nId, const std::string& sFilePath, int nFilter = 393) ; EXE_EXPORT bool ExeExport3MF( int nId, const std::string& sFilePath, int nFilter = 393) ; +EXE_EXPORT bool ExeExport3dm( int nId, const std::string& sFilePath, int nFilter = 393) ; EXE_EXPORT bool ExeExportSvg( int nId, const std::string& sFilePath, int nFilter = 393) ; EXE_EXPORT bool ExeSetThreeJSLibDir( const std::string & sThreeJSLibDir) ; EXE_EXPORT bool ExeExportThreeJS( int nId, const std::string& sFilePath, int nFilter = 393) ; From 8471ff37ba5484015f0d9fc0ba68ca819ec4303a Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Tue, 26 Sep 2023 12:21:42 +0200 Subject: [PATCH 06/51] Include : - aggiunte coordinate U e V ai vertici delle TriMesh. --- EGkStmFromTriangleSoup.h | 6 ++++-- EGkSurfTriMesh.h | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/EGkStmFromTriangleSoup.h b/EGkStmFromTriangleSoup.h index 354e90a..f417910 100644 --- a/EGkStmFromTriangleSoup.h +++ b/EGkStmFromTriangleSoup.h @@ -35,13 +35,15 @@ class StmFromTriangleSoup EGK_EXPORT ~StmFromTriangleSoup( void) ; EGK_EXPORT bool Start( int nBuckets = GRID_STD_BUCKETS) ; EGK_EXPORT bool AddTriangle( const Triangle3d& Tria) ; - EGK_EXPORT bool AddTriangle( const Point3d& ptP0, const Point3d& ptP1, const Point3d& ptP2) ; + EGK_EXPORT bool AddTriangle( const Point3d& ptP0, const Point3d& ptP1, const Point3d& ptP2, + const double dU0 = -1, const double dV0 = -1, const double dU1 = -1, const double dV1 = -1, + const double dU2 = -1, const double dV2 = -1) ; EGK_EXPORT bool AddSurfTriMesh( const ISurfTriMesh& stmSource) ; EGK_EXPORT bool End( void) ; EGK_EXPORT ISurfTriMesh* GetSurf( void) ; private : - inline int AddVertex( const Point3d& ptP) ; + inline int AddVertex( const Point3d& ptP, const double dU = -1, const double dV = -1) ; private : ISurfTriMesh* m_pSTM ; diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index e37521a..94c1f9f 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -43,7 +43,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual void SetLinearTolerance( double dLinTol) = 0 ; virtual void SetBoundaryAngle( double dBoundaryAngDeg) = 0 ; virtual void SetSmoothAngle( double dSmoothAngDeg) = 0 ; - virtual int AddVertex( const Point3d& ptVert) = 0 ; + virtual int AddVertex( const Point3d& ptVert, const double dU = -1, const double dV = -1) = 0 ; virtual bool MoveVertex( int nInd, const Point3d& ptNewVert) = 0 ; virtual int AddTriangle( const int nIdVert[3], int nTFlag = 0) = 0 ; virtual bool RemoveTriangle( int nId) = 0 ; @@ -68,8 +68,11 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual double GetLinearTolerance( void) const = 0 ; virtual double GetSmoothAngle( void) const = 0 ; virtual bool GetVertex( int nId, Point3d& ptP) const = 0 ; + virtual bool GetVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual int GetFirstVertex( Point3d& ptP) const = 0 ; + virtual int GetFirstVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual int GetNextVertex( int nId, Point3d& ptP) const = 0 ; + virtual int GetNextVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual bool GetTriangle( int nId, int nIdVert[3]) const = 0 ; virtual int GetFirstTriangle( int nIdVert[3]) const = 0 ; virtual int GetNextTriangle( int nId, int nIdVert[3]) const = 0 ; From e4795d9eba530778dcc831aa1b37495558d9355b Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 2 Oct 2023 16:04:09 +0200 Subject: [PATCH 07/51] Include : - aggiornato codice di protezione mensile librerie. --- EgtKeyCodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index 704d327..b0e05c7 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -24,7 +24,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2509 ; +const int KEY_BASELIB_VER = 2510 ; const int KEY_BASELIB_LEV = 1 ; //---------------------------------------------------------------------------- From 0c2643af4e101df7224b036b4ed002493233f57c Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Wed, 4 Oct 2023 12:15:32 +0200 Subject: [PATCH 08/51] Include : - aggiunta funzione SubtractProjectedFacesOnStmFace - aggiornamento prototipo GetSilhouette. --- EGkSubtractProjectedFacesOnStmFace.h | 30 ++++++++++++++++++++++++++++ EGkSurfTriMesh.h | 2 +- EXeExecutor.h | 5 ++++- 3 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 EGkSubtractProjectedFacesOnStmFace.h diff --git a/EGkSubtractProjectedFacesOnStmFace.h b/EGkSubtractProjectedFacesOnStmFace.h new file mode 100644 index 0000000..80e3fe2 --- /dev/null +++ b/EGkSubtractProjectedFacesOnStmFace.h @@ -0,0 +1,30 @@ +//---------------------------------------------------------------------------- +// EgalTech 2023-2023 +//---------------------------------------------------------------------------- +// File : EGkSubtractProjectedFacesOnStmFace.h Data : 26.09.23 Versione : 2.5j1 +// Contenuto : Dichiarazione della funzione per proiettare facce di TriMesh su una superficie di TriMesh. +// +// +// +// Modifiche : 26.09.23 RE Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkSurfTriMesh.h" + +//----------------------- Macro per import/export ---------------------------- +#undef EGK_EXPORT +#if defined( I_AM_EGK) // da definirsi solo nella DLL + #define EGK_EXPORT __declspec( dllexport) +#else + #define EGK_EXPORT __declspec( dllimport) +#endif + +//----------------------------------------------------------------------------- +EGK_EXPORT bool SubtractProjectedFacesOnStmFace( const ISurfTriMesh& Stm, int nFaceInd, + ISURFTMPOVECTOR& vStmOthers, INTVECTOR& vFIndOthers, + bool bOCFlag, bool& bExistProjection, ISurfTriMesh*& pStmRes, + int& nNewFaceNbr) ; diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index e37521a..422b767 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -85,7 +85,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual bool GetTriangleSmoothNormals( int nId, TriNormals3d& TNrms) const = 0 ; virtual ISurfTriMesh* CloneTriangle( int nTria) const = 0 ; virtual bool GetLoops( POLYLINEVECTOR& vPL) const = 0 ; - virtual bool GetSilhouette( const Vector3d& vtDir, double dTol, POLYLINEVECTOR& vPL) const = 0 ; + virtual bool GetSilhouette( const Vector3d& vtDir, double dTol, POLYLINEVECTOR& vPL, bool bAllTria = false) const = 0 ; virtual int GetFacetCount( void) const = 0 ; virtual int GetFacetSize( void) const = 0 ; virtual int GetFacetFromTria( int nT) const = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index e05e505..7973916 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -608,6 +608,9 @@ EXE_EXPORT bool ExeSurfTmIntersect( int nId1, int nId2, bool bTwoColors = false) EXE_EXPORT bool ExeSurfTmResetTwoColors( int nId) ; EXE_EXPORT int ExeSurfTmSplit( int nId, int nSplitterId, int* pnCount) ; EXE_EXPORT bool ExeSurfTmCut( int nId, int nCutterId, bool bInVsOut, bool bSaveOnEq) ; +EXE_EXPORT bool ExeSubtractProjectedFacesOnStmFace( int nSurfId, int nFaceInd, int nDestGrpId, + INTVECTOR vSurfsId, INTVECTOR vSurfFacesInd, bool bOCFlag, + int& nNewId, bool& bExistProjection, int& nNewFaceNbr) ; // GeomDb Volume Modify EXE_EXPORT int ExeExplodeVolume( int nId, int* pnCount) ; @@ -701,7 +704,7 @@ EXE_EXPORT bool ExeSurfTmFacetOppositeSideEx( int nId, int nFacet, const Vector3 Point3d& ptP1, Point3d& ptPm, Point3d& ptP2, Vector3d& vtIn1, Vector3d& vtOut2, double& dLen, double& dWidth) ; EXE_EXPORT bool ExeSurfTmFacetsContact( int nId, int nF1, int nF2, int nRefId, bool& bAdjac, Point3d& ptP1, Point3d& ptP2, double& dAng) ; EXE_EXPORT int ExeExtractSurfTmLoops( int nId, int nDestGrpId, int* pnCount) ; -EXE_EXPORT int ExeGetSurfTmSilhouette( int nId, const Vector3d& vtDir, double dToler, int nDestGrpId, int nRefType, int* pnCount) ; +EXE_EXPORT int ExeGetSurfTmSilhouette( int nId, const Vector3d& vtDir, double dToler, int nDestGrpId, int nRefType, int* pnCount, bool bAllTria = false) ; EXE_EXPORT int ExeExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ; EXE_EXPORT int ExeCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ; EXE_EXPORT bool ExeSurfTmGetAllVertInFacet( int nId, int nFacet, INTVECTOR& vVert) ; From 7335a703cffcc10e583a64d1bfd3642d9c7c43fc Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 9 Oct 2023 12:59:50 +0200 Subject: [PATCH 09/51] Include : - aggiornamento prototipi. --- EGnGetKeyData.h | 1 + EXeExecutor.h | 8 ++++---- SELkLockId.h | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/EGnGetKeyData.h b/EGnGetKeyData.h index 6b050bd..dd0c352 100644 --- a/EGnGetKeyData.h +++ b/EGnGetKeyData.h @@ -33,3 +33,4 @@ EGN_EXPORT bool SetEGnKeyOptions( int nRet, int nKeyOpt1, int nKeyOpt2, int nKey EGN_EXPORT int GetEGnKeyOptions( int nProd, int nVer, int nLev, unsigned int& nKeyOpt1, unsigned int& nKeyOpt2, int& nKeyOptExpDays) ; // Interpretazione della stringa di LockId EGN_EXPORT bool GetLockIdStringInfo( const std::string& sLockId, int& nKeyType, bool& bNetKey, int& nUserId) ; +EGN_EXPORT bool GetLockIdStringNetData( const std::string& sLockId, std::string& sAddrPort) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 7973916..457a49d 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -56,7 +56,7 @@ EXE_EXPORT bool ExeGetVersionInfo( std::string& sVer, const char* szNewLine) ; EXE_EXPORT bool ExeGetKeyInfo( std::string& sKey) ; EXE_EXPORT bool ExeSetLockType( int nType) ; EXE_EXPORT bool ExeSetLockId( const std::string& sLockId) ; -EXE_EXPORT bool ExeSetNetHwKey( bool bNetHwKey, int nUserId = 0) ; +EXE_EXPORT bool ExeSetNetHwKey( bool bNetHwKey, int nUserId = 0, const std::string& sAddrPort = "") ; EXE_EXPORT bool ExeGetKeyLevel( int nProd, int nVer, int nLev, int& nKLev) ; EXE_EXPORT bool ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& nOpt2) ; EXE_EXPORT bool ExeGetKeyLeftDays( int& nLeftDays) ; @@ -608,9 +608,9 @@ EXE_EXPORT bool ExeSurfTmIntersect( int nId1, int nId2, bool bTwoColors = false) EXE_EXPORT bool ExeSurfTmResetTwoColors( int nId) ; EXE_EXPORT int ExeSurfTmSplit( int nId, int nSplitterId, int* pnCount) ; EXE_EXPORT bool ExeSurfTmCut( int nId, int nCutterId, bool bInVsOut, bool bSaveOnEq) ; -EXE_EXPORT bool ExeSubtractProjectedFacesOnStmFace( int nSurfId, int nFaceInd, int nDestGrpId, - INTVECTOR vSurfsId, INTVECTOR vSurfFacesInd, bool bOCFlag, - int& nNewId, bool& bExistProjection, int& nNewFaceNbr) ; +EXE_EXPORT bool ExeSurfTmSubtractProjectedFacesOnFace( int nSurfId, int nFaceInd, int nDestGrpId, + INTVECTOR vSurfsId, INTVECTOR vSurfFacesInd, bool bOCFlag, + bool& bExistProjection, int& nNewId, int& nNewFaceNbr) ; // GeomDb Volume Modify EXE_EXPORT int ExeExplodeVolume( int nId, int* pnCount) ; diff --git a/SELkLockId.h b/SELkLockId.h index 4758594..f7a6b09 100644 --- a/SELkLockId.h +++ b/SELkLockId.h @@ -19,8 +19,8 @@ //------------------------------------------------------------------------------- // Imposto il tipo di protezione ammessa (ANY, HW, SW) bool SetLockType( int nType) ; -// Imposto chiave di rete e identificativo utente (0-9) -bool SetNetHwKey( bool bNetHwKey, int nUserId) ; +// Imposto chiave di rete, identificativo utente (0-9) e indirizzo +bool SetNetHwKey( bool bNetHwKey, int nUserId, const std::string& sAddrPort) ; // Libero chiave di rete (da eseguire al termine del programma) bool CloseNetHwKey( void) ; // Recupero l'identificativo in chiaro della protezione From 25e52f23d6aa5a04006e8346261bd1c40a61e265 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Tue, 10 Oct 2023 13:38:09 +0200 Subject: [PATCH 10/51] Include : - aggiornamento prototipi. --- EGkSubtractProjectedFacesOnStmFace.h | 3 +-- EXeExecutor.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/EGkSubtractProjectedFacesOnStmFace.h b/EGkSubtractProjectedFacesOnStmFace.h index 80e3fe2..0cd252d 100644 --- a/EGkSubtractProjectedFacesOnStmFace.h +++ b/EGkSubtractProjectedFacesOnStmFace.h @@ -24,7 +24,6 @@ #endif //----------------------------------------------------------------------------- -EGK_EXPORT bool SubtractProjectedFacesOnStmFace( const ISurfTriMesh& Stm, int nFaceInd, - ISURFTMPOVECTOR& vStmOthers, INTVECTOR& vFIndOthers, +EGK_EXPORT bool SubtractProjectedFacesOnStmFace( const ISurfTriMesh& Stm, int nFaceInd, ISURFTMPOVECTOR& vStmOthers, bool bOCFlag, bool& bExistProjection, ISurfTriMesh*& pStmRes, int& nNewFaceNbr) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 457a49d..786cec5 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -609,7 +609,7 @@ EXE_EXPORT bool ExeSurfTmResetTwoColors( int nId) ; EXE_EXPORT int ExeSurfTmSplit( int nId, int nSplitterId, int* pnCount) ; EXE_EXPORT bool ExeSurfTmCut( int nId, int nCutterId, bool bInVsOut, bool bSaveOnEq) ; EXE_EXPORT bool ExeSurfTmSubtractProjectedFacesOnFace( int nSurfId, int nFaceInd, int nDestGrpId, - INTVECTOR vSurfsId, INTVECTOR vSurfFacesInd, bool bOCFlag, + INTVECTOR vSurfsId, bool bOCFlag, bool& bExistProjection, int& nNewId, int& nNewFaceNbr) ; // GeomDb Volume Modify From a6e5145392ca2d469278218490a38cfa4e8ce4bc Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Tue, 17 Oct 2023 12:05:52 +0200 Subject: [PATCH 11/51] Include : - gestione sup NURBS periodiche - aggiunta note e cambio nomi. --- EGkCurveAux.h | 3 +++ EGkSurfAux.h | 16 ++++++++++------ 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/EGkCurveAux.h b/EGkCurveAux.h index e12d361..b685193 100644 --- a/EGkCurveAux.h +++ b/EGkCurveAux.h @@ -40,6 +40,9 @@ struct CNurbsData CNurbsData( void) : nDeg( 0), bRat( false), bPeriodic( false), bClosed( false), bExtraKnotes( false) {} } ; +// N.B. : in caso la curva sia razionale i punti di controllo sono in forma NON OMOGENEA [ x, y, z, w] ( dove la forma OMOGENEA è [ w*x, w*y, w*z, w]) +// tutte le operazioni richiedono la forma OMOGENEA, finite le quali posso riportarmi alla forma NON OMOGENEA + //---------------------------------------------------------------------------- //! Trasforma un arco in una nuova curva di Bezier semplice o composta EGK_EXPORT ICurve* ArcToBezierCurve( const ICurve* pArc) ; diff --git a/EGkSurfAux.h b/EGkSurfAux.h index ef510b4..dae7001 100644 --- a/EGkSurfAux.h +++ b/EGkSurfAux.h @@ -27,12 +27,12 @@ #endif //---------------------------------------------------------------------------- -//! Struttura dati per curva Nurbs -struct CNurbsSurfData +//! Struttura dati per superficie Nurbs +struct SNurbsSurfData { int nDegU ; // grado in U int nDegV ; // grado in V - bool bRat ; // flag di curva razionale (pesi non tutti unitari) + bool bRat ; // flag di superficie razionale (pesi non tutti unitari) bool bPeriodicU ; // flag per segnalare vettore dei nodi periodico in U bool bPeriodicV ; // flag per segnalare vettore dei nodi periodico in V bool bClosedU ; // flag di superficie chiusa sul parametro U @@ -46,9 +46,13 @@ struct CNurbsSurfData PNTMATRIX mCP ; // matrice dei punti di controllo DBLMATRIX mW ; // matrice dei pesi - CNurbsSurfData( void) : nDegU( 0), nDegV( 0), bRat( false), bPeriodicU( false), bPeriodicV( false), bClosedU( false), bClosedV( false), bExtraKnotes( false) {} + SNurbsSurfData( void) : nDegU( 0), nDegV( 0), bRat( false), bPeriodicU( false), bPeriodicV( false), bClosedU( false), bClosedV( false), bExtraKnotes( false) {} } ; +// N.B. : in caso la superficie sia razionale i punti di controllo sono in forma NON OMOGENEA [ x, y, z, w] ( dove la forma omogenea è [ w*x, w*y, w*z, w]) +// tutte le operazioni richiedono la forma OMOGENEA, finite le quali posso riportarmi alla forma NON OMOGENEA + //---------------------------------------------------------------------------- -//! Trasforma una curva Nurbs standard in una nuova curva di Bezier semplice o composta -EGK_EXPORT ISurf* NurbsToBezierSurface( const CNurbsSurfData& cnData) ; +//! Trasforma una superficie Nurbs standard in una nuova superficie di Bezier semplice o composta +EGK_EXPORT bool NurbsSurfaceCanonicalize( SNurbsSurfData& snData) ; +EGK_EXPORT ISurf* NurbsToBezierSurface( const SNurbsSurfData& snData) ; From dd74337190de9b125e8b6ed08be1e0db5e80d85c Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Mon, 23 Oct 2023 10:31:17 +0200 Subject: [PATCH 12/51] =?UTF-8?q?Include=20:=20-=20aggiunta=20la=20possibi?= =?UTF-8?q?lit=C3=A0=20di=20mostrare=20le=20curve=20di=20trim=20sullo=20sp?= =?UTF-8?q?azio=20parametrico=20per=20le=20superfici=20di=20Bezier.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EXeExecutor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXeExecutor.h b/EXeExecutor.h index c695400..12d12a1 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -357,7 +357,7 @@ EXE_EXPORT int ExeCreateSurfTmBySurfBezier( int nParentId, int nSbezId) ; EXE_EXPORT int ExeCreateSurfTmByVolZmap( int nParentId, int nZmapId, int nPart) ; EXE_EXPORT int ExeCreateSurfBezier( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTVECTOR& vPnt, int nRefType) ; EXE_EXPORT int ExeCreateSurfBezierRational( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTUVECTOR& vPntW, int nRefType) ; -EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight) ; +EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight = 50, bool bShowTrim = false) ; // GeomDB Create Volume EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX, From 26d46c8b266b374b38fa85f06d6f08a8d9328be5 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Mon, 23 Oct 2023 14:31:07 +0200 Subject: [PATCH 13/51] Include : - aggiunta dell'Export 3dm. --- EExExport3dm.h | 40 ++++++++++++++++++++++++++++++++++++++++ EXeConst.h | 1 + EXeExecutor.h | 1 + 3 files changed, 42 insertions(+) create mode 100644 EExExport3dm.h diff --git a/EExExport3dm.h b/EExExport3dm.h new file mode 100644 index 0000000..3164f4a --- /dev/null +++ b/EExExport3dm.h @@ -0,0 +1,40 @@ +//---------------------------------------------------------------------------- +// EgalTech 2023 +//---------------------------------------------------------------------------- +// File : EExExport3dm.h Data : 21.09.23 Versione : +// Contenuto : Dichiarazione della interfaccia IExport3dm. +// +// +// +// Modifiche : 21.09.23 DB Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkGeomDB.h" +#include "/EgtDev/Include/EExExportConst.h" +#include + +//----------------------- 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) IExport3dm +{ +public : + virtual ~IExport3dm( void) {} + virtual bool SetOptions( int nFilter) = 0 ; + virtual bool Export( IGeomDB* pGDB, int nId, const std::string& sFile) = 0 ; +} ; + +//----------------------------------------------------------------------------- +extern "C" { + EEX_EXPORT IExport3dm* CreateExport3dm(void) ; +} diff --git a/EXeConst.h b/EXeConst.h index 446021e..46695c7 100644 --- a/EXeConst.h +++ b/EXeConst.h @@ -29,6 +29,7 @@ enum FileType { FT_NULL = 0, FT_BTLX = 19, FT_3MF = 20, FT_OBJ = 21, + FT_3DM = 22 , FT_IGES = 31, FT_STEP = 32, FT_ACIS = 33, diff --git a/EXeExecutor.h b/EXeExecutor.h index 786cec5..5cae25f 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -126,6 +126,7 @@ EXE_EXPORT bool ExeAdvancedImport( const std::string& sFilePath, double dToler = EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath, int nFlag = 1, int nFilter = 393) ; EXE_EXPORT bool ExeExportStl( int nId, const std::string& sFilePath, int nFilter = 393) ; EXE_EXPORT bool ExeExport3MF( int nId, const std::string& sFilePath, int nFilter = 393) ; +EXE_EXPORT bool ExeExport3dm( int nId, const std::string& sFilePath, int nFilter = 393) ; EXE_EXPORT bool ExeExportSvg( int nId, const std::string& sFilePath, int nFilter = 393) ; EXE_EXPORT bool ExeSetThreeJSLibDir( const std::string & sThreeJSLibDir) ; EXE_EXPORT bool ExeExportThreeJS( int nId, const std::string& sFilePath, int nFilter = 393) ; From 36541aea66829f4fd81de41832aa481df3cf0172 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 24 Oct 2023 13:08:20 +0200 Subject: [PATCH 14/51] Include : - aggiornamento prototipi. --- EInAPI.h | 1 + 1 file changed, 1 insertion(+) diff --git a/EInAPI.h b/EInAPI.h index a8a0b25..6ad68ba 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -118,6 +118,7 @@ EIN_EXPORT BOOL __stdcall EgtAdvancedImport( const wchar_t* wsFilePath, double d EIN_EXPORT BOOL __stdcall EgtExportDxf( int nId, const wchar_t* wsFilePath, int nFlag, int nFilter) ; EIN_EXPORT BOOL __stdcall EgtExportStl( int nId, const wchar_t* wsFilePath, int nFilter) ; EIN_EXPORT BOOL __stdcall EgtExport3MF( int nId, const wchar_t* wsFilePath, int nFilter) ; +EIN_EXPORT BOOL __stdcall EgtExport3dm( int nId, const wchar_t* wsFilePath, int nFilter) ; EIN_EXPORT BOOL __stdcall EgtExportSvg( int nId, const wchar_t* wsFilePath, int nFilter) ; EIN_EXPORT BOOL __stdcall EgtSetThreeJSLibDir( const wchar_t* wsThreeJSLibDir) ; EIN_EXPORT BOOL __stdcall EgtExportThreeJS( int nId, const wchar_t* wsFilePath, int nFilter) ; From be6efe65e44c2f0f9c1e626a2c28b0d8f954cdc0 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 28 Oct 2023 18:12:16 +0200 Subject: [PATCH 15/51] Include : - aggiornamento prototipi. --- EMkMachMgr.h | 10 +++++++--- EXeExecutor.h | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/EMkMachMgr.h b/EMkMachMgr.h index a9c3de7..822b452 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2015-2023 //---------------------------------------------------------------------------- -// File : EMkMachMgr.h Data : 25.08.23 Versione : 2.5h3 +// File : EMkMachMgr.h Data : 28.10.23 Versione : 2.5j4 // Contenuto : Dichiarazione della interfaccia IMachMgr. // // @@ -14,6 +14,7 @@ // 13.01.21 DS Aggiunte in interfaccia GetCalcHead e GetCalcExit. // 21.09.22 DS Aggiunta in interfaccia GetAxisOffset. // 25.08.23 DS Aggiunta in interfaccia CopyMachGroup. +// 28.10.23 DS Aggiunte in interfaccia GetClEntAxesVal, GetToolSetupPosInCurrSetup e GetAllCurrAxesName. // //---------------------------------------------------------------------------- @@ -166,6 +167,7 @@ class __declspec( novtable) IMachMgr virtual bool ImportSetup( const std::string& sName) = 0 ; virtual bool VerifyCurrSetup( STRVECTOR& vsErrors) = 0 ; virtual bool FindToolInCurrSetup( const std::string& sTool) = 0 ; + virtual bool GetToolSetupPosInCurrSetup( const std::string& sTool, std::string& sTcPos) = 0 ; virtual bool GetToolsInCurrSetupPos( const std::string& sTcPos, STRVECTOR& vsTools) = 0 ; virtual bool UpdateCurrSetup( void) = 0 ; virtual bool EraseCurrSetup( void) = 0 ; @@ -201,7 +203,7 @@ class __declspec( novtable) IMachMgr virtual bool MdbToBeImported( const std::string& sFile, STRVECTOR& vsMachiningsNames, INTVECTOR& vMachiningsTypes) const = 0 ; virtual bool MdbImport( const std::string& sFile, const STRVECTOR& vsMachiningsToImport, const STRVECTOR& vsMachiningsNames, STRVECTOR& vsImported) = 0 ; - // Operations : general + // Operations : general virtual int GetOperationCount( void) const = 0 ; virtual int GetFirstOperation( void) const = 0 ; virtual int GetNextOperation( int nId) const = 0 ; @@ -264,8 +266,9 @@ class __declspec( novtable) IMachMgr virtual bool GetMachiningEndPoint( Point3d& ptEnd) const = 0 ; // CL Entities Interrogations virtual bool GetClEntMove( int nEntId, int& nMove) const = 0 ; - virtual bool GetClEntFlag( int nEntId, int& nFlag) const = 0 ; + virtual bool GetClEntFlag( int nEntId, int& nFlag, int& nFlag2) const = 0 ; virtual bool GetClEntIndex( int nEntId, int& nIndex) const = 0 ; + virtual bool GetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) const = 0 ; // Simulation virtual bool SimInit( void) = 0 ; virtual bool SimStart( bool bFirst) = 0 ; @@ -284,6 +287,7 @@ class __declspec( novtable) IMachMgr // Machine Calc virtual bool SetCalcTable( const std::string& sTable) = 0 ; virtual bool SetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) = 0 ; + virtual bool GetAllCurrAxesName( STRVECTOR& vAxName) const = 0 ; virtual bool SetRotAxisBlock( const std::string& sAxis, double dVal) = 0 ; virtual bool GetRotAxisBlocked( int nInd, std::string& sAxis, double& dVal) const = 0 ; virtual bool GetCalcTool( std::string& sTool) const = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 5cae25f..4f08f09 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -1014,6 +1014,7 @@ EXE_EXPORT bool ExeGetDefaultSetupName( std::string& sName) ; EXE_EXPORT bool ExeImportSetup( const std::string& sName) ; EXE_EXPORT bool ExeVerifyCurrSetup( STRVECTOR& vsErrors) ; EXE_EXPORT bool ExeFindToolInCurrSetup( const std::string& sTool) ; +EXE_EXPORT bool ExeGetToolSetupPosInCurrSetup( const std::string& sTool, std::string& sTcPos) ; EXE_EXPORT bool ExeGetToolsInCurrSetupPos( const std::string& sTcPos, STRVECTOR& vsTools) ; EXE_EXPORT bool ExeUpdateCurrSetup( void) ; EXE_EXPORT bool ExeEraseCurrSetup( void) ; @@ -1112,8 +1113,10 @@ EXE_EXPORT bool ExeUpdateAllMachinings( bool bStopOnFirstErr, std::string& sErrL EXE_EXPORT bool ExeUpdateAllMachiningsEx( bool bStopOnFirstErr, std::string& sErrList, std::string& sWarnList) ; // CL Entities Interrogations EXE_EXPORT bool ExeGetClEntMove( int nEntId, int& nMove) ; -EXE_EXPORT bool ExeGetClEntFlag( int nEntId, int& nFlag) ; +EXE_EXPORT bool ExeGetClEntFlag( int nEntId, int& nFlag, int& nFlag2) ; EXE_EXPORT bool ExeGetClEntIndex( int nEntId, int& nIndex) ; +EXE_EXPORT bool ExeGetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) ; + // Simulation EXE_EXPORT bool ExeSimInit( void) ; EXE_EXPORT bool ExeSimStart( bool bFirst) ; @@ -1147,6 +1150,7 @@ EXE_EXPORT bool ExeGetAllTcPosNames( STRVECTOR& vNames) ; // Machine Calc EXE_EXPORT bool ExeSetCalcTable( const std::string& sTable) ; EXE_EXPORT bool ExeSetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) ; +EXE_EXPORT bool ExeGetAllCurrAxesName( STRVECTOR& vAxName) ; EXE_EXPORT bool ExeSetRotAxisBlock( const std::string& sAxis, double dVal) ; EXE_EXPORT bool ExeGetCalcTool( std::string& sTool, std::string& sHead, int& nExit) ; EXE_EXPORT bool ExeGetRotAxisBlocked( int nInd, std::string& sAxis, double& dVal) ; From 5c074aec899292646236212b83dcd814e7397b30 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 3 Nov 2023 17:19:34 +0100 Subject: [PATCH 16/51] Include : - aggiornamento prototipi - aggiornato codice di protezione mensile librerie. --- EGkCurveComposite.h | 1 + EgtKeyCodes.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/EGkCurveComposite.h b/EGkCurveComposite.h index 48b90ec..64c915e 100644 --- a/EGkCurveComposite.h +++ b/EGkCurveComposite.h @@ -58,6 +58,7 @@ class __declspec( novtable) ICurveComposite : public ICurve virtual bool ArcsBezierCurvesToArcsPerpExtr( double dLinTol, double dAngTolDeg) = 0 ; virtual bool StraightArcsToLines( double dLinTol, double dAngTolDeg) = 0 ; virtual bool MergeCurves( double dLinTol, double dAngTolDeg, bool bStartEnd = true, bool bNeedSameProp = false) = 0 ; + virtual bool RemoveSmallParts( double dLinTol, double dAngTolDeg) = 0 ; virtual bool RemoveSmallDefects( double dLinTol, double dAngTolDeg, bool bAlsoSpikes = false) = 0 ; virtual bool RemoveUndercutOnY( double dLinTol, double dAngTolDeg) = 0 ; virtual bool IsAPoint( void) const = 0 ; diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index b0e05c7..a46c75f 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -24,7 +24,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2510 ; +const int KEY_BASELIB_VER = 2511 ; const int KEY_BASELIB_LEV = 1 ; //---------------------------------------------------------------------------- From 6dacd30dbdbb18d019266e8fd336bb63e793f11c Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Tue, 7 Nov 2023 17:56:17 +0100 Subject: [PATCH 17/51] Include : - aggiunto il flag clamped durante la conversione da superfici e curve nurbs a Bezier. --- EGkCurveAux.h | 3 ++- EGkSurfAux.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/EGkCurveAux.h b/EGkCurveAux.h index b685193..76ed287 100644 --- a/EGkCurveAux.h +++ b/EGkCurveAux.h @@ -32,12 +32,13 @@ struct CNurbsData bool bRat ; // flag di curva razionale (pesi non tutti unitari) bool bPeriodic ; // flag per segnalare vettore dei nodi periodico bool bClosed ; // flag di curva chiusa + bool bClamped ; // flag di curva clamped bool bExtraKnotes ; // flag per segnalare presenza di nodi extra all'inizio e fine (totale 2) DBLVECTOR vU ; // vettore dei nodi PNTVECTOR vCP ; // vettore dei punti di controllo DBLVECTOR vW ; // vettore dei pesi - CNurbsData( void) : nDeg( 0), bRat( false), bPeriodic( false), bClosed( false), bExtraKnotes( false) {} + CNurbsData( void) : nDeg( 0), bRat( false), bPeriodic( false), bClosed( false), bClamped( false), bExtraKnotes(false) {} } ; // N.B. : in caso la curva sia razionale i punti di controllo sono in forma NON OMOGENEA [ x, y, z, w] ( dove la forma OMOGENEA è [ w*x, w*y, w*z, w]) diff --git a/EGkSurfAux.h b/EGkSurfAux.h index dae7001..15254a2 100644 --- a/EGkSurfAux.h +++ b/EGkSurfAux.h @@ -37,6 +37,8 @@ struct SNurbsSurfData bool bPeriodicV ; // flag per segnalare vettore dei nodi periodico in V bool bClosedU ; // flag di superficie chiusa sul parametro U bool bClosedV ; // flag di superficie chiusa sul parametro V + bool bClampedU ; // flag di superficie clamped sul parametro U + bool bClampedV ; // flag di superficie clamped sul parametro V bool bExtraKnotes ; // flag per segnalare presenza di nodi extra all'inizio e fine (totale 2) DBLVECTOR vU ; // vettore dei nodi in U DBLVECTOR vV ; // vettore dei nodi in V @@ -46,7 +48,8 @@ struct SNurbsSurfData PNTMATRIX mCP ; // matrice dei punti di controllo DBLMATRIX mW ; // matrice dei pesi - SNurbsSurfData( void) : nDegU( 0), nDegV( 0), bRat( false), bPeriodicU( false), bPeriodicV( false), bClosedU( false), bClosedV( false), bExtraKnotes( false) {} + SNurbsSurfData( void) : nDegU( 0), nDegV( 0), bRat( false), bPeriodicU( false), bPeriodicV( false), bClosedU( false), bClosedV( false), + bClampedU( false), bClampedV( false), bExtraKnotes(false) {} } ; // N.B. : in caso la superficie sia razionale i punti di controllo sono in forma NON OMOGENEA [ x, y, z, w] ( dove la forma omogenea è [ w*x, w*y, w*z, w]) From a1151f8df2e59089a431c695a651be7cddc8f912 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Wed, 8 Nov 2023 10:03:08 +0100 Subject: [PATCH 18/51] EgtExchange : - tolto parametro dScaleFactor ad Import3dm. --- EExImport3dm.h | 2 +- EXeExecutor.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/EExImport3dm.h b/EExImport3dm.h index 5465f8a..353d859 100644 --- a/EExImport3dm.h +++ b/EExImport3dm.h @@ -28,7 +28,7 @@ class __declspec( novtable) IImport3dm { public : virtual ~IImport3dm( void) {} - virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1, + virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dTextHeight = 2.0, double dExtLine = 5.0, double dArrLen = 5.0, double dTextDist = 2.0, bool bLenIsMM = true, int nDecDig = -2, std::string sFont = "ModernPropS.Nfe") = 0 ; } ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 3854ee0..f43a52e 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -121,7 +121,7 @@ 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 ExeImport3dm( const std::string& sFilePath, double dScaleFactor) ; +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) ; EXE_EXPORT bool ExeExportDxf( int nId, const std::string& sFilePath, int nFlag = 1, int nFilter = 393) ; From 14fd82f32295dd7d022cbc8a20560c6b2f7e0a04 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Wed, 8 Nov 2023 10:49:14 +0100 Subject: [PATCH 19/51] Include : - aggiunta la funzione Import3dm. --- EInAPI.h | 1 + 1 file changed, 1 insertion(+) diff --git a/EInAPI.h b/EInAPI.h index 6ad68ba..ad54e8c 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -113,6 +113,7 @@ EIN_EXPORT BOOL __stdcall EgtImportDxf( const wchar_t* wsFilePath, double dScale 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 EgtImport3dm( const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtAdvancedImportIsEnabled( void) ; EIN_EXPORT BOOL __stdcall EgtAdvancedImport( const wchar_t* wsFilePath, double dLinToler) ; EIN_EXPORT BOOL __stdcall EgtExportDxf( int nId, const wchar_t* wsFilePath, int nFlag, int nFilter) ; From 435a89b2b9524edca3b2c10d65fe393bc5d81b8c Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 13 Nov 2023 08:50:09 +0100 Subject: [PATCH 20/51] Include : - aggiornamento prototipi. --- EXeExecutor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXeExecutor.h b/EXeExecutor.h index f43a52e..ba996d9 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -359,7 +359,7 @@ EXE_EXPORT int ExeCreateSurfTmBySurfBezier( int nParentId, int nSbezId) ; EXE_EXPORT int ExeCreateSurfTmByVolZmap( int nParentId, int nZmapId, int nPart) ; EXE_EXPORT int ExeCreateSurfBezier( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTVECTOR& vPnt, int nRefType) ; EXE_EXPORT int ExeCreateSurfBezierRational( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTUVECTOR& vPntW, int nRefType) ; -EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight = 50, bool bShowTrim = false) ; +EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight = 50, bool bShowTrim = false, int* pnCount = nullptr) ; // GeomDB Create Volume EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX, From ddd7f858a4beac609ce242c233bbbf39a5034594 Mon Sep 17 00:00:00 2001 From: SaraP Date: Tue, 14 Nov 2023 15:07:33 +0100 Subject: [PATCH 21/51] Include : - aggiornamento prototipi. --- EXeExecutor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXeExecutor.h b/EXeExecutor.h index ba996d9..4c6b8ce 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -316,7 +316,7 @@ EXE_EXPORT int ExeCreateCirclesAlongCurve( int nParentId, int nCrvId, double dO double dStartAdd, double dEndAdd, double dDiam, int* pnCount) ; // GeomDB Create Surf EXE_EXPORT int ExeCreateSurfFlatRegion( int nParentId, const INTVECTOR& vCrvIds, int* pnCount) ; -EXE_EXPORT int ExeCreateSurfFrFatCurve( int nParentId, int nCrvId, double dRad, bool bSquared) ; +EXE_EXPORT int ExeCreateSurfFrFatCurve( int nParentId, int nCrvId, double dRad, bool bSquaredEnds, bool bSquaredMids) ; EXE_EXPORT int ExeCreateSurfFrRectangle( int nParentId, const Point3d& ptIni, const Point3d& ptCross, int nRefType) ; EXE_EXPORT int ExeCreateSurfFrRectangle3P( int nParentId, const Point3d& ptIni, const Point3d& ptCross, const Point3d& ptDir, int nRefType) ; From 841dddf0471ce17a86e2d2305c69089e582fd686 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 14 Nov 2023 19:11:35 +0100 Subject: [PATCH 22/51] Include : - sistemazione prototipi per passaggio import/export 3dm da Exchange a Exch3dm. --- EE3DllMain.h | 73 ++++++++++++++++++++++++++++++++ EExExport3dm.h => EE3Export3dm.h | 12 +++--- EExImport3dm.h => EE3Import3dm.h | 12 +++--- 3 files changed, 85 insertions(+), 12 deletions(-) create mode 100644 EE3DllMain.h rename EExExport3dm.h => EE3Export3dm.h (77%) rename EExImport3dm.h => EE3Import3dm.h (79%) diff --git a/EE3DllMain.h b/EE3DllMain.h new file mode 100644 index 0000000..9d2418e --- /dev/null +++ b/EE3DllMain.h @@ -0,0 +1,73 @@ +//---------------------------------------------------------------------------- +// EgalTech 2023-2023 +//---------------------------------------------------------------------------- +// File : EE3DllMain.h Data : 14.11.23 Versione : 2.5k2 +// Contenuto : Prototipi funzioni generali della DLL. +// +// +// +// Modifiche : 14.11.23 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include + +class ILogger ; + +//----------------------- Macro per import/export ---------------------------- +#undef EE3_EXPORT +#if defined( I_AM_EE3) // da definirsi solo nella DLL + #define EE3_EXPORT __declspec( dllexport) +#else + #define EE3_EXPORT __declspec( dllimport) +#endif + +//----------------------------------------------------------------------------- +// E' necessaria l'interfaccia in C per caricare queste funzioni dinamicamente +extern "C" { + // restituisce la versione della Dll + EE3_EXPORT const char* GetEE3Version( void) ; + // permette di impostare il logger per la Dll + EE3_EXPORT void SetEE3Logger( ILogger* pLogger) ; + // imposta la chiave di protezione + EE3_EXPORT void SetEE3Key( const std::string& sKey) ; + // imposta se chiave hardware di rete + EE3_EXPORT void SetEE3NetHwKey( bool bNetHwKey) ; +} + + +//----------------------------------------------------------------------------- +#include "/EgtDev/Include/EGnStringUtils.h" +#include "/EgtDev/Include/EgtILogger.h" +#include "/EgtDev/Include/EgtKeyCodes.h" +#include "/EgtDev/Include/SELkKeyProc.h" + +//----------------------------------------------------------------------------- +// Test della chiave per caricare la DLL +inline bool +TestKeyForEE3( const std::string& sKey, int nKeyOpt, ILogger* pLogger) +{ + // verifico la chiave e le opzioni + unsigned int nOpt1, nOpt2 ; + int nOptExpDays ; + int nRet = GetKeyOptions( sKey, KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV, + nOpt1, nOpt2, nOptExpDays) ; + if ( nRet != KEY_OK && ! EqualNoCase( sKey, "EE3Base")) { + if ( nRet != KEY_OK) { + std::string sErr = "Error on Key (EE3/" + ToString( nRet) + ")" ; + LOG_ERROR( pLogger, sErr.c_str()) ; + return false ; + } + if ( ( nOpt1 & ( KEYOPT_EEX_INPBASE|KEYOPT_EEX_EXPBASE)) == 0 || + ( nKeyOpt != 0 && ( nOpt1 & nKeyOpt) == 0) || + nOptExpDays < GetCurrDay()) { + std::string sErr = "Warning on Key (EE3/OPT)" ; + LOG_ERROR( pLogger, sErr.c_str()) ; + return false ; + } + } + return true ; +} diff --git a/EExExport3dm.h b/EE3Export3dm.h similarity index 77% rename from EExExport3dm.h rename to EE3Export3dm.h index 3164f4a..adbb7ad 100644 --- a/EExExport3dm.h +++ b/EE3Export3dm.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2023 //---------------------------------------------------------------------------- -// File : EExExport3dm.h Data : 21.09.23 Versione : +// File : EE3Export3dm.h Data : 21.09.23 Versione : // Contenuto : Dichiarazione della interfaccia IExport3dm. // // @@ -18,11 +18,11 @@ #include //----------------------- Macro per import/export ---------------------------- -#undef EEK_EXPORT -#if defined( I_AM_EEX) // da definirsi solo nella DLL -#define EEX_EXPORT __declspec( dllexport) +#undef EE3_EXPORT +#if defined( I_AM_EE3) // da definirsi solo nella DLL +#define EE3_EXPORT __declspec( dllexport) #else -#define EEX_EXPORT __declspec( dllimport) +#define EE3_EXPORT __declspec( dllimport) #endif //----------------------------------------------------------------------------- @@ -36,5 +36,5 @@ public : //----------------------------------------------------------------------------- extern "C" { - EEX_EXPORT IExport3dm* CreateExport3dm(void) ; + EE3_EXPORT IExport3dm* CreateExport3dm(void) ; } diff --git a/EExImport3dm.h b/EE3Import3dm.h similarity index 79% rename from EExImport3dm.h rename to EE3Import3dm.h index 353d859..ad23959 100644 --- a/EExImport3dm.h +++ b/EE3Import3dm.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2023 //---------------------------------------------------------------------------- -// File : EExImport3dm.h Data : 26.06.23 Versione : 2.5f1 +// File : EE3Import3dm.h Data : 26.06.23 Versione : 2.5f1 // Contenuto : Dichiarazione della interfaccia IImport3dm. // // @@ -16,11 +16,11 @@ #include //----------------------- Macro per import/export ---------------------------- -#undef EEK_EXPORT -#if defined( I_AM_EEX) // da definirsi solo nella DLL -#define EEX_EXPORT __declspec( dllexport) +#undef EE3_EXPORT +#if defined( I_AM_EE3) // da definirsi solo nella DLL +#define EE3_EXPORT __declspec( dllexport) #else -#define EEX_EXPORT __declspec( dllimport) +#define EE3_EXPORT __declspec( dllimport) #endif //----------------------------------------------------------------------------- @@ -35,5 +35,5 @@ public : //----------------------------------------------------------------------------- extern "C" { - EEX_EXPORT IImport3dm* CreateImport3dm( void) ; + EE3_EXPORT IImport3dm* CreateImport3dm( void) ; } From 137103f92c3c6266bda54f803817511e6edef280 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 16 Nov 2023 19:00:42 +0100 Subject: [PATCH 23/51] Include : - aggiornamento prototipi. --- EXeExecutor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/EXeExecutor.h b/EXeExecutor.h index 4c6b8ce..df713f4 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -702,6 +702,7 @@ EXE_EXPORT bool ExeSurfTmFacetNearestMidPoint( int nId, int nFacet, const Point3 EXE_EXPORT bool ExeSurfTmFacetCenter( int nId, int nFacet, int nRefId, Point3d& ptCen, Vector3d& vtN) ; EXE_EXPORT bool ExeSurfTmFacetNormVersor( int nId, int nFacet, int nRefId, Vector3d& vtNorm) ; EXE_EXPORT bool ExeSurfTmFacetMinAreaRectangle( int nId, int nFacet, int nRefId, Frame3d& frRect, double& dDimX, double& dDimY) ; +EXE_EXPORT bool ExeSurfTmFacetElevationInBBox( int nId, int nFacet, const BBox3d& b3Box, int nRefId, double& dElev) ; EXE_EXPORT bool ExeSurfTmFacetOppositeSide( int nId, int nFacet, const Vector3d& vtDir, int nRefId, Point3d& ptP1, Point3d& ptP2) ; EXE_EXPORT bool ExeSurfTmFacetOppositeSideEx( int nId, int nFacet, const Vector3d& vtDir, int nRefId, From 3925a97c84ade864c16438508ae3217326a9cc82 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Mon, 20 Nov 2023 11:14:02 +0100 Subject: [PATCH 24/51] Include : - aggiunta funzione CalcPocketing. --- EGkCalcPocketing.h | 29 +++++++++++++++++++++++++++++ EXeExecutor.h | 1 + 2 files changed, 30 insertions(+) create mode 100644 EGkCalcPocketing.h diff --git a/EGkCalcPocketing.h b/EGkCalcPocketing.h new file mode 100644 index 0000000..efeae81 --- /dev/null +++ b/EGkCalcPocketing.h @@ -0,0 +1,29 @@ +//---------------------------------------------------------------------------- +// EgalTech 2023-2023 +//---------------------------------------------------------------------------- +// File : EGkCalcPocketing.h Data : 16.11.23 Versione : 2.5j1 +// Contenuto : Calcolo dei percorsi elementari di pocketing. +// +// +// +// Modifiche : 16.11.23 RE Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkCurveComposite.h" +#include "/EgtDev/Include/EGkSurfFlatRegion.h" + +//----------------------- Macro per import/export ---------------------------- +#undef EGK_EXPORT +#if defined( I_AM_EGK) // da definirsi solo nella DLL + #define EGK_EXPORT __declspec( dllexport) +#else + #define EGK_EXPORT __declspec( dllimport) +#endif + +//----------------------------------------------------------------------------- +EGK_EXPORT bool CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dStep, double dAngle, int nType, + bool bSmooth, ICRVCOMPOPOVECTOR& vCrv) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index df713f4..16571ce 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -587,6 +587,7 @@ EXE_EXPORT bool ExeRemoveCurveCompoUndercutOnY( int nId, double dLinTol) ; 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, int nRefType) ; +EXE_EXPORT bool ExePocketing( const INTVECTOR vId, double dRad, double dStep, double dAngle, int nType, bool bSmooth, int nDestGrpId, int& nFirstId, int& nCrvCount) ; // GeomDb Surf Modify EXE_EXPORT bool ExeInvertSurface( const INTVECTOR& vIds) ; From 6e3503fde57c40083536ebdf726206c701b21ea2 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 22 Nov 2023 20:21:06 +0100 Subject: [PATCH 25/51] =?UTF-8?q?Include=20:=20-=20a=20classe=20PolyLine?= =?UTF-8?q?=20aggiunte=20propriet=C3=A0=20TempProp=20e=20relative=20funzio?= =?UTF-8?q?ni=20Set/Get.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EGkPolyLine.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/EGkPolyLine.h b/EGkPolyLine.h index 61d0e42..a26e6dd 100644 --- a/EGkPolyLine.h +++ b/EGkPolyLine.h @@ -116,6 +116,11 @@ class PolyLine 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) ; + EGK_EXPORT void SetTempProp( int nProp, int nPropInd = 0) + { if ( nPropInd >= 0 && nPropInd < 2) + m_nTempProp[nPropInd] = nProp ; } + EGK_EXPORT int GetTempProp( int nPropInd = 0) const + { return (( nPropInd >= 0 && nPropInd < 2) ? m_nTempProp[nPropInd] : 0) ; } private : bool MyChangeStart( int nPos) ; @@ -123,9 +128,10 @@ class PolyLine bool MyMakeConvex( const Vector3d& vtN, bool bLeftSide) ; private : - int m_nRejected ; - PNTULIST m_lUPoints ; - mutable PNTULIST::const_iterator m_iter ; + int m_nRejected ; // numero punti rifiutati perchè coincidenti + int m_nTempProp[2] ; // vettore proprietà temporanee + PNTULIST m_lUPoints ; // lista dei punti + mutable PNTULIST::const_iterator m_iter ; // iteratore corrente } ; //---------------------------------------------------------------------------- From 2e2f69b2528b46f700f944223207d26749e0f8e1 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 23 Nov 2023 10:47:24 +0100 Subject: [PATCH 26/51] Include : - aggiornamento prototipi. --- EInAPI.h | 2 ++ EXeExecutor.h | 2 ++ EgtFunPtrType.h | 9 +++++---- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/EInAPI.h b/EInAPI.h index ad54e8c..1776070 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -34,6 +34,8 @@ extern "C" { // General EIN_EXPORT BOOL __stdcall EgtInit( int nDebug, const wchar_t* wsLogFile, const wchar_t* wsLogMsg) ; EIN_EXPORT BOOL __stdcall EgtExit( void) ; +typedef bool (__stdcall * pfOnTerminateProcess) ( int) ; +EIN_EXPORT BOOL __stdcall EgtSetOnTerminateProcess( pfOnTerminateProcess pFun) ; EIN_EXPORT BOOL __stdcall EgtSetUserLevel( int nUserLev) ; EIN_EXPORT int __stdcall EgtGetUserLevel( void) ; EIN_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* wsKey) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 16571ce..ae1d793 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -37,6 +37,8 @@ class LuaMgr ; // General EXE_EXPORT bool ExeInit( int nDebug, const std::string& sLogFile, const std::string& sLogMsg) ; EXE_EXPORT bool ExeExit( void) ; +EXE_EXPORT bool ExeSetOnTerminateProcess( pfOnTerminateProcess pFun) ; +EXE_EXPORT bool ExeOnTerminateProcess( int nExitCode) ; EXE_EXPORT int ExeGetDebugLevel( void) ; EXE_EXPORT bool ExeSetUserLevel( int nUserLev) ; EXE_EXPORT int ExeGetUserLevel( void) ; diff --git a/EgtFunPtrType.h b/EgtFunPtrType.h index fe4c6dd..853e7a1 100644 --- a/EgtFunPtrType.h +++ b/EgtFunPtrType.h @@ -1,13 +1,13 @@ //---------------------------------------------------------------------------- -// EgalTech 2018-2018 +// EgalTech 2018-2023 //---------------------------------------------------------------------------- -// File : EgtFunPtrType.h Data : 19.07.18 Versione : 1.9g2 +// File : EgtFunPtrType.h Data : 23.11.23 Versione : 2.5k5 // Contenuto : Dichiarazione tipi puntatori a funzione. // // // // Modifiche : 19.07.18 DS Creazione modulo. -// +// 23.11.23 DS Aggiunta pfOnTerminateProcess. // //---------------------------------------------------------------------------- @@ -16,5 +16,6 @@ #include //---------------------------------------------------------------------------- -typedef int (__stdcall * pfProcEvents) (int, int) ; +typedef bool (__stdcall * pfOnTerminateProcess) ( int) ; +typedef int (__stdcall * pfProcEvents) ( int, int) ; typedef bool (__stdcall * pfOutText) ( const std::string&) ; From a645be8f7db42b903ff520ae2352d5a32237df4f Mon Sep 17 00:00:00 2001 From: SaraP Date: Thu, 23 Nov 2023 13:01:37 +0100 Subject: [PATCH 27/51] Include : - aggiunti prototipi per Voronoi - aggiornamento prototipi. --- EGkCurve.h | 6 +++ EGkCurveComposite.h | 4 +- EGkGeoObj.h | 2 + EGkOffsetCurve.h | 2 +- EGkSfrCreate.h | 2 +- EGkSurfFlatRegion.h | 7 +++- EGkVoronoi.h | 92 +++++++++++++++++++++++++++++++++++++++++++++ EXeExecutor.h | 2 + 8 files changed, 113 insertions(+), 4 deletions(-) create mode 100644 EGkVoronoi.h diff --git a/EGkCurve.h b/EGkCurve.h index 7d20f16..93418d8 100644 --- a/EGkCurve.h +++ b/EGkCurve.h @@ -19,6 +19,8 @@ #include "/EgtDev/Include/EGkPlane3d.h" #include "/EgtDev/Include/EgtPointerOwner.h" +class Voronoi ; + //---------------------------------------------------------------------------- class __declspec( novtable) ICurve : public IGeoObj { @@ -92,6 +94,10 @@ class __declspec( novtable) ICurve : public IGeoObj virtual bool TrimEndAtLen( double dLenTrim) = 0 ; virtual bool ExtendStartByLen( double dLenExt) = 0 ; virtual bool ExtendEndByLen( double dLenExt) = 0 ; + virtual Voronoi* GetVoronoiObject( void) const = 0 ; + virtual bool CalcVoronoiDiagram( std::vector>& vCrvs, int nBound = 3) const = 0 ; + virtual bool CalcMedialAxis( std::vector>& vCrvs, int nSide) const = 0 ; + virtual bool CalcFatCurve( std::vector>& vCrvs, double dRadius, bool bSquareEnds, bool bSquareMids) const = 0 ; } ; //---------------------------------------------------------------------------- diff --git a/EGkCurveComposite.h b/EGkCurveComposite.h index 64c915e..a0c4f46 100644 --- a/EGkCurveComposite.h +++ b/EGkCurveComposite.h @@ -41,7 +41,7 @@ class __declspec( novtable) ICurveComposite : public ICurve virtual const ICurve* GetLastCurve( void) const = 0 ; virtual const ICurve* GetPrevCurve( void) const = 0 ; virtual bool IsParamAtJoint( double dU) const = 0 ; - virtual ICurve* RemoveFirstOrLastCurve( bool bLast = true) = 0 ; + virtual ICurve* RemoveFirstOrLastCurve( bool bLast = true) = 0 ; virtual bool ChangeStartPoint( double dU) = 0 ; virtual bool AddPoint( const Point3d& ptStart) = 0 ; virtual bool AddLine( const Point3d& ptNew, bool bEndOrStart = true) = 0 ; @@ -68,6 +68,8 @@ class __declspec( novtable) ICurveComposite : public ICurve virtual bool IsATrapezoid( double dLinTol, Point3d& ptP, Vector3d& vtB1, Vector3d& vtL1, Vector3d& vtB2) const = 0 ; virtual bool SetCurveTempProp( int nCrv, int nProp, int nPropInd = 0) = 0 ; virtual bool GetCurveTempProp( int nCrv, int& nProp, int nPropInd = 0) const = 0 ; + virtual bool SetCurveTempParam( int nCrv, double dParam, int nParamInd = 0) ; + virtual bool GetCurveTempParam( int nCrv, double& dParam, int nParamInd = 0) const ; } ; //----------------------------------------------------------------------------- diff --git a/EGkGeoObj.h b/EGkGeoObj.h index 466dda6..36bd595 100644 --- a/EGkGeoObj.h +++ b/EGkGeoObj.h @@ -56,6 +56,8 @@ class __declspec( novtable) IGeoObj virtual const IObjGraphics* GetObjGraphics( void) const = 0 ; virtual void SetTempProp( int nProp, int nPropInd = 0) = 0 ; virtual int GetTempProp( int nPropInd = 0) const = 0 ; + virtual void SetTempParam( double dParam, int nParamInd = 0) = 0 ; + virtual double GetTempParam( int nParamInd = 0) const = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EGkOffsetCurve.h b/EGkOffsetCurve.h index 0b6ffc1..314301d 100644 --- a/EGkOffsetCurve.h +++ b/EGkOffsetCurve.h @@ -30,7 +30,7 @@ class OffsetCurve public : EGK_EXPORT bool Reset( void) ; - EGK_EXPORT bool Make( const ICurve* pCrv, double dDist, int nType) ; + EGK_EXPORT bool Make( const ICurve* pCrv, double dDist, int nType, bool bUseVoronoi = false) ; EGK_EXPORT int GetCurveCount( void) { return int( m_CrvLst.size()) ; } EGK_EXPORT ICurve* GetCurve( void) ; EGK_EXPORT ICurve* GetLongerCurve( void) ; diff --git a/EGkSfrCreate.h b/EGkSfrCreate.h index c81c3c7..40f4aab 100644 --- a/EGkSfrCreate.h +++ b/EGkSfrCreate.h @@ -30,7 +30,7 @@ EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionRectangle( double dWidth, double dL EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionStadium( double dWidth, double dLen) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionDisk( double dRadius) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius, - bool bSquareEnds, bool bSquareMids) ; + bool bSquareEnds, bool bSquareMids, bool bUseVoronoi = false) ; // NB : la curva ingrassata non deve autointersecarsi EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromTriangle( const Triangle3d& Tria) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLine( const PolyLine& ContourPolyLine) ; diff --git a/EGkSurfFlatRegion.h b/EGkSurfFlatRegion.h index 819b471..2774217 100644 --- a/EGkSurfFlatRegion.h +++ b/EGkSurfFlatRegion.h @@ -17,6 +17,7 @@ #include "/EgtDev/Include/EGkIntersCurves.h" #include "/EgtDev/Include/EgkCurveComposite.h" #include "/EgtDev/Include/EgtPointerOwner.h" +#include "/EgtDev/Include/EGkVoronoi.h" class ISurfTriMesh ; @@ -35,7 +36,8 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf virtual bool Add( const ISurfFlatRegion& Other) = 0 ; virtual bool Subtract( const ISurfFlatRegion& Other) = 0 ; virtual bool Intersect( const ISurfFlatRegion& Other) = 0 ; - virtual bool Offset( double dDist, int nType) = 0 ; + virtual bool Offset( double dDist, int nType, bool bUseVoronoi = false) = 0 ; + virtual ISurfFlatRegion* CreateOffsetSurf( double dDist, int nType, bool bUseVoronoi = false) const = 0 ; virtual bool GetGrossArea( double& dArea) const = 0 ; virtual const Point3d& GetPlanePoint( void) const = 0 ; virtual const Vector3d& GetNormVersor( void) const = 0 ; @@ -49,6 +51,9 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf virtual bool GetCurveClassification( const ICurve& Crv, double dLenMin, CRVCVECTOR& ccClass) const = 0 ; virtual int GetChunkSimpleClassification( int nChunk, const ISurfFlatRegion& Other, int nOthChunk) const ; // compare only outsides virtual bool GetZigZagInfill( double dSideStep, bool bAllowStepCorrection, bool bInvert, ICRVCOMPOPOVECTOR& vpCrvs) const = 0 ; + virtual Voronoi* GetVoronoiObject( void) const = 0 ; + virtual bool CalcVoronoiDiagram( ICURVEPOVECTOR& vCrvs, int nBound = VORONOI_STD_BOUND) const = 0 ; + virtual bool CalcMedialAxis( ICURVEPOVECTOR& vCrvs, int nSide = Voronoi::WMAT_LEFT) const = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EGkVoronoi.h b/EGkVoronoi.h new file mode 100644 index 0000000..02fe3b4 --- /dev/null +++ b/EGkVoronoi.h @@ -0,0 +1,92 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2023 +//---------------------------------------------------------------------------- +// File : EGkVoronoi.h Data : 23.11.23 Versione : 2.5k5 +// Contenuto : Dichiarazione della classe Voronoi con libreria VRONI +// +// +// +// Modifiche : 23.11.23 SP Creazione modulo. + +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkFrame3d.h" +#include "/EgtDev/Include/EGkCurve.h" +#include "/EgtDev/Include/EGkCurveArc.h" +#include "/EgtDev/Include/EGkCurveBezier.h" +#include "/EgtDev/Include/EGkCurveComposite.h" +#include "/EgtDev/Include/EGkCurveLine.h" +#include "/EgtDev/Extern/vroni/Include/vroni_object.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 + +static const int VORONOI_STD_BOUND = 3 ; +static const double VRONI_OFFS_TOL = 1e-14 ; + +//-------------------------- Forward Definitions ------------------------------- +class ISurfFlatRegion ; + +//---------------------------------------------------------------------------- +class Voronoi +{ + public : + // costanti per il lato del medial axis + enum WMATSide { WMAT_LEFT = 0, + WMAT_RIGHT = 1, + WMAT_BOTHSIDES = 2} ; + public : + EGK_EXPORT Voronoi( void) : m_vroni( nullptr), m_nBound( VORONOI_STD_BOUND), m_bVDComputed( false), m_bAllowAdd( true) {} ; + EGK_EXPORT Voronoi( const ICurve* pCrv, bool bAllowAdd) ; + EGK_EXPORT Voronoi( const ISurfFlatRegion* pSfr, bool bAllowAdd) ; + EGK_EXPORT ~Voronoi( void) ; + + public : + EGK_EXPORT bool AddCurve( const ICurve* pCrv) ; + EGK_EXPORT bool AddSurfFlatRegion( const ISurfFlatRegion* pSfr) ; + EGK_EXPORT ICurve* GetCurve( int nId) ; + EGK_EXPORT int GetCurveCount( void) + { return m_vpCrvs.size() ; } ; + + EGK_EXPORT bool CalcVoronoiDiagram( ICURVEPOVECTOR& vCrvs, int nBound = VORONOI_STD_BOUND) ; + EGK_EXPORT bool CalcOffset( ICURVEPOVECTOR& vOffs, double dOffs, int nType) ; + EGK_EXPORT bool CalcFatCurve( ICURVEPOVECTOR& vOffs, double dOffs, bool bSquareEnds, bool bSquareMids) ; + EGK_EXPORT bool CalcMedialAxis( ICURVEPOVECTOR& vCrvs, int nSide) ; + + private : + bool Clear( void) ; + bool IsValid( void) const + { return m_vroni != nullptr ; } ; + bool AddCurveToVroni( const ICurve * pCrv) ; + bool AddLineToVroni( const ICurveLine* pLine, int& nVroniCrv, int nLoopId, int nCrvId = 0, Point3d ptForcedEnd = P_INVALID) ; + bool AddArcToVroni( const ICurveArc* pArc, int& nVroniCrv, int nLoopId, int nCrvId = 0, Point3d ptForcedEnd = P_INVALID) ; + bool AddCompoToVroni( const ICurveComposite* pCompo, int& nCrv, int nLoopId) ; + bool AddBezierToVroni( const ICurveBezier* pBezier, int& nVroniCrv, int nLoopId) ; + + bool CalcVoronoi( int nBound = VORONOI_STD_BOUND) ; + bool CalcVroniOffset( ICRVCOMPOPLIST& vOffs, double dOffs, bool bRightOffs, bool bLeftOffs) ; + bool UpdateVoronoi( double dOffs) ; + bool VerifyCurvesValidityForOffset( void) ; + bool AdjustOpenOffsetCurve( ICurveComposite& pCompo, double dOffs) ; + bool AdjustOffsetStart( ICurveComposite& pCompo) ; + int GetOffsetCurveSide( const ICurveComposite& pOffs, int nCrv) ; + ICurve* GetBisectorCurve( int i) ; + + private : + vroniObject* m_vroni ; // oggetto base della libreria vroni + Frame3d m_Frame ; // frame in cui è espresso l'oggetto vroni + int m_nBound ; // bound associato al diagramma di Voronoi corrente + CICURVEPVECTOR m_vpCrvs ; // curve associate al Voronoi ( espresse rispetto a m_Frame) + BBox3d m_bBox ; // box degli oggetti associati al Voronoi + bool m_bVDComputed ; // indica se il diagramma di Voronoi è stato calcolato + bool m_bAllowAdd ; // indica se possibile aggiungere altre curve/superifici dopo aver creato l'oggetto Voronoi +} ; diff --git a/EXeExecutor.h b/EXeExecutor.h index ae1d793..f8fbcaf 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -678,6 +678,8 @@ EXE_EXPORT bool ExeCurveCompoCenter( int nId, int nSimpCrv, int nRefId, Point3d& EXE_EXPORT bool ExeCurveCompoRadius( int nId, int nSimpCrv, double& dRad) ; EXE_EXPORT bool ExeCurveCompoAngCenter( int nId, int nSimpCrv, double& dAngCen) ; EXE_EXPORT bool ExeCurveCompoNormVersor( int nId, int nSimpCrv, int nRefId, Vector3d& vtNorm) ; +EXE_EXPORT int ExeCurveGetVoronoi( int nId, int nDestGrpId, int nBound, int* pnCount) ; +EXE_EXPORT int ExeCurveGetFatCurve( int nId, int nDestGrpId, double dRad, bool bSquareEnds, bool bSquareMids, int* pnCount) ; // GeomDb Surf Get EXE_EXPORT bool ExeSurfArea( int nId, double& dArea) ; From de1bfee540da0f2897cd7b36ea5c236c2060ce93 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 24 Nov 2023 12:50:55 +0100 Subject: [PATCH 28/51] Include : - aggiornamento prototipi. --- EGkCurve.h | 3 --- EGkCurveAux.h | 13 +++++++++++++ EGkCurveComposite.h | 4 ++-- EGkOffsetCurve.h | 2 +- EGkSfrCreate.h | 2 +- EGkSurfFlatRegion.h | 4 ++-- EGkVoronoi.h | 33 +++++++++++++++++---------------- 7 files changed, 36 insertions(+), 25 deletions(-) diff --git a/EGkCurve.h b/EGkCurve.h index 93418d8..446f348 100644 --- a/EGkCurve.h +++ b/EGkCurve.h @@ -95,9 +95,6 @@ class __declspec( novtable) ICurve : public IGeoObj virtual bool ExtendStartByLen( double dLenExt) = 0 ; virtual bool ExtendEndByLen( double dLenExt) = 0 ; virtual Voronoi* GetVoronoiObject( void) const = 0 ; - virtual bool CalcVoronoiDiagram( std::vector>& vCrvs, int nBound = 3) const = 0 ; - virtual bool CalcMedialAxis( std::vector>& vCrvs, int nSide) const = 0 ; - virtual bool CalcFatCurve( std::vector>& vCrvs, double dRadius, bool bSquareEnds, bool bSquareMids) const = 0 ; } ; //---------------------------------------------------------------------------- diff --git a/EGkCurveAux.h b/EGkCurveAux.h index 76ed287..60572bf 100644 --- a/EGkCurveAux.h +++ b/EGkCurveAux.h @@ -78,3 +78,16 @@ EGK_EXPORT ICurve* ProjectCurveOnPlane( const ICurve& crCrv, const Plane3d& plPl //---------------------------------------------------------------------------- //! Uniforma la pendenza di una composita tra quota iniziale e finale assegnate EGK_EXPORT bool AdjustCurveSlope( ICurveComposite* pCrv, double dNini, double dNfin) ; + +//---------------------------------------------------------------------------- +//! Calcolo del diagramma di Voronoi della curva, nei TempParam dei risultati la distanza +//! Per nBound tenere valore di default. +EGK_EXPORT bool CalcCurveVoronoiDiagram( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, int nBound = 3) ; + +//---------------------------------------------------------------------------- +//! Calcolo del Medial Axis della curva (sottoinsieme del diagramma di Voronoi), nei TempParam dei risultati la distanza +EGK_EXPORT bool CalcCurveMedialAxis( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, int nSide) ; + +//---------------------------------------------------------------------------- +//! Calcola l'offset completo di una curva +EGK_EXPORT bool CalcCurveFatCurve( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, double dRadius, bool bSquareEnds, bool bSquareMids) ; diff --git a/EGkCurveComposite.h b/EGkCurveComposite.h index a0c4f46..a8d55b3 100644 --- a/EGkCurveComposite.h +++ b/EGkCurveComposite.h @@ -68,8 +68,8 @@ class __declspec( novtable) ICurveComposite : public ICurve virtual bool IsATrapezoid( double dLinTol, Point3d& ptP, Vector3d& vtB1, Vector3d& vtL1, Vector3d& vtB2) const = 0 ; virtual bool SetCurveTempProp( int nCrv, int nProp, int nPropInd = 0) = 0 ; virtual bool GetCurveTempProp( int nCrv, int& nProp, int nPropInd = 0) const = 0 ; - virtual bool SetCurveTempParam( int nCrv, double dParam, int nParamInd = 0) ; - virtual bool GetCurveTempParam( int nCrv, double& dParam, int nParamInd = 0) const ; + virtual bool SetCurveTempParam( int nCrv, double dParam, int nParamInd = 0) = 0 ; + virtual bool GetCurveTempParam( int nCrv, double& dParam, int nParamInd = 0) const = 0 ; } ; //----------------------------------------------------------------------------- diff --git a/EGkOffsetCurve.h b/EGkOffsetCurve.h index 314301d..0b6ffc1 100644 --- a/EGkOffsetCurve.h +++ b/EGkOffsetCurve.h @@ -30,7 +30,7 @@ class OffsetCurve public : EGK_EXPORT bool Reset( void) ; - EGK_EXPORT bool Make( const ICurve* pCrv, double dDist, int nType, bool bUseVoronoi = false) ; + EGK_EXPORT bool Make( const ICurve* pCrv, double dDist, int nType) ; EGK_EXPORT int GetCurveCount( void) { return int( m_CrvLst.size()) ; } EGK_EXPORT ICurve* GetCurve( void) ; EGK_EXPORT ICurve* GetLongerCurve( void) ; diff --git a/EGkSfrCreate.h b/EGkSfrCreate.h index 40f4aab..c81c3c7 100644 --- a/EGkSfrCreate.h +++ b/EGkSfrCreate.h @@ -30,7 +30,7 @@ EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionRectangle( double dWidth, double dL EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionStadium( double dWidth, double dLen) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionDisk( double dRadius) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius, - bool bSquareEnds, bool bSquareMids, bool bUseVoronoi = false) ; + bool bSquareEnds, bool bSquareMids) ; // NB : la curva ingrassata non deve autointersecarsi EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromTriangle( const Triangle3d& Tria) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLine( const PolyLine& ContourPolyLine) ; diff --git a/EGkSurfFlatRegion.h b/EGkSurfFlatRegion.h index 2774217..4de17f3 100644 --- a/EGkSurfFlatRegion.h +++ b/EGkSurfFlatRegion.h @@ -36,8 +36,8 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf virtual bool Add( const ISurfFlatRegion& Other) = 0 ; virtual bool Subtract( const ISurfFlatRegion& Other) = 0 ; virtual bool Intersect( const ISurfFlatRegion& Other) = 0 ; - virtual bool Offset( double dDist, int nType, bool bUseVoronoi = false) = 0 ; - virtual ISurfFlatRegion* CreateOffsetSurf( double dDist, int nType, bool bUseVoronoi = false) const = 0 ; + virtual bool Offset( double dDist, int nType) = 0 ; + virtual ISurfFlatRegion* CreateOffsetSurf( double dDist, int nType) const = 0 ; virtual bool GetGrossArea( double& dArea) const = 0 ; virtual const Point3d& GetPlanePoint( void) const = 0 ; virtual const Vector3d& GetNormVersor( void) const = 0 ; diff --git a/EGkVoronoi.h b/EGkVoronoi.h index 02fe3b4..b32a29c 100644 --- a/EGkVoronoi.h +++ b/EGkVoronoi.h @@ -38,23 +38,24 @@ class ISurfFlatRegion ; //---------------------------------------------------------------------------- class Voronoi -{ +{ public : // costanti per il lato del medial axis - enum WMATSide { WMAT_LEFT = 0, - WMAT_RIGHT = 1, + enum WMATSide { WMAT_LEFT = 0, + WMAT_RIGHT = 1, WMAT_BOTHSIDES = 2} ; public : - EGK_EXPORT Voronoi( void) : m_vroni( nullptr), m_nBound( VORONOI_STD_BOUND), m_bVDComputed( false), m_bAllowAdd( true) {} ; + EGK_EXPORT Voronoi( void) + : m_vroni( nullptr), m_nBound( VORONOI_STD_BOUND), m_bVDComputed( false), m_bAllowAdd( true) {} ; EGK_EXPORT Voronoi( const ICurve* pCrv, bool bAllowAdd) ; EGK_EXPORT Voronoi( const ISurfFlatRegion* pSfr, bool bAllowAdd) ; EGK_EXPORT ~Voronoi( void) ; - - public : + + public : EGK_EXPORT bool AddCurve( const ICurve* pCrv) ; EGK_EXPORT bool AddSurfFlatRegion( const ISurfFlatRegion* pSfr) ; - EGK_EXPORT ICurve* GetCurve( int nId) ; - EGK_EXPORT int GetCurveCount( void) + EGK_EXPORT ICurve* GetCurve( int nId) const ; + EGK_EXPORT int GetCurveCount( void) const { return m_vpCrvs.size() ; } ; EGK_EXPORT bool CalcVoronoiDiagram( ICURVEPOVECTOR& vCrvs, int nBound = VORONOI_STD_BOUND) ; @@ -64,29 +65,29 @@ class Voronoi private : bool Clear( void) ; - bool IsValid( void) const + bool IsValid( void) const { return m_vroni != nullptr ; } ; bool AddCurveToVroni( const ICurve * pCrv) ; bool AddLineToVroni( const ICurveLine* pLine, int& nVroniCrv, int nLoopId, int nCrvId = 0, Point3d ptForcedEnd = P_INVALID) ; bool AddArcToVroni( const ICurveArc* pArc, int& nVroniCrv, int nLoopId, int nCrvId = 0, Point3d ptForcedEnd = P_INVALID) ; bool AddCompoToVroni( const ICurveComposite* pCompo, int& nCrv, int nLoopId) ; bool AddBezierToVroni( const ICurveBezier* pBezier, int& nVroniCrv, int nLoopId) ; - + bool CalcVoronoi( int nBound = VORONOI_STD_BOUND) ; bool CalcVroniOffset( ICRVCOMPOPLIST& vOffs, double dOffs, bool bRightOffs, bool bLeftOffs) ; bool UpdateVoronoi( double dOffs) ; bool VerifyCurvesValidityForOffset( void) ; - bool AdjustOpenOffsetCurve( ICurveComposite& pCompo, double dOffs) ; - bool AdjustOffsetStart( ICurveComposite& pCompo) ; + bool AdjustOpenOffsetCurve( ICurveComposite& pCompo, double dOffs) ; + bool AdjustOffsetStart( ICurveComposite& pCompo) ; int GetOffsetCurveSide( const ICurveComposite& pOffs, int nCrv) ; - ICurve* GetBisectorCurve( int i) ; + ICurve* GetBisectorCurve( int i) ; private : vroniObject* m_vroni ; // oggetto base della libreria vroni - Frame3d m_Frame ; // frame in cui è espresso l'oggetto vroni - int m_nBound ; // bound associato al diagramma di Voronoi corrente + Frame3d m_Frame ; // frame in cui è espresso l'oggetto vroni + int m_nBound ; // bound associato al diagramma di Voronoi corrente CICURVEPVECTOR m_vpCrvs ; // curve associate al Voronoi ( espresse rispetto a m_Frame) - BBox3d m_bBox ; // box degli oggetti associati al Voronoi + BBox3d m_bBox ; // box degli oggetti associati al Voronoi bool m_bVDComputed ; // indica se il diagramma di Voronoi è stato calcolato bool m_bAllowAdd ; // indica se possibile aggiungere altre curve/superifici dopo aver creato l'oggetto Voronoi } ; From 2018c11a8d9c645e7c63174d6e6128294f4351d8 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 24 Nov 2023 15:36:32 +0100 Subject: [PATCH 29/51] Include : - aggiornamento prototipi. --- EXeExecutor.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/EXeExecutor.h b/EXeExecutor.h index f8fbcaf..7e5e2a8 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -590,6 +590,9 @@ EXE_EXPORT bool ExeChainCurvesInGroup( int nGroupId, const Point3d& ptNear, int EXE_EXPORT bool ExeReorderCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType) ; EXE_EXPORT bool ExeProjectCurveOnSurfTm( int nCurveId, int nSurfTmId, const Vector3d& vtDir, int nDestGrpId, double dLinTol, int nRefType) ; EXE_EXPORT bool ExePocketing( const INTVECTOR vId, double dRad, double dStep, double dAngle, int nType, bool bSmooth, int nDestGrpId, int& nFirstId, int& nCrvCount) ; +EXE_EXPORT int ExeCurveGetVoronoi( int nId, int nDestGrpId, int nBound, int* pnCount) ; +EXE_EXPORT int ExeCurveGetMedialAxis( int nId, int nDestGrpId, int nSide, int* pnCount) ; +EXE_EXPORT int ExeCurveGetFatCurve( int nId, int nDestGrpId, double dRad, bool bSquareEnds, bool bSquareMids, int* pnCount) ; // GeomDb Surf Modify EXE_EXPORT bool ExeInvertSurface( const INTVECTOR& vIds) ; @@ -678,8 +681,6 @@ EXE_EXPORT bool ExeCurveCompoCenter( int nId, int nSimpCrv, int nRefId, Point3d& EXE_EXPORT bool ExeCurveCompoRadius( int nId, int nSimpCrv, double& dRad) ; EXE_EXPORT bool ExeCurveCompoAngCenter( int nId, int nSimpCrv, double& dAngCen) ; EXE_EXPORT bool ExeCurveCompoNormVersor( int nId, int nSimpCrv, int nRefId, Vector3d& vtNorm) ; -EXE_EXPORT int ExeCurveGetVoronoi( int nId, int nDestGrpId, int nBound, int* pnCount) ; -EXE_EXPORT int ExeCurveGetFatCurve( int nId, int nDestGrpId, double dRad, bool bSquareEnds, bool bSquareMids, int* pnCount) ; // GeomDb Surf Get EXE_EXPORT bool ExeSurfArea( int nId, double& dArea) ; From 42f3b9007dffad03e4a05ddaca4298f5534749f2 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Mon, 27 Nov 2023 12:23:15 +0100 Subject: [PATCH 30/51] EgtInclude : - Aggiunta funzione CalcZigZagInfill e aggiornamento prototipi. --- EGkCalcPocketing.h | 4 ++++ EXeExecutor.h | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/EGkCalcPocketing.h b/EGkCalcPocketing.h index efeae81..792ad29 100644 --- a/EGkCalcPocketing.h +++ b/EGkCalcPocketing.h @@ -27,3 +27,7 @@ //----------------------------------------------------------------------------- EGK_EXPORT bool CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dStep, double dAngle, int nType, bool bSmooth, ICRVCOMPOPOVECTOR& vCrv) ; +EGK_EXPORT bool CalcZigZagInfill( const ISurfFlatRegion* pSfr, double dStep, bool bSmooth, + ICRVCOMPOPOVECTOR& vCrvCompoRes) ; +EGK_EXPORT bool CalcSpiralInfill( const ISurfFlatRegion* pSfr, double dStep, bool bSmooth, + ICRVCOMPOPOVECTOR& vCrvCompoRes) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 7e5e2a8..82e30cd 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -692,8 +692,7 @@ EXE_EXPORT bool ExeSurfFrTestExternal( int nId1, int nId2, double dMinDist) ; EXE_EXPORT int ExeSurfFrChunkCount( int nId) ; EXE_EXPORT int ExeSurfFrChunkSimpleClassify( int nId1, int nChunk1, int nId2, int nChunk2, double dToler = 0) ; EXE_EXPORT int ExeExtractSurfFrChunkLoops( int nId, int nChunk, int nDestGrpId, int* pnCount) ; -EXE_EXPORT int ExeSurfFrGetZigZagInfill( int nId, int nDestGrpId, double dStep, double dAng, bool bStepCorrection, - bool bInvert, int* pnCount) ; +EXE_EXPORT int ExeSurfFrGetZigZagInfill( int nId, int nDestGrpId, double dStep, double dAng, bool bSmooth, int* pnCount) ; EXE_EXPORT int ExeSurfTmVertexCount( int nId) ; EXE_EXPORT int ExeSurfTmFacetCount( int nId) ; EXE_EXPORT int ExeSurfTmPartCount( int nId) ; From f3bfeac4db4af89a3a74c906d9f4967d509dc2b6 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 28 Nov 2023 11:11:27 +0100 Subject: [PATCH 31/51] Include : - aggiornamento prototipo. --- EXeExecutor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXeExecutor.h b/EXeExecutor.h index 82e30cd..b33da50 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -707,7 +707,7 @@ EXE_EXPORT bool ExeSurfTmFacetNearestMidPoint( int nId, int nFacet, const Point3 EXE_EXPORT bool ExeSurfTmFacetCenter( int nId, int nFacet, int nRefId, Point3d& ptCen, Vector3d& vtN) ; EXE_EXPORT bool ExeSurfTmFacetNormVersor( int nId, int nFacet, int nRefId, Vector3d& vtNorm) ; EXE_EXPORT bool ExeSurfTmFacetMinAreaRectangle( int nId, int nFacet, int nRefId, Frame3d& frRect, double& dDimX, double& dDimY) ; -EXE_EXPORT bool ExeSurfTmFacetElevationInBBox( int nId, int nFacet, const BBox3d& b3Box, int nRefId, double& dElev) ; +EXE_EXPORT bool ExeSurfTmFacetElevationInBBox( int nId, int nFacet, const BBox3d& b3Box, bool bAcceptOutFacet, int nRefId, double& dElev) ; EXE_EXPORT bool ExeSurfTmFacetOppositeSide( int nId, int nFacet, const Vector3d& vtDir, int nRefId, Point3d& ptP1, Point3d& ptP2) ; EXE_EXPORT bool ExeSurfTmFacetOppositeSideEx( int nId, int nFacet, const Vector3d& vtDir, int nRefId, From 7510267e1f8a094653c832d09246051b187cb95e Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Wed, 29 Nov 2023 11:53:17 +0100 Subject: [PATCH 32/51] Include : - modifica prototipi. --- EGkCalcPocketing.h | 4 +--- EGkSurfFlatRegion.h | 1 - EXeExecutor.h | 5 ++++- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/EGkCalcPocketing.h b/EGkCalcPocketing.h index 792ad29..dffa76d 100644 --- a/EGkCalcPocketing.h +++ b/EGkCalcPocketing.h @@ -27,7 +27,5 @@ //----------------------------------------------------------------------------- EGK_EXPORT bool CalcPocketing( const ISurfFlatRegion* pSfr, double dRad, double dStep, double dAngle, int nType, bool bSmooth, ICRVCOMPOPOVECTOR& vCrv) ; -EGK_EXPORT bool CalcZigZagInfill( const ISurfFlatRegion* pSfr, double dStep, bool bSmooth, - ICRVCOMPOPOVECTOR& vCrvCompoRes) ; -EGK_EXPORT bool CalcSpiralInfill( const ISurfFlatRegion* pSfr, double dStep, bool bSmooth, +EGK_EXPORT bool CalcZigZagInfill( const ISurfFlatRegion* pSfr, double dStep, bool bSmooth, bool bRemoveOverlapLink, ICRVCOMPOPOVECTOR& vCrvCompoRes) ; diff --git a/EGkSurfFlatRegion.h b/EGkSurfFlatRegion.h index 4de17f3..f9f6531 100644 --- a/EGkSurfFlatRegion.h +++ b/EGkSurfFlatRegion.h @@ -50,7 +50,6 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf virtual bool GetChunkCentroid( int nChunk, Point3d& ptCen) const ; virtual bool GetCurveClassification( const ICurve& Crv, double dLenMin, CRVCVECTOR& ccClass) const = 0 ; virtual int GetChunkSimpleClassification( int nChunk, const ISurfFlatRegion& Other, int nOthChunk) const ; // compare only outsides - virtual bool GetZigZagInfill( double dSideStep, bool bAllowStepCorrection, bool bInvert, ICRVCOMPOPOVECTOR& vpCrvs) const = 0 ; virtual Voronoi* GetVoronoiObject( void) const = 0 ; virtual bool CalcVoronoiDiagram( ICURVEPOVECTOR& vCrvs, int nBound = VORONOI_STD_BOUND) const = 0 ; virtual bool CalcMedialAxis( ICURVEPOVECTOR& vCrvs, int nSide = Voronoi::WMAT_LEFT) const = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index b33da50..df9c119 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -589,7 +589,6 @@ EXE_EXPORT bool ExeRemoveCurveCompoUndercutOnY( int nId, double dLinTol) ; 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, int nRefType) ; -EXE_EXPORT bool ExePocketing( const INTVECTOR vId, double dRad, double dStep, double dAngle, int nType, bool bSmooth, int nDestGrpId, int& nFirstId, int& nCrvCount) ; EXE_EXPORT int ExeCurveGetVoronoi( int nId, int nDestGrpId, int nBound, int* pnCount) ; EXE_EXPORT int ExeCurveGetMedialAxis( int nId, int nDestGrpId, int nSide, int* pnCount) ; EXE_EXPORT int ExeCurveGetFatCurve( int nId, int nDestGrpId, double dRad, bool bSquareEnds, bool bSquareMids, int* pnCount) ; @@ -652,6 +651,10 @@ EXE_EXPORT bool ExeTextGetFont( int nId, std::string& sFont) ; EXE_EXPORT bool ExeTextGetHeight( int nId, double& dH) ; EXE_EXPORT bool ExeTextGetItalic( int nId, bool& bItl) ; +// GeomDb Get Pocketing +EXE_EXPORT bool ExePocketing( const int nId, double dRad, double dStep, double dAngle, int nType, bool bSmooth, int nDestGrpId, int& nFirstId, int& nCrvCount) ; +EXE_EXPORT int ExeSurfFrGetZigZagInfill( int nId, int nDestGrpId, double dStep, double dAng, bool bSmooth, bool bRemoveOverlapLink,int* pnCount) ; + // GeomDb Curve Get EXE_EXPORT bool ExeCurveDomain( int nId, double* pdStart, double* pdEnd) ; EXE_EXPORT bool ExeCurveLength( int nId, double* pdLen) ; From d699fb9fea2fc475dc9aedb2c1fb3f75fce9722e Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 1 Dec 2023 16:43:45 +0100 Subject: [PATCH 33/51] Include : - aggiornamento codici di protezione mensili. --- EgtKeyCodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index a46c75f..beeff79 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -24,7 +24,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2511 ; +const int KEY_BASELIB_VER = 2512 ; const int KEY_BASELIB_LEV = 1 ; //---------------------------------------------------------------------------- From 766a2a1cb18bd80f048d5894f0c29855a43fe144 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 11 Dec 2023 10:15:39 +0100 Subject: [PATCH 34/51] Include : - aggiornamento prototipi. --- EGkSurfTriMesh.h | 9 ++++++--- EXeExecutor.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index 5623db0..b9def3d 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2014-2023 //---------------------------------------------------------------------------- -// File : EGkSurfTriMesh.h Data : 07.07.23 Versione : 2.5g1 +// File : EGkSurfTriMesh.h Data : 10.12.23 Versione : 2.5l2 // Contenuto : Dichiarazione della interfaccia ISurfTriMesh. // // @@ -70,9 +70,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual bool GetVertex( int nId, Point3d& ptP) const = 0 ; virtual bool GetVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual int GetFirstVertex( Point3d& ptP) const = 0 ; - virtual int GetFirstVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual int GetNextVertex( int nId, Point3d& ptP) const = 0 ; - virtual int GetNextVertexParam( int nId, double& dU, double& dV) const = 0 ; virtual bool GetTriangle( int nId, int nIdVert[3]) const = 0 ; virtual int GetFirstTriangle( int nIdVert[3]) const = 0 ; virtual int GetNextTriangle( int nId, int nIdVert[3]) const = 0 ; @@ -107,6 +105,11 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual bool SwapFacets( int nF1, int nF2) = 0 ; virtual bool GetFacetLocalBBox( int nF, BBox3d& b3Loc, int nFlag = BBF_STANDARD) const = 0 ; virtual bool GetFacetBBox( int nF, const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const = 0 ; + virtual int GetEdgeCount( void) const = 0 ; + virtual int GetEdgeSize( void) const = 0 ; + virtual bool GetEdge( int nInd, int& nV1, int& nV2, int& nFl, int& nFr, double& dAng) const = 0 ; + virtual bool GetEdge( int nInd, Point3d& ptP1, Point3d& ptP2, double& dAng) const = 0 ; + virtual bool GetEdges( ICURVEPOVECTOR& vpCurve) const = 0 ; virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ; virtual bool GeneralizedCut( const ICurve& cvCurve, bool bSaveOnEq) = 0 ; virtual bool Add( const ISurfTriMesh& Other) = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index df9c119..8a8e928 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -724,6 +724,7 @@ EXE_EXPORT bool ExeSurfTmGetAllVertInFacet( int nId, int nFacet, INTVECTOR& vVer EXE_EXPORT bool ExeSurfTmGetFacetBBox( int nId, int nFacet, int nFlag, BBox3d& b3Box) ; EXE_EXPORT bool ExeSurfTmGetFacetBBoxGlob( int nId, int nFacet, int nFlag, BBox3d& b3Box) ; EXE_EXPORT bool ExeSurfTmGetFacetBBoxRef( int nId, int nFacet, int nFlag, const Frame3d& frRef, BBox3d& b3Box) ; +EXE_EXPORT int ExeSurfTmGetEdges( int nId, int nDestGrpId, bool bSmoothAng, int* pnCount) ; EXE_EXPORT bool ExeSurfBezierGetPoint( int nSurfId, double dU, double dV, int nRefId, Point3d& ptP) ; EXE_EXPORT bool ExeSurfBezierGetPointD1( int nSurfId, double dU, double dV, int nUsd, int nVsd, int nRefId, Point3d& ptP, Vector3d& vtDerU, Vector3d& vtDerV) ; From 0c6aed9ec235a63ed051ff716825b51e21a1410c Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 14 Dec 2023 12:01:07 +0100 Subject: [PATCH 35/51] Include : - aggiornamento prototipi. --- EXeExecutor.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EXeExecutor.h b/EXeExecutor.h index 8a8e928..b99fe35 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -385,6 +385,7 @@ EXE_EXPORT int ExeGetFirstLayer( int nPartId, bool bOnlyVisible) ; EXE_EXPORT int ExeGetNextLayer( int nId, bool bOnlyVisible) ; EXE_EXPORT int ExeGetLastLayer( int nPartId, bool bOnlyVisible) ; EXE_EXPORT int ExeGetPrevLayer( int nId, bool bOnlyVisible) ; +EXE_EXPORT bool ExeIsGhostPart( int nGhostId) ; EXE_EXPORT int ExeGetFirstGhostPart( void) ; EXE_EXPORT int ExeGetNextGhostPart( int nId) ; EXE_EXPORT bool ExeEraseEmptyParts( void) ; @@ -395,6 +396,7 @@ EXE_EXPORT bool ExeDeselectLayerObjs( int nLayerId) ; EXE_EXPORT bool ExeSelectPathObjs( int nId, bool bHaltOnFork) ; EXE_EXPORT int ExeDuploNew( int nSouId) ; EXE_EXPORT bool ExeDuploCount( int nSouId, int& nCount) ; +EXE_EXPORT bool ExeDuploCountInRaw( int nSouId, int& nCount) ; EXE_EXPORT bool ExeDuploList( int nSouId, INTVECTOR& vnRef) ; EXE_EXPORT bool ExeDuploSetModified( int nSouId) ; EXE_EXPORT bool ExeDuploGetModified( int nSouId, bool& bModif) ; From 9e8267d22878ece11d661bcb1e0f2cfeff994c59 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 14 Dec 2023 20:27:14 +0100 Subject: [PATCH 36/51] Include : - aggiornamento prototipi. --- EInAPI.h | 2 ++ EXeExecutor.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/EInAPI.h b/EInAPI.h index 1776070..f4cb839 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -339,6 +339,8 @@ EIN_EXPORT BOOL __stdcall EgtSelectPathObjs( int nId, BOOL bHaltOnFork) ; EIN_EXPORT int __stdcall EgtDuploNew( int nSouId) ; EIN_EXPORT BOOL __stdcall EgtDuploCount( int nSouId, int* pnCount) ; EIN_EXPORT BOOL __stdcall EgtDuploList( int nSouId, int*& vInd, int* pnCount) ; +EIN_EXPORT BOOL __stdcall EgtDuploInRawCount( int nSouId, int* pnCount) ; +EIN_EXPORT BOOL __stdcall EgtDuploWithoutRawList( int*& vInd, int* pnCount) ; EIN_EXPORT BOOL __stdcall EgtDuploSetModified( int nSouId) ; EIN_EXPORT BOOL __stdcall EgtDuploGetModified( int nSouId, BOOL* pbModif) ; EIN_EXPORT BOOL __stdcall EgtDuploSetLocked( int nDupId) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index b99fe35..632fdce 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -396,8 +396,9 @@ EXE_EXPORT bool ExeDeselectLayerObjs( int nLayerId) ; EXE_EXPORT bool ExeSelectPathObjs( int nId, bool bHaltOnFork) ; EXE_EXPORT int ExeDuploNew( int nSouId) ; EXE_EXPORT bool ExeDuploCount( int nSouId, int& nCount) ; -EXE_EXPORT bool ExeDuploCountInRaw( int nSouId, int& nCount) ; EXE_EXPORT bool ExeDuploList( int nSouId, INTVECTOR& vnRef) ; +EXE_EXPORT bool ExeDuploInRawCount( int nSouId, int& nCount) ; +EXE_EXPORT bool ExeDuploWithoutRawList( INTVECTOR& vnRef) ; EXE_EXPORT bool ExeDuploSetModified( int nSouId) ; EXE_EXPORT bool ExeDuploGetModified( int nSouId, bool& bModif) ; EXE_EXPORT bool ExeDuploSetLocked( int nDupId) ; From 239fac2dc91111fd59ad8b7b93731bb9355e4de6 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 15 Dec 2023 16:16:09 +0100 Subject: [PATCH 37/51] =?UTF-8?q?Include=20:=20-=20ora=20il=20Logger=20?= =?UTF-8?q?=C3=A8=20di=20default=20thread=20safe.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EgtLogger.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/EgtLogger.h b/EgtLogger.h index 24a52a7..3d44e0a 100644 --- a/EgtLogger.h +++ b/EgtLogger.h @@ -1,13 +1,13 @@ //---------------------------------------------------------------------------- -// EgalTech 2013-2013 +// EgalTech 2013-2023 //---------------------------------------------------------------------------- -// File : EgtLogger.h Data : 06.12.13 Versione : 1.4a4 +// File : EgtLogger.h Data : 15.12.23 Versione : 2.5l3 // Contenuto : Classi per logger. // // // // Modifiche : 06.12.13 DS Creazione modulo. -// +// 15.12.23 DS Ora default è thread safe. // //---------------------------------------------------------------------------- @@ -76,7 +76,7 @@ namespace egtlogger } ; public : - Logger( LogLevel nLevel, const char* szName, bool bThreadSafe = false, + Logger( LogLevel nLevel, const char* szName, bool bThreadSafe = true, int nLoggableItems = LI_DATETIME | LI_LOGGERNAME | LI_LOGGERLEVEL | LI_FUNCTION | LI_LINENUMBER) : m_nLevel( nLevel), m_name( szName), m_threadProtect( bThreadSafe), m_loggableItem( nLoggableItems) {} From ebedf43bd437cad50fffdf2a85dc1fac334db1e7 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 18 Dec 2023 09:31:54 +0100 Subject: [PATCH 38/51] Include : - aggiornamento prototipi. --- EGkPolygon3d.h | 6 +++--- EGkPolygonElevation.h | 32 ++++++++++++++++++++++++++++++++ EXeExecutor.h | 1 + 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 EGkPolygonElevation.h diff --git a/EGkPolygon3d.h b/EGkPolygon3d.h index 02c9541..a859ab8 100644 --- a/EGkPolygon3d.h +++ b/EGkPolygon3d.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2015-2020 +// EgalTech 2015-2023 //---------------------------------------------------------------------------- -// File : Polygon3d.h Data : 02.10.20 Versione : 2.2j1 +// File : EGkPolygon3d.h Data : 17.12.23 Versione : 2.5l3 // Contenuto : Dichiarazione della classe Polygon3d (poligono nello spazio). // // @@ -58,7 +58,7 @@ class Polygon3d EGK_EXPORT bool ToGlob( const Frame3d& frRef) ; EGK_EXPORT bool ToLoc( const Frame3d& frRef) ; EGK_EXPORT bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ; - + EGK_EXPORT bool GetLocalBBox( BBox3d& b3Loc) const ; EGK_EXPORT bool IsValid( void) const { return ! m_Plane.GetVersN().IsSmall() ; } EGK_EXPORT const Plane3d& GetPlane( void) const diff --git a/EGkPolygonElevation.h b/EGkPolygonElevation.h new file mode 100644 index 0000000..dfa0c18 --- /dev/null +++ b/EGkPolygonElevation.h @@ -0,0 +1,32 @@ +//---------------------------------------------------------------------------- +// EgalTech 2023-2023 +//---------------------------------------------------------------------------- +// File : EGkPolygonElevation.h Data : 02.10.20 Versione : 2.2j1 +// Contenuto : Dichiarazione della classe Polygon3d (poligono nello spazio). +// +// +// +// Modifiche : 30.08.15 DS Creazione modulo. +// 19.06.19 DS Aggiunta GetVertices. +// 23.07.19 DS Aggiunte Offset e Invert. +// 02.10.20 DS A FromPlaneTrimmedWithBox aggiunto parametro dToler. +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkPolygon3d.h" +#include "/EgtDev/Include/EGkSurfTriMesh.h" + +//----------------------- Macro per import/export ---------------------------- +#undef EGK_EXPORT +#if defined( I_AM_EGK) // da definirsi solo nella DLL + #define EGK_EXPORT __declspec( dllexport) +#else + #define EGK_EXPORT __declspec( dllimport) +#endif + + +//---------------------------------------------------------------------------- +EGK_EXPORT bool PolygonElevationInBBox( const Polygon3d& pgFacet, const BBox3d& b3Box, bool bAcceptOutFacet, double& dElev) ; +EGK_EXPORT bool PolygonElevationInClosedSurfTm( const Polygon3d& pgFacet, const ISurfTriMesh& CldStm, bool bAcceptOutFacet, double& dElev) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 632fdce..2f42b44 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -714,6 +714,7 @@ EXE_EXPORT bool ExeSurfTmFacetCenter( int nId, int nFacet, int nRefId, Point3d& EXE_EXPORT bool ExeSurfTmFacetNormVersor( int nId, int nFacet, int nRefId, Vector3d& vtNorm) ; EXE_EXPORT bool ExeSurfTmFacetMinAreaRectangle( int nId, int nFacet, int nRefId, Frame3d& frRect, double& dDimX, double& dDimY) ; EXE_EXPORT bool ExeSurfTmFacetElevationInBBox( int nId, int nFacet, const BBox3d& b3Box, bool bAcceptOutFacet, int nRefId, double& dElev) ; +EXE_EXPORT bool ExeSurfTmFacetElevationInClosedSurfTm( int nFacetStmId, int nFacet, int nClosedStmId, bool bAcceptOutFacet, double& dElev) ; EXE_EXPORT bool ExeSurfTmFacetOppositeSide( int nId, int nFacet, const Vector3d& vtDir, int nRefId, Point3d& ptP1, Point3d& ptP2) ; EXE_EXPORT bool ExeSurfTmFacetOppositeSideEx( int nId, int nFacet, const Vector3d& vtDir, int nRefId, From 3d41f1455981b4792c9df5d2ed7abccf83dbddad Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 18 Dec 2023 19:53:57 +0100 Subject: [PATCH 39/51] =?UTF-8?q?Include=20:=20-=20modifica=20al=20costrut?= =?UTF-8?q?tore=20di=20default=20di=20CNurbsData=20per=20impostare=20il=20?= =?UTF-8?q?nuovo=20flag=20bClamped=20a=20true=20(per=20compatibilit=C3=A0?= =?UTF-8?q?=20con=20precedente=20stato).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EGkCurveAux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EGkCurveAux.h b/EGkCurveAux.h index 60572bf..e0fef54 100644 --- a/EGkCurveAux.h +++ b/EGkCurveAux.h @@ -38,7 +38,7 @@ struct CNurbsData PNTVECTOR vCP ; // vettore dei punti di controllo DBLVECTOR vW ; // vettore dei pesi - CNurbsData( void) : nDeg( 0), bRat( false), bPeriodic( false), bClosed( false), bClamped( false), bExtraKnotes(false) {} + CNurbsData( void) : nDeg( 0), bRat( false), bPeriodic( false), bClosed( false), bClamped( true), bExtraKnotes(false) {} } ; // N.B. : in caso la curva sia razionale i punti di controllo sono in forma NON OMOGENEA [ x, y, z, w] ( dove la forma OMOGENEA è [ w*x, w*y, w*z, w]) From 5367ebddbdd33abf473806be01596c52c15ab78f Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 29 Dec 2023 13:08:44 +0100 Subject: [PATCH 40/51] Include : - aggiornamento prototipi. --- EGkDistPointCurve.h | 33 +++++++++++++++++---------------- EGkDistPointSurfTm.h | 14 +++++++------- EGkPolyLine.h | 5 +++-- EGkStmFromTriangleSoup.h | 5 ++--- EGkSurfTriMesh.h | 2 +- EgtExecMgr.h | 2 +- EgtLogger.h | 6 ++---- 7 files changed, 33 insertions(+), 34 deletions(-) diff --git a/EGkDistPointCurve.h b/EGkDistPointCurve.h index e0dca1c..b4b5b47 100644 --- a/EGkDistPointCurve.h +++ b/EGkDistPointCurve.h @@ -49,22 +49,23 @@ class DistPointCurve // Il flag bIsSegment vale solo per linee. public : - EGK_EXPORT bool GetSqDist( double& dSqDist) ; - EGK_EXPORT bool GetDist( double& dDist) ; - EGK_EXPORT bool IsEpsilon( double dTol) - { double dSqDist ; return ( GetSqDist( dSqDist) && ( dSqDist < SQ_EPS_ZERO || dSqDist < dTol * dTol)) ; } - EGK_EXPORT bool IsSmall( void) - { return IsEpsilon( EPS_SMALL) ; } - EGK_EXPORT bool IsZero( void) - { return IsEpsilon( EPS_ZERO) ; } - EGK_EXPORT int GetNbrMinDist( void) { return (int) m_Info.size() ; } - EGK_EXPORT bool GetMinDistPoint( int nInd, Point3d& ptMinDist, int& nFlag) ; - EGK_EXPORT bool GetMinDistPoint( double dNearParam, Point3d& ptMinDist, int& nFlag) ; - EGK_EXPORT bool GetParamAtMinDistPoint( int nInd, double& dParam, int& nFlag) ; - EGK_EXPORT bool GetParamAtMinDistPoint( double dNearParam, double& dParam, int& nFlag) ; - EGK_EXPORT bool GetSideAtMinDistPoint( int nInd, const Vector3d& vtN, int& nSide) ; - EGK_EXPORT bool GetSideAtMinDistPoint( double dNearParam, const Vector3d& vtN, int& nSide) ; - EGK_EXPORT bool GetMinDistInfo( int nInd, MinDistPCInfo& aInfo) ; + EGK_EXPORT bool GetSqDist( double& dSqDist) const ; + EGK_EXPORT bool GetDist( double& dDist) const ; + EGK_EXPORT bool IsEpsilon( double dTol) const + { double dSqDist ; return ( GetSqDist( dSqDist) && ( dSqDist < SQ_EPS_ZERO || dSqDist < dTol * dTol)) ; } + EGK_EXPORT bool IsSmall( void) const + { return IsEpsilon( EPS_SMALL) ; } + EGK_EXPORT bool IsZero( void) const + { return IsEpsilon( EPS_ZERO) ; } + EGK_EXPORT int GetNbrMinDist( void) const + { return (int) m_Info.size() ; } + EGK_EXPORT bool GetMinDistPoint( int nInd, Point3d& ptMinDist, int& nFlag) const ; + EGK_EXPORT bool GetMinDistPoint( double dNearParam, Point3d& ptMinDist, int& nFlag) const ; + EGK_EXPORT bool GetParamAtMinDistPoint( int nInd, double& dParam, int& nFlag) const ; + EGK_EXPORT bool GetParamAtMinDistPoint( double dNearParam, double& dParam, int& nFlag) const ; + EGK_EXPORT bool GetSideAtMinDistPoint( int nInd, const Vector3d& vtN, int& nSide) const ; + EGK_EXPORT bool GetSideAtMinDistPoint( double dNearParam, const Vector3d& vtN, int& nSide) const ; + EGK_EXPORT bool GetMinDistInfo( int nInd, MinDistPCInfo& aInfo) const ; private : DistPointCurve( void) ; diff --git a/EGkDistPointSurfTm.h b/EGkDistPointSurfTm.h index c8ec942..43d7a1f 100644 --- a/EGkDistPointSurfTm.h +++ b/EGkDistPointSurfTm.h @@ -37,16 +37,16 @@ class DistPointSurfTm EGK_EXPORT DistPointSurfTm( const Point3d& ptP, const ISurfTriMesh& tmSurf) ; public : - EGK_EXPORT bool GetDist( double& dDist) ; - EGK_EXPORT bool IsEpsilon( double dTol) + EGK_EXPORT bool GetDist( double& dDist) const ; + EGK_EXPORT bool IsEpsilon( double dTol) const { return ( m_dDist >= 0. && ( m_dDist < EPS_ZERO || m_dDist < dTol)) ; } - EGK_EXPORT bool IsSmall( void) + EGK_EXPORT bool IsSmall( void) const { return IsEpsilon( EPS_SMALL) ; } - EGK_EXPORT bool IsZero( void) + EGK_EXPORT bool IsZero( void) const { return IsEpsilon( EPS_ZERO) ; } - EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDistPoint) ; - EGK_EXPORT bool GetMinDistTriaIndex( int& nMinDistTriaIndex) ; - EGK_EXPORT bool IsPointInside( void) + EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDistPoint) const ; + EGK_EXPORT bool GetMinDistTriaIndex( int& nMinDistTriaIndex) const ; + EGK_EXPORT bool IsPointInside( void) const { return m_bIsInside ; } private : diff --git a/EGkPolyLine.h b/EGkPolyLine.h index a26e6dd..88de9de 100644 --- a/EGkPolyLine.h +++ b/EGkPolyLine.h @@ -136,8 +136,9 @@ class PolyLine //---------------------------------------------------------------------------- // Raccolte di PolyLine -typedef std::vector POLYLINEVECTOR ; // vettore di PolyLine -typedef std::list POLYLINELIST ; // lista di PolyLine +typedef std::vector POLYLINEVECTOR ; // vettore di PolyLine +typedef std::list POLYLINELIST ; // lista di PolyLine +typedef std::vector POLYLINEMATRIX ; // matrice di PolyLine //---------------------------------------------------------------------------- EGK_EXPORT bool DistPointPolyLine( const Point3d& ptP, const PolyLine& plPoly, double& dDist) ; diff --git a/EGkStmFromTriangleSoup.h b/EGkStmFromTriangleSoup.h index f417910..e444c0a 100644 --- a/EGkStmFromTriangleSoup.h +++ b/EGkStmFromTriangleSoup.h @@ -36,14 +36,13 @@ class StmFromTriangleSoup EGK_EXPORT bool Start( int nBuckets = GRID_STD_BUCKETS) ; EGK_EXPORT bool AddTriangle( const Triangle3d& Tria) ; EGK_EXPORT bool AddTriangle( const Point3d& ptP0, const Point3d& ptP1, const Point3d& ptP2, - const double dU0 = -1, const double dV0 = -1, const double dU1 = -1, const double dV1 = -1, - const double dU2 = -1, const double dV2 = -1) ; + double dU0 = -1, double dV0 = -1, double dU1 = -1, double dV1 = -1, double dU2 = -1, double dV2 = -1) ; EGK_EXPORT bool AddSurfTriMesh( const ISurfTriMesh& stmSource) ; EGK_EXPORT bool End( void) ; EGK_EXPORT ISurfTriMesh* GetSurf( void) ; private : - inline int AddVertex( const Point3d& ptP, const double dU = -1, const double dV = -1) ; + inline int AddVertex( const Point3d& ptP, double dU = -1, double dV = -1) ; private : ISurfTriMesh* m_pSTM ; diff --git a/EGkSurfTriMesh.h b/EGkSurfTriMesh.h index b9def3d..3510e12 100644 --- a/EGkSurfTriMesh.h +++ b/EGkSurfTriMesh.h @@ -43,7 +43,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual void SetLinearTolerance( double dLinTol) = 0 ; virtual void SetBoundaryAngle( double dBoundaryAngDeg) = 0 ; virtual void SetSmoothAngle( double dSmoothAngDeg) = 0 ; - virtual int AddVertex( const Point3d& ptVert, const double dU = -1, const double dV = -1) = 0 ; + virtual int AddVertex( const Point3d& ptVert, double dU = -1, double dV = -1) = 0 ; virtual bool MoveVertex( int nInd, const Point3d& ptNewVert) = 0 ; virtual int AddTriangle( const int nIdVert[3], int nTFlag = 0) = 0 ; virtual bool RemoveTriangle( int nId) = 0 ; diff --git a/EgtExecMgr.h b/EgtExecMgr.h index 92ad538..c54d5e9 100644 --- a/EgtExecMgr.h +++ b/EgtExecMgr.h @@ -37,7 +37,7 @@ class ExecManager { return m_pExecMap.insert( std::pair< std::string, Exec>( sName, eFunc)).second ; } int Execute( T& Executor, const std::string& sCmd1, const std::string& sCmd2, const STRVECTOR& vsParams) - { KeyExecMap::iterator Iter = m_pExecMap.find( sCmd1) ; + { const auto Iter = m_pExecMap.find( sCmd1) ; if ( Iter != m_pExecMap.end() && (Iter->second) != nullptr) { if ( ( Executor.*(Iter->second))( sCmd2, vsParams)) return ER_OK ; diff --git a/EgtLogger.h b/EgtLogger.h index 3d44e0a..66a6051 100644 --- a/EgtLogger.h +++ b/EgtLogger.h @@ -109,8 +109,7 @@ namespace egtlogger void ClearOutputStreams( void) { - std::vector::iterator iter ; - for ( iter = m_outputStreams.begin(); iter < m_outputStreams.end() ; ++iter) { + for ( auto iter = m_outputStreams.cbegin() ; iter < m_outputStreams.cend() ; ++iter) { if ( iter->bOwned) delete iter->pStream ; } @@ -127,8 +126,7 @@ namespace egtlogger { m_threadProtect.Lock() ; - std::vector::iterator iter ; - for ( iter = m_outputStreams.begin() ; iter < m_outputStreams.end() ; ++iter) { + for ( auto iter = m_outputStreams.cbegin() ; iter < m_outputStreams.cend() ; ++iter) { if ( nLevel < iter->nLevel) continue ; From 2682ad87721ba8fbcad14820b6252cbec96bcfc5 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 2 Jan 2024 16:01:29 +0100 Subject: [PATCH 41/51] Include : - aggiornamento prototipi. --- EXeExecutor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/EXeExecutor.h b/EXeExecutor.h index 2f42b44..89079f5 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -899,6 +899,7 @@ EXE_EXPORT bool ExeCAvSetAdvTool( double dToolLen, double dToolDiam, double dTip EXE_EXPORT bool ExeCAvSetSawTool( double dToolLen, double dToolDiam, double dThickness, double dStemDiam, double dToolCornR) ; EXE_EXPORT bool ExeCAvSetGenTool( int nToolSectId) ; EXE_EXPORT int ExeCAvGetToolOutline( int nDestGrpId, bool bApprox = false) ; +EXE_EXPORT double ExeCAvToolPosBox( const Point3d& ptP, const Vector3d& vtAx, const BBox3d& b3Box, const Vector3d& vtMove) ; EXE_EXPORT double ExeCAvToolPosStm( const Point3d& ptP, const Vector3d& vtAx, int nSurfTmId, const Vector3d& vtMove, int nRefType) ; EXE_EXPORT bool ExeCAvToolPathStm( int nCrvId, const Vector3d& vtAx, int nSurfTmId, const Vector3d& vtMove, double dLinTol, int nRefType) ; From 00baa7c287c1ad271402e632980b196944bbe812 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 9 Jan 2024 18:28:33 +0100 Subject: [PATCH 42/51] Include : - aggiornamento parametri. --- EGrScene.h | 6 ++++-- EInAPI.h | 6 ++++-- EXeExecutor.h | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/EGrScene.h b/EGrScene.h index c61756d..744ebc8 100644 --- a/EGrScene.h +++ b/EGrScene.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2014-2022 +// EgalTech 2014-2024 //---------------------------------------------------------------------------- -// File : EGrScene.h Data : 22.10.22 Versione : 2.4j1 +// File : EGrScene.h Data : 09.01.24 Versione : 2.5l7 // Contenuto : Dichiarazione della interfaccia IEGrScene per scena OpenGL. // // @@ -93,6 +93,8 @@ class IEGrScene // Grid virtual bool SetGridShow( bool bShowGrid, bool bShowFrame) = 0 ; virtual bool SetGridGeo( double dSnapStep, int nMinLineSstep, int nMajLineSstep, int nExtSstep) = 0 ; + virtual bool SetGridGeoAdv( double dSnapStep, int nMinLineSstep, int nMajLineSstep, + double dXmin, double dXmax, double dYmin, double dYmax) = 0 ; virtual bool SetGridColor( Color colMinLine, Color colMajLine) = 0 ; virtual void GetGridParam( double& dSnapStep, int& nExtStep) const = 0 ; virtual bool GetShowGrid( void) = 0 ; diff --git a/EInAPI.h b/EInAPI.h index f4cb839..caccf7d 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2014-2022 +// EgalTech 2014-2024 //---------------------------------------------------------------------------- -// File : EInAPI.h Data : 06.05.22 Versione : 2.4e1 +// File : EInAPI.h Data : 09.01.24 Versione : 2.5l6 // Contenuto : API (application programming interface). // // @@ -979,6 +979,8 @@ EIN_EXPORT BOOL __stdcall EgtSetWinRectAttribs( BOOL bOutline, const int WrCol[4 EIN_EXPORT BOOL __stdcall EgtSetGlobFrameShow( BOOL bShow) ; EIN_EXPORT BOOL __stdcall EgtSetGridShow( BOOL bShowGrid, BOOL bShowFrame) ; EIN_EXPORT BOOL __stdcall EgtSetGridGeo( double dSnapStep, int nMinLineSstep, int nMajLineSstep, int nExtSstep) ; +EIN_EXPORT BOOL __stdcall EgtSetGridGeoAdv( double dSnapStep, int nMinLineSstep, int nMajLineSstep, + double dXmin, double dXmax, double dYmin, double dYmax) ; EIN_EXPORT BOOL __stdcall EgtSetGridColor( const int nMinCol[4], const int nMajCol[4]) ; EIN_EXPORT BOOL __stdcall EgtResize( int nW, int nH) ; EIN_EXPORT BOOL __stdcall EgtDraw( void) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 89079f5..33a9f3a 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2015-2022 +// EgalTech 2015-2024 //---------------------------------------------------------------------------- -// File : EXcExecutor.h Data : 06.05.22 Versione : 2.4e1 +// File : EXcExecutor.h Data : 09.01.24 Versione : 2.5l6 // Contenuto : Interfaccia Executor. // // @@ -1215,6 +1215,8 @@ EXE_EXPORT bool ExeSetWinRectAttribs( bool bOutline, Color WrCol) ; EXE_EXPORT bool ExeSetGlobFrameShow( bool bShow) ; EXE_EXPORT bool ExeSetGridShow( bool bShowGrid, bool bShowFrame) ; EXE_EXPORT bool ExeSetGridGeo( double dSnapStep, int nMinLineSstep, int nMajLineSstep, int nExtSstep) ; +EXE_EXPORT bool ExeSetGridGeoAdv( double dSnapStep, int nMinLineSstep, int nMajLineSstep, + double dXmin, double dXmax, double dYmin, double dYmax) ; EXE_EXPORT bool ExeSetGridColor( Color colMin, Color colMaj) ; EXE_EXPORT bool ExeResize( int nW, int nH) ; EXE_EXPORT bool ExeDraw( void) ; From cc370650c2e985303fe0ef4d2c76310102b303cd Mon Sep 17 00:00:00 2001 From: SaraP Date: Wed, 10 Jan 2024 10:10:03 +0100 Subject: [PATCH 43/51] Include : - aggiornamento prototipi. --- EGkOffsetCurve.h | 5 +++++ EGkSfrCreate.h | 2 +- EXeExecutor.h | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/EGkOffsetCurve.h b/EGkOffsetCurve.h index 0b6ffc1..26a6cab 100644 --- a/EGkOffsetCurve.h +++ b/EGkOffsetCurve.h @@ -26,6 +26,8 @@ class OffsetCurve { public : + EGK_EXPORT OffsetCurve(): m_dLinTol( 10 * EPS_SMALL) {} ; + EGK_EXPORT OffsetCurve( double dLinTol) : m_dLinTol( dLinTol) {} ; EGK_EXPORT ~OffsetCurve( void) ; public : @@ -35,7 +37,10 @@ class OffsetCurve EGK_EXPORT ICurve* GetCurve( void) ; EGK_EXPORT ICurve* GetLongerCurve( void) ; EGK_EXPORT ICurve* GetShorterCurve( void) ; + EGK_EXPORT double GetLinTol( void) const { return m_dLinTol ; } + EGK_EXPORT void SetLinTol( double dTol) { m_dLinTol = dTol ; } private : ICURVEPLIST m_CrvLst ; + double m_dLinTol ; } ; \ No newline at end of file diff --git a/EGkSfrCreate.h b/EGkSfrCreate.h index c81c3c7..0066574 100644 --- a/EGkSfrCreate.h +++ b/EGkSfrCreate.h @@ -30,7 +30,7 @@ EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionRectangle( double dWidth, double dL EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionStadium( double dWidth, double dLen) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionDisk( double dRadius) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius, - bool bSquareEnds, bool bSquareMids) ; + bool bSquareEnds, bool bSquareMids, double dOffsLinTol = 10 * EPS_SMALL) ; // NB : la curva ingrassata non deve autointersecarsi EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromTriangle( const Triangle3d& Tria) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLine( const PolyLine& ContourPolyLine) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 33a9f3a..62c5aa1 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -318,7 +318,7 @@ EXE_EXPORT int ExeCreateCirclesAlongCurve( int nParentId, int nCrvId, double dO double dStartAdd, double dEndAdd, double dDiam, int* pnCount) ; // GeomDB Create Surf EXE_EXPORT int ExeCreateSurfFlatRegion( int nParentId, const INTVECTOR& vCrvIds, int* pnCount) ; -EXE_EXPORT int ExeCreateSurfFrFatCurve( int nParentId, int nCrvId, double dRad, bool bSquaredEnds, bool bSquaredMids) ; +EXE_EXPORT int ExeCreateSurfFrFatCurve( int nParentId, int nCrvId, double dRad, bool bSquaredEnds, bool bSquaredMids, double dLinTol) ; EXE_EXPORT int ExeCreateSurfFrRectangle( int nParentId, const Point3d& ptIni, const Point3d& ptCross, int nRefType) ; EXE_EXPORT int ExeCreateSurfFrRectangle3P( int nParentId, const Point3d& ptIni, const Point3d& ptCross, const Point3d& ptDir, int nRefType) ; @@ -537,7 +537,7 @@ EXE_EXPORT int ExeSplitText( int nId, int* pnCount) ; // GeomDb Curve Modify EXE_EXPORT bool ExeInvertCurve( const INTVECTOR& vIds) ; EXE_EXPORT bool ExeOffsetCurve( int nId, double dDist, int nType) ; -EXE_EXPORT int ExeOffsetCurveAdv( int nId, double dDist, int nType, int* pnCount) ; +EXE_EXPORT int ExeOffsetCurveAdv( int nId, double dDist, int nType, int* pnCount, double dLinTol = 10 * EPS_SMALL) ; EXE_EXPORT int ExeCurveMedialAxis( int nId) ; EXE_EXPORT bool ExeApproxCurve( int nId, int nApprType, double dLinTol) ; EXE_EXPORT bool ExeProjectCurveOnPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, int nRefType) ; From cf09eda2549d8b3691bdf408c0e40a47b44f122b Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 16 Jan 2024 10:35:45 +0100 Subject: [PATCH 44/51] Include : - passaggio codici protezione librerie a 26. --- EgtKeyCodes.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index beeff79..4cc50ee 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2015-2023 +// EgalTech 2015-2024 //---------------------------------------------------------------------------- -// File : EgtKeyCodes.h Data : 01.01.23 Versione : 2.5a1 +// File : EgtKeyCodes.h Data : 16.01.24 Versione : 2.65a1 // Contenuto : Costanti per codici di protezione librerie di base. // // @@ -17,6 +17,7 @@ // 01.01.21 DS Nuova gestione KEY_BASELIB_VER con versione prodotto e mese. // 01.01.22 DS Passaggio a versione 24. // 01.01.23 DS Passaggio a versione 25. +// 16.01.24 DS Passaggio a versione 26. // //---------------------------------------------------------------------------- @@ -24,7 +25,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2512 ; +const int KEY_BASELIB_VER = 2601 ; const int KEY_BASELIB_LEV = 1 ; //---------------------------------------------------------------------------- From 8b52d7e8aa4929f42030dad8f76006068204bee1 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 16 Jan 2024 19:42:44 +0100 Subject: [PATCH 45/51] Include : - aggiornamento prototipi. --- EInAPI.h | 1 + EMkMachMgr.h | 1 + EXeExecutor.h | 1 + 3 files changed, 3 insertions(+) diff --git a/EInAPI.h b/EInAPI.h index caccf7d..4705e0d 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -724,6 +724,7 @@ EIN_EXPORT BOOL __stdcall EgtGetMachGroupNewName( const wchar_t* wsName, wchar_t EIN_EXPORT int __stdcall EgtAddMachGroup( const wchar_t* wsName, const wchar_t* wsMachineName) ; EIN_EXPORT int __stdcall EgtCopyMachGroup( const wchar_t* wsSouName, const wchar_t* wsName) ; EIN_EXPORT BOOL __stdcall EgtRemoveMachGroup( int nMGroupId) ; +EIN_EXPORT BOOL __stdcall EgtChangeMachGroupName( int nMGroupInd, const wchar_t* wsNewName) ; EIN_EXPORT BOOL __stdcall EgtGetMachGroupName( int nMGroupId, wchar_t*& wsName) ; EIN_EXPORT BOOL __stdcall EgtGetMachGroupMachineName( int nMGroupId, wchar_t*& wsMachineName) ; EIN_EXPORT int __stdcall EgtGetMachGroupId( const wchar_t* wsName) ; diff --git a/EMkMachMgr.h b/EMkMachMgr.h index 822b452..bf72fd5 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -61,6 +61,7 @@ class __declspec( novtable) IMachMgr virtual int AddMachGroup( const std::string& sName, const std::string& sMachineName) = 0 ; virtual int CopyMachGroup( const std::string& sSouName, const std::string& sName) = 0 ; virtual bool RemoveMachGroup( int nId) = 0 ; + virtual bool ChangeMachGroupName( int nId, const std::string& sNewName) = 0 ; virtual std::string GetMachGroupName( int nId) const = 0 ; virtual std::string GetMachGroupMachineName( int nId) const = 0 ; virtual int GetMachGroupId( const std::string& sName) const = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 62c5aa1..396b50f 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -926,6 +926,7 @@ EXE_EXPORT bool ExeGetMachGroupNewName( std::string& sName) ; EXE_EXPORT int ExeAddMachGroup( const std::string& sName, const std::string& sMachineName) ; EXE_EXPORT int ExeCopyMachGroup( const std::string& sSouName, const std::string& sName) ; EXE_EXPORT bool ExeRemoveMachGroup( int nMGroupId) ; +EXE_EXPORT bool ExeChangeMachGroupName( int nId, const std::string& sNewName) ; EXE_EXPORT bool ExeGetMachGroupName( int nId, std::string& sName) ; EXE_EXPORT bool ExeGetMachGroupMachineName( int nId, std::string& sMachineName) ; EXE_EXPORT int ExeGetMachGroupId( const std::string& sName) ; From 3ca2a64bfa89ff1903aff7e981ccec35fdba1004 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 17 Jan 2024 13:20:46 +0100 Subject: [PATCH 46/51] Include : - aggiornamento prototipi - aggiunte costanti per tipo punto intersezione Linea-Curva. --- EXeConst.h | 11 +++++++++++ EXeExecutor.h | 25 ++++++++++++++++--------- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/EXeConst.h b/EXeConst.h index 46695c7..b6352d3 100644 --- a/EXeConst.h +++ b/EXeConst.h @@ -67,6 +67,17 @@ enum ApprType{ APP_LINES = 0, // come ICurve::APL_STD APP_RIGHT_CONVEX_LINES = 12, // come ICurve::APL_RIGHT_CONVEX APP_ARCS = 3} ; +//----------------- Costanti tipo punto intersezione Linea Curva --------------- +enum CLiType { CLT_NONE = 0, + CLT_IN = 1, + CLT_OUT = 2, + CLT_TOUCH_IN = 3, + CLT_TOUCH_OUT = 4, + CLT_TGINI_IN = 5, + CLT_TGFIN_IN = 6, + CLT_TGINI_OUT = 7, + CLT_TGFIN_OUT = 8} ; + //----------------- Costanti tipo punto intersezione Linea SurfTriMesh --------- enum SLiType { SLT_NONE = 0, SLT_IN = 1, diff --git a/EXeExecutor.h b/EXeExecutor.h index 396b50f..a06c890 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -799,21 +799,28 @@ EXE_EXPORT bool ExePointSurfTmDist( const Point3d& ptP, int nStmId, int nRefType double* pdDist, Point3d& ptMin, int* pnTria) ; // Geo Intersect -EXE_EXPORT bool ExeLineBoxInters( const Point3d& ptP, const Vector3d& vtDir, const BBox3d& b3Box, INTDBLVECTOR& vInters) ; +EXE_EXPORT bool ExeLineCurveInters( const Point3d& ptP, const Vector3d& vtDir, const int nId, const int nRefType, + INTDBLVECTOR& vInters) ; +EXE_EXPORT bool ExeLineBoxInters( const Point3d& ptP, const Vector3d& vtDir, const BBox3d& b3Box, + INTDBLVECTOR& vInters) ; +EXE_EXPORT bool ExeLineSurfTmInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRefType, + INTDBLVECTOR& vInters) ; +EXE_EXPORT bool ExeLineVolZmapInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRefType, + INTDBLVECTOR& vInters) ; +EXE_EXPORT int ExePlaneCurveInters( const Point3d& ptOn, const Vector3d& vtN, const int nId, const int nDestGrpId, const int nRefType, + int* pnCount) ; EXE_EXPORT int ExePlaneBoxInters( const Point3d& ptOn, const Vector3d& vtN, const BBox3d& b3Box, int nDestGrpId, int nRefType, int* pnPntCount, int* pnCrvCount, int* pnSrfCount) ; -EXE_EXPORT bool ExeLineSurfTmInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRefType, INTDBLVECTOR& vInters) ; EXE_EXPORT int ExePlaneSurfTmInters( const Point3d& ptOn, const Vector3d& vtN, int nId, int nDestGrpId, int nRefType, double dToler, int* pnPntCount, int* pnCrvCount, int* pnSrfCount) ; -EXE_EXPORT int ExeParPlanesSurfTmInters( const Point3d& ptOn, const Vector3d& vtN, const DBLVECTOR& vdDist, int nId, int nDestGrpId, int nRefType, double dToler, - int* pnGrpCount) ; -EXE_EXPORT int ExeSurfTmSurfTmInters( int nId1, int nId2, int nDestGrpId, double dToler, - int* pnPntCount, int* pnCrvCount, int* pnSrfCount) ; -EXE_EXPORT int ExePlaneCurveInters( const Point3d& ptOn, const Vector3d& vtN, const int nId, const int nDestGrpId, const int nRefType, int* pnCount) ; -EXE_EXPORT int ExeCurveCurveInters( const int nId1, const int nId2, const int nDestGrpId, int* pnPntCount, int* pnCrvCount) ; -EXE_EXPORT bool ExeLineVolZmapInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRefType, INTDBLVECTOR& vInters) ; +EXE_EXPORT int ExeParPlanesSurfTmInters( const Point3d& ptOn, const Vector3d& vtN, const DBLVECTOR& vdDist, int nId, int nDestGrpId, int nRefType, double dToler, + int* pnGrpCount) ; EXE_EXPORT int ExePlaneVolZmapInters( const Point3d& ptOn, const Vector3d& vtN, int nId, int nDestGrpId, int nRefType, int* pnCount) ; +EXE_EXPORT int ExeCurveCurveInters( const int nId1, const int nId2, const int nDestGrpId, + int* pnPntCount, int* pnCrvCount) ; +EXE_EXPORT int ExeSurfTmSurfTmInters( int nId1, int nId2, int nDestGrpId, double dToler, + int* pnPntCount, int* pnCrvCount, int* pnSrfCount) ; // Collision Detection EXE_EXPORT int ExeCDeBoxSolid( const Frame3d& frBox, const Vector3d& vtDiag, int nSolidId, double dSafeDist, int nRefType) ; From dc7a6fa31ff00ad7439e98c20d1a76398b156b1c Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 25 Jan 2024 18:17:54 +0100 Subject: [PATCH 47/51] Include : - aggiornamento prototipi. --- EInAPI.h | 1 + EXeExecutor.h | 1 + SELkKeyProc.h | 7 +++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/EInAPI.h b/EInAPI.h index 4705e0d..3476840 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -57,6 +57,7 @@ EIN_EXPORT BOOL __stdcall EgtSetNetHwKey( BOOL bNetHwKey) ; EIN_EXPORT BOOL __stdcall EgtGetKeyLevel( int nProd, int nVer, int nLev, int* pnKLev) ; EIN_EXPORT BOOL __stdcall EgtGetKeyOptions( int nProd, int nVer, int nLev, unsigned int* pnOpt2) ; EIN_EXPORT BOOL __stdcall EgtGetKeyLeftDays( int* pnLeftDays) ; +EIN_EXPORT BOOL __stdcall EgtGetKeyAssLeftDays( int* pnAssLeftDays) ; EIN_EXPORT BOOL __stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays) ; EIN_EXPORT BOOL __stdcall EgtGetOsInfo( wchar_t*& wsOs) ; EIN_EXPORT BOOL __stdcall EgtGetCpuInfo( wchar_t*& wsCpu) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index a06c890..c22eee9 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -62,6 +62,7 @@ EXE_EXPORT bool ExeSetNetHwKey( bool bNetHwKey, int nUserId = 0, const std::stri EXE_EXPORT bool ExeGetKeyLevel( int nProd, int nVer, int nLev, int& nKLev) ; EXE_EXPORT bool ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& nOpt2) ; EXE_EXPORT bool ExeGetKeyLeftDays( int& nLeftDays) ; +EXE_EXPORT bool ExeGetKeyAssLeftDays( int& nAssLeftDays) ; EXE_EXPORT bool ExeGetKeyOptLeftDays( int& nOptLeftDays) ; EXE_EXPORT bool ExeGetOsInfo( std::string& sOs) ; EXE_EXPORT bool ExeGetCpuInfo( std::string& sCpu) ; diff --git a/SELkKeyProc.h b/SELkKeyProc.h index 8a74a06..673d6ac 100644 --- a/SELkKeyProc.h +++ b/SELkKeyProc.h @@ -1,13 +1,14 @@ //---------------------------------------------------------------------------- -// EgalTech 2014-2015 +// EgalTech 2014-2024 //---------------------------------------------------------------------------- -// File : SELkKeyProc.h Data : 27.07.15 Versione : 1.6g1 +// File : SELkKeyProc.h Data : 25.01.24 Versione : 2.6a1 // Contenuto : Dichiarazione funzioni per la gestione della chiave. // // // // Modifiche : 10.09.14 DS Creazione modulo. // 27.02.15 DS Agg. gestione chiavi hardware OxySec. +// 25.01.24 DS Agg. GetKeyLevelEx per scadenza assistenza. // //---------------------------------------------------------------------------- @@ -25,6 +26,8 @@ bool ReadKey( const std::string& sKey, const std::string& sScramKey, int VerifyKey( const std::string& sKey, int nProd, int nVer, int nLev) ; int GetKeyLevel( const std::string& sKey, int nProd, int nVer, int nLev, int& nKLev, int& nKExpDays) ; +int GetKeyLevelEx( const std::string& sKey, int nProd, int nVer, int nLev, + int& nKLev, int& nKExpDays, int& nKAssExpDays) ; int GetKeyOptions( const std::string& sKey, int nProd, int nVer, int nLev, unsigned int& nKOpt1, unsigned int& nKOpt2, int& nKOptExpDays) ; int GetCurrDay( void) ; From f7a3a6f00f47d021a61cb0c88c597dd34d7b2197 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 29 Jan 2024 09:14:36 +0100 Subject: [PATCH 48/51] Include : - tolto Voronoi e aggiustamenti conseguenti. --- EGkCurve.h | 3 -- EGkCurveAux.h | 5 ++- EGkSurfFlatRegion.h | 12 ++++-- EGkVoronoi.h | 93 --------------------------------------------- 4 files changed, 12 insertions(+), 101 deletions(-) delete mode 100644 EGkVoronoi.h diff --git a/EGkCurve.h b/EGkCurve.h index 446f348..7d20f16 100644 --- a/EGkCurve.h +++ b/EGkCurve.h @@ -19,8 +19,6 @@ #include "/EgtDev/Include/EGkPlane3d.h" #include "/EgtDev/Include/EgtPointerOwner.h" -class Voronoi ; - //---------------------------------------------------------------------------- class __declspec( novtable) ICurve : public IGeoObj { @@ -94,7 +92,6 @@ class __declspec( novtable) ICurve : public IGeoObj virtual bool TrimEndAtLen( double dLenTrim) = 0 ; virtual bool ExtendStartByLen( double dLenExt) = 0 ; virtual bool ExtendEndByLen( double dLenExt) = 0 ; - virtual Voronoi* GetVoronoiObject( void) const = 0 ; } ; //---------------------------------------------------------------------------- diff --git a/EGkCurveAux.h b/EGkCurveAux.h index e0fef54..05221eb 100644 --- a/EGkCurveAux.h +++ b/EGkCurveAux.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2014-2014 //---------------------------------------------------------------------------- -// File : EGkCurveAux.h Data : 23.05.14 Versione : 1.5e9 +// File : EGkCurveAux.h Data : 28.01.24 Versione : 2.6a2 // Contenuto : Dichiarazione funzioni ausiliarie per ICurve. // // @@ -86,6 +86,9 @@ EGK_EXPORT bool CalcCurveVoronoiDiagram( const ICurve& crvC, ICURVEPOVECTOR& vCr //---------------------------------------------------------------------------- //! Calcolo del Medial Axis della curva (sottoinsieme del diagramma di Voronoi), nei TempParam dei risultati la distanza +const int WMAT_BOTHSIDES = 0 ; +const int WMAT_LEFT = 1 ; +const int WMAT_RIGHT = 2 ; EGK_EXPORT bool CalcCurveMedialAxis( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, int nSide) ; //---------------------------------------------------------------------------- diff --git a/EGkSurfFlatRegion.h b/EGkSurfFlatRegion.h index f9f6531..d975ded 100644 --- a/EGkSurfFlatRegion.h +++ b/EGkSurfFlatRegion.h @@ -17,7 +17,6 @@ #include "/EgtDev/Include/EGkIntersCurves.h" #include "/EgtDev/Include/EgkCurveComposite.h" #include "/EgtDev/Include/EgtPointerOwner.h" -#include "/EgtDev/Include/EGkVoronoi.h" class ISurfTriMesh ; @@ -50,9 +49,8 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf virtual bool GetChunkCentroid( int nChunk, Point3d& ptCen) const ; virtual bool GetCurveClassification( const ICurve& Crv, double dLenMin, CRVCVECTOR& ccClass) const = 0 ; virtual int GetChunkSimpleClassification( int nChunk, const ISurfFlatRegion& Other, int nOthChunk) const ; // compare only outsides - virtual Voronoi* GetVoronoiObject( void) const = 0 ; - virtual bool CalcVoronoiDiagram( ICURVEPOVECTOR& vCrvs, int nBound = VORONOI_STD_BOUND) const = 0 ; - virtual bool CalcMedialAxis( ICURVEPOVECTOR& vCrvs, int nSide = Voronoi::WMAT_LEFT) const = 0 ; + virtual bool CalcVoronoiDiagram( ICURVEPOVECTOR& vCrvs, int nBound = 3) const = 0 ; + virtual bool CalcMedialAxis( ICURVEPOVECTOR& vCrvs, int nSide = 1) const = 0 ; } ; //----------------------------------------------------------------------------- @@ -86,3 +84,9 @@ const int REGC_IN2 = 2 ; //!< La seconda regione const int REGC_SAME = 3 ; //!< Le due regioni coincidono const int REGC_OUT = 4 ; //!< Le due regioni sono esterne const int REGC_INTERS = 5 ; //!< Le due regioni si intersecano + +//----------------------------------------------------------------------------- +// Costanti per zona calcolo medial axis della regione +const int WMAT_IN_OUT = 0 ; +const int WMAT_IN = 1 ; +const int WMAT_OUT = 2 ; diff --git a/EGkVoronoi.h b/EGkVoronoi.h deleted file mode 100644 index b32a29c..0000000 --- a/EGkVoronoi.h +++ /dev/null @@ -1,93 +0,0 @@ -//---------------------------------------------------------------------------- -// EgalTech 2015-2023 -//---------------------------------------------------------------------------- -// File : EGkVoronoi.h Data : 23.11.23 Versione : 2.5k5 -// Contenuto : Dichiarazione della classe Voronoi con libreria VRONI -// -// -// -// Modifiche : 23.11.23 SP Creazione modulo. - -// -//---------------------------------------------------------------------------- - -#pragma once - -#include "/EgtDev/Include/EGkFrame3d.h" -#include "/EgtDev/Include/EGkCurve.h" -#include "/EgtDev/Include/EGkCurveArc.h" -#include "/EgtDev/Include/EGkCurveBezier.h" -#include "/EgtDev/Include/EGkCurveComposite.h" -#include "/EgtDev/Include/EGkCurveLine.h" -#include "/EgtDev/Extern/vroni/Include/vroni_object.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 - -static const int VORONOI_STD_BOUND = 3 ; -static const double VRONI_OFFS_TOL = 1e-14 ; - -//-------------------------- Forward Definitions ------------------------------- -class ISurfFlatRegion ; - -//---------------------------------------------------------------------------- -class Voronoi -{ - public : - // costanti per il lato del medial axis - enum WMATSide { WMAT_LEFT = 0, - WMAT_RIGHT = 1, - WMAT_BOTHSIDES = 2} ; - public : - EGK_EXPORT Voronoi( void) - : m_vroni( nullptr), m_nBound( VORONOI_STD_BOUND), m_bVDComputed( false), m_bAllowAdd( true) {} ; - EGK_EXPORT Voronoi( const ICurve* pCrv, bool bAllowAdd) ; - EGK_EXPORT Voronoi( const ISurfFlatRegion* pSfr, bool bAllowAdd) ; - EGK_EXPORT ~Voronoi( void) ; - - public : - EGK_EXPORT bool AddCurve( const ICurve* pCrv) ; - EGK_EXPORT bool AddSurfFlatRegion( const ISurfFlatRegion* pSfr) ; - EGK_EXPORT ICurve* GetCurve( int nId) const ; - EGK_EXPORT int GetCurveCount( void) const - { return m_vpCrvs.size() ; } ; - - EGK_EXPORT bool CalcVoronoiDiagram( ICURVEPOVECTOR& vCrvs, int nBound = VORONOI_STD_BOUND) ; - EGK_EXPORT bool CalcOffset( ICURVEPOVECTOR& vOffs, double dOffs, int nType) ; - EGK_EXPORT bool CalcFatCurve( ICURVEPOVECTOR& vOffs, double dOffs, bool bSquareEnds, bool bSquareMids) ; - EGK_EXPORT bool CalcMedialAxis( ICURVEPOVECTOR& vCrvs, int nSide) ; - - private : - bool Clear( void) ; - bool IsValid( void) const - { return m_vroni != nullptr ; } ; - bool AddCurveToVroni( const ICurve * pCrv) ; - bool AddLineToVroni( const ICurveLine* pLine, int& nVroniCrv, int nLoopId, int nCrvId = 0, Point3d ptForcedEnd = P_INVALID) ; - bool AddArcToVroni( const ICurveArc* pArc, int& nVroniCrv, int nLoopId, int nCrvId = 0, Point3d ptForcedEnd = P_INVALID) ; - bool AddCompoToVroni( const ICurveComposite* pCompo, int& nCrv, int nLoopId) ; - bool AddBezierToVroni( const ICurveBezier* pBezier, int& nVroniCrv, int nLoopId) ; - - bool CalcVoronoi( int nBound = VORONOI_STD_BOUND) ; - bool CalcVroniOffset( ICRVCOMPOPLIST& vOffs, double dOffs, bool bRightOffs, bool bLeftOffs) ; - bool UpdateVoronoi( double dOffs) ; - bool VerifyCurvesValidityForOffset( void) ; - bool AdjustOpenOffsetCurve( ICurveComposite& pCompo, double dOffs) ; - bool AdjustOffsetStart( ICurveComposite& pCompo) ; - int GetOffsetCurveSide( const ICurveComposite& pOffs, int nCrv) ; - ICurve* GetBisectorCurve( int i) ; - - private : - vroniObject* m_vroni ; // oggetto base della libreria vroni - Frame3d m_Frame ; // frame in cui è espresso l'oggetto vroni - int m_nBound ; // bound associato al diagramma di Voronoi corrente - CICURVEPVECTOR m_vpCrvs ; // curve associate al Voronoi ( espresse rispetto a m_Frame) - BBox3d m_bBox ; // box degli oggetti associati al Voronoi - bool m_bVDComputed ; // indica se il diagramma di Voronoi è stato calcolato - bool m_bAllowAdd ; // indica se possibile aggiungere altre curve/superifici dopo aver creato l'oggetto Voronoi -} ; From d2f78740bb657a9e4cf512e65ee642dc187a91d3 Mon Sep 17 00:00:00 2001 From: SaraP Date: Mon, 29 Jan 2024 14:44:21 +0100 Subject: [PATCH 49/51] Include : - aggiornamento prototipi. --- EXeExecutor.h | 1 + 1 file changed, 1 insertion(+) diff --git a/EXeExecutor.h b/EXeExecutor.h index c22eee9..633161d 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -605,6 +605,7 @@ EXE_EXPORT bool ExeSurfFrAdd( int nId1, int nId2) ; EXE_EXPORT bool ExeSurfFrSubtract( int nId1, int nId2) ; EXE_EXPORT bool ExeSurfFrIntersect( int nId1, int nId2) ; EXE_EXPORT bool ExeSurfFrOffset( int nId, double dDist, int nType) ; +EXE_EXPORT bool ExeSurfFrOffsetAdv( int nId, double dDist, int nType, int& nNewId) ; EXE_EXPORT bool ExeSurfFrMoveSimpleNoCollision( int nId1, int nId2, const Vector3d& vtDir, double& dLen, int nRefType) ; EXE_EXPORT bool ExeSurfFrRotateSimpleNoCollision( int nId1, int nId2, const Point3d& ptCen, double& dAngDeg, int nRefType) ; EXE_EXPORT bool ExeSurfTmMoveVertex( int nId, int nVert, const Point3d& ptNewVert, int nRefType, bool bUpdate) ; From 65b7c14f62333ef6aebb389f57371317e72f4dd5 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 31 Jan 2024 09:41:58 +0100 Subject: [PATCH 50/51] Include : - aggiornamento prototipi. --- EGnStringUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EGnStringUtils.h b/EGnStringUtils.h index 8e51f5b..34002ac 100644 --- a/EGnStringUtils.h +++ b/EGnStringUtils.h @@ -245,7 +245,7 @@ const std::string ToString( const int (&nVal)[size], int nPrec = 1) inline const std::string ToString( bool bVal) { return std::string( ( bVal ? "1" : "0")) ; } -EGN_EXPORT const std::string ToString( double dVal, int nPrec = 6) ; +EGN_EXPORT const std::string ToString( double dVal, int nPrec = 6, int* pnErr = nullptr) ; template const std::string ToString( const double (&dVal)[size], int nPrec = 6) { std::string sDest ; sDest.reserve( 14 * size) ; From 09409e92e849becd7cba9277fd21413cad664974 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 2 Feb 2024 15:58:26 +0100 Subject: [PATCH 51/51] Include : - aggiornamento mensile codici protezione librerie. --- EgtKeyCodes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index 4cc50ee..9278809 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -25,7 +25,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2601 ; +const int KEY_BASELIB_VER = 2602 ; const int KEY_BASELIB_LEV = 1 ; //----------------------------------------------------------------------------