Compare commits

...

61 Commits

Author SHA1 Message Date
SaraP cc370650c2 Include :
- aggiornamento prototipi.
2024-01-10 10:10:03 +01:00
Dario Sassi 00baa7c287 Include :
- aggiornamento parametri.
2024-01-09 18:28:33 +01:00
Dario Sassi 2682ad8772 Include :
- aggiornamento prototipi.
2024-01-02 16:01:29 +01:00
Dario Sassi 5367ebddbd Include :
- aggiornamento prototipi.
2023-12-29 13:08:44 +01:00
Dario Sassi 3d41f14559 Include :
- modifica al costruttore di default di CNurbsData per impostare il nuovo flag bClamped a true (per compatibilità con precedente stato).
2023-12-18 19:53:57 +01:00
Dario Sassi ebedf43bd4 Include :
- aggiornamento prototipi.
2023-12-18 09:31:54 +01:00
Dario Sassi 239fac2dc9 Include :
- ora il Logger è di default thread safe.
2023-12-15 16:16:09 +01:00
Dario Sassi 9e8267d228 Include :
- aggiornamento prototipi.
2023-12-14 20:27:14 +01:00
Dario Sassi 0c6aed9ec2 Include :
- aggiornamento prototipi.
2023-12-14 12:01:07 +01:00
Dario Sassi 766a2a1cb1 Include :
- aggiornamento prototipi.
2023-12-11 10:15:39 +01:00
Dario Sassi d699fb9fea Include :
- aggiornamento codici di protezione mensili.
2023-12-01 16:43:45 +01:00
Riccardo Elitropi 7510267e1f Include :
- modifica prototipi.
2023-11-29 11:53:17 +01:00
Dario Sassi f3bfeac4db Include :
- aggiornamento prototipo.
2023-11-28 11:11:27 +01:00
Dario Sassi e491ffa45f Merge commit '42f3b9007dffad03e4a05ddaca4298f5534749f2' 2023-11-28 11:02:07 +01:00
Riccardo Elitropi 42f3b9007d EgtInclude :
- Aggiunta funzione CalcZigZagInfill e aggiornamento prototipi.
2023-11-27 12:23:15 +01:00
Dario Sassi 2018c11a8d Include :
- aggiornamento prototipi.
2023-11-24 15:36:32 +01:00
Dario Sassi de1bfee540 Include :
- aggiornamento prototipi.
2023-11-24 12:50:55 +01:00
SaraP a645be8f7d Include :
- aggiunti prototipi per Voronoi
- aggiornamento prototipi.
2023-11-23 13:01:37 +01:00
Dario Sassi 2e2f69b252 Include :
- aggiornamento prototipi.
2023-11-23 10:47:24 +01:00
Dario Sassi 6e3503fde5 Include :
- a classe PolyLine aggiunte proprietà TempProp e relative funzioni Set/Get.
2023-11-22 20:21:06 +01:00
Riccardo Elitropi 3925a97c84 Include :
- aggiunta funzione CalcPocketing.
2023-11-20 11:14:02 +01:00
Dario Sassi 137103f92c Include :
- aggiornamento prototipi.
2023-11-16 19:00:42 +01:00
Dario Sassi 841dddf047 Include :
- sistemazione prototipi per passaggio import/export 3dm da Exchange a Exch3dm.
2023-11-14 19:11:35 +01:00
SaraP ddd7f858a4 Include :
- aggiornamento prototipi.
2023-11-14 15:07:33 +01:00
Dario Sassi 435a89b2b9 Include :
- aggiornamento prototipi.
2023-11-13 08:50:09 +01:00
Daniele Bariletti 14fd82f322 Include :
- aggiunta la funzione Import3dm.
2023-11-08 10:49:14 +01:00
Daniele Bariletti a1151f8df2 EgtExchange :
- tolto parametro dScaleFactor ad Import3dm.
2023-11-08 10:03:08 +01:00
Daniele Bariletti 68256f2456 Merge branch '3dm_import+trim&mesh' 2023-11-07 17:58:54 +01:00
Daniele Bariletti 6dacd30dbd Include :
- aggiunto il flag clamped durante la conversione da superfici e
curve nurbs a Bezier.
2023-11-07 17:56:17 +01:00
Dario Sassi 5c074aec89 Include :
- aggiornamento prototipi
- aggiornato codice di protezione mensile librerie.
2023-11-03 17:19:34 +01:00
Dario Sassi be6efe65e4 Include :
- aggiornamento prototipi.
2023-10-28 18:12:16 +02:00
Dario Sassi 36541aea66 Include :
- aggiornamento prototipi.
2023-10-24 13:08:20 +02:00
Daniele Bariletti 26d46c8b26 Include :
- aggiunta dell'Export 3dm.
2023-10-23 14:31:07 +02:00
Daniele Bariletti dd74337190 Include :
- aggiunta la possibilità di mostrare le curve di trim sullo spazio parametrico
per le superfici di Bezier.
2023-10-23 10:31:17 +02:00
Daniele Bariletti a6e5145392 Include :
- gestione sup NURBS periodiche
- aggiunta note e cambio nomi.
2023-10-17 12:05:52 +02:00
Riccardo Elitropi 25e52f23d6 Include :
- aggiornamento prototipi.
2023-10-10 13:38:09 +02:00
Dario Sassi 7335a703cf Include :
- aggiornamento prototipi.
2023-10-09 12:59:50 +02:00
Riccardo Elitropi 0c2643af4e Include :
- aggiunta funzione SubtractProjectedFacesOnStmFace
- aggiornamento prototipo GetSilhouette.
2023-10-04 12:15:32 +02:00
Dario Sassi e4795d9eba Include :
-  aggiornato codice di protezione mensile librerie.
2023-10-02 16:04:09 +02:00
Daniele Bariletti 8471ff37ba Include :
- aggiunte coordinate U e V ai vertici delle TriMesh.
2023-09-26 12:21:42 +02:00
Daniele Bariletti 5eb4c65db4 Include :
- aggiunta del 3dm Export.
2023-09-21 17:07:18 +02:00
Daniele Bariletti 2425304b2e Include :
- introdotto l'uso della grafica di default per le ExtDim importate
da 3dm.
2023-09-21 14:44:53 +02:00
Dario Sassi 0a0f0daaff Include :
- aggiornamento prototipi.
2023-09-18 08:15:38 +02:00
Dario Sassi 773f812bb8 Include :
- aggiornamento prototipi.
2023-09-12 16:00:58 +02:00
Dario Sassi 598d06443e Include :
- aggiornamento e nuovi prototipi.
2023-09-11 10:34:25 +02:00
Daniele Bariletti 8728e4f41f Merge branch 'Bezier_trim&mesh' into 3dm_import 2023-08-29 09:59:12 +02:00
Daniele Bariletti 76d9ed12de Include :
- aggiunta funzione per la conversione da superfici NURBS a Bezier.
2023-08-29 09:58:32 +02:00
Daniele Bariletti a3793abcd8 Merge branch 'master' into 3dm_import 2023-08-29 09:49:43 +02:00
Dario Sassi 921f764bb6 Include :
- aggiornamento prototipi.
2023-08-27 18:28:40 +02:00
Dario Sassi 6962aeced4 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.
2023-08-23 16:45:11 +02:00
Dario Sassi fdb7209f3f Include :
- piccola modifica in Clamp.
2023-08-19 11:46:50 +02:00
Dario Sassi 63c5f940d8 Include :
- aggiornamento prototipi.
2023-08-04 13:20:38 +02:00
Daniele Bariletti c58190b9e7 Merge branch 'master' into 3dm_import 2023-08-03 11:18:46 +02:00
Daniele Bariletti 53a5e52d47 Include:
- aggiunta importazione di file 3dm.
2023-08-03 11:17:50 +02:00
Dario Sassi e563bbf302 Include :
- in ConvertCurveToComposite aggiunta gestione estrusione, spessore e proprietà temporanee.
2023-08-03 11:16:48 +02:00
Dario Sassi 11bbd29d0e Include :
- aggiornato codice di protezione mensile.
2023-08-02 20:03:19 +02:00
DarioS 1599910667 Include :
- aggiornamento prototipi.
2023-07-28 11:21:56 +02:00
DarioS 340d11635d Include :
- aggiunta funzione inline ConvertCurveToComposite.
2023-07-21 15:10:21 +02:00
DarioS e62a6036a4 Include :
- aggiunta funzione IsGlobFrame.
2023-07-20 20:44:22 +02:00
DarioS 3106768d39 Include :
- aggiornamento prototipi.
2023-07-10 11:12:33 +02:00
DarioS 880f586861 Include :
- aggiornamento prototipi.
2023-07-07 17:01:09 +02:00
50 changed files with 758 additions and 128 deletions
+73
View File
@@ -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 <string>
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 ;
}
+40
View File
@@ -0,0 +1,40 @@
//----------------------------------------------------------------------------
// EgalTech 2023
//----------------------------------------------------------------------------
// File : EE3Export3dm.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 <string>
//----------------------- 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
//-----------------------------------------------------------------------------
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" {
EE3_EXPORT IExport3dm* CreateExport3dm(void) ;
}
+39
View File
@@ -0,0 +1,39 @@
//----------------------------------------------------------------------------
// EgalTech 2023
//----------------------------------------------------------------------------
// File : EE3Import3dm.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 <string>
//----------------------- 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
//-----------------------------------------------------------------------------
class __declspec( novtable) IImport3dm
{
public :
virtual ~IImport3dm( void) {}
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 ;
} ;
//-----------------------------------------------------------------------------
extern "C" {
EE3_EXPORT IImport3dm* CreateImport3dm( void) ;
}
+4 -2
View File
@@ -1,13 +1,14 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2022
// EgalTech 2014-2023
//----------------------------------------------------------------------------
// File : EGkArcSpecial.h Data : 20.12.22 Versione : 2.4l3
// File : EGkArcSpecial.h Data : 04.08.23 Versione : 2.5h1
// Contenuto : Dichiarazione funzioni per calcolo speciale archi.
//
//
//
// Modifiche : 12.06.14 DS Creazione modulo.
// 20.12.22 DS Aggiunta GetArc2PCN.
// 04.08.23 DS Aggiunta GetArc2PNB.
//
//----------------------------------------------------------------------------
@@ -27,5 +28,6 @@
//----------------------------------------------------------------------------
EGK_EXPORT ICurve* GetArc2PD( const Point3d& ptStart, const Point3d& ptEnd, double dDirStartDeg) ;
EGK_EXPORT ICurve* GetArc2PVN( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtDirS, const Vector3d& vtN) ;
EGK_EXPORT ICurve* GetArc2PNB( const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtN, double dBulge) ;
EGK_EXPORT ICurve* GetArc3P( const Point3d& ptStart, const Point3d& ptOther, const Point3d& ptEnd, bool bCirc) ;
EGK_EXPORT ICurveArc* GetArc2PCN( const Point3d& ptStart, const Point3d& ptEnd, const Point3d& ptNearCen, const Vector3d& vtN) ;
+31
View File
@@ -0,0 +1,31 @@
//----------------------------------------------------------------------------
// 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) ;
EGK_EXPORT bool CalcZigZagInfill( const ISurfFlatRegion* pSfr, double dStep, bool bSmooth, bool bRemoveOverlapLink,
ICRVCOMPOPOVECTOR& vCrvCompoRes) ;
+1 -3
View File
@@ -16,7 +16,6 @@
#include "/EgtDev/Include/EGkPointGrid3d.h"
#include "/EgtDev/Include/EGkGeoCollection.h"
#include <unordered_set>
class IGeomDB ;
@@ -59,7 +58,6 @@ class ChainCurves
EGK_EXPORT bool GetForkIds( INTVECTOR& vForkIds) ;
private :
typedef std::unordered_set<int> INTUSET ;
struct CrvData {
int nId ;
Point3d ptStart ;
@@ -92,7 +90,7 @@ class ChainCurves
private :
bool m_bAllowInvert ;
double m_dToler ;
INTUSET m_sCrvId ;
INTUNORDSET m_sCrvId ;
CRVDATAVECTOR m_vCrvData ;
PointGrid3d m_PointGrid ;
bool m_bFromNear ;
+3
View File
@@ -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,7 @@ 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 ;
} ;
//----------------------------------------------------------------------------
+18 -1
View File
@@ -32,14 +32,18 @@ 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( 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])
// 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) ;
@@ -74,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) ;
+6 -5
View File
@@ -1,13 +1,13 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2015
// EgalTech 2015-2023
//----------------------------------------------------------------------------
// File : EGkCurveByApprox.h Data : 23.07.15 Versione : 1.6g7
// File : EGkCurveByApprox.h Data : 28.07.23 Versione : 2.5g3
// Contenuto : Dichiarazione della classe CurveByApprox.
//
//
//
// Modifiche : 23.07.15 DS Creazione modulo.
//
// 28.07.23 DS GetArcs e GetArcsCorner.
//
//----------------------------------------------------------------------------
@@ -35,10 +35,11 @@ class CurveByApprox
EGK_EXPORT bool Reset( void) ;
EGK_EXPORT bool AddPoint( const Point3d& ptP) ;
EGK_EXPORT ICurve* GetCurve( int nType, double dLinTol, double dAngTolDeg, double dLinFea) ;
EGK_EXPORT bool GetArcs( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) ;
EGK_EXPORT bool GetArcs( double dLinTol, double dAngTolDeg, PolyArc& PA) ;
EGK_EXPORT bool GetArcsCorner( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) ;
public :
enum TYPE { ARCS_CORNER = 1, CUBIC_BEZIERS = 2} ;
enum TYPE { ARCS = 0, ARCS_CORNER = 1, CUBIC_BEZIERS = 2} ;
private :
bool CalcParameterization( void) ;
+29 -1
View File
@@ -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 ;
@@ -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 ;
@@ -67,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) = 0 ;
virtual bool GetCurveTempParam( int nCrv, double& dParam, int nParamInd = 0) const = 0 ;
} ;
//-----------------------------------------------------------------------------
@@ -84,6 +87,31 @@ inline ICurveComposite* GetCurveComposite( IGeoObj* pGObj)
{ if ( pGObj == nullptr || pGObj->GetType() != CRV_COMPO)
return nullptr ;
return (static_cast<ICurveComposite*>(pGObj)) ; }
inline ICurveComposite* ConvertCurveToComposite( IGeoObj* pGObj)
{ if ( pGObj == nullptr || ( pGObj->GetType() & GEO_CURVE) == 0) {
delete pGObj ;
return nullptr ;
}
ICurveComposite* pCrvCo = CreateCurveComposite() ;
if ( pCrvCo == nullptr) {
delete pGObj ;
return nullptr ;
}
ICurve* pCrv = static_cast<ICurve*>( pGObj) ;
Vector3d vtExtr ;
if ( pCrv->GetExtrusion( vtExtr) && ! vtExtr.IsSmall())
pCrvCo->SetExtrusion( vtExtr) ;
double dThick ;
if ( pCrv->GetThickness( dThick) && abs( dThick) > EPS_SMALL)
pCrvCo->SetThickness( dThick) ;
for ( int i = 0 ; i < 2 ; ++ i) {
int nProp = pCrv->GetTempProp( i) ;
if ( nProp != 0)
pCrvCo->SetTempProp( nProp, i) ;
}
pCrvCo->AddCurve( pCrv) ;
return pCrvCo ;
}
//----------------------------------------------------------------------------
// Raccolte di puntatori a ICurveComposite
+7
View File
@@ -45,3 +45,10 @@ inline ICurveLine* GetCurveLine( IGeoObj* pGObj)
{ if ( pGObj == nullptr || pGObj->GetType() != CRV_LINE)
return nullptr ;
return (static_cast<ICurveLine*>(pGObj)) ; }
//----------------------------------------------------------------------------
// Raccolte di puntatori a ICurveLine
typedef std::vector<const ICurveLine*> CICRVLINEVECTOR ; // vettore di puntatori a const ICurveLine
typedef std::vector<ICurveLine*> ICRVLINEPVECTOR ; // vettore di puntatori a ICurveLine
typedef std::list<ICurveLine*> ICRVLINEPLIST ; // lista di puntatori a ICurveLine
typedef std::vector<PtrOwner<ICurveLine>> ICRVLINEPOVECTOR ; // vettore di puntatori esclusivi a ICurveLine
+17 -16
View File
@@ -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) ;
+22 -10
View File
@@ -1,13 +1,13 @@
//----------------------------------------------------------------------------
// EgalTech 2018-2018
// EgalTech 2018-2023
//----------------------------------------------------------------------------
// File : EGkDistPointTria.h Data : 11.12.18 Versione : 1.9l2
// File : EGkDistPointSurfTm.h Data : 06.07.23 Versione : 2.5g1
// Contenuto : Dichiarazione della classe distanza Punto da Trimesh.
//
//
//
// Modifiche : 06.12.18 LM Creazione modulo.
//
// 06.07.23 DS Aggiunta GetSurfTmNearestVertex.
//
//----------------------------------------------------------------------------
@@ -23,6 +23,13 @@
#define EGK_EXPORT __declspec( dllimport)
#endif
//----------------------------------------------------------------------------
// Calcola la distanza tra punto e superficie trimesh.
// Risultati :
// - distanza
// - punto sulla superficie a minima distanza
// - indice del triangolo su cui giace il punto
// - indicazione se il punto di riferimento è dalla parte interna o esterna della superficie.
//----------------------------------------------------------------------------
class DistPointSurfTm
{
@@ -30,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 :
@@ -51,3 +58,8 @@ class DistPointSurfTm
int m_nMinDistTriaIndex ;
bool m_bIsInside ;
} ;
//----------------------------------------------------------------------------
// Calcola l'indice del vertice della superficie a minima distanza dal punto di riferimento.
//----------------------------------------------------------------------------
EGK_EXPORT int GetSurfTmNearestVertex( const Point3d& ptP, const ISurfTriMesh& tmSurf) ;
+11 -2
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2013-2014
// EgalTech 2013-2023
//----------------------------------------------------------------------------
// File : EGkFrame3d.h Data : 30.05.14 Versione : 1.5e10
// File : EGkFrame3d.h Data : 20.07.23 Versione : 2.5g2
// Contenuto : Dichiarazione della classe Reference Frame 3d.
//
//
@@ -167,3 +167,12 @@ AreSameFrame( const Frame3d& frRef1, const Frame3d& frRef2)
return false ;
return true ;
}
//----------------------------------------------------------------------------
// Verifica se il riferimento coincide con quello globale (o identità)
//----------------------------------------------------------------------------
inline bool
IsGlobFrame( const Frame3d& frRef)
{
return AreSameFrame( frRef, GLOB_FRM) ;
}
+5 -1
View File
@@ -1,13 +1,14 @@
//----------------------------------------------------------------------------
// EgalTech 2013-2023
//----------------------------------------------------------------------------
// File : EGkGdbIterator.h Data : 29.01.23 Versione : 2.5a2
// File : EGkGdbIterator.h Data : 09.07.23 Versione : 2.5g1
// Contenuto : Dichiarazione della interfaccia IGdbIterator.
//
//
//
// Modifiche : 04.12.13 DS Creazione modulo.
// 29.01.23 DS Aggiunte GetAllInfo e CopyAllInfoFrom.
// 09.07.23 DS Aggiunte SetStipple e GetStipple.
//
//----------------------------------------------------------------------------
@@ -144,6 +145,9 @@ class __declspec( novtable) IGdbIterator
virtual bool RemoveInfo( const std::string& sKey) = 0 ;
virtual bool GetAllInfo( STRVECTOR& vsInfo) const = 0 ;
virtual bool CopyAllInfoFrom( const IGdbIterator& iIter) = 0 ;
// Stipple
virtual bool SetStipple( int nFactor, int nPattern) = 0 ;
virtual bool GetStipple( int& nFactor, int& nPattern) const = 0 ;
// TextureData
virtual bool SetTextureName( const std::string& sTxrName) = 0 ;
virtual bool SetTextureFrame( const Frame3d& frTxrRef) = 0 ;
+12 -6
View File
@@ -32,15 +32,15 @@ typedef std::list<POINTI> PNTILIST ; // lista di coppie punto, intero
//----------------------------------------------------------------------------
// Raccolte di coppie Point3d,dU
typedef std::pair<Point3d,double> POINTU ; // coppia punto, parametro (o altro)
typedef std::vector<POINTU> PNTUVECTOR ; // vettore di coppie punto, parametro
typedef std::list<POINTU> PNTULIST ; // lista di coppie punto, parametro
typedef std::pair<Point3d,double> POINTU ; // coppia punto, parametro (o altro)
typedef std::vector<POINTU> PNTUVECTOR ; // vettore di coppie punto, parametro
typedef std::list<POINTU> PNTULIST ; // lista di coppie punto, parametro
//----------------------------------------------------------------------------
// Raccolte di coppie Point3d,Point3d
typedef std::pair<Point3d,Point3d> BIPOINT ; // coppia punto1, punto2
typedef std::vector<BIPOINT> BIPNTVECTOR ; // vettore di coppie punto1, punto2
typedef std::list<BIPOINT> BIPNTLIST ; // lista di coppie punto1, punto2
typedef std::pair<Point3d,Point3d> BIPOINT ; // coppia punto1, punto2
typedef std::vector<BIPOINT> BIPNTVECTOR ; // vettore di coppie punto1, punto2
typedef std::list<BIPOINT> BIPNTLIST ; // lista di coppie punto1, punto2
//----------------------------------------------------------------------------
// Raccolte di Punti di curva con loro geometria differenziale
@@ -57,3 +57,9 @@ typedef std::list<Vector3d> VCT3DLIST ; // lista di vettori 3d
typedef std::vector<BBox3d> BOXVECTOR ; // vettore di bounding box 3d
typedef std::list<BBox3d> BOXLIST ; // lista di bounding box 3d
typedef std::vector<std::pair<BBox3d,int>> BOXIVECTOR ; // vettore di bounding box 3d e Id
//----------------------------------------------------------------------------
// Raccolte di coppie Point3d,Vector3d
typedef std::pair<Point3d,Vector3d> PNTVECT ; // coppia punto, vettore
typedef std::vector<PNTVECT> PNTVECTVECTOR ; // vettore di coppie punto, vettore
typedef std::list<PNTVECT> PNTVECTLIST ; // lista di coppie punto, vettore
+2
View File
@@ -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 ;
} ;
//-----------------------------------------------------------------------------
+6 -1
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2013-2023
//----------------------------------------------------------------------------
// File : EGkGeomDB.h Data : 29.01.23 Versione : 2.5a
// File : EGkGeomDB.h Data : 09.07.23 Versione : 2.5g1
// Contenuto : Dichiarazione della interfaccia IGeomDB.
//
//
@@ -12,6 +12,7 @@
// 30.05.14 DS Agg. metodi di Shear.
// 03.12.14 DS Aggiunta gestione riferimento di griglia.
// 29.01.23 DS Aggiunta GetAllInfo.
// 09.07.23 DS Aggiunte DumpStipple, SetStipple e GetStipple.
//
//----------------------------------------------------------------------------
@@ -179,6 +180,10 @@ class __declspec( novtable) IGeomDB
virtual bool RemoveInfo( int nId, const std::string& sKey) = 0 ;
virtual bool GetAllInfo( int nId, STRVECTOR& vsInfo) const = 0 ;
virtual bool CopyAllInfoFrom( int nId, int nSouId) = 0 ;
// Stipple (significativo solo per curve)
virtual bool DumpStipple( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const = 0 ;
virtual bool SetStipple( int nId, int nFactor, int nPattern) = 0 ;
virtual bool GetStipple( int nId, int& nFactor, int& nPattern) const = 0 ;
// TextureData
virtual bool DumpTextureData( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const = 0 ;
virtual bool SetTextureName( int nId, const std::string& sTxrName) = 0 ;
+8 -8
View File
@@ -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 ;
} ;
+5
View File
@@ -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 ;
} ;
+5 -2
View File
@@ -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) ;
+12 -5
View File
@@ -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,15 +128,17 @@ 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
} ;
//----------------------------------------------------------------------------
// Raccolte di PolyLine
typedef std::vector<PolyLine> POLYLINEVECTOR ; // vettore di PolyLine
typedef std::list<PolyLine> POLYLINELIST ; // lista di PolyLine
typedef std::vector<PolyLine> POLYLINEVECTOR ; // vettore di PolyLine
typedef std::list<PolyLine> POLYLINELIST ; // lista di PolyLine
typedef std::vector<POLYLINEVECTOR> POLYLINEMATRIX ; // matrice di PolyLine
//----------------------------------------------------------------------------
EGK_EXPORT bool DistPointPolyLine( const Point3d& ptP, const PolyLine& plPoly, double& dDist) ;
+3 -3
View File
@@ -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
+32
View File
@@ -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) ;
+43
View File
@@ -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<Point5ax> PNT5AXVECTOR ; // vettore di Punti 5assi
//----------------------------------------------------------------------------
// Proiezione di una curva su una superficie TriMesh lungo la direzione data.
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const Vector3d& vtDir, double dLinTol,
PNT5AXVECTOR& vPt5ax) ;
+1 -1
View File
@@ -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) ;
+3 -2
View File
@@ -35,13 +35,14 @@ 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,
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) ;
inline int AddVertex( const Point3d& ptP, double dU = -1, double dV = -1) ;
private :
ISurfTriMesh* m_pSTM ;
+29
View File
@@ -0,0 +1,29 @@
//----------------------------------------------------------------------------
// 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,
bool bOCFlag, bool& bExistProjection, ISurfTriMesh*& pStmRes,
int& nNewFaceNbr) ;
+61
View File
@@ -0,0 +1,61 @@
//----------------------------------------------------------------------------
// 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 superficie Nurbs
struct SNurbsSurfData
{
int nDegU ; // grado in U
int nDegV ; // grado in V
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
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
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
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])
// tutte le operazioni richiedono la forma OMOGENEA, finite le quali posso riportarmi alla forma NON OMOGENEA
//----------------------------------------------------------------------------
//! 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) ;
+5 -1
View File
@@ -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 ;
@@ -36,6 +37,7 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf
virtual bool Subtract( const ISurfFlatRegion& Other) = 0 ;
virtual bool Intersect( const ISurfFlatRegion& Other) = 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 ;
@@ -48,7 +50,9 @@ 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 ;
} ;
//-----------------------------------------------------------------------------
+12 -4
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2022
// EgalTech 2014-2023
//----------------------------------------------------------------------------
// File : EGkSurfTriMesh.h Data : 10.10.22 Versione : 2.4i4
// File : EGkSurfTriMesh.h Data : 10.12.23 Versione : 2.5l2
// Contenuto : Dichiarazione della interfaccia ISurfTriMesh.
//
//
@@ -43,7 +43,8 @@ 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, 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 ;
virtual bool AdjustTopology( void) = 0 ;
@@ -67,6 +68,7 @@ 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 GetNextVertex( int nId, Point3d& ptP) const = 0 ;
virtual bool GetTriangle( int nId, int nIdVert[3]) const = 0 ;
@@ -84,11 +86,12 @@ 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 ;
virtual bool GetAllTriaInFacet( int nF, INTVECTOR& vT) const = 0 ;
virtual bool GetAllVertInFacet( int nF, INTVECTOR& vVert) const = 0 ;
virtual bool GetFacetLoops( int nF, POLYLINEVECTOR& vPL) const = 0 ;
virtual bool GetFacetAdjacencies( int nF, INTMATRIX& vAdj) const = 0 ;
virtual bool GetFacetNearestEndPoint( int nF, const Point3d& ptNear, Point3d& ptEnd, Vector3d& vtN) const = 0 ;
@@ -102,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 ;
+5 -2
View File
@@ -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
+4 -2
View File
@@ -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 ;
+93
View File
@@ -0,0 +1,93 @@
//----------------------------------------------------------------------------
// 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
} ;
+1
View File
@@ -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) ;
+4 -4
View File
@@ -196,11 +196,11 @@ EGN_EXPORT bool FromString( const std::string& sVal, STRVECTOR& vsVal) ;
//----------------------------------------------------------------------------
inline const std::string
ToString( int nVal, int nPrec = 1)
ToString( int nVal, int nPrec = 1, int nRadix = 10)
{
// eseguo conversione
char szBuff[24] ;
int nErr = _itoa_s( nVal, szBuff, 10) ;
int nErr = _itoa_s( nVal, szBuff, nRadix) ;
// se errore, ritorno stringa opportuna
if ( nErr != 0) {
_ASSERT( 0) ;
@@ -216,11 +216,11 @@ ToString( int nVal, int nPrec = 1)
return sBuff ;
}
inline const std::string
ToString( unsigned int nVal, int nPrec = 1)
ToString( unsigned int nVal, int nPrec = 1, int nRadix = 10)
{
// eseguo conversione
char szBuff[24] ;
int nErr = _ui64toa_s( nVal, szBuff, 24, 10) ;
int nErr = _ultoa_s( nVal, szBuff, nRadix) ;
// se errore, ritorno stringa opportuna
if ( nErr != 0) {
_ASSERT( 0) ;
+4 -2
View File
@@ -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 ;
+11 -2
View File
@@ -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).
//
//
@@ -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) ;
@@ -113,11 +115,13 @@ 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) ;
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) ;
@@ -335,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) ;
@@ -716,6 +722,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) ;
@@ -972,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) ;
+10 -4
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2022
// EgalTech 2015-2023
//----------------------------------------------------------------------------
// File : EMkMachMgr.h Data : 21.09.22 Versione : 2.4i4
// File : EMkMachMgr.h Data : 28.10.23 Versione : 2.5j4
// Contenuto : Dichiarazione della interfaccia IMachMgr.
//
//
@@ -13,6 +13,8 @@
// 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.
// 28.10.23 DS Aggiunte in interfaccia GetClEntAxesVal, GetToolSetupPosInCurrSetup e GetAllCurrAxesName.
//
//----------------------------------------------------------------------------
@@ -57,6 +59,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 ;
@@ -164,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 ;
@@ -199,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 ;
@@ -262,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 ;
@@ -282,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 ;
+5 -3
View File
@@ -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
} ;
//----------------------------------------------------------------------------
+1
View File
@@ -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" ;
+7 -4
View File
@@ -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) ;
}
+1
View File
@@ -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,
+48 -11
View File
@@ -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.
//
//
@@ -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) ;
@@ -56,7 +58,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) ;
@@ -121,11 +123,13 @@ 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) ;
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) ;
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) ;
@@ -266,6 +270,8 @@ EXE_EXPORT int ExeCreateArcC2PEx( int nParentId, const Point3d& ptCen,
const Point3d& ptNearEnd, int nRefType) ;
EXE_EXPORT int ExeCreateArc3P( int nParentId, const Point3d& ptP1,
const Point3d& ptP2, const Point3d& ptP3, int nRefType) ;
EXE_EXPORT int ExeCreateArc2PB( int nParentId, const Point3d& ptStart, const Point3d& ptEnd,
double dBulge, int nRefType) ;
EXE_EXPORT int ExeCreateArc2PD( int nParentId, const Point3d& ptStart, const Point3d& ptEnd,
double dDirSDeg, int nRefType) ;
EXE_EXPORT int ExeCreateArc2PDEx( int nParentId, const Point3d& ptStart,
@@ -312,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 bSquared) ;
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) ;
@@ -331,6 +337,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,
@@ -353,7 +361,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, int* pnCount = nullptr) ;
// GeomDB Create Volume
EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX,
@@ -377,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) ;
@@ -388,6 +397,8 @@ 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 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) ;
@@ -526,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) ;
@@ -580,6 +591,10 @@ 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 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) ;
@@ -591,6 +606,7 @@ EXE_EXPORT bool ExeSurfFrIntersect( int nId1, int nId2) ;
EXE_EXPORT bool ExeSurfFrOffset( int nId, double dDist, int nType) ;
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) ;
EXE_EXPORT int ExeSurfTmToTriangles( int nId, int* pnCount) ;
EXE_EXPORT bool ExeSurfTmRemoveFacet( int nId, int nFacet) ;
EXE_EXPORT bool ExeSurfTmSwapFacets( int nId, int nFacet1, int nFacet2) ;
@@ -603,6 +619,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 ExeSurfTmSubtractProjectedFacesOnFace( int nSurfId, int nFaceInd, int nDestGrpId,
INTVECTOR vSurfsId, bool bOCFlag,
bool& bExistProjection, int& nNewId, int& nNewFaceNbr) ;
EXE_EXPORT bool ExeSurfBzTrim( int nId, int nCutterId) ;
// GeomDb Volume Modify
@@ -635,6 +654,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) ;
@@ -675,10 +698,12 @@ 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 ExeSurfTmPartCount( int nId) ;
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) ;
EXE_EXPORT bool ExeSurfTmGetVertex( int nId, int nVert, int nRefId, Point3d& ptVert) ;
EXE_EXPORT bool ExeSurfTmGetNearestVertex( int nId, const Point3d& ptNear, int nRefId, int& nVert, Point3d& ptVert) ;
EXE_EXPORT int ExeSurfTmFacetFromTria( int nId, int nT) ;
EXE_EXPORT bool ExeSurfTmFacetAdjacencies( int nId, int nFacet, INTMATRIX& vAdj) ;
EXE_EXPORT bool ExeSurfTmFacetNearestEndPoint( int nId, int nFacet, const Point3d& ptNear, int nRefId,
@@ -688,18 +713,22 @@ 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, 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,
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) ;
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) ;
@@ -870,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) ;
@@ -894,6 +924,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) ;
@@ -1001,6 +1032,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) ;
@@ -1099,8 +1131,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) ;
@@ -1134,6 +1168,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) ;
@@ -1180,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) ;
+1 -1
View File
@@ -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 ;
+5 -4
View File
@@ -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 <string>
//----------------------------------------------------------------------------
typedef int (__stdcall * pfProcEvents) (int, int) ;
typedef bool (__stdcall * pfOnTerminateProcess) ( int) ;
typedef int (__stdcall * pfProcEvents) ( int, int) ;
typedef bool (__stdcall * pfOutText) ( const std::string&) ;
+1 -1
View File
@@ -24,7 +24,7 @@
//----------------------------------------------------------------------------
const int KEY_BASELIB_PROD = 207 ;
const int KEY_BASELIB_VER = 2506 ;
const int KEY_BASELIB_VER = 2512 ;
const int KEY_BASELIB_LEV = 1 ;
//----------------------------------------------------------------------------
+6 -8
View File
@@ -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)
{}
@@ -109,8 +109,7 @@ namespace egtlogger
void ClearOutputStreams( void)
{
std::vector<StreamInfo>::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<StreamInfo>::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 ;
+4 -4
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2016-2018
// EgalTech 2016-2023
//----------------------------------------------------------------------------
// File : EgtNumUtils.h Data : 05.11.16 Versione : 1.6w1
// File : EgtNumUtils.h Data : 16.08.23 Versione : 2.5h2
// Contenuto : Funzioni numeriche di base.
//
//
@@ -17,14 +17,14 @@
inline
int Clamp( int nVal, int nMin, int nMax)
{
return ( nVal < nMin ? nMin : nMax < nVal ? nMax : nVal) ;
return ( nVal < nMin ? nMin : ( nVal > nMax ? nMax : nVal)) ;
}
//----------------------------------------------------------------------------
inline
double Clamp( double dVal, double dMin, double dMax)
{
return ( dVal < dMin ? dMin : dMax < dVal ? dMax : dVal) ;
return ( dVal < dMin ? dMin : ( dVal > dMax ? dMax : dVal)) ;
}
//----------------------------------------------------------------------------
+2 -2
View File
@@ -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