From 53a5e52d472f255ad2b35796d7ed220ce4d08434 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 3 Aug 2023 11:17:50 +0200 Subject: [PATCH 01/64] 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 6962aeced4615085ab17154dd0457aba281909c3 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 23 Aug 2023 16:45:11 +0200 Subject: [PATCH 02/64] Include : - aggiunto P_INVALID Pointt3d non definito (IsValid ritorna false) - aggiunto V_INVALID Vector3d non definito (IsValid ritorna false) - aggiunte raccolte di puntatori a ICurveLine. --- EGkCurveLine.h | 7 +++++++ EGkPoint3d.h | 7 +++++-- EGkVector3d.h | 7 +++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/EGkCurveLine.h b/EGkCurveLine.h index 8ab95f0..380c10a 100644 --- a/EGkCurveLine.h +++ b/EGkCurveLine.h @@ -45,3 +45,10 @@ inline ICurveLine* GetCurveLine( IGeoObj* pGObj) { if ( pGObj == nullptr || pGObj->GetType() != CRV_LINE) return nullptr ; return (static_cast(pGObj)) ; } + +//---------------------------------------------------------------------------- +// Raccolte di puntatori a ICurveLine +typedef std::vector CICRVLINEVECTOR ; // vettore di puntatori a const ICurveLine +typedef std::vector ICRVLINEPVECTOR ; // vettore di puntatori a ICurveLine +typedef std::list ICRVLINEPLIST ; // lista di puntatori a ICurveLine +typedef std::vector> ICRVLINEPOVECTOR ; // vettore di puntatori esclusivi a ICurveLine diff --git a/EGkPoint3d.h b/EGkPoint3d.h index 3d23f4c..eb82b46 100644 --- a/EGkPoint3d.h +++ b/EGkPoint3d.h @@ -1,12 +1,13 @@ //---------------------------------------------------------------------------- -// EgalTech 2013-2022 +// EgalTech 2013-2023 //---------------------------------------------------------------------------- -// File : EGkPoint3d.h Data : 22.08.224 Versione : 2.4h2 +// File : EGkPoint3d.h Data : 23.08.23 Versione : 2.5h2 // Contenuto : Dichiarazione della classe Punto 3d. // // // // Modifiche : 30.12.12 DS Creazione modulo. +// 23.08.23 DS Aggiunto P_INVALID. // // //---------------------------------------------------------------------------- @@ -99,6 +100,8 @@ class EGK_EXPORT Point3d //---------------------------------------------------------------------------- // Punti notevoli //---------------------------------------------------------------------------- +//! Punto non valido +const Point3d P_INVALID( NAN, NAN, NAN) ; //! Punto origine const Point3d ORIG( 0, 0, 0) ; diff --git a/EGkVector3d.h b/EGkVector3d.h index a4f0f69..2dc1764 100644 --- a/EGkVector3d.h +++ b/EGkVector3d.h @@ -1,13 +1,14 @@ //---------------------------------------------------------------------------- -// EgalTech 2013-2022 +// EgalTech 2013-2023 //---------------------------------------------------------------------------- -// File : EGkVector3d.h Data : 27.08.22 Versione : 2.4h2 +// File : EGkVector3d.h Data : 23.08.23 Versione : 2.5h2 // Contenuto : Dichiarazione della classe Vettore 3d. // // // // Modifiche : 31.12.13 DS Creazione modulo. // 14.12.19 DS Aggiunti confronti con Epsilon. +// 23.08.23 DS Aggiunto V_INVALID. // //---------------------------------------------------------------------------- @@ -170,6 +171,8 @@ class EGK_EXPORT Vector3d //---------------------------------------------------------------------------- // Vettori notevoli //---------------------------------------------------------------------------- +//! Vettore non valido +const Vector3d V_INVALID( NAN, NAN, NAN) ; //! Vettore nullo const Vector3d V_NULL( 0, 0, 0) ; //! Versore asse X From 921f764bb6f56bd87b7fd1ae2b344907dcb15015 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sun, 27 Aug 2023 18:28:40 +0200 Subject: [PATCH 03/64] Include : - aggiornamento prototipi. --- EInAPI.h | 1 + EMkMachMgr.h | 6 ++++-- EXeExecutor.h | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/EInAPI.h b/EInAPI.h index 10b24fb..a8a0b25 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -716,6 +716,7 @@ EIN_EXPORT int __stdcall EgtGetLastMachGroup( void) ; EIN_EXPORT int __stdcall EgtGetPrevMachGroup( int nId) ; EIN_EXPORT BOOL __stdcall EgtGetMachGroupNewName( const wchar_t* wsName, wchar_t*& wsNewName) ; 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 EgtGetMachGroupName( int nMGroupId, wchar_t*& wsName) ; EIN_EXPORT BOOL __stdcall EgtGetMachGroupMachineName( int nMGroupId, wchar_t*& wsMachineName) ; diff --git a/EMkMachMgr.h b/EMkMachMgr.h index aa95c54..a9c3de7 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2015-2022 +// EgalTech 2015-2023 //---------------------------------------------------------------------------- -// File : EMkMachMgr.h Data : 21.09.22 Versione : 2.4i4 +// File : EMkMachMgr.h Data : 25.08.23 Versione : 2.5h3 // Contenuto : Dichiarazione della interfaccia IMachMgr. // // @@ -13,6 +13,7 @@ // 10.11.20 DS Portate in interfaccia funzioni di calcolo con vettori di angoli. // 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. // //---------------------------------------------------------------------------- @@ -57,6 +58,7 @@ class __declspec( novtable) IMachMgr virtual int GetPrevMachGroup( int nId) const = 0 ; virtual bool GetMachGroupNewName( std::string& sName) const = 0 ; 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 std::string GetMachGroupName( int nId) const = 0 ; virtual std::string GetMachGroupMachineName( int nId) const = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index e997a69..f15a448 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -899,6 +899,7 @@ EXE_EXPORT int ExeGetLastMachGroup( void) ; EXE_EXPORT int ExeGetPrevMachGroup( int nId) ; 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 ExeGetMachGroupName( int nId, std::string& sName) ; EXE_EXPORT bool ExeGetMachGroupMachineName( int nId, std::string& sMachineName) ; From 76d9ed12de2001a02357b28d6b320e4441b4cda1 Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Tue, 29 Aug 2023 09:58:32 +0200 Subject: [PATCH 04/64] 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 598d06443e20b7d967cfd265465b3ffe34b27f1e Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 11 Sep 2023 10:34:25 +0200 Subject: [PATCH 05/64] Include : - aggiornamento e nuovi prototipi. --- EGkDistPointSurfTm.h | 2 +- EGkGeoCollection.h | 18 +++++++++++------ EGkIntersPlaneSurfTm.h | 16 +++++++-------- EGkProjectCurveSurfTm.h | 43 +++++++++++++++++++++++++++++++++++++++++ EMkMachiningConst.h | 8 +++++--- EMkMachiningGeoConst.h | 1 + EMkOperationConst.h | 11 +++++++---- EXeExecutor.h | 1 + EgtKeyCodes.h | 2 +- 9 files changed, 79 insertions(+), 23 deletions(-) create mode 100644 EGkProjectCurveSurfTm.h diff --git a/EGkDistPointSurfTm.h b/EGkDistPointSurfTm.h index 49b5d46..c8ec942 100644 --- a/EGkDistPointSurfTm.h +++ b/EGkDistPointSurfTm.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2018-2023 //---------------------------------------------------------------------------- -// File : EGkDistPointTria.h Data : 06.07.23 Versione : 2.5g1 +// File : EGkDistPointSurfTm.h Data : 06.07.23 Versione : 2.5g1 // Contenuto : Dichiarazione della classe distanza Punto da Trimesh. // // diff --git a/EGkGeoCollection.h b/EGkGeoCollection.h index a62a5c6..0e5c428 100644 --- a/EGkGeoCollection.h +++ b/EGkGeoCollection.h @@ -32,15 +32,15 @@ typedef std::list PNTILIST ; // lista di coppie punto, intero //---------------------------------------------------------------------------- // Raccolte di coppie Point3d,dU -typedef std::pair POINTU ; // coppia punto, parametro (o altro) -typedef std::vector PNTUVECTOR ; // vettore di coppie punto, parametro -typedef std::list PNTULIST ; // lista di coppie punto, parametro +typedef std::pair POINTU ; // coppia punto, parametro (o altro) +typedef std::vector PNTUVECTOR ; // vettore di coppie punto, parametro +typedef std::list PNTULIST ; // lista di coppie punto, parametro //---------------------------------------------------------------------------- // Raccolte di coppie Point3d,Point3d -typedef std::pair BIPOINT ; // coppia punto1, punto2 -typedef std::vector BIPNTVECTOR ; // vettore di coppie punto1, punto2 -typedef std::list BIPNTLIST ; // lista di coppie punto1, punto2 +typedef std::pair BIPOINT ; // coppia punto1, punto2 +typedef std::vector BIPNTVECTOR ; // vettore di coppie punto1, punto2 +typedef std::list BIPNTLIST ; // lista di coppie punto1, punto2 //---------------------------------------------------------------------------- // Raccolte di Punti di curva con loro geometria differenziale @@ -57,3 +57,9 @@ typedef std::list VCT3DLIST ; // lista di vettori 3d typedef std::vector BOXVECTOR ; // vettore di bounding box 3d typedef std::list BOXLIST ; // lista di bounding box 3d typedef std::vector> BOXIVECTOR ; // vettore di bounding box 3d e Id + +//---------------------------------------------------------------------------- +// Raccolte di coppie Point3d,Vector3d +typedef std::pair PNTVECT ; // coppia punto, vettore +typedef std::vector PNTVECTVECTOR ; // vettore di coppie punto, vettore +typedef std::list PNTVECTLIST ; // lista di coppie punto, vettore diff --git a/EGkIntersPlaneSurfTm.h b/EGkIntersPlaneSurfTm.h index 2d5ef79..a517f9f 100644 --- a/EGkIntersPlaneSurfTm.h +++ b/EGkIntersPlaneSurfTm.h @@ -32,13 +32,13 @@ EGK_EXPORT bool IntersPlaneSurfTm( const Plane3d& plPlane, const ISurfTriMesh& S //----------------------------------------------------------------------------- class IntersParPlanesSurfTm { -public : - EGK_EXPORT IntersParPlanesSurfTm( const Frame3d& frPlanes, const ISurfTriMesh& Stm) ; - EGK_EXPORT bool GetInters( double dDist, PNTVECTOR& vPnt, BIPNTVECTOR& vBpt, TRIA3DVECTOR& vTria) const ; + public : + EGK_EXPORT IntersParPlanesSurfTm( const Frame3d& frPlanes, const ISurfTriMesh& Stm) ; + EGK_EXPORT bool GetInters( double dDist, PNTVECTOR& vPnt, BIPNTVECTOR& vBpt, TRIA3DVECTOR& vTria) const ; -private : - bool m_bOk ; - const Frame3d m_frPlanes ; - const ISurfTriMesh* m_pSTm ; - HashGrids1d m_HGrids ; + private : + bool m_bOk ; + const Frame3d m_frPlanes ; + const ISurfTriMesh* m_pSTm ; + HashGrids1d m_HGrids ; } ; \ No newline at end of file diff --git a/EGkProjectCurveSurfTm.h b/EGkProjectCurveSurfTm.h new file mode 100644 index 0000000..1eb0038 --- /dev/null +++ b/EGkProjectCurveSurfTm.h @@ -0,0 +1,43 @@ +//---------------------------------------------------------------------------- +// EgalTech 2023-2023 +//---------------------------------------------------------------------------- +// File : EGkProjectCurveSurfTm.h Data : 31.08.23 Versione : 2.5h3 +// Contenuto : Dichiarazione funzioni proiezione curve su superficie Trimesh. +// +// +// +// Modifiche : 31.08.23 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkCurve.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 + +//---------------------------------------------------------------------------- +// Definizione di Punto 5assi e sue raccolte +struct Point5ax { + Point3d ptP ; + Vector3d vtDir ; + double dPar ; + int nFlag ; + Point5ax( void) : ptP(), vtDir(), dPar(), nFlag() {} ; + Point5ax( const Point3d& ptBase, const Vector3d& vtTool, double dU, int nData) + : ptP( ptBase), vtDir( vtTool), dPar( dU), nFlag( nData) {} ; +} ; +typedef std::vector PNT5AXVECTOR ; // vettore di Punti 5assi + +//---------------------------------------------------------------------------- +// Proiezione di una curva su una superficie TriMesh lungo la direzione data. +EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const Vector3d& vtDir, double dLinTol, + PNT5AXVECTOR& vPt5ax) ; diff --git a/EMkMachiningConst.h b/EMkMachiningConst.h index 5d70b5b..d65834a 100644 --- a/EMkMachiningConst.h +++ b/EMkMachiningConst.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2015-2022 +// EgalTech 2015-2023 //---------------------------------------------------------------------------- -// File : EmkMachiningConst.h Data : 04.02.22 Versione : 2.4b1 +// File : EmkMachiningConst.h Data : 06.09.23 Versione : 2.5i1 // Contenuto : Costanti delle lavorazioni. // // @@ -12,6 +12,7 @@ // 03.06.20 DS Agg. MPA_TABMIN e MPA_TABMAX. // 09.11.20 DS Agg. MPA_SIDEANGFEED e MPA_STEPLAST. // 04.02.22 DS Agg. MPA_EPICYCLESRAD e MPA_EPICYCLESDIST. +// 06.09.23 DS Agg. 5AxMachining. // //---------------------------------------------------------------------------- @@ -62,7 +63,8 @@ enum MachiningType { MT_CHISELING = OPER_CHISELING, MT_SURFROUGHING = OPER_SURFROUGHING, MT_SURFFINISHING = OPER_SURFFINISHING, - MT_WATERJETTING = OPER_WATERJETTING + MT_WATERJETTING = OPER_WATERJETTING, + MT_5AXMACHINING = OPER_5AXMACHINING } ; //---------------------------------------------------------------------------- diff --git a/EMkMachiningGeoConst.h b/EMkMachiningGeoConst.h index f9e80c1..8fa2f8b 100644 --- a/EMkMachiningGeoConst.h +++ b/EMkMachiningGeoConst.h @@ -33,6 +33,7 @@ static std::string MCH_TABS = "TABS" ; static std::string MCH_PV = "PV" ; static std::string MCH_ST = "ST" ; static std::string MCH_CL = "CL" ; +static std::string MCH_DBL = "DBL" ; static std::string MCH_PATH = "P" ; // Nomi di entità CL speciali static std::string MCH_CL_CLIMB = "CLIMB" ; diff --git a/EMkOperationConst.h b/EMkOperationConst.h index 8a9f649..56b379e 100644 --- a/EMkOperationConst.h +++ b/EMkOperationConst.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2015-2019 +// EgalTech 2015-2023 //---------------------------------------------------------------------------- -// File : EmkOperationConst.h Data : 08.07.19 Versione : 2.1g2 +// File : EmkOperationConst.h Data : 06.09.23 Versione : 2.5i1 // Contenuto : Costanti delle operazioni. // // @@ -12,6 +12,7 @@ // 03.02.17 DS Agg. Chiseling. // 25.05.19 DS Agg. SurfRoughing e SurfFinishing. // 08.07.19 DS Agg. WaterJetting. +// 06.09.23 DS Agg. 5AxMachining. // //---------------------------------------------------------------------------- @@ -31,7 +32,8 @@ enum OperType { OPER_NULL = 0, // nulla OPER_CHISELING = 0x020000, // scalpellatura OPER_SURFROUGHING = 0x040000, // sgrossatura superficie OPER_SURFFINISHING = 0x080000, // finitura superficie - OPER_WATERJETTING = 0x100000} ; // taglio water jet + OPER_WATERJETTING = 0x100000, // taglio water jet + OPER_5AXMACHINING = 0x200000} ; // lavorazione 5 assi // Controllo tipo valido bool inline IsValidDispositionType( int nType) { @@ -50,5 +52,6 @@ bool inline IsValidMachiningType( int nType) nType == OPER_CHISELING || nType == OPER_SURFROUGHING || nType == OPER_SURFFINISHING || - nType == OPER_WATERJETTING ) ; + nType == OPER_WATERJETTING || + nType == OPER_5AXMACHINING) ; } diff --git a/EXeExecutor.h b/EXeExecutor.h index f15a448..1341b21 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -581,6 +581,7 @@ EXE_EXPORT bool ExeMergeCurvesInCurveCompo( int nId, double dLinTol, bool bStart 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) ; // GeomDb Surf Modify EXE_EXPORT bool ExeInvertSurface( const INTVECTOR& vIds) ; diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index b19d875..704d327 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -24,7 +24,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2508 ; +const int KEY_BASELIB_VER = 2509 ; const int KEY_BASELIB_LEV = 1 ; //---------------------------------------------------------------------------- From 773f812bb8c503f1672f665064e6b0ddeb6e125a Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 12 Sep 2023 16:00:58 +0200 Subject: [PATCH 06/64] Include : - aggiornamento prototipi. --- EGkVolZmap.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/EGkVolZmap.h b/EGkVolZmap.h index f63d7b4..f0186e4 100644 --- a/EGkVolZmap.h +++ b/EGkVolZmap.h @@ -1,12 +1,13 @@ //---------------------------------------------------------------------------- -// EgalTech 2015-2020 +// EgalTech 2015-2023 //---------------------------------------------------------------------------- -// File : EGkVolZmap.h Data : 12.05.19 Versione : 2.2k1 +// File : EGkVolZmap.h Data : 12.09.23 Versione : 2.5i1 // Contenuto : Dichiarazione della interfaccia IVolZmap. // // // // Modifiche : 22.01.15 DS Creazione modulo. +// 12.09.23 DS Aggiunto metodo IsTriDexel. // // //---------------------------------------------------------------------------- @@ -60,6 +61,7 @@ class __declspec( novtable) IVolZmap : public IGeoObj virtual bool GetBlockTriangles( int nBlock, TRIA3DEXVECTOR& vTria) const = 0 ; virtual bool GetEdges( ICURVEPOVECTOR& vpCurve) const = 0 ; virtual bool GetVolume( double& dVol) const = 0 ; + virtual bool IsTriDexel( void) const = 0 ; virtual bool GetDexelLines( int nDir, int nPos1, int nPos2, POLYLINELIST& lstPL) const = 0 ; virtual int GetResolution( void) const = 0 ; virtual bool ChangeResolution( int nDexvoxRatio) = 0 ; From 0a0f0daaff3ced361b7be10d092e74c3fc2e2e46 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 18 Sep 2023 08:15:38 +0200 Subject: [PATCH 07/64] Include : - aggiornamento prototipi. --- EXeExecutor.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/EXeExecutor.h b/EXeExecutor.h index 1341b21..e05e505 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -333,6 +333,8 @@ EXE_EXPORT int ExeCreateSurfTmCone( int nParentId, const Point3d& ptOrig, const double dRad, double dHeight, double dLinTol, int nRefType) ; EXE_EXPORT int ExeCreateSurfTmSphere( int nParentId, const Point3d& ptOrig, double dRad, double dLinTol, int nRefType) ; +EXE_EXPORT int ExeCreateSurfTmTriangle( int nParentId, const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptP3, int nRefType) ; +EXE_EXPORT int ExeCreateSurfTmRectangle( int nParentId, const Point3d& ptO, const Point3d& ptL, const Point3d& ptT, int nRefType) ; EXE_EXPORT int ExeCreateSurfTmByFlatContour( int nParentId, int nCrvId, double dLinTol) ; EXE_EXPORT int ExeCreateSurfTmByRegion( int nParentId, const INTVECTOR& vCrvIds, double dLinTol) ; EXE_EXPORT int ExeCreateSurfTmByExtrusion( int nParentId, const INTVECTOR& vCrvIds, const Vector3d& vtExtr, From 2425304b2eb69bb8e3192f4ecd1b42469dc0761b Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Thu, 21 Sep 2023 14:44:44 +0200 Subject: [PATCH 08/64] 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 09/64] 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 10/64] 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 11/64] 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 12/64] 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 13/64] 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 14/64] 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 15/64] 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 16/64] =?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 17/64] 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 18/64] 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 19/64] 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 20/64] 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 21/64] 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 22/64] 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 23/64] 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 24/64] 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 25/64] 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 26/64] 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 27/64] 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 28/64] 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 29/64] =?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 30/64] 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 31/64] 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 32/64] 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 33/64] 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 34/64] 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 35/64] 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 36/64] 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 37/64] 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 38/64] 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 39/64] 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 40/64] 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 41/64] =?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 42/64] 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 43/64] =?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 44/64] 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 45/64] 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 46/64] 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 47/64] 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 48/64] 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 49/64] 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 50/64] 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 51/64] 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 52/64] 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 53/64] 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 54/64] 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 55/64] 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 ; //---------------------------------------------------------------------------- From fd9ad519782f6defc65e6658163ce4a38bb73817 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Thu, 8 Feb 2024 13:04:40 +0100 Subject: [PATCH 56/64] Include : - aggiunto algoritmo Dijkstra. --- ENkDijkstra.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 ENkDijkstra.h diff --git a/ENkDijkstra.h b/ENkDijkstra.h new file mode 100644 index 0000000..5eea97e --- /dev/null +++ b/ENkDijkstra.h @@ -0,0 +1,42 @@ +//---------------------------------------------------------------------------- +// EgalTech 2024-2024 +//---------------------------------------------------------------------------- +// File : ENkDijkstra.h Data : 08.02.24 Versione : 2.6b1 +// Contenuto : Classe per calcolo del percorso a peso minimo su un grafo orientato. +// +// +// Modifiche : 02.02.2024 RE Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EgtNumCollection.h" + +//----------------------- Macro per import/export ---------------------------- +#undef ENK_EXPORT +#if defined( I_AM_ENK) // da definirsi solo nella DLL + #define ENK_EXPORT __declspec( dllexport) +#else + #define ENK_EXPORT __declspec( dllimport) +#endif + +//---------------------------------------------------------------------------- +class __declspec( novtable) IDijkstra +{ + public : + virtual ~IDijkstra( void) {} + virtual bool SetGraph( DBLMATRIX AdjMatrix, int nDestInd = -1) = 0 ; + virtual bool GetPath( INTVECTOR& vNodePath) = 0 ; + + public : + double DIST_NO_ADJ = 1073741823U ; +} ; + +//----------------------------------------------------------------------------- +ENK_EXPORT IDijkstra* CreateDijkstra( void) ; + +//----------------------------------------------------------------------------- +// costante per arco non presente +const double DIST_NO_ADJ = 1073741823U ; From 2ded5d72ed40e455fef44fe6065f73188ee97634 Mon Sep 17 00:00:00 2001 From: Riccardo Elitropi Date: Tue, 13 Feb 2024 12:28:02 +0100 Subject: [PATCH 57/64] Include : - piccola modifica. --- ENkDijkstra.h | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ENkDijkstra.h b/ENkDijkstra.h index 5eea97e..2118f89 100644 --- a/ENkDijkstra.h +++ b/ENkDijkstra.h @@ -29,9 +29,6 @@ class __declspec( novtable) IDijkstra virtual ~IDijkstra( void) {} virtual bool SetGraph( DBLMATRIX AdjMatrix, int nDestInd = -1) = 0 ; virtual bool GetPath( INTVECTOR& vNodePath) = 0 ; - - public : - double DIST_NO_ADJ = 1073741823U ; } ; //----------------------------------------------------------------------------- @@ -39,4 +36,4 @@ ENK_EXPORT IDijkstra* CreateDijkstra( void) ; //----------------------------------------------------------------------------- // costante per arco non presente -const double DIST_NO_ADJ = 1073741823U ; +const double WEIGHT_NO_ADJ = 1073741823U ; From 447719df31e1738809fa7c69164d172a3e560687 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 13 Feb 2024 14:32:46 +0100 Subject: [PATCH 58/64] Include : - aggiornamento prototipi. --- EGkProjectCurveSurfTm.h | 4 ++-- EXeExecutor.h | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/EGkProjectCurveSurfTm.h b/EGkProjectCurveSurfTm.h index 1eb0038..2d2320b 100644 --- a/EGkProjectCurveSurfTm.h +++ b/EGkProjectCurveSurfTm.h @@ -39,5 +39,5 @@ typedef std::vector PNT5AXVECTOR ; // vettore di Punti 5assi //---------------------------------------------------------------------------- // Proiezione di una curva su una superficie TriMesh lungo la direzione data. -EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const Vector3d& vtDir, double dLinTol, - PNT5AXVECTOR& vPt5ax) ; +EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const Vector3d& vtDir, + double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 633161d..27d24a2 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -540,7 +540,7 @@ 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, double dLinTol = 10 * EPS_SMALL) ; EXE_EXPORT int ExeCurveMedialAxis( int nId) ; -EXE_EXPORT bool ExeApproxCurve( int nId, int nApprType, double dLinTol) ; +EXE_EXPORT bool ExeApproxCurve( int nId, int nApprType, double dLinTol, double dMaxSegmLen = INFINITO) ; EXE_EXPORT bool ExeProjectCurveOnPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, int nRefType) ; EXE_EXPORT bool ExeChangeClosedCurveStart( int nId, double dU) ; EXE_EXPORT bool ExeChangeClosedCurveStartPoint( int nId, const Point3d& ptP, int nRefType) ; @@ -592,7 +592,8 @@ EXE_EXPORT bool ExeMergeCurvesInCurveCompo( int nId, double dLinTol, bool bStart 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 ExeProjectCurveOnSurfTm( int nCurveId, int nSurfTmId, const Vector3d& vtDir, int nDestGrpId, + double dLinTol, double dMaxSegmLen, int nRefType) ; 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) ; From 98bcfa22309f1898ccfa5a2325a46ab060bad569 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 16 Feb 2024 08:41:32 +0100 Subject: [PATCH 59/64] Include : - aggiornamento prototipi. --- EGkCDeBoxClosedSurfTm.h | 9 ++++++++- EGkCDeClosedSurfTmClosedSurfTm.h | 10 ++++++---- EGkCDeConeFrustumClosedSurfTm.h | 15 +++++++++------ EGkCDeConvexTorusClosedSurfTm.h | 9 ++++++--- EGkCDeCylClosedSurfTm.h | 9 ++++++++- EGkCDeRectPrismoidClosedSurfTm.h | 6 +++++- EGkCDeSpheClosedSurfTm.h | 6 +++++- EGkVolZmap.h | 22 +++++++++++----------- 8 files changed, 58 insertions(+), 28 deletions(-) diff --git a/EGkCDeBoxClosedSurfTm.h b/EGkCDeBoxClosedSurfTm.h index 5778093..733bd01 100644 --- a/EGkCDeBoxClosedSurfTm.h +++ b/EGkCDeBoxClosedSurfTm.h @@ -24,4 +24,11 @@ #endif //---------------------------------------------------------------------------- -EGK_EXPORT bool CDeBoxClosedSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, const ISurfTriMesh& Stm) ; +// Il sistema di riferimento è allineato con il box e ha origine in un suo vertice. +// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL. +// Il sistema di riferimento del box è riferito a quello della superficie. +// La funzione restituisce : +// - true in caso di collisione o inconsistenza dei parametri di input +// - false in caso di assenza di collisione. +//---------------------------------------------------------------------------- +EGK_EXPORT bool CDeBoxClosedSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, const ISurfTriMesh& Stm, double dSafeDist) ; diff --git a/EGkCDeClosedSurfTmClosedSurfTm.h b/EGkCDeClosedSurfTmClosedSurfTm.h index f84a1fe..142bdec 100644 --- a/EGkCDeClosedSurfTmClosedSurfTm.h +++ b/EGkCDeClosedSurfTmClosedSurfTm.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2020-2023 +// EgalTech 2020-2024 //---------------------------------------------------------------------------- -// File : EGkCDeClosedSurfTmClosedSurfTm.h Data : 14.06.23 Versione : 2.5f3 +// File : EGkCDeClosedSurfTmClosedSurfTm.h Data : 15.02.24 Versione : 2.6b2 // Contenuto : Dichiarazione funzione verifica collisione tra // SurfTm e SurfTm. // @@ -23,8 +23,10 @@ #endif //---------------------------------------------------------------------------- -// La funzione restituisce true in caso di collisone, false in caso di assenza -// di collisione o inconsistenza dei parametri di input. // Le due superfici devono essere espresse nel medesimo sistema di riferimento. // La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL. +// La funzione restituisce : +// - true in caso di collisione o inconsistenza dei parametri di input +// - false in caso di assenza di collisione. +//---------------------------------------------------------------------------- EGK_EXPORT bool CDeClosedSurfTmClosedSurfTm( const ISurfTriMesh& SurfA, const ISurfTriMesh& SurfB, double dSafeDist) ; diff --git a/EGkCDeConeFrustumClosedSurfTm.h b/EGkCDeConeFrustumClosedSurfTm.h index 735c2bd..1e8666f 100644 --- a/EGkCDeConeFrustumClosedSurfTm.h +++ b/EGkCDeConeFrustumClosedSurfTm.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2020-2020 +// EgalTech 2020-2024 //---------------------------------------------------------------------------- -// File : EGkCDeConeFrustumClosedSurfTm.h Data : 09.11.20 Versione : +// File : EGkCDeConeFrustumClosedSurfTm.h Data : 15.02.24 Versione : 2.6b2 // Contenuto : Dichiarazione funzione verifica collisione tra // Cone e Closed SurfTriMesh. // @@ -23,8 +23,11 @@ #endif //---------------------------------------------------------------------------- -// Il sisitema di riferimento deve avere l'asse di simmetria del cono come asse Z e origine nel centro della base. -// La distanza di sicurezza ha effetto solo se maggiore di epsilon, altrimenti è ignorata ed è ininfluente. -// Il sistema di riferimento del cono deve essere immerso in quello della superficie. +// Il sistema di riferimento deve avere l'asse di simmetria del cono come asse Z e origine nel centro della base. +// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL. +// Il sistema di riferimento del cono è riferito a quello della superficie. +// La funzione restituisce : +// - true in caso di collisione o inconsistenza dei parametri di input +// - false in caso di assenza di collisione. EGK_EXPORT bool CDeConeFrustumClosedSurfTm( const Frame3d& frCone, double dBaseRad, double dTopRad, double dHeight, - double dSafeDist, const ISurfTriMesh& Stm) ; \ No newline at end of file + const ISurfTriMesh& Stm, double dSafeDist) ; \ No newline at end of file diff --git a/EGkCDeConvexTorusClosedSurfTm.h b/EGkCDeConvexTorusClosedSurfTm.h index 8d35834..764bd21 100644 --- a/EGkCDeConvexTorusClosedSurfTm.h +++ b/EGkCDeConvexTorusClosedSurfTm.h @@ -24,9 +24,12 @@ #endif //---------------------------------------------------------------------------- -// Il toro convesso è il disco limitato dalla sola parte esterna del toro. +// Il toro convesso è il disco solido limitato dalla sola parte esterna del toro. // Raggio principale R1, raggio secondario R2. // Il toro è posto nel piano XY del suo riferimento, centrato sull'origine. -// La funzione restituisce true in caso di collisione. +// La funzione restituisce : +// - true in caso di collisione o inconsistenza dei parametri di input +// - false in caso di assenza di collisione. +//---------------------------------------------------------------------------- EGK_EXPORT bool CDeConvexTorusClosedSurfTm( const Frame3d& frTorus, double dRad1, double dRad2, - double dSafeDist, const ISurfTriMesh& tmSurf) ; + const ISurfTriMesh& tmSurf, double dSafeDist) ; diff --git a/EGkCDeCylClosedSurfTm.h b/EGkCDeCylClosedSurfTm.h index 189e1ae..4fd6fc4 100644 --- a/EGkCDeCylClosedSurfTm.h +++ b/EGkCDeCylClosedSurfTm.h @@ -23,4 +23,11 @@ #endif //---------------------------------------------------------------------------- -EGK_EXPORT bool CDeCylClosedSurfTm( const Frame3d& frCyl, double dR, double dH, double dSafeDist, const ISurfTriMesh& Stm) ; +// Il sistema di riferimento deve avere l'asse di simmetria del cilindro come asse Z e origine nel centro della base. +// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL, altrimenti è ignorata ed è ininfluente. +// Il sistema di riferimento del cilindro è riferito a quello della superficie. +// La funzione restituisce : +// - true in caso di collisione o inconsistenza dei parametri di input +// - false in caso di assenza di collisione. +//---------------------------------------------------------------------------- +EGK_EXPORT bool CDeCylClosedSurfTm( const Frame3d& frCyl, double dR, double dH, const ISurfTriMesh& Stm, double dSafeDist) ; diff --git a/EGkCDeRectPrismoidClosedSurfTm.h b/EGkCDeRectPrismoidClosedSurfTm.h index 5ad830a..4514a25 100644 --- a/EGkCDeRectPrismoidClosedSurfTm.h +++ b/EGkCDeRectPrismoidClosedSurfTm.h @@ -26,6 +26,10 @@ // Il sistema di riferimento deve avere l'origine nel centro della Base, asse X lungo // un segmento della stessa e asse Z ortogonale alle basi e diretto verso la base Top. // Il sistema di riferimento della piramide deve essere immerso in quello della superficie. +// La funzione restituisce : +// - true in caso di collisione o inconsistenza dei parametri di input +// - false in caso di assenza di collisione. +//---------------------------------------------------------------------------- EGK_EXPORT bool CDeRectPrismoidClosedSurfTm( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY, double dLenghtTopX, double dLenghtTopY, double dHeight, - double dSafeDist, const ISurfTriMesh& Stm) ; \ No newline at end of file + const ISurfTriMesh& Stm, double dSafeDist) ; \ No newline at end of file diff --git a/EGkCDeSpheClosedSurfTm.h b/EGkCDeSpheClosedSurfTm.h index abbb59a..5565721 100644 --- a/EGkCDeSpheClosedSurfTm.h +++ b/EGkCDeSpheClosedSurfTm.h @@ -23,4 +23,8 @@ #endif //---------------------------------------------------------------------------- -EGK_EXPORT bool CDeSpheClosedSurfTm( const Point3d& ptCen, double dR, double dSafeDist, const ISurfTriMesh& Stm) ; +// La funzione restituisce : +// - true in caso di collisione o inconsistenza dei parametri di input +// - false in caso di assenza di collisione. +//---------------------------------------------------------------------------- +EGK_EXPORT bool CDeSpheClosedSurfTm( const Point3d& ptCen, double dR, const ISurfTriMesh& Stm, double dSafeDist) ; diff --git a/EGkVolZmap.h b/EGkVolZmap.h index f0186e4..0a81696 100644 --- a/EGkVolZmap.h +++ b/EGkVolZmap.h @@ -91,17 +91,17 @@ class __declspec( novtable) IVolZmap : public IGeoObj virtual bool GetDepth( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength, bool bExact) const = 0 ; virtual bool GetLineIntersection( const Point3d& ptP, const Vector3d& vtD, ILZIVECTOR& vIntersInfo) const = 0 ; virtual bool GetPlaneIntersection( const Plane3d& plPlane, ICURVEPOVECTOR& vpLoop) const = 0 ; - virtual bool AvoidBox( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, bool bPrecise = false) const = 0 ; - virtual bool AvoidSphere( const Point3d& ptCenter, double dRad, double dSafeDist, bool bPrecise = false) const = 0 ; - virtual bool AvoidCylinder( const Frame3d& frCyl, double dR, double dH, double dSafeDist, bool bPrecise = false) const = 0 ; - virtual bool AvoidConeFrustum( const Frame3d& frCone, double dRadBot, double dRadTop, double dHeight, - double dSafeDist, bool bPrecise = false) const = 0 ; - virtual bool AvoidRectPrismoid( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY, - double dLenghtTopX, double dLenghtTopY, double dHeight, - double dSafeDist, bool bPrecise = false) const = 0 ; - virtual bool AvoidTorus( const Frame3d& frTorus, double dRadMax, double dRadMin, - double dSafeDist, bool bPrecise = false) const = 0 ; - virtual bool AvoidSurfTm( const ISurfTriMesh& tmSurf, double dSafeDist, bool bPrecise = false) const = 0 ; + virtual bool CDeBox( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, bool bPrecise = false) const = 0 ; + virtual bool CDeSphere( const Point3d& ptCenter, double dRad, double dSafeDist, bool bPrecise = false) const = 0 ; + virtual bool CDeCylinder( const Frame3d& frCyl, double dR, double dH, double dSafeDist, bool bPrecise = false) const = 0 ; + virtual bool CDeConeFrustum( const Frame3d& frCone, double dRadBot, double dRadTop, double dHeight, + double dSafeDist, bool bPrecise = false) const = 0 ; + virtual bool CDeRectPrismoid( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY, + double dLenghtTopX, double dLenghtTopY, double dHeight, + double dSafeDist, bool bPrecise = false) const = 0 ; + virtual bool CDeTorus( const Frame3d& frTorus, double dRadMax, double dRadMin, + double dSafeDist, bool bPrecise = false) const = 0 ; + virtual bool CDeSurfTm( const ISurfTriMesh& tmSurf, double dSafeDist, bool bPrecise = false) const = 0 ; virtual bool Cut( const Plane3d& plPlane) = 0 ; virtual bool Compact( void) = 0 ; virtual int GetPartCount( void) const = 0 ; From 270bb60b26199c4dc32f5fd46b8a00007b408cfc Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 19 Feb 2024 14:50:36 +0100 Subject: [PATCH 60/64] Include : - aggiornamento prototipi. --- EGrScene.h | 6 ++++-- EXeExecutor.h | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/EGrScene.h b/EGrScene.h index 744ebc8..dcb9f8d 100644 --- a/EGrScene.h +++ b/EGrScene.h @@ -1,13 +1,13 @@ //---------------------------------------------------------------------------- // EgalTech 2014-2024 //---------------------------------------------------------------------------- -// File : EGrScene.h Data : 09.01.24 Versione : 2.5l7 +// File : EGrScene.h Data : 16.02.24 Versione : 2.6b4 // Contenuto : Dichiarazione della interfaccia IEGrScene per scena OpenGL. // // // // Modifiche : 13.02.14 DS Creazione modulo. -// +// 16.02.24 DS Aggiunte Set/Get CameraDirOrizzOffset. // //---------------------------------------------------------------------------- @@ -57,10 +57,12 @@ class IEGrScene virtual void Destroy( void) = 0 ; // Camera virtual bool SetCenter( const Point3d& ptCenter) = 0 ; + virtual bool SetCameraDirOrizzOffset( int nRightStepOffset = 0) = 0 ; virtual bool SetCamera( double dAngVertDeg, double dAngOrizzDeg, double dDist) = 0 ; virtual bool SetCamera( int nDir, double dDist = 0) = 0 ; virtual const Point3d& GetCenter( void) const = 0 ; virtual Point3d GetProjectedCenter( void) const = 0 ; + virtual int GetCameraDirOrizzOffset( void) const = 0 ; virtual void GetCamera( double* pdAngVertDeg, double* pdAngOrizzDeg, double* pdDist = nullptr) const = 0 ; virtual int GetCameraDir( void) const = 0 ; virtual const Vector3d& GetCameraUp( void) const = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 27d24a2..12cf406 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -1263,11 +1263,13 @@ EXE_EXPORT bool ExeResetGeoTria( bool bRedraw) ; EXE_EXPORT bool ExeSetWinRect( int nPrevX, int nPrevY, int nCurrX, int nCurrY, bool bRedraw) ; EXE_EXPORT bool ExeResetWinRect( bool bRedraw) ; EXE_EXPORT bool ExeZoomWin( int nPrevX, int nPrevY, int nCurrX, int nCurrY, bool bRedraw) ; +EXE_EXPORT bool ExeSetViewOrizzOffsStep( int nDirOffsStep = 0) ; EXE_EXPORT bool ExeSetView( int nDir, bool bRedraw) ; EXE_EXPORT bool ExeSetGenericView( double dAngVertDeg, double dAngHorizDeg, bool bRedraw) ; EXE_EXPORT bool ExeSetViewCenter( const Point3d& ptP, bool bRedraw) ; EXE_EXPORT bool ExePanView( int nPrevX, int nPrevY, int nCurrX, int nCurrY, bool bRedraw) ; EXE_EXPORT bool ExeRotateView( int nPrevX, int nPrevY, int nCurrX, int nCurrY, bool bRedraw) ; +EXE_EXPORT bool ExeGetViewOrizzOffsStep( int* pnDirOffsStep) ; EXE_EXPORT bool ExeGetView( int* pnDir) ; EXE_EXPORT bool ExeGetGenericView( double* pdAngVertDeg, double* pdAngHorizDeg) ; EXE_EXPORT bool ExeGetViewUp( Vector3d& vtUp) ; From b3d5483564431d144eff57c689d8f0996f2a3963 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 26 Feb 2024 15:16:24 +0100 Subject: [PATCH 61/64] Include : - aggiornamento prototipi. --- EGkIntersCurveSurfTm.h | 63 +++++++++++++++++++++++++++++++++++++++++ EGkIntersLineSurfTm.h | 18 ++++++++++-- EGkIntersLineTria.h | 12 ++++---- EGkIntersLineVolZmap.h | 62 ++++++++++++++++++++++++++++++++++++++++ EGkIntersPlaneVolZmap.h | 27 ++++++++++++++++++ EGkVolZmap.h | 28 ------------------ EXeConst.h | 8 ------ EXeExecutor.h | 2 ++ 8 files changed, 175 insertions(+), 45 deletions(-) create mode 100644 EGkIntersCurveSurfTm.h create mode 100644 EGkIntersLineVolZmap.h create mode 100644 EGkIntersPlaneVolZmap.h diff --git a/EGkIntersCurveSurfTm.h b/EGkIntersCurveSurfTm.h new file mode 100644 index 0000000..122464f --- /dev/null +++ b/EGkIntersCurveSurfTm.h @@ -0,0 +1,63 @@ +//---------------------------------------------------------------------------- +// EgalTech 2024-2024 +//---------------------------------------------------------------------------- +// File : EGkIntersCurveSurfTm.h Data : 23.02.24 Versione : 2.6b4 +// Contenuto : Dichiarazione della classe intersezione Curva/SurfTriMesh. +// +// +// +// Modifiche : 23.02.24 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkCurve.h" +#include "/EgtDev/Include/EGkSurfTriMesh.h" +#include "/EgtDev/Include/EGkIntersLineTria.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 + +//----------------------------------------------------------------------------- +//! dati di intersezione curva - superficie trimesh +struct IntCrvStmInfo { + int nILTT ; //!< tipo di intersezione curva-triangolo + double dU ; //!< parametro sulla curva (non distanza) + double dU2 ; //!< secondo parametro sulla curva (non distanza) + int nT ; //!< indice del triangolo della superficie trimesh + double dCosDN ; //!< coseno dell'angolo tra la direzione della curva e la normale del triangolo + Point3d ptI ; //!< punto di intersezione + Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto) + // costruttori + IntCrvStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2() {} + IntCrvStmInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP) + : nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {} + IntCrvStmInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2) + : nILTT( nIL), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {} +} ; +//! vettore di IntCrvStmInfo +typedef std::vector ICSIVECTOR ; + +//----------------------------------------------------------------------------- +// Costanti tipo intersezione filtrata Curva-Superficie +enum CSiType { CSIT_NONE = 0, + CSIT_OUT_IN = 1, + CSIT_IN_OUT = 2, + CSIT_IN_IN = 3, + CSIT_OUT_OUT = 4, + CSIT_IN_ON = 5, + CSIT_ON_IN = 6, + CSIT_OUT_ON = 7, + CSIT_ON_OUT = 8} ; + +//----------------------------------------------------------------------------- +EGK_EXPORT bool IntersCurveSurfTm( const ICurve& Curve, const ISurfTriMesh& Stm, double dLinTol, ICSIVECTOR& vInfo) ; +EGK_EXPORT bool IntersCurveSurfTmExt( const ICurve& Curve, const ISurfTriMesh& Stm, double dLinTol, INTDBLVECTOR& vInters) ; +EGK_EXPORT bool FilterCurveSurfTmInters( const ICurve& Curve, const ICSIVECTOR& vInfo, INTDBLVECTOR& vInters) ; diff --git a/EGkIntersLineSurfTm.h b/EGkIntersLineSurfTm.h index e344c28..1aa857a 100644 --- a/EGkIntersLineSurfTm.h +++ b/EGkIntersLineSurfTm.h @@ -29,14 +29,14 @@ //! dati di intersezione linea - superficie trimesh struct IntLinStmInfo { int nILTT ; //!< tipo di intersezione linea-triangolo - double dU ; //!< parametro sulla linea - double dU2 ; //!< secondo parametro sulla linea + double dU ; //!< distanza sulla linea + double dU2 ; //!< seconda distanza sulla linea int nT ; //!< indice del triangolo della superficie trimesh double dCosDN ; //!< coseno dell'angolo tra la direzione della linea e la normale del triangolo Point3d ptI ; //!< punto di intersezione Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto) // costruttori - IntLinStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2() {} + IntLinStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT( 0), dCosDN( 0), ptI(), ptI2() {} IntLinStmInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP) : nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {} IntLinStmInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2) @@ -45,6 +45,15 @@ struct IntLinStmInfo { //! vettore di IntLinStmInfo typedef std::vector ILSIVECTOR ; +//----------------------------------------------------------------------------- +// Costanti tipo intersezione Linea SurfTriMesh dopo filtraggio +enum LSiType { LST_NONE = 0, + LST_IN = 1, + LST_OUT = 2, + LST_TG_INI = 3, + LST_TG_FIN = 4, + LST_TOUCH = 5} ; + //----------------------------------------------------------------------------- EGK_EXPORT bool IntersLineSurfTm( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfTriMesh& Stm, ILSIVECTOR& vInfo, bool bFinite = true) ; @@ -62,3 +71,6 @@ class IntersParLinesSurfTm const ISurfTriMesh* m_pSTm ; HashGrids2d m_HGrids ; } ; + +//----------------------------------------------------------------------------- +EGK_EXPORT bool FilterLineSurfTmInters( const ILSIVECTOR& vInfo, INTDBLVECTOR& vInters) ; diff --git a/EGkIntersLineTria.h b/EGkIntersLineTria.h index 3cf11f0..77660fc 100644 --- a/EGkIntersLineTria.h +++ b/EGkIntersLineTria.h @@ -23,12 +23,6 @@ #define EGK_EXPORT __declspec( dllimport) #endif -//----------------------------------------------------------------------------- -EGK_EXPORT int IntersLineTria( const Point3d& ptL1, const Point3d& ptL2, const Triangle3d& trTria, - Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ; -EGK_EXPORT int IntersLineTria( const Point3d& ptL, const Vector3d& vtL, double dLen, const Triangle3d& trTria, - Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ; - //----------------------------------------------------------------------------- // Tipo di intersezione linea-triangolo enum IntLineTriaType { ILTT_NO = 0, // non c'è intersezione @@ -37,3 +31,9 @@ enum IntLineTriaType { ILTT_NO = 0, // non c' ILTT_VERT = 3, // intersezione coincide con un vertice ILTT_EDGE = 4, // intersezione coincide con interno di un lato ILTT_IN = 5} ; // intersezione in interno del triangolo + +//----------------------------------------------------------------------------- +EGK_EXPORT int IntersLineTria( const Point3d& ptL1, const Point3d& ptL2, const Triangle3d& trTria, + Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ; +EGK_EXPORT int IntersLineTria( const Point3d& ptL, const Vector3d& vtL, double dLen, const Triangle3d& trTria, + Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ; diff --git a/EGkIntersLineVolZmap.h b/EGkIntersLineVolZmap.h new file mode 100644 index 0000000..d083264 --- /dev/null +++ b/EGkIntersLineVolZmap.h @@ -0,0 +1,62 @@ +//---------------------------------------------------------------------------- +// EgalTech 2024-2024 +//---------------------------------------------------------------------------- +// File : EGkIntersLineVolZmap.h Data : 22.02.24 Versione : 2.6b4 +// Contenuto : Dichiarazione prototipi intersezione Linea/VolZmap. +// +// +// +// Modifiche : 22.02.24 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkVolZmap.h" +#include "/EgtDev/Include/EGkIntersLineTria.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 + +//----------------------------------------------------------------------------- +// dati di intersezione linea - volume Zmap +struct IntLineZmapInfo { + int nILTT ; // Tipo di intersezione linea-triangolo + double dU ; // Distanza sulla linea + double dU2 ; // Seconda distanza sulla linea + int nVox ; // Indice del voxel del triangolo + int nBlock ; // Indice del blocco del triangolo + Triangle3d trTria ; // Triangolo + double dCosDN ; // Coseno dell'angolo tra la direzione della linea e la normale del triangolo + Point3d ptI ; // Punto di intersezione + Point3d ptI2 ; // Secondo punto di intersezione (termine di tratto sovrapposto) + // Costruttori + IntLineZmapInfo( void) + : nILTT( ILTT_NO), dU( 0), dU2( 0), nVox( -1), nBlock( -1), trTria(), dCosDN( 0), ptI(), ptI2() {} + IntLineZmapInfo( int nIL, double dUU, int nVx, int nBl, Triangle3d& trTr, double dCos, const Point3d& ptP) + : nILTT( nIL), dU( dUU), dU2( 0), nVox( nVx), nBlock( nBl), dCosDN( dCos), trTria( trTr), ptI( ptP), ptI2() {} + IntLineZmapInfo( int nIL, double dUU, double dUU2, int nVx, int nBl, Triangle3d& trTr, double dCos, + const Point3d& ptP, const Point3d& ptP2) + : nILTT( nIL), dU( dUU), dU2( dUU2), nVox( nVx), nBlock( nBl), trTria( trTr), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {} +} ; +// Vettore di IntLineZmapInfo +typedef std::vector ILZIVECTOR ; + +//----------------------------------------------------------------------------- +// Costanti tipo intersezione Linea VolZmap dopo filtraggio +enum LZiType { LZT_NONE = 0, + LZT_IN = 1, + LZT_OUT = 2, + LZT_TG_INI = 3, + LZT_TG_FIN = 4, + LZT_TOUCH = 5} ; + +//----------------------------------------------------------------------------- +EGK_EXPORT bool IntersLineVolZmap( const Point3d& ptL, const Vector3d& vtL, const IVolZmap& Vzm, ILZIVECTOR& vInfo) ; +EGK_EXPORT bool FilterLineVolZmapInters( const ILZIVECTOR& vInfo, INTDBLVECTOR& vInters) ; diff --git a/EGkIntersPlaneVolZmap.h b/EGkIntersPlaneVolZmap.h new file mode 100644 index 0000000..fac31b5 --- /dev/null +++ b/EGkIntersPlaneVolZmap.h @@ -0,0 +1,27 @@ +//---------------------------------------------------------------------------- +// EgalTech 2024-2024 +//---------------------------------------------------------------------------- +// File : EGkIntersPlaneVolZmap.h Data : 22.02.24 Versione : 2.6b4 +// Contenuto : Dichiarazione prototipi intersezione Piano/VolZmap. +// +// +// +// Modifiche : 22.02.24 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkVolZmap.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 IntersPlaneVolZmap( const Plane3d& plPlane, const IVolZmap& Vzm, ICURVEPOVECTOR& vpLoop) ; diff --git a/EGkVolZmap.h b/EGkVolZmap.h index 0a81696..f1a1245 100644 --- a/EGkVolZmap.h +++ b/EGkVolZmap.h @@ -15,35 +15,9 @@ #pragma once #include "/EgtDev/Include/EGkGeoObj.h" -#include "/EgtDev/Include/EGkPolyLine.h" #include "/EgtDev/Include/EGkCurveComposite.h" #include "/EgtDev/Include/EGkSurfFlatRegion.h" #include "/EgtDev/Include/EGkSurfTriMesh.h" -#include "/EgtDev/Include/EGkTriangle3d.h" -#include "/EgtDev/Include/EGkIntersLineTria.h" - -// ------------------------- STRUTTURE ----------------------------------------------------------- -// Informazioni su intersezione linea - volume Zmap -struct IntLineZmapInfo { - int nILTT ; // Tipo di intersezione linea-triangolo - double dU ; // Parametro sulla linea - double dU2 ; // Secondo parametro sulla linea - int nVox ; // Indice del voxel del triangolo - int nBlock ; // Indice del blocco del triangolo - Point3d ptI ; // Punto di intersezione - Point3d ptI2 ; // Secondo punto di intersezione (termine di tratto sovrapposto) - Triangle3d trTria ; // Triangolo - // Costruttori - IntLineZmapInfo( void) - : nILTT( ILTT_NO), dU( 0), dU2( 0), nVox( -1), nBlock( -1), ptI(), ptI2(), trTria() {} - IntLineZmapInfo( int nIL, double dUU, int nVx, int nBl, const Point3d& ptP, Triangle3d& trTr) - : nILTT( nIL), dU( dUU), dU2( 0), nVox( nVx), nBlock( nBl), ptI( ptP), ptI2(), trTria( trTr) {} - IntLineZmapInfo( int nIL, double dUU, double dUU2, int nVx, int nBl, - const Point3d& ptP, const Point3d& ptP2, Triangle3d& trTr) - : nILTT( nIL), dU( dUU), dU2( dUU2), nVox( nVx), nBlock( nBl), ptI( ptP), ptI2( ptP2), trTria( trTr) {} -} ; -// Vettore di IntLineZmapInfo -typedef std::vector ILZIVECTOR ; //---------------------------------------------------------------------------- class __declspec( novtable) IVolZmap : public IGeoObj @@ -89,8 +63,6 @@ class __declspec( novtable) IVolZmap : public IGeoObj const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs, const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe) = 0 ; virtual bool GetDepth( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength, bool bExact) const = 0 ; - virtual bool GetLineIntersection( const Point3d& ptP, const Vector3d& vtD, ILZIVECTOR& vIntersInfo) const = 0 ; - virtual bool GetPlaneIntersection( const Plane3d& plPlane, ICURVEPOVECTOR& vpLoop) const = 0 ; virtual bool CDeBox( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, bool bPrecise = false) const = 0 ; virtual bool CDeSphere( const Point3d& ptCenter, double dRad, double dSafeDist, bool bPrecise = false) const = 0 ; virtual bool CDeCylinder( const Frame3d& frCyl, double dR, double dH, double dSafeDist, bool bPrecise = false) const = 0 ; diff --git a/EXeConst.h b/EXeConst.h index b6352d3..181478a 100644 --- a/EXeConst.h +++ b/EXeConst.h @@ -78,14 +78,6 @@ enum CLiType { CLT_NONE = 0, CLT_TGINI_OUT = 7, CLT_TGFIN_OUT = 8} ; -//----------------- Costanti tipo punto intersezione Linea SurfTriMesh --------- -enum SLiType { SLT_NONE = 0, - SLT_IN = 1, - SLT_OUT = 2, - SLT_TG_INI = 3, - SLT_TG_FIN = 4, - SLT_TOUCH = 5} ; - //----------------- Costanti tipo di costruzione di superficie rigata ---------- enum RuledType{ RUL_TYPE_ISOPAR = 0, // come ISurfTrimesh::RLT_ISOPAR RUL_TYPE_MINDIST = 1, // come ISurfTrimesh::RLT_MINDIST diff --git a/EXeExecutor.h b/EXeExecutor.h index 12cf406..4927c0a 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -822,6 +822,8 @@ EXE_EXPORT int ExePlaneVolZmapInters( const Point3d& ptOn, const Vector3d& vtN, int* pnCount) ; EXE_EXPORT int ExeCurveCurveInters( const int nId1, const int nId2, const int nDestGrpId, int* pnPntCount, int* pnCrvCount) ; +EXE_EXPORT int ExeCurveSurfTmInters( const int nCrvId, const int nStmId, 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) ; From 0f84188120d03461113a1f187bd5916a9267dbdb Mon Sep 17 00:00:00 2001 From: Daniele Bariletti Date: Tue, 27 Feb 2024 16:40:13 +0100 Subject: [PATCH 62/64] Include : - aggiornamento prototitpi. --- EGkGeoObjSave.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/EGkGeoObjSave.h b/EGkGeoObjSave.h index 3d9c0b1..7f2b170 100644 --- a/EGkGeoObjSave.h +++ b/EGkGeoObjSave.h @@ -39,5 +39,40 @@ SaveGeoObj( IGeoObj* pGObj, const std::string& sFile, int nFlag = GDB_SV_BIN) // rimuovo l'oggetto dal GeomDB bOk = ( pGeomDB->RemoveGeoObjAndErase( nId) != nullptr) && bOk ; + return bOk ; +} + +//---------------------------------------------------------------------------- +bool +SaveGeoObj( std::vector vpGObj, const std::string& sFile, int nFlag = GDB_SV_BIN) +{ + for ( int i = 0 ; i < int( vpGObj.size()); ++i) { + // verifico validità oggetto + if ( vpGObj[i] == nullptr || ! vpGObj[i]->IsValid() ) + return false ; + } + // creo GeomDB temporaneo + PtrOwner pGeomDB( CreateGeomDB()) ; + if ( IsNull( pGeomDB)) + return false ; + INTVECTOR vIds ; + int nLayId = 0 ; + for ( int i = 0 ; i < int( vpGObj.size()); ++i) { + // inserisco l'oggetto nel GeomDB (sotto pezzo/layer) + if ( i == 0) { + int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ; + nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ; + } + int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vpGObj[i]) ; + vIds.push_back( nId) ; + if ( nId == GDB_ID_NULL) + return false ; + } + // eseguo il salvataggio + bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ; + // rimuovo l'oggetto dal GeomDB + for ( int i = 0 ; i < int( vIds.size()); ++i) + bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr ) && bOk ; + return bOk ; } \ No newline at end of file From 3b1ffa6f4aa29536a7c4cabbd498b9449f310399 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 27 Feb 2024 18:19:14 +0100 Subject: [PATCH 63/64] Include : - aggiornamento prototipi. --- EGkStmFromCurves.h | 9 +++++---- EXeExecutor.h | 1 + 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/EGkStmFromCurves.h b/EGkStmFromCurves.h index b5bfb8f..92c662a 100644 --- a/EGkStmFromCurves.h +++ b/EGkStmFromCurves.h @@ -1,13 +1,13 @@ //---------------------------------------------------------------------------- -// EgalTech 2015-2015 +// EgalTech 2015-2024 //---------------------------------------------------------------------------- -// File : EGkStmFromCurves.h Data : 01.02.15 Versione : 1.6b1 +// File : EGkStmFromCurves.h Data : 27.02.24 Versione : 2.6b4 // Contenuto : Dichiarazione della classe StmFromTriangleSoup. // // // // Modifiche : 19.05.14 DS Creazione modulo. -// +// 27.02.24 DS Aggiunta GetSurfTriMeshTransSwept. // //---------------------------------------------------------------------------- @@ -39,7 +39,8 @@ EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByRevolve( const ICurve* pCurve, const Po EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByScrewing( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx, double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRectSwept( double dDimH, double dDimV, double dBevelH, double dBevelV, - const ICurve* pGuide, int nCapType, double dLinTol) ; + const ICurve* pGuide, int nCapType, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ; +EGK_EXPORT ISurfTriMesh* GetSurfTriMeshTransSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const ICurve* pCurve1, const ICurve* pCurve2, int nType, double dLinTol = 10 * EPS_SMALL) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 4927c0a..34a1238 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -355,6 +355,7 @@ EXE_EXPORT int ExeCreateSurfTmByScrewing( int nParentId, int nCrvId, EXE_EXPORT int ExeCreateSurfTmRectSwept( int nParentId, double dDimH, double dDimV, double dBevelH, double dBevelV, int nGuideId, int nCapType, double dLinTol) ; EXE_EXPORT int ExeCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol) ; +EXE_EXPORT int ExeCreateSurfTmTransSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol) ; EXE_EXPORT int ExeCreateSurfTmRuled( int nParentId, int nPtOrCrvId1, int nPtOrCrvId2, int nType, double dLinTol) ; EXE_EXPORT int ExeCreateSurfTmByTriangles( int nParentId, const INTVECTOR& vIds, bool bErase) ; EXE_EXPORT int ExeCreateSurfTmBySewing( int nParentId, const INTVECTOR& vIds, bool bErase) ; From 6d06630d0a8599681c5e206f3c38402ab65e6f22 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 2 Mar 2024 11:53:49 +0100 Subject: [PATCH 64/64] Include : - aggiornamento mensile codici protezione librerie. --- EgtKeyCodes.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index 9278809..cf707a4 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2015-2024 //---------------------------------------------------------------------------- -// File : EgtKeyCodes.h Data : 16.01.24 Versione : 2.65a1 +// File : EgtKeyCodes.h Data : 16.01.24 Versione : 2.6a1 // Contenuto : Costanti per codici di protezione librerie di base. // // @@ -25,7 +25,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 2602 ; +const int KEY_BASELIB_VER = 2603 ; const int KEY_BASELIB_LEV = 1 ; //----------------------------------------------------------------------------