Compare commits

..

3 Commits

Author SHA1 Message Date
Daniele Bariletti 1c4109e9a2 Merge commit '9144694734e55e22ee227a51ec928897e760ad79' into ExtDimension_Angular 2023-04-19 16:47:30 +02:00
Daniele Bariletti db1243aba5 Include :
- aggiornamento prototipi
2023-04-14 10:02:16 +02:00
Daniele Bariletti faa791c428 Merge commit '4c7cf4d0e40a3618fdafee73bd4d484811de6916' into ExtDimension_Angular 2023-04-14 09:56:58 +02:00
117 changed files with 654 additions and 4002 deletions
-57
View File
@@ -1,57 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2025
//----------------------------------------------------------------------------
// File : EBsAPI.h Data : 24.01.25 Versione : 2.7a1
// Contenuto : API (application programming interface).
//
//
//
// Modifiche : 05.10.24 DS Creazione modulo.
// 24.01.25 DS Aggiunta gestione messaggi.
//
//----------------------------------------------------------------------------
#pragma once
#define NOMINMAX
#include <windows.h>
//----------------------- Macro per import/export ----------------------------
#undef EGTBASIS_EXPORT
#if defined( I_AM_EGTBASIS) // da definirsi solo nella DLL
#define EGTBASIS_EXPORT __declspec( dllexport)
#else
#define EGTBASIS_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
#ifdef __cplusplus
extern "C" {
#endif
// API
// Protezione
EGTBASIS_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* wsKey) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyLevel( int nProd, int nVer, int nLev, int* pnKLev) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyOptions( int nProd, int nVer, int nLev, unsigned int* pnOpt1, unsigned int* pnOpt2) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyLeftDays( int* pnLeftDays) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyAssLeftDays( int* pnAssLeftDays) ;
EGTBASIS_EXPORT BOOL __stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays) ;
// Liberazione memoria blocchi dati ritornati (di solito per stringhe)
EGTBASIS_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ;
// Messaggi
EGTBASIS_EXPORT BOOL __stdcall EgtLoadMessages( const wchar_t* wsMsgFilePath) ;
EGTBASIS_EXPORT const wchar_t* __stdcall EgtGetMsg( int nMsg) ;
// Logger
EGTBASIS_EXPORT BOOL __stdcall EgtInitLogger( int nDebug, const wchar_t* wsLogFile) ;
EGTBASIS_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg, int nDebugLevel) ;
// Ini File
EGTBASIS_EXPORT BOOL __stdcall EgtGetStringUtf8FromIni( const wchar_t* wsSec, const wchar_t* wsKey,
const wchar_t* wsDef, wchar_t*& wsVal, const wchar_t* wsIniFile) ;
EGTBASIS_EXPORT BOOL __stdcall EgtWriteStringUtf8ToIni( const wchar_t* wsSec, const wchar_t* wsKey,
const wchar_t* wsVal, const wchar_t* wsIniFile) ;
#ifdef __cplusplus
}
#endif
-73
View File
@@ -1,73 +0,0 @@
//----------------------------------------------------------------------------
// 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
@@ -1,40 +0,0 @@
//----------------------------------------------------------------------------
// 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
@@ -1,39 +0,0 @@
//----------------------------------------------------------------------------
// 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) ;
}
+2 -5
View File
@@ -16,7 +16,6 @@
#include "/EgtDev/Include/EGkGeomDB.h" #include "/EgtDev/Include/EGkGeomDB.h"
#include "/EgtDev/Include/EExBeamConst.h" #include "/EgtDev/Include/EExBeamConst.h"
#include "/EgtDev/Include/EgtFunPtrType.h"
#include <string> #include <string>
//----------------------- Macro per import/export ---------------------------- //----------------------- Macro per import/export ----------------------------
@@ -54,13 +53,11 @@ class __declspec( novtable) IBeamMgr
int nCrvId, int nCrv2Id, bool bUpdate = true) = 0 ; int nCrvId, int nCrv2Id, bool bUpdate = true) = 0 ;
virtual bool EraseProcess( int nGeomId, bool bUpdate = true) = 0 ; virtual bool EraseProcess( int nGeomId, bool bUpdate = true) = 0 ;
virtual bool EnableProcess( int nGeomId, bool bEnable, bool bUpdate = true) = 0 ; virtual bool EnableProcess( int nGeomId, bool bEnable, bool bUpdate = true) = 0 ;
virtual bool CalcAllSolids( bool bShow, bool bRecalc, pcfProcEvents pFun = nullptr) = 0 ;
virtual bool ShowAllSolids( bool bShow, pcfProcEvents pFun = nullptr) = 0 ;
virtual bool CalcSolid( int nPartId, bool bRecalc = false) = 0 ; virtual bool CalcSolid( int nPartId, bool bRecalc = false) = 0 ;
virtual int GetSolid( int nPartId) const = 0 ; virtual int GetSolid( int nPartId) const = 0 ;
virtual bool ShowSolid( int nPartId, bool bShow) = 0 ; virtual bool ShowSolid( int nPartId, bool bShow) = 0 ;
virtual bool GetBuildingIsOn( int nAssGrpId) const = 0 ; virtual bool GetBuildingIsOn( void) const = 0 ;
virtual bool ShowBuilding( int nAssGrpId, bool bShow) = 0 ; virtual bool ShowBuilding( bool bShow) = 0 ;
} ; } ;
+1 -4
View File
@@ -29,13 +29,10 @@ class __declspec( novtable) IImport3MF
{ {
public : public :
virtual ~IImport3MF( void) {} virtual ~IImport3MF( void) {}
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, int nFlag = 0) = 0 ; virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup) = 0 ;
} ; } ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
extern "C" { extern "C" {
EEX_EXPORT IImport3MF* CreateImport3MF( void) ; EEX_EXPORT IImport3MF* CreateImport3MF( void) ;
} }
enum EIm3MFFlag { EI3FLAG_NONE = 0x0000,
EI3FLAG_KEEP_GROUPS = 0x0001} ;
-1
View File
@@ -37,6 +37,5 @@ class __declspec( novtable) IImportBtl
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
extern "C" { extern "C" {
EEX_EXPORT bool SetBtlAuxDir( const std::string& sBtlAuxDir) ; EEX_EXPORT bool SetBtlAuxDir( const std::string& sBtlAuxDir) ;
EEX_EXPORT bool SetBtlLuaData( const std::string& sLuaLibsDir, const std::string& sLuaLastRequire) ;
EEX_EXPORT IImportBtl* CreateImportBtl( void) ; EEX_EXPORT IImportBtl* CreateImportBtl( void) ;
} }
-38
View File
@@ -1,38 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EExImportOff.h Data : 28.11.24 Versione : 2.6k2
// Contenuto : Dichiarazione della interfaccia IImportOff.
//
//
//
// Modifiche : 28.11.24 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkGeomDB.h"
#include <string>
//----------------------- Macro per import/export ----------------------------
#undef EEK_EXPORT
#if defined( I_AM_EEX) // da definirsi solo nella DLL
#define EEX_EXPORT __declspec( dllexport)
#else
#define EEX_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
class __declspec( novtable) IImportOff
{
public :
virtual ~IImportOff( void) {}
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1) = 0 ;
} ;
//-----------------------------------------------------------------------------
extern "C" {
EEX_EXPORT IImportOff* CreateImportOff( void) ;
}
-38
View File
@@ -1,38 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2025-2025
//----------------------------------------------------------------------------
// File : EExImportPly.h Data : 28.02.25 Versione : 2.7b2
// Contenuto : Dichiarazione della interfaccia IImportPly.
//
//
//
// Modifiche : 28.02.25 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkGeomDB.h"
#include <string>
//----------------------- Macro per import/export ----------------------------
#undef EEK_EXPORT
#if defined( I_AM_EEX) // da definirsi solo nella DLL
#define EEX_EXPORT __declspec( dllexport)
#else
#define EEX_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
class __declspec( novtable) IImportPly
{
public :
virtual ~IImportPly( void) {}
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1) = 0 ;
} ;
//-----------------------------------------------------------------------------
extern "C" {
EEX_EXPORT IImportPly* CreateImportPly( void) ;
}
+2 -4
View File
@@ -1,14 +1,13 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2014-2023 // EgalTech 2014-2022
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkArcSpecial.h Data : 04.08.23 Versione : 2.5h1 // File : EGkArcSpecial.h Data : 20.12.22 Versione : 2.4l3
// Contenuto : Dichiarazione funzioni per calcolo speciale archi. // Contenuto : Dichiarazione funzioni per calcolo speciale archi.
// //
// //
// //
// Modifiche : 12.06.14 DS Creazione modulo. // Modifiche : 12.06.14 DS Creazione modulo.
// 20.12.22 DS Aggiunta GetArc2PCN. // 20.12.22 DS Aggiunta GetArc2PCN.
// 04.08.23 DS Aggiunta GetArc2PNB.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -28,6 +27,5 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
EGK_EXPORT ICurve* GetArc2PD( const Point3d& ptStart, const Point3d& ptEnd, double dDirStartDeg) ; 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* 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 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) ; EGK_EXPORT ICurveArc* GetArc2PCN( const Point3d& ptStart, const Point3d& ptEnd, const Point3d& ptNearCen, const Vector3d& vtN) ;
+8 -45
View File
@@ -1,21 +1,20 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2013-2023 // EgalTech 2013-2022
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkBBox3d.h Data : 12.05.23 Versione : 2.5e3 // File : EGkBBox3d.h Data : 17.08.22 Versione : 2.4h1
// Contenuto : Dichiarazione della classe axis aligned bounding box BBox3d. // Contenuto : Dichiarazione della classe axis aligned bounding box BBox3d.
// //
// //
// //
// Modifiche : 14.01.13 DS Creazione modulo. // Modifiche : 14.01.13 DS Creazione modulo.
// 17.08.22 DS Aggiunte GetDimX, GetDimY, GetDimZ. // 17.08.22 DS Aggiunte GetDimX, GetDimY, GetDimZ.
// 12.05.23 DS Aggiunta Overlaps con Box su riferimento. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#pragma once #pragma once
#include "/EgtDev/Include/EGkPoint3d.h" #include "/EgtDev/Include/EGkPoint3d.h"
#include <vector>
//----------------------- Macro per import/export ---------------------------- //----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT #undef EGK_EXPORT
@@ -48,7 +47,7 @@ class EGK_EXPORT BBox3d
{ m_ptMin = Point3d( +INFINITO, +INFINITO, +INFINITO) ; { m_ptMin = Point3d( +INFINITO, +INFINITO, +INFINITO) ;
m_ptMax = Point3d( -INFINITO, -INFINITO, -INFINITO) ; } m_ptMax = Point3d( -INFINITO, -INFINITO, -INFINITO) ; }
void Set( const Point3d& ptP) void Set( const Point3d& ptP)
{ m_ptMin = ptP ; m_ptMax = ptP ; } { m_ptMin = ptP ; m_ptMax = ptP ; }
void Set( double dX, double dY, double dZ) void Set( double dX, double dY, double dZ)
{ m_ptMin = Point3d( dX, dY, dZ) ; m_ptMax = m_ptMin ; } { m_ptMin = Point3d( dX, dY, dZ) ; m_ptMax = m_ptMin ; }
void Set( const Point3d& ptP1, const Point3d& ptP2) ; void Set( const Point3d& ptP1, const Point3d& ptP2) ;
@@ -66,8 +65,6 @@ class EGK_EXPORT BBox3d
void Add( const Point3d& ptP) ; void Add( const Point3d& ptP) ;
void Add( double dX, double dY, double dZ) ; void Add( double dX, double dY, double dZ) ;
void Add( const BBox3d& b3B) ; void Add( const BBox3d& b3B) ;
void Add( const std::vector<Point3d>& vPnt) { for ( const Point3d& pt: vPnt){
Add( pt) ; }}
void Expand( double dDelta) ; void Expand( double dDelta) ;
void Expand( double dDeltaX, double dDeltaY, double dDeltaZ) ; void Expand( double dDeltaX, double dDeltaY, double dDeltaZ) ;
const Point3d& GetMin( void) const const Point3d& GetMin( void) const
@@ -93,11 +90,10 @@ class EGK_EXPORT BBox3d
bool EnclosesXY( const Point3d& ptP) const ; bool EnclosesXY( const Point3d& ptP) const ;
bool Encloses( const BBox3d& b3Box) const ; bool Encloses( const BBox3d& b3Box) const ;
bool EnclosesXY( const BBox3d& b3Box) const ; bool EnclosesXY( const BBox3d& b3Box) const ;
bool Overlaps( const BBox3d& b3Box) const ; bool Overlaps( const BBox3d& b3B) const ;
bool OverlapsXY( const BBox3d& b3Box) const ; bool OverlapsXY( const BBox3d& b3B) const ;
bool Overlaps( const Frame3d& frBox, const BBox3d& b3Box) const ; bool FindIntersection( const BBox3d& b3B, BBox3d& b3Int) const ;
bool FindIntersection( const BBox3d& b3Box, BBox3d& b3Int) const ; bool FindIntersectionXY( const BBox3d& b3B, BBox3d& b3Int) const ;
bool FindIntersectionXY( const BBox3d& b3Box, BBox3d& b3Int) const ;
double SqDistFromPoint( const Point3d& ptP) const ; double SqDistFromPoint( const Point3d& ptP) const ;
double SqDistFromPointXY( const Point3d& ptP) const ; double SqDistFromPointXY( const Point3d& ptP) const ;
double DistFromPoint( const Point3d& ptP) const double DistFromPoint( const Point3d& ptP) const
@@ -130,36 +126,3 @@ class EGK_EXPORT BBox3d
Point3d m_ptMin ; Point3d m_ptMin ;
Point3d m_ptMax ; Point3d m_ptMax ;
} ; } ;
//----------------------------------------------------------------------------
//! Restituisce una copia in locale del box passato
//----------------------------------------------------------------------------
inline const BBox3d
GetToLoc( const BBox3d& b3Box, const Frame3d& frRef)
{
BBox3d b3New = b3Box ;
b3New.ToLoc( frRef) ;
return b3New ;
}
//----------------------------------------------------------------------------
//! Restituisce una copia in globale del box passato
//----------------------------------------------------------------------------
inline const BBox3d
GetToGlob( const BBox3d& b3Box, const Frame3d& frRef)
{
BBox3d b3New = b3Box ;
b3New.ToGlob( frRef) ;
return b3New ;
}
//----------------------------------------------------------------------------
//! Restituisce una copia dal primo al secondo riferimento del box passato
//----------------------------------------------------------------------------
inline const BBox3d
GetLocToLoc( const BBox3d& b3Box, const Frame3d& frOri, const Frame3d& frDest)
{
BBox3d b3New = b3Box ;
b3New.LocToLoc( frOri, frDest) ;
return b3New ;
}
-42
View File
@@ -1,42 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkCAvSilhouetteSurfTm.h Data : 08.06.24 Versione : 2.6f2
// Contenuto : Dichiarazione della funzione calcolo silhouette.
//
//
//
// Modifiche : 08.06.24 DS 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 CAvSilhouetteSurfTm( const ISurfTriMesh& Stm, const Plane3d& plPlane, double dTol, POLYLINEVECTOR& vPL) ;
//-----------------------------------------------------------------------------
class __declspec( novtable) ICAvParSilhouettesSurfTm
{
public :
virtual ~ICAvParSilhouettesSurfTm( void) {}
virtual bool SetData( const CISURFTMPVECTOR& vpStm, const Frame3d& frPlanes, double dTol) = 0 ;
virtual bool SetData( const CISURFTMPVECTOR& vpStm, const Frame3d& frPlanes, double dTol,
double dSideAng, double dDiam, double dCornRad, double dMaxMat, double dOffsR,
double dMaxDepth) = 0 ;
virtual bool GetSilhouette( double dLevel, POLYLINEVECTOR& vPL) = 0 ;
} ;
//-----------------------------------------------------------------------------
EGK_EXPORT ICAvParSilhouettesSurfTm* CreateCAvParSilhouettesSurfTm( void) ;
+2 -12
View File
@@ -23,8 +23,6 @@
#define EGK_EXPORT __declspec( dllimport) #define EGK_EXPORT __declspec( dllimport)
#endif #endif
class ICurveComposite ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class __declspec( novtable) ICAvToolSurfTm { class __declspec( novtable) ICAvToolSurfTm {
public : public :
@@ -37,17 +35,9 @@ class __declspec( novtable) ICAvToolSurfTm {
virtual bool SetGenTool( const ICurveComposite* pToolOutline) = 0 ; virtual bool SetGenTool( const ICurveComposite* pToolOutline) = 0 ;
virtual double GetToolRadius( void) const = 0 ; virtual double GetToolRadius( void) const = 0 ;
virtual double GetToolHeight( void) const = 0 ; virtual double GetToolHeight( void) const = 0 ;
virtual double GetToolTipHeight( void) const = 0 ;
virtual double GetToolTipRadius( void) const = 0 ;
virtual double GetToolCornRadius( void) const = 0 ;
virtual const ICurveComposite& GetToolOutline( bool bApprox = false) const = 0 ; virtual const ICurveComposite& GetToolOutline( bool bApprox = false) const = 0 ;
virtual bool TestPosition( const Point3d& ptT, const Vector3d& vtDir, const Vector3d& vtMove, virtual bool TestPosition( const Point3d& ptT, const Vector3d& vtDir, const Vector3d& vtMove, double& dTotDist) = 0 ;
double& dTotDist, Vector3d* pvtTriaN = nullptr) const = 0 ; virtual bool TestPath( PNTULIST& lPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dLinTol) = 0 ;
virtual bool TestPositionAdv( const Point3d& ptT, const Vector3d& vtDir, const Vector3d& vtMove,
double& dTotDist, VCT3DVECTOR& vVtN) const = 0 ;
virtual bool TestSeries( PNTUVECTOR& vPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dProgCoeff = 1) = 0 ;
virtual bool TestSeriesAdv( PNTUVVECTVECTOR& vPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dProgCoeff = 1) = 0 ;
virtual bool TestPath( PNTULIST& lPntM, const Vector3d& vtDir, const Vector3d& vtMove, double dLinTol, double dProgCoeff = 1) = 0 ;
} ; } ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
+3 -16
View File
@@ -1,13 +1,12 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2016-2024 // EgalTech 2016-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkCDeBoxClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2 // File : EGkCDeBoxClosedSurfTm.h Data : 09.01.20 Versione : 2.2a2
// Contenuto : Dichiarazione funzione verifica collisione tra // Contenuto : Dichiarazione funzione verifica collisione tra
// BoundingBox e Closed SurfTriMesh. // BoundingBox e Closed SurfTriMesh.
// //
// Modifiche : 05.10.16 DS Creazione modulo. // Modifiche : 05.10.16 DS Creazione modulo.
// 09.01.20 DS Cambio nome alla funzione e cambio parametri. // 09.01.20 DS Cambio nome alla funzione e cambio parametri.
// 24.03.24 DS Aggiunta TestBoxSurfTm.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -25,16 +24,4 @@
#endif #endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Il sistema di riferimento è allineato con il box e ha origine in un suo vertice. EGK_EXPORT bool CDeBoxClosedSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, const ISurfTriMesh& Stm) ;
// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL.
// Il sistema di riferimento del box è riferito a quello della superficie.
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeBoxClosedSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, const ISurfTriMesh& Stm, double dSafeDist) ;
//----------------------------------------------------------------------------
// Verifica l'interferenza tra il box e la superficie : restituisce true in caso di interferenza.
//----------------------------------------------------------------------------
EGK_EXPORT bool TestBoxSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, const ISurfTriMesh& Stm, double dSafeDist) ;
+6 -13
View File
@@ -1,12 +1,12 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2020-2024 // EgalTech 2020-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkCDeClosedSurfTmClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2 // File : EGkCDeSurfTmSurfTm.h Data : 13.11.20 Versione :
// Contenuto : Dichiarazione funzione verifica collisione tra // Contenuto : Dichiarazione funzione verifica collisione tra
// SurfTm e SurfTm. // SurfTm e SurfTm.
// //
// Modifiche : 13.11.20 LM Creazione modulo. // Modifiche : 13.11.20 LM Creazione modulo.
// 24.03.24 DS Aggiunta TestSurfTmSurfTm. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -23,15 +23,8 @@
#endif #endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// La funzione restituisce true in caso di collisone, false in caso di assenza
// di collisione o inconsistenza dei parametri di input.
// Le due superfici devono essere espresse nel medesimo sistema di riferimento. // Le due superfici devono essere espresse nel medesimo sistema di riferimento.
// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL. // La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL.
// La funzione restituisce : EGK_EXPORT bool CDeClosedSurfTmClosedSurfTm( const SurfTriMesh& SurfA, const SurfTriMesh& SurfB, double dSafeDist) ;
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeClosedSurfTmClosedSurfTm( const ISurfTriMesh& SurfA, const ISurfTriMesh& SurfB, double dSafeDist) ;
//----------------------------------------------------------------------------
// Verifica l'interferenza tra le due superfici : restituisce true in caso di interferenza.
//----------------------------------------------------------------------------
EGK_EXPORT bool TestSurfTmSurfTm( const ISurfTriMesh& SurfA, const ISurfTriMesh& SurfB, double dSafeDist) ;
+7 -16
View File
@@ -1,12 +1,12 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2020-2024 // EgalTech 2020-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkCDeConeFrustumClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2 // File : EGkCDeConeFrustumClosedSurfTm.h Data : 09.11.20 Versione :
// Contenuto : Dichiarazione funzione verifica collisione tra // Contenuto : Dichiarazione funzione verifica collisione tra
// Cone e Closed SurfTriMesh. // Cone e Closed SurfTriMesh.
// //
// Modifiche : 09.11.20 LM Creazione modulo. // Modifiche : 09.11.20 LM Creazione modulo.
// 24.03.24 DS Aggiunta TestConeFrustumSurfTm. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -23,17 +23,8 @@
#endif #endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Il sistema di riferimento deve avere l'asse di simmetria del cono come asse Z e origine nel centro della base. // Il sisitema di riferimento deve avere l'asse di simmetria del cono come asse Z e origine nel centro della base.
// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL. // La distanza di sicurezza ha effetto solo se maggiore di epsilon, altrimenti è ignorata ed è ininfluente.
// Il sistema di riferimento del cono è riferito a quello della superficie. // Il sistema di riferimento del cono deve essere immerso in quello della superficie.
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
EGK_EXPORT bool CDeConeFrustumClosedSurfTm( const Frame3d& frCone, double dBaseRad, double dTopRad, double dHeight, EGK_EXPORT bool CDeConeFrustumClosedSurfTm( const Frame3d& frCone, double dBaseRad, double dTopRad, double dHeight,
const ISurfTriMesh& Stm, double dSafeDist) ; double dSafeDist, const ISurfTriMesh& Stm) ;
//----------------------------------------------------------------------------
// Verifica l'interferenza tra il tronco di cono e la superficie : restituisce true in caso di interferenza.
//----------------------------------------------------------------------------
EGK_EXPORT bool TestConeFrustumSurfTm( const Frame3d& frCone, double dBaseRad, double dTopRad, double dHeight,
const ISurfTriMesh& Stm, double dSafeDist) ;
+7 -16
View File
@@ -1,12 +1,12 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2020-2024 // EgalTech 2020-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkCDeConvexTorusTria.h Data : 24.03.24 Versione : 2.6c2 // File : EGkCDeConvexTorusTria.h Data : 18.11.20 Versione :
// Contenuto : Dichiarazione funzione verifica collisione tra // Contenuto : Dichiarazione funzione verifica collisione tra
// toro convesso e SurfTriMesh. // toro convesso e SurfTriMesh.
// //
// Modifiche : 18.11.20 LM Creazione modulo. // Modifiche : 18.11.20 LM Creazione modulo.
// 24.03.24 DS Aggiunta TestConvexTorusSurfTm. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -24,18 +24,9 @@
#endif #endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Il toro convesso è il disco solido limitato dalla sola parte esterna del toro. // Il toro convesso è il disco limitato dalla sola parte esterna del toro.
// Raggio principale R1, raggio secondario R2. // Raggio principale R1, raggio secondario R2.
// Il toro è posto nel piano XY del suo riferimento, centrato sull'origine. // Il toro è posto nel piano XY del suo riferimento, centrato sull'origine.
// La funzione restituisce : // La funzione restituisce true in caso di collisione.
// - true in caso di collisione o inconsistenza dei parametri di input EGK_EXPORT bool CDeConvexTorusClosedSurfTm( const Frame3d& frTorusFrame, double dRad1, double dRad2,
// - false in caso di assenza di collisione. double dSafeDist, const ISurfTriMesh& tmSurf) ;
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeConvexTorusClosedSurfTm( const Frame3d& frTorus, double dRad1, double dRad2,
const ISurfTriMesh& tmSurf, double dSafeDist) ;
//----------------------------------------------------------------------------
// Verifica l'interferenza tra il toro convesso e la superficie : restituisce true in caso di interferenza
//----------------------------------------------------------------------------
EGK_EXPORT bool TestConvexTorusSurfTm( const Frame3d& frTorus, double dRad1, double dRad2,
const ISurfTriMesh& Stm, double dSafeDist) ;
+4 -16
View File
@@ -1,12 +1,12 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2020-2024 // EgalTech 2020-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkCDeCylClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2 // File : EGkCDeCylClosedSurfTm.h Data : 09.01.20 Versione : 2.2a2
// Contenuto : Dichiarazione funzione verifica collisione tra // Contenuto : Dichiarazione funzione verifica collisione tra
// Cylinder e Closed SurfTriMesh. // Cylinder e Closed SurfTriMesh.
// //
// Modifiche : 09.01.20 DS Creazione modulo. // Modifiche : 09.01.20 DS Creazione modulo.
// 24.03.24 DS Aggiunta TestCylSurfTm. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -23,16 +23,4 @@
#endif #endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Il sistema di riferimento deve avere l'asse di simmetria del cilindro come asse Z e origine nel centro della base. EGK_EXPORT bool CDeCylClosedSurfTm( const Frame3d& frCyl, double dR, double dH, double dSafeDist, const ISurfTriMesh& Stm) ;
// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL, altrimenti è ignorata ed è ininfluente.
// Il sistema di riferimento del cilindro è riferito a quello della superficie.
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeCylClosedSurfTm( const Frame3d& frCyl, double dR, double dH, const ISurfTriMesh& Stm, double dSafeDist) ;
//----------------------------------------------------------------------------
// Verifica l'interferenza tra il cilindro e la superficie : restituisce true in caso di interferenza.
//----------------------------------------------------------------------------
EGK_EXPORT bool TestCylSurfTm( const Frame3d& frCyl, double dR, double dH, const ISurfTriMesh& Stm, double dSafeDist) ;
+4 -15
View File
@@ -1,12 +1,12 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2020-2024 // EgalTech 2020-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkCDeRectPrismoidClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2 // File : EGkCDeRectPrismoidClosedSurfTm.h Data : 09.11.20 Versione :
// Contenuto : Dichiarazione funzione verifica collisione tra // Contenuto : Dichiarazione funzione verifica collisione tra
// prismoide a basi rettangolari e Closed SurfTriMesh. // prismoide a basi rettangolari e Closed SurfTriMesh.
// //
// Modifiche : 09.11.20 LM Creazione modulo. // Modifiche : 09.11.20 LM Creazione modulo.
// 24.03.24 DS Aggiunta TestRectPrismoidSurfTm. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -26,17 +26,6 @@
// Il sistema di riferimento deve avere l'origine nel centro della Base, asse X lungo // Il sistema di riferimento deve avere l'origine nel centro della Base, asse X lungo
// un segmento della stessa e asse Z ortogonale alle basi e diretto verso la base Top. // un segmento della stessa e asse Z ortogonale alle basi e diretto verso la base Top.
// Il sistema di riferimento della piramide deve essere immerso in quello della superficie. // Il sistema di riferimento della piramide deve essere immerso in quello della superficie.
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeRectPrismoidClosedSurfTm( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY, EGK_EXPORT bool CDeRectPrismoidClosedSurfTm( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY,
double dLenghtTopX, double dLenghtTopY, double dHeight, double dLenghtTopX, double dLenghtTopY, double dHeight,
const ISurfTriMesh& Stm, double dSafeDist) ; double dSafeDist, const ISurfTriMesh& Stm) ;
//----------------------------------------------------------------------------
// Verifica l'interferenza tra il Prismoide a basi rettangolari e la superficie : restituisce true in caso di interferenza.
//----------------------------------------------------------------------------
EGK_EXPORT bool TestRectPrismoidSurfTm( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY,
double dLenghtTopX, double dLenghtTopY, double dHeight,
const ISurfTriMesh& Stm, double dSafeDist) ;
+4 -13
View File
@@ -1,12 +1,12 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2020-2024 // EgalTech 2020-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkCDeSpheClosedSurfTm.h Data : 24.03.24 Versione : 2.6c2 // File : EGkCDeSpheClosedSurfTm.h Data : 09.01.20 Versione : 2.2a2
// Contenuto : Dichiarazione funzione verifica collisione tra // Contenuto : Dichiarazione funzione verifica collisione tra
// Sphere e Closed SurfTriMesh. // Sphere e Closed SurfTriMesh.
// //
// Modifiche : 09.01.20 DS Creazione modulo. // Modifiche : 09.01.20 DS Creazione modulo.
// 24.03.24 DS Aggiunta TestSpheSurfTm. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -23,13 +23,4 @@
#endif #endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// La funzione restituisce : EGK_EXPORT bool CDeSpheClosedSurfTm( const Point3d& ptCen, double dR, double dSafeDist, const ISurfTriMesh& Stm) ;
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeSpheClosedSurfTm( const Point3d& ptCen, double dR, const ISurfTriMesh& Stm, double dSafeDist) ;
//----------------------------------------------------------------------------
// Verifica l'interferenza tra la sfera e la superficie : restituisce true in caso di interferenza
//----------------------------------------------------------------------------
EGK_EXPORT bool TestSpheSurfTm( const Point3d& ptCen, double dR, const ISurfTriMesh& Stm, double dSafeDist) ;
-88
View File
@@ -1,88 +0,0 @@
//----------------------------------------------------------------------------
// 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 dRadOffs, double dStep,
double dAngle, double dOpenMinSafe, int nType, bool bSmooth, bool bCalcUnclReg, bool bInvert, bool bAvoidOpt,
bool bAllowZigZagOneWayBorders, bool bCalcFeed, const Point3d& ptEndPrec, const ISurfFlatRegion* pSfrLimit,
bool bAllOffs, double dMaxOptSize, double dLiTang, int nLiType, ICRVCOMPOPOVECTOR& vCrv) ;
EGK_EXPORT bool CalcSmoothCurve( ICurveComposite* pCrv, double dRightLen, double dLeftLen, bool bAsParam) ;
EGK_EXPORT bool CalcZigZagInfill( const ISurfFlatRegion* pSfr, double dStep, bool bSmooth, bool bRemoveOverlapLink,
ICRVCOMPOPOVECTOR& vCrvCompoRes) ;
//-----------------------------------------------------------------------------
// Sottotipo di lavorazione
enum { POCKET_ZIGZAG = 0,
POCKET_ONEWAY = 1,
POCKET_SPIRALIN = 2,
POCKET_SPIRALOUT = 3,
POCKET_CONFORMAL_ZIGZAG = 4,
POCKET_CONFORMAL_ONEWAY = 5
} ;
// Definizione di lato aperto e lato chiuso
enum {
TEMP_PROP_CLOSE_EDGE = 0,
TEMP_PROP_OPEN_EDGE = 1,
TEMP_PROP_OPEN_EDGE_IN_RAW = 2
} ;
// Definizione di curva invalida
enum {
TEMP_PROP_INVALID = - 1
} ;
// Definizione curva di raccordo per smussi
enum {
TEMP_PROP_SMOOTH = - 2
} ;
// Definizione tipo di curva per casi speciali
enum {
TEMP_PROP_SINGLE_CURVE = - 3,
TEMP_PROP_OPT_TRAPEZOID = - 4,
TEMP_PROP_BORDER_CURVE = - 5,
TEMP_PROP_OPT_CIRCLE = - 9
} ;
// Definizione tipo di curva per entrate da fuori
enum {
TEMP_PROP_OUT_START = - 6
} ;
// Definizione di curva attiva/non attiva
enum {
TEMP_PROP_CURVE_ACTIVE = - 7,
TEMP_PROP_CURVE_INACTIVE = - 8
} ;
// Definizione tipo LeadIn
enum {
LEAD_IN_NONE = 0,
LEAD_IN_GLIDE = 1,
LEAD_IN_ZIGZAG = 2,
LEAD_IN_HELIX = 3
} ;
+3 -1
View File
@@ -16,6 +16,7 @@
#include "/EgtDev/Include/EGkPointGrid3d.h" #include "/EgtDev/Include/EGkPointGrid3d.h"
#include "/EgtDev/Include/EGkGeoCollection.h" #include "/EgtDev/Include/EGkGeoCollection.h"
#include <unordered_set>
class IGeomDB ; class IGeomDB ;
@@ -58,6 +59,7 @@ class ChainCurves
EGK_EXPORT bool GetForkIds( INTVECTOR& vForkIds) ; EGK_EXPORT bool GetForkIds( INTVECTOR& vForkIds) ;
private : private :
typedef std::unordered_set<int> INTUSET ;
struct CrvData { struct CrvData {
int nId ; int nId ;
Point3d ptStart ; Point3d ptStart ;
@@ -90,7 +92,7 @@ class ChainCurves
private : private :
bool m_bAllowInvert ; bool m_bAllowInvert ;
double m_dToler ; double m_dToler ;
INTUNORDSET m_sCrvId ; INTUSET m_sCrvId ;
CRVDATAVECTOR m_vCrvData ; CRVDATAVECTOR m_vCrvData ;
PointGrid3d m_PointGrid ; PointGrid3d m_PointGrid ;
bool m_bFromNear ; bool m_bFromNear ;
-1
View File
@@ -108,7 +108,6 @@ class Color
const Color WHITE( 255, 255, 255) ; const Color WHITE( 255, 255, 255) ;
const Color LGRAY( 192, 192, 192) ; const Color LGRAY( 192, 192, 192) ;
const Color GRAY( 128, 128, 128) ; const Color GRAY( 128, 128, 128) ;
const Color DGRAY( 64, 64, 64) ;
const Color BLACK( 0, 0, 0) ; const Color BLACK( 0, 0, 0) ;
const Color RED( 255, 0, 0) ; const Color RED( 255, 0, 0) ;
const Color MAROON( 128, 0, 0) ; const Color MAROON( 128, 0, 0) ;
+1 -2
View File
@@ -31,7 +31,6 @@ class __declspec( novtable) ICurve : public IGeoObj
PP_END = 3} ; // punto coincidente con la fine PP_END = 3} ; // punto coincidente con la fine
enum ApprLineType { APL_STD = 0, // approssimazione standard enum ApprLineType { APL_STD = 0, // approssimazione standard
APL_SPECIAL = 10, // come STD, per composite conserva estremi di curve componenti APL_SPECIAL = 10, // come STD, per composite conserva estremi di curve componenti
APL_SPECIAL_INT = 20, // come SPECIAL, per composite anche almeno un interno di componenti non rettilinei
APL_LEFT = 1, // linee sempre a sinistra APL_LEFT = 1, // linee sempre a sinistra
APL_LEFT_CONVEX = 11, // linee sempre a sinistra convesse APL_LEFT_CONVEX = 11, // linee sempre a sinistra convesse
APL_RIGHT = 2, // linee sempre a destra APL_RIGHT = 2, // linee sempre a destra
@@ -80,7 +79,7 @@ class __declspec( novtable) ICurve : public IGeoObj
virtual bool ApproxWithArcsEx( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) const = 0 ; virtual bool ApproxWithArcsEx( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) const = 0 ;
virtual ICurve* CopyParamRange( double dUStart, double dUEnd) const = 0 ; virtual ICurve* CopyParamRange( double dUStart, double dUEnd) const = 0 ;
virtual bool Invert( void) = 0 ; virtual bool Invert( void) = 0 ;
virtual bool SimpleOffset( double dDist, int nType = OFF_FILLET, double dMaxAngExt = ANG_RIGHT) = 0 ; virtual bool SimpleOffset( double dDist, int nType = OFF_FILLET) = 0 ;
virtual bool SetExtrusion( const Vector3d& vtExtr) = 0 ; virtual bool SetExtrusion( const Vector3d& vtExtr) = 0 ;
virtual bool SetThickness( double dThick) = 0 ; virtual bool SetThickness( double dThick) = 0 ;
virtual bool ModifyStart( const Point3d& ptNewStart) = 0 ; virtual bool ModifyStart( const Point3d& ptNewStart) = 0 ;
+1 -1
View File
@@ -55,7 +55,7 @@ class __declspec( novtable) ICurveArc : public ICurve
virtual bool ChangeDeltaN( double dNewDeltaN) = 0 ; virtual bool ChangeDeltaN( double dNewDeltaN) = 0 ;
virtual bool ChangeAngCenter( double dNewAngCenDeg) = 0 ; virtual bool ChangeAngCenter( double dNewAngCenDeg) = 0 ;
virtual bool ChangeStartPoint( double dU) = 0 ; virtual bool ChangeStartPoint( double dU) = 0 ;
virtual bool ExtendedOffset( double dDist) = 0 ; virtual bool ExtendedOffset( double dDist, int nType = OFF_FILLET) = 0 ;
virtual bool ToExplementary( void) = 0 ; virtual bool ToExplementary( void) = 0 ;
virtual bool Flip( void) = 0 ; virtual bool Flip( void) = 0 ;
} ; } ;
+3 -97
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2014-2014 // EgalTech 2014-2014
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkCurveAux.h Data : 28.01.24 Versione : 2.6a2 // File : EGkCurveAux.h Data : 23.05.14 Versione : 1.5e9
// Contenuto : Dichiarazione funzioni ausiliarie per ICurve. // Contenuto : Dichiarazione funzioni ausiliarie per ICurve.
// //
// //
@@ -15,10 +15,6 @@
#include "/EgtDev/Include/EGkCurveComposite.h" #include "/EgtDev/Include/EGkCurveComposite.h"
class ICurveBezier ;
class ICurveLine ;
class ICurveArc ;
class ICurveComposite ;
//----------------------- Macro per import/export ---------------------------- //----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT #undef EGK_EXPORT
@@ -36,65 +32,17 @@ struct CNurbsData
bool bRat ; // flag di curva razionale (pesi non tutti unitari) bool bRat ; // flag di curva razionale (pesi non tutti unitari)
bool bPeriodic ; // flag per segnalare vettore dei nodi periodico bool bPeriodic ; // flag per segnalare vettore dei nodi periodico
bool bClosed ; // flag di curva chiusa 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) bool bExtraKnotes ; // flag per segnalare presenza di nodi extra all'inizio e fine (totale 2)
DBLVECTOR vU ; // vettore dei nodi DBLVECTOR vU ; // vettore dei nodi
PNTVECTOR vCP ; // vettore dei punti di controllo PNTVECTOR vCP ; // vettore dei punti di controllo
DBLVECTOR vW ; // vettore dei pesi DBLVECTOR vW ; // vettore dei pesi
CNurbsData( void) : nDeg( 0), bRat( false), bPeriodic( false), bClosed( false), bClamped( true), bExtraKnotes(false) {} CNurbsData( void) : nDeg( 0), bRat( false), bPeriodic( false), bClosed( false), bExtraKnotes( false) {}
} ; } ;
// N.B. : in caso la curva sia razionale i punti di controllo sono in forma NON OMOGENEA [ x, y, z, w] ( dove la forma OMOGENEA è [ w*x, w*y, w*z, w])
// tutte le operazioni richiedono la forma OMOGENEA, finite le quali posso riportarmi alla forma NON OMOGENEA
//----------------------------------------------------------------------------
//! Trasforma una curva in una nuova curva di Bezier semplice
EGK_EXPORT ICurve* CurveToBezierCurve( const ICurve* pCrv, int nDeg = 3, bool bMakeRatOrNot = false) ;
//----------------------------------------------------------------------------
//! Trasforma una linea in una nuova curva di Bezier semplice
EGK_EXPORT ICurveBezier* LineToBezierCurve( const ICurveLine* pCrvLine, int nDeg = 3, bool bMakeRatOrNot = false) ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Trasforma un arco in una nuova curva di Bezier semplice o composta //! Trasforma un arco in una nuova curva di Bezier semplice o composta
EGK_EXPORT ICurve* ArcToBezierCurve( const ICurveArc* pArc, int nDeg = 3, bool bMakeRatOrNot = true) ; EGK_EXPORT ICurve* ArcToBezierCurve( const ICurve* pArc) ;
//----------------------------------------------------------------------------
//! Trasforma una curva compo in una nuova curva di Bezier semplice o composta
EGK_EXPORT ICurve* CompositeToBezierCurve( const ICurveComposite* pCrv, int nDeg = 3, bool bMakeRatOrNot = false) ;
//----------------------------------------------------------------------------
//! Trasforma una curva bezier in una nuova curva di Bezier semplice o composta della razionalità e grado desiderato ( minimo 3)
EGK_EXPORT ICurve* EditBezierCurve( const ICurveBezier* pCrv, int nDeg = 3, bool bMakeRatOrNot = false, double dTol = 10 * EPS_SMALL) ;
//----------------------------------------------------------------------------
//! Approssima una bezier con una serie di bezier cubiche
EGK_EXPORT ICurve* ApproxBezierWithCubics( const ICurve* pCrv, double dTol) ;
//----------------------------------------------------------------------------
//! Approssima una bezier con una serie di bezier cubiche
EGK_EXPORT ICurveBezier* ApproxArcCurveBezierWithSingleCubic( const ICurve* pCrv, const Point3d& ptCen, const Vector3d& vtN) ;
//----------------------------------------------------------------------------
//! Campiona una serie di punti dalla curva e li approssima con una o più curve di bezier
EGK_EXPORT ICurve* ApproxCurveWithBezier( const ICurve*, double dTol, int nType) ;
//----------------------------------------------------------------------------
//! Interpola un set di punti e li approssima con una o più curve di bezier cubiche
EGK_EXPORT ICurve* InterpolatePointSetWithBezier( const PNTVECTOR& vPnt, double dLinTol, double dMaxLen) ;
//----------------------------------------------------------------------------
//! Aumento il grado della curva di Bezier
EGK_EXPORT ICurveBezier* BezierIncreaseDegree( const ICurveBezier* pCrvBezier) ;
//----------------------------------------------------------------------------
//! Riduco il grado della curva di Bezier
EGK_EXPORT ICurveBezier* BezierDecreaseDegree( const ICurveBezier* pCrvBezier, double dTol) ;
//----------------------------------------------------------------------------
//! Misura l'errore di approsimazione tra la curva originale e quella modificata
EGK_EXPORT bool CalcApproxError( const ICurve* pCrvOri, const ICurve* pCrvNew, double& dErr, int nPoints = 20) ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Trasforma una curva in una nuova curva semplice o composta senza archi (solo linee o curve di Bezier) //! Trasforma una curva in una nuova curva semplice o composta senza archi (solo linee o curve di Bezier)
@@ -126,45 +74,3 @@ EGK_EXPORT ICurve* ProjectCurveOnPlane( const ICurve& crCrv, const Plane3d& plPl
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Uniforma la pendenza di una composita tra quota iniziale e finale assegnate //! Uniforma la pendenza di una composita tra quota iniziale e finale assegnate
EGK_EXPORT bool AdjustCurveSlope( ICurveComposite* pCrv, double dNini, double dNfin) ; EGK_EXPORT bool AdjustCurveSlope( ICurveComposite* pCrv, double dNini, double dNfin) ;
//----------------------------------------------------------------------------
//! Calcolo del diagramma di Voronoi della curva/e, nei TempParam dei risultati la distanza
//! Per nBound tenere valore di default.
EGK_EXPORT bool CalcCurveVoronoiDiagram( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, int nBound = 3) ;
EGK_EXPORT bool CalcCurvesVoronoiDiagram( const CICURVEPVECTOR& vCrvC, ICURVEPOVECTOR& vCrvs, int nBound = 3) ;
//----------------------------------------------------------------------------
//! Calcolo del Medial Axis della curva/e (sottoinsieme del diagramma di Voronoi), nei TempParam dei risultati la distanza
const int WMAT_BOTHSIDES = 0 ;
const int WMAT_LEFT = 1 ;
const int WMAT_RIGHT = 2 ;
EGK_EXPORT bool CalcCurveMedialAxis( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, int nSide) ;
EGK_EXPORT bool CalcCurvesMedialAxis( const CICURVEPVECTOR& vCrvC, 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,
bool bMergeOnlySameProps = true) ;
//----------------------------------------------------------------------------
//! Calcola, nel caso di curve chiuse, il valore limite di offset ( in valore assoluto) che fa sparire la curva
EGK_EXPORT bool CalcCurveLimitOffset( const ICurve& crvC, double& dOffs) ;
//----------------------------------------------------------------------------
//! Calcola, se possibile, le curve di offset del valore richiesto come curve singole
EGK_EXPORT bool CalcCurveSingleCurvesOffset( const ICurve& crvC, ICURVEPOVECTOR& vCrvs, double dOffs) ;
//----------------------------------------------------------------------------
//! Calcola, se possibile, le curve di offset dato un vettore di curve aperte/chiuse
EGK_EXPORT bool CalcOffsetCurves( const ICURVEPVECTOR& vpCrvs, ICURVEPOVECTOR& vCrvs, double dOffs,
int nType = ICurve::OFF_FILLET) ;
//----------------------------------------------------------------------------
//! Calcola, se possibile, le fat curve di offset dato un vettore di curve aperte/chiuse
EGK_EXPORT bool CalcFatOffsetCurves( const ICURVEPVECTOR& vpCrvs, ICURVEPOVECTOR& vCrvs, double dOffs,
bool bSquareEnds, bool bSquareMids,
bool bMergeOnlySameProps = true) ;
//----------------------------------------------------------------------------
//! Resetta l'oggetto voronoi associato alla curva liberandone la memoria
EGK_EXPORT void ResetCurveVoronoi( const ICurve& crvC) ;
-7
View File
@@ -16,7 +16,6 @@
#include "/EgtDev/Include/EGkCurve.h" #include "/EgtDev/Include/EGkCurve.h"
class ICurveArc ; class ICurveArc ;
class ICurveLine ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
class __declspec( novtable) ICurveBezier : public ICurve class __declspec( novtable) ICurveBezier : public ICurve
@@ -28,9 +27,7 @@ class __declspec( novtable) ICurveBezier : public ICurve
virtual bool Init( int nDeg, bool bIsRational) = 0 ; virtual bool Init( int nDeg, bool bIsRational) = 0 ;
virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl) = 0 ; virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl) = 0 ;
virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl, double dW) = 0 ; virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl, double dW) = 0 ;
virtual bool SetControlWeight( int nInd, double dW) = 0 ;
virtual bool FromArc( const ICurveArc& crArc) = 0 ; virtual bool FromArc( const ICurveArc& crArc) = 0 ;
virtual bool FromLine( const ICurveLine& crLine) = 0 ;
virtual int GetDegree( void) const = 0 ; virtual int GetDegree( void) const = 0 ;
virtual bool IsRational( void) const = 0 ; virtual bool IsRational( void) const = 0 ;
virtual bool IsAPoint( void) const = 0 ; virtual bool IsAPoint( void) const = 0 ;
@@ -38,10 +35,6 @@ class __declspec( novtable) ICurveBezier : public ICurve
virtual double GetControlWeight( int nInd, bool* pbOk = NULL) const = 0 ; virtual double GetControlWeight( int nInd, bool* pbOk = NULL) const = 0 ;
virtual bool GetControlPolygonLength( double& dLen) const = 0 ; virtual bool GetControlPolygonLength( double& dLen) const = 0 ;
virtual int GetSingularParam( double& dPar) const = 0 ; virtual int GetSingularParam( double& dPar) const = 0 ;
virtual bool MakeRational( void) = 0 ;
virtual bool MakeRationalStandardForm( void) = 0 ;
virtual bool MakeNonRational( double dTol) = 0 ;
virtual bool IsALine( void) const = 0 ;
} ; } ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
+5 -6
View File
@@ -1,13 +1,13 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2023 // EgalTech 2015-2015
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkCurveByApprox.h Data : 28.07.23 Versione : 2.5g3 // File : EGkCurveByApprox.h Data : 23.07.15 Versione : 1.6g7
// Contenuto : Dichiarazione della classe CurveByApprox. // Contenuto : Dichiarazione della classe CurveByApprox.
// //
// //
// //
// Modifiche : 23.07.15 DS Creazione modulo. // Modifiche : 23.07.15 DS Creazione modulo.
// 28.07.23 DS GetArcs e GetArcsCorner. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -35,11 +35,10 @@ class CurveByApprox
EGK_EXPORT bool Reset( void) ; EGK_EXPORT bool Reset( void) ;
EGK_EXPORT bool AddPoint( const Point3d& ptP) ; EGK_EXPORT bool AddPoint( const Point3d& ptP) ;
EGK_EXPORT ICurve* GetCurve( int nType, double dLinTol, double dAngTolDeg, double dLinFea) ; EGK_EXPORT ICurve* GetCurve( int nType, double dLinTol, double dAngTolDeg, double dLinFea) ;
EGK_EXPORT bool GetArcs( double dLinTol, double dAngTolDeg, PolyArc& PA) ; EGK_EXPORT bool GetArcs( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) ;
EGK_EXPORT bool GetArcsCorner( double dLinTol, double dAngTolDeg, double dLinFea, PolyArc& PA) ;
public : public :
enum TYPE { ARCS = 0, ARCS_CORNER = 1, CUBIC_BEZIERS = 2} ; enum TYPE { ARCS_CORNER = 1, CUBIC_BEZIERS = 2} ;
private : private :
bool CalcParameterization( void) ; bool CalcParameterization( void) ;
+1 -1
View File
@@ -36,7 +36,7 @@ class CurveByInterp
public : public :
enum METHOD { BESSEL = 1, AKIMA = 2, AKIMA_CORNER = 3} ; enum METHOD { BESSEL = 1, AKIMA = 2, AKIMA_CORNER = 3} ;
enum TYPE { BIARCS = 1, CUBIC_BEZIERS = 2, CUBIC_BEZIERS_LONG = 3} ; enum TYPE { BIARCS = 1, CUBIC_BEZIERS = 2} ;
private : private :
bool CalcAkimaTangents( bool bDetectCorner) ; bool CalcAkimaTangents( bool bDetectCorner) ;
+1 -32
View File
@@ -41,7 +41,7 @@ class __declspec( novtable) ICurveComposite : public ICurve
virtual const ICurve* GetLastCurve( void) const = 0 ; virtual const ICurve* GetLastCurve( void) const = 0 ;
virtual const ICurve* GetPrevCurve( void) const = 0 ; virtual const ICurve* GetPrevCurve( void) const = 0 ;
virtual bool IsParamAtJoint( double dU) 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 ChangeStartPoint( double dU) = 0 ;
virtual bool AddPoint( const Point3d& ptStart) = 0 ; virtual bool AddPoint( const Point3d& ptStart) = 0 ;
virtual bool AddLine( const Point3d& ptNew, bool bEndOrStart = true) = 0 ; virtual bool AddLine( const Point3d& ptNew, bool bEndOrStart = true) = 0 ;
@@ -58,7 +58,6 @@ class __declspec( novtable) ICurveComposite : public ICurve
virtual bool ArcsBezierCurvesToArcsPerpExtr( double dLinTol, double dAngTolDeg) = 0 ; virtual bool ArcsBezierCurvesToArcsPerpExtr( double dLinTol, double dAngTolDeg) = 0 ;
virtual bool StraightArcsToLines( 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 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 RemoveSmallDefects( double dLinTol, double dAngTolDeg, bool bAlsoSpikes = false) = 0 ;
virtual bool RemoveUndercutOnY( double dLinTol, double dAngTolDeg) = 0 ; virtual bool RemoveUndercutOnY( double dLinTol, double dAngTolDeg) = 0 ;
virtual bool IsAPoint( void) const = 0 ; virtual bool IsAPoint( void) const = 0 ;
@@ -68,9 +67,6 @@ class __declspec( novtable) ICurveComposite : public ICurve
virtual bool IsATrapezoid( double dLinTol, Point3d& ptP, Vector3d& vtB1, Vector3d& vtL1, Vector3d& vtB2) const = 0 ; 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 SetCurveTempProp( int nCrv, int nProp, int nPropInd = 0) = 0 ;
virtual bool GetCurveTempProp( int nCrv, int& nProp, int nPropInd = 0) const = 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 ;
virtual bool GetOnlyPoint( Point3d& ptStart) const = 0 ;
} ; } ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -88,33 +84,6 @@ inline ICurveComposite* GetCurveComposite( IGeoObj* pGObj)
{ if ( pGObj == nullptr || pGObj->GetType() != CRV_COMPO) { if ( pGObj == nullptr || pGObj->GetType() != CRV_COMPO)
return nullptr ; return nullptr ;
return (static_cast<ICurveComposite*>(pGObj)) ; } 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) ;
double dParam = pCrv->GetTempParam( i) ;
pCrvCo->SetTempParam( dParam, i) ;
}
pCrvCo->AddCurve( pCrv) ;
return pCrvCo ;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Raccolte di puntatori a ICurveComposite // Raccolte di puntatori a ICurveComposite
-7
View File
@@ -45,10 +45,3 @@ inline ICurveLine* GetCurveLine( IGeoObj* pGObj)
{ if ( pGObj == nullptr || pGObj->GetType() != CRV_LINE) { if ( pGObj == nullptr || pGObj->GetType() != CRV_LINE)
return nullptr ; return nullptr ;
return (static_cast<ICurveLine*>(pGObj)) ; } 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
-60
View File
@@ -1,60 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2020-2024
//----------------------------------------------------------------------------
// File : EGkDistLineLine.h Data : 10.05.24 Versione : 2.6e31
// Contenuto : Dichiarazione della classe distanza fra elementi lineari.
//
//
//
// Modifiche : 06.11.20 LM Creazione modulo.
// 10.05.24 DS Portata in Include.
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkPoint3d.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
//----------------------------------------------------------------------------
class DistLineLine
{
public :
EGK_EXPORT DistLineLine( const Point3d& ptSt1, const Point3d& ptEn1,
const Point3d& ptSt2, const Point3d& ptEn2,
bool bIsSegment1 = true, bool bIsSegment2 = true) ;
EGK_EXPORT DistLineLine( const Point3d& ptSt1, const Vector3d& vtD1, double dLen1,
const Point3d& ptSt2, const Vector3d& vtD2, double dLen2,
bool bIsSegment1 = true, bool bIsSegment2 = true) ;
public :
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 bool GetMinDistPoints( Point3d& ptMinDist1, Point3d& ptMinDist2) const ;
EGK_EXPORT bool GetPositionsAtMinDistPoints( double& dPos1, double& dPos2) const ;
private :
void Calculate( const Point3d& ptSt1, const Vector3d& vtD1, double dLen1,
const Point3d& ptSt2, const Vector3d& vtD2, double dLen2,
bool bIsSegment1, bool bIsSegment2) ;
private:
double m_dSqDist ;
mutable double m_dDist ;
double m_dPos1 ;
double m_dPos2 ;
Point3d m_ptMinDist1 ;
Point3d m_ptMinDist2 ;
} ;
+19 -19
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2013-2024 // EgalTech 2013-2014
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkDistPointCurve.h Data : 20.05.24 Versione : 2.6e5 // File : EGkDistPointCurve.h Data : 02.01.14 Versione : 1.5a1
// Contenuto : Dichiarazione della classe distanza punto da Curva. // Contenuto : Dichiarazione della classe distanza punto da Curva.
// //
// //
@@ -49,25 +49,25 @@ class DistPointCurve
// Il flag bIsSegment vale solo per linee. // Il flag bIsSegment vale solo per linee.
public : public :
EGK_EXPORT bool GetSqDist( double& dSqDist) const ; EGK_EXPORT bool GetSqDist( double& dSqDist) ;
EGK_EXPORT bool GetDist( double& dDist) const ; EGK_EXPORT bool GetDist( double& dDist) ;
EGK_EXPORT bool IsEpsilon( double dTol) const EGK_EXPORT bool IsEpsilon( double dTol)
{ double dSqDist ; return ( GetSqDist( dSqDist) && ( dSqDist < SQ_EPS_ZERO || dSqDist < dTol * dTol)) ; } { double dSqDist ; return ( GetSqDist( dSqDist) && ( dSqDist < SQ_EPS_ZERO || dSqDist < dTol * dTol)) ; }
EGK_EXPORT bool IsSmall( void) const EGK_EXPORT bool IsSmall( void)
{ return IsEpsilon( EPS_SMALL) ; } { return IsEpsilon( EPS_SMALL) ; }
EGK_EXPORT bool IsZero( void) const EGK_EXPORT bool IsZero( void)
{ return IsEpsilon( EPS_ZERO) ; } { return IsEpsilon( EPS_ZERO) ; }
EGK_EXPORT int GetNbrMinDist( void) const EGK_EXPORT int GetNbrMinDist( void) { return (int) m_Info.size() ; }
{ return (int) m_Info.size() ; } EGK_EXPORT bool GetMinDistPoint( int nInd, Point3d& ptMinDist, int& nFlag) ;
EGK_EXPORT bool GetMinDistPoint( int nInd, Point3d& ptMinDist, int& nFlag) const ; EGK_EXPORT bool GetMinDistPoint( double dNearParam, Point3d& ptMinDist, int& nFlag) ;
EGK_EXPORT bool GetMinDistPoint( double dNearParam, Point3d& ptMinDist, int& nFlag) const ; EGK_EXPORT bool GetParamAtMinDistPoint( int nInd, double& dParam, int& nFlag) ;
EGK_EXPORT bool GetParamAtMinDistPoint( int nInd, double& dParam, int& nFlag) const ; EGK_EXPORT bool GetParamAtMinDistPoint( double dNearParam, double& dParam, int& nFlag) ;
EGK_EXPORT bool GetParamAtMinDistPoint( double dNearParam, double& dParam, int& nFlag) const ; EGK_EXPORT bool GetSideAtMinDistPoint( int nInd, const Vector3d& vtN, int& nSide) ;
EGK_EXPORT bool GetSideAtMinDistPoint( int nInd, const Vector3d& vtN, int& nSide) const ; EGK_EXPORT bool GetSideAtMinDistPoint( double dNearParam, const Vector3d& vtN, int& nSide) ;
EGK_EXPORT bool GetSideAtMinDistPoint( double dNearParam, const Vector3d& vtN, int& nSide) const ; EGK_EXPORT bool GetMinDistInfo( int nInd, MinDistPCInfo& aInfo) ;
EGK_EXPORT bool GetMinDistInfo( int nInd, MinDistPCInfo& aInfo) const ;
private : private :
DistPointCurve( void) ;
void LineCalculate( const Point3d& ptP, const ICurve& Curve, bool bIsSegment) ; void LineCalculate( const Point3d& ptP, const ICurve& Curve, bool bIsSegment) ;
void ArcCalculate( const Point3d& ptP, const ICurve& Curve) ; void ArcCalculate( const Point3d& ptP, const ICurve& Curve) ;
void CrvBezierCalculate( const Point3d& ptP, const ICurve& Curve) ; void CrvBezierCalculate( const Point3d& ptP, const ICurve& Curve) ;
-65
View File
@@ -1,65 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2013-2024
//----------------------------------------------------------------------------
// File : EGkDistPointLine.h Data : 20.05.24 Versione : 2.6e5
// Contenuto : Dichiarazione della classe distanza punto da linea/segmento.
//
//
//
// Modifiche : 30.12.12 DS Creazione modulo.
// 20.05.24 DS Pubblicato in Include.
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkPoint3d.h"
#include "/EgtDev/Include/EGkCurveLine.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
//-----------------------------------------------------------------------------
class DistPointLine
{
friend class DistPointCurve ;
public :
EGK_EXPORT DistPointLine( const Point3d& ptP,
const ICurveLine& crvLine, bool bIsSegment = true) ;
EGK_EXPORT DistPointLine( const Point3d& ptP,
const Point3d& ptIni, const Point3d& ptFin, bool bIsSegment = true) ;
EGK_EXPORT DistPointLine( const Point3d& ptP,
const Point3d& ptIni, const Vector3d& vtDir, double dLen, bool bIsSegment = true) ;
public :
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 (( m_dSqDist < 0) ? 0 : 1) ; }
EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDist) const ;
EGK_EXPORT bool GetParamAtMinDistPoint( double& dParam) const ;
private :
void Calculate( const Point3d& ptP,
const Point3d& ptIni, const Vector3d& vtDir, double dLen, bool bIsSegment) ;
private :
double m_dSqDist ;
mutable double m_dDist ;
double m_dParam ;
Point3d m_ptMinDist ;
} ;
-67
View File
@@ -1,67 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2018-2023
//----------------------------------------------------------------------------
// File : EgkDistPointSurfBz.cpp Data : 29.10.25 Versione : 2.7j3
// Contenuto : Dichiarazione della classe distanza Punto da superficie di Bezier.
//
//
//
// Modifiche : 29.10.25 DB Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkSurfBezier.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//----------------------------------------------------------------------------
// Calcola la distanza tra punto e superficie bezier.
// Risultati :
// - distanza
// - punto sulla superficie a minima distanza
// - corrispettivo punto nello spazio parametrico
// - normale alla superficie in quel punto
// - indicazione se il punto di riferimento è dalla parte interna o esterna della superficie ( se chiusa ).
// - indicazione se il punto di riferimento è a destra o sinistra della superficie ( se aperta )
//----------------------------------------------------------------------------
class DistPointSurfBz
{
public :
EGK_EXPORT DistPointSurfBz( const Point3d& ptP, const ISurfBezier& srfBz) ;
public :
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) const
{ return IsEpsilon( EPS_SMALL) ; }
EGK_EXPORT bool IsZero( void) const
{ return IsEpsilon( EPS_ZERO) ; }
EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDistPoint) const ;
EGK_EXPORT bool GetParamPoint( Point3d& ptParamPoint) const ;
EGK_EXPORT bool GetNorm( Vector3d& vtN) const ;
EGK_EXPORT bool IsPointInside( void) const
{ return ( m_bIsInside && m_bIsSurfClosed) ; }
EGK_EXPORT bool IsPointOnLeftSide( void) const
{ return m_bIsInside ;}
private :
void Calculate( const Point3d& ptP, const ISurfBezier& srfBz) ;
private :
double m_dDist ; // Minima distanza del punto dalla superficie
Point3d m_ptMinDistPoint ; // Punto sulla superficie a minima distanza
Point3d m_ptParam ; // punto corrispondente nello spazio parametrico
Vector3d m_vtN ; // normale alla superficie nel punto a minima distanza
bool m_bIsInside ; // Flag per punto interno o esterno alla superficie ( se chiusa )
bool m_bIsSurfClosed ; // Flag per superficie aperta o chiusa
} ;
-72
View File
@@ -1,72 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkDistPointSurfFr.h Data : 18.07.24 Versione : 2.6g5
// Contenuto : Dichiarazione della classe distanza Punto da FlatRegion.
//
//
//
// Modifiche : 18.07.24 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#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
//----------------------------------------------------------------------------
// Calcola la distanza tra punto e Flat Region.
// Risultati :
// - distanza
// - punto sulla superficie a minima distanza
// - indici del chunk e del loop e parametro del punto di frontiera a minima distanza
// - indicazione se il punto passato è sul bordo (PRS_ON), interno (PRS_IN) o esterno (PRS_OUT) alla regione.
// Note :
// - nel caso di più punti di frontiera vicini, ne viene calcolato solo uno
// - se il punto non giace nel piano della Regione
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
enum PrSide { PRS_IN = -1, PRS_ON = 0, PRS_OUT = +1} ;
// Corrispondono a MDS_LEFT, MDS_ON e MDS_RIGHT per giacitura punto rispetto a curva.
//----------------------------------------------------------------------------
class DistPointSurfFr
{
public :
EGK_EXPORT DistPointSurfFr( const Point3d& ptP, const ISurfFlatRegion& frSurf) ;
public :
EGK_EXPORT bool GetDist( double& dDist) const ;
EGK_EXPORT bool GetDistOnRegionPlane( double& dDist) const ;
EGK_EXPORT bool GetPointAtMinDist( Point3d& ptMinDistPoint) const ;
EGK_EXPORT bool GetParamAtMinDist( int& nMinChunk, int& nMinLoop, double& dMinPar) const ;
EGK_EXPORT bool GetSideAtMinDist( int& nSide) const ;
private :
void Calculate( const Point3d& ptP, const ISurfFlatRegion& frSurf) ;
private :
double m_dDist ;
double m_dDistOnPlane ;
int m_nMinChunk ;
int m_nMinLoop ;
double m_dMinPar ;
Point3d m_ptMinDistPoint ;
int m_nSide ;
} ;
//----------------------------------------------------------------------------
// Verifica velocizzata
EGK_EXPORT bool IsPointInsideSurfFr( const Point3d& ptP, const ISurfFlatRegion* pSfr, double dMinDist, bool& bInside, int& nChunk) ;
inline bool IsPointInsideSurfFr( const Point3d& ptP, const ISurfFlatRegion* pSfr, double dMinDist, bool& bInside)
{ int nChunk ; return IsPointInsideSurfFr( ptP, pSfr, dMinDist, bInside, nChunk) ;}
+15 -33
View File
@@ -1,13 +1,13 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2018-2023 // EgalTech 2018-2018
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkDistPointSurfTm.h Data : 06.07.23 Versione : 2.5g1 // File : EGkDistPointTria.h Data : 11.12.18 Versione : 1.9l2
// Contenuto : Dichiarazione della classe distanza Punto da Trimesh. // Contenuto : Dichiarazione della classe distanza Punto da Trimesh.
// //
// //
// //
// Modifiche : 06.12.18 LM Creazione modulo. // Modifiche : 06.12.18 LM Creazione modulo.
// 06.07.23 DS Aggiunta GetSurfTmNearestVertex. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -23,14 +23,6 @@
#define EGK_EXPORT __declspec( dllimport) #define EGK_EXPORT __declspec( dllimport)
#endif #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 ( se chiusa ).
// - indicazione se il punto di riferimento è a destra o sinistra della superficie ( se aperta )
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
class DistPointSurfTm class DistPointSurfTm
{ {
@@ -38,34 +30,24 @@ class DistPointSurfTm
EGK_EXPORT DistPointSurfTm( const Point3d& ptP, const ISurfTriMesh& tmSurf) ; EGK_EXPORT DistPointSurfTm( const Point3d& ptP, const ISurfTriMesh& tmSurf) ;
public : public :
EGK_EXPORT bool GetDist( double& dDist) const ; EGK_EXPORT bool GetDist( double& dDist) ;
EGK_EXPORT bool IsEpsilon( double dTol) const EGK_EXPORT bool IsEpsilon( double dTol)
{ return ( m_dDist >= 0. && ( m_dDist < EPS_ZERO || m_dDist < dTol)) ; } { return ( m_dDist >= 0. && ( m_dDist < EPS_ZERO || m_dDist < dTol)) ; }
EGK_EXPORT bool IsSmall( void) const EGK_EXPORT bool IsSmall( void)
{ return IsEpsilon( EPS_SMALL) ; } { return IsEpsilon( EPS_SMALL) ; }
EGK_EXPORT bool IsZero( void) const EGK_EXPORT bool IsZero( void)
{ return IsEpsilon( EPS_ZERO) ; } { return IsEpsilon( EPS_ZERO) ; }
EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDistPoint) const ; EGK_EXPORT bool GetMinDistPoint( Point3d& ptMinDistPoint) ;
EGK_EXPORT bool GetMinDistTriaIndex( int& nMinDistTriaIndex) const ; EGK_EXPORT bool GetMinDistTriaIndex( int& nMinDistTriaIndex) ;
EGK_EXPORT bool GetMinDistTriaIndices( INTVECTOR& vMinDistTriaIndex) const ; EGK_EXPORT bool IsPointInside( void)
EGK_EXPORT bool IsPointInside( void) const { return m_bIsInside ; }
{ return ( m_bIsInside && m_bIsSurfClosed) ; }
EGK_EXPORT bool IsPointOnLeftSide( void) const
{ return m_bIsInside ;}
private : private :
void Calculate( const Point3d& ptP, const ISurfTriMesh& tmSurf) ; void Calculate( const Point3d& ptP, const ISurfTriMesh& tmSurf) ;
private : private :
double m_dDist ; // Minima distanza del punto dalla superficie double m_dDist ;
Point3d m_ptMinDistPoint ; // Punto sulla superficie a minima distanza Point3d m_ptMinDistPoint ;
int m_nMinDistTriaIndex ; // Triangolo utilizzato per calcolare il punto a minima distanza int m_nMinDistTriaIndex ;
INTVECTOR m_vnMinDistTriaIndex ; // Indici dei triangoli a minima distanza bool m_bIsInside ;
bool m_bIsInside ; // Flag per punto interno o esterno alla superficie ( se chiusa )
bool m_bIsSurfClosed ; // Flag per superficie aperta o chiusa
} ; } ;
//----------------------------------------------------------------------------
// Calcola l'indice del vertice della superficie a minima distanza dal punto di riferimento.
//----------------------------------------------------------------------------
EGK_EXPORT int GetSurfTmNearestVertex( const Point3d& ptP, const ISurfTriMesh& tmSurf) ;
+3 -6
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2014-2025 // EgalTech 2014-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkDllMain.h Data : 11.09.25 Versione : 2.7i2 // File : EGkDllMain.h Data : 19.09.20 Versione : 2.2i2
// Contenuto : Prototipi funzioni generali della DLL. // Contenuto : Prototipi funzioni generali della DLL.
// //
// //
@@ -9,7 +9,6 @@
// Modifiche : 21.11.13 DS Creazione modulo. // Modifiche : 21.11.13 DS Creazione modulo.
// 13.01.15 DS Agg. funzioni Get sui font. // 13.01.15 DS Agg. funzioni Get sui font.
// 19.09.20 DS Agg. funzione SetEGkDebugLev. // 19.09.20 DS Agg. funzione SetEGkDebugLev.
// 11.09.25 DS Agg. funzione SetDefaultFont.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -43,11 +42,9 @@ EGK_EXPORT void SetEGkKeyType( int nType) ;
EGK_EXPORT void SetEGkNetHwKey( bool bNetHwKey) ; EGK_EXPORT void SetEGkNetHwKey( bool bNetHwKey) ;
// permette di inizializzare il font manager // permette di inizializzare il font manager
EGK_EXPORT void InitFontManager( const std::string& sNfeFontDir, const std::string& sDefaultFont) ; EGK_EXPORT void InitFontManager( const std::string& sNfeFontDir, const std::string& sDefaultFont) ;
// imposta il font di default
EGK_EXPORT void SetDefaultFont( const std::string& sDefaultFont) ;
// restituisce il direttorio dei font proprietari (Nfe) // restituisce il direttorio dei font proprietari (Nfe)
EGK_EXPORT const std::string& GetNfeFontDir( void) ; EGK_EXPORT const std::string& GetNfeFontDir( void) ;
// restituisce il nome del font di default // restituisce il nome del font di default
EGK_EXPORT const std::string& GetDefaultFont( void) ; EGK_EXPORT const std::string& GetDefaultFont( void) ;
// imposto il gestore eventi // imposto il gestore eventi
EGK_EXPORT bool SetEGkProcessEvents( psfProcEvents pFun) ; EGK_EXPORT bool SetEGkProcessEvents( pfProcEvents pFun) ;
+2 -6
View File
@@ -36,11 +36,8 @@ class __declspec( novtable) IExtDimension : public IGeoObj
const Vector3d& vtN, const std::string& sText) = 0 ; const Vector3d& vtN, const std::string& sText) = 0 ;
virtual bool SetDiametral( const Point3d& ptCen, const Point3d& ptPos, virtual bool SetDiametral( const Point3d& ptCen, const Point3d& ptPos,
const Vector3d& vtN, const std::string& sText) = 0 ; const Vector3d& vtN, const std::string& sText) = 0 ;
virtual bool SetAngular( const Point3d& ptV, const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptPos, virtual bool SetAngular( const Point3d& ptP1, const Point3d& ptV, const Point3d& ptP2, const Point3d& ptPos,
const Vector3d& vtN, const std::string& sText) = 0 ; const Vector3d& vtN, const std::string& sText ) = 0 ;
virtual bool SetAngularEx( const Point3d& ptV1, const Point3d& ptP1,
const Point3d& ptV2, const Point3d& ptP2, const Point3d& ptPos,
const Vector3d& vtN, const std::string& sText) = 0 ;
virtual const Vector3d& GetNormVersor( void) const = 0 ; virtual const Vector3d& GetNormVersor( void) const = 0 ;
virtual const Vector3d& GetDirVersor( void) const = 0 ; virtual const Vector3d& GetDirVersor( void) const = 0 ;
virtual const std::string& GetText( void) const = 0 ; virtual const std::string& GetText( void) const = 0 ;
@@ -58,7 +55,6 @@ class __declspec( novtable) IExtDimension : public IGeoObj
virtual double GetTextHeight( void) const = 0 ; virtual double GetTextHeight( void) const = 0 ;
virtual bool GetMidPoint( Point3d& ptMid) const = 0 ; virtual bool GetMidPoint( Point3d& ptMid) const = 0 ;
virtual bool GetCenterPoint( Point3d& ptCen) const = 0 ; virtual bool GetCenterPoint( Point3d& ptCen) const = 0 ;
virtual const std::string& GetSubType( void) const = 0 ;
virtual bool ApproxWithLines( double dLinTol, double dAngTolDeg, POLYLINELIST& lstPL) const = 0 ; virtual bool ApproxWithLines( double dLinTol, double dAngTolDeg, POLYLINELIST& lstPL) const = 0 ;
} ; } ;
+20 -73
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2013-2023 // EgalTech 2013-2014
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkFrame3d.h Data : 20.07.23 Versione : 2.5g2 // File : EGkFrame3d.h Data : 30.05.14 Versione : 1.5e10
// Contenuto : Dichiarazione della classe Reference Frame 3d. // Contenuto : Dichiarazione della classe Reference Frame 3d.
// //
// //
@@ -56,23 +56,23 @@ class EGK_EXPORT Frame3d
bool ToLoc( const Frame3d& frRef) ; bool ToLoc( const Frame3d& frRef) ;
bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ; bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ;
Frame3d& operator*=( const Frame3d& frRef) Frame3d& operator*=( const Frame3d& frRef)
{ ToGlob( frRef) ; return *this ; } { this->ToGlob( frRef) ; return *this ;}
Frame3d& operator/=( const Frame3d& frRef) Frame3d& operator/=( const Frame3d& frRef)
{ ToLoc( frRef) ; return *this ; } { this->ToLoc( frRef) ; return *this ;}
bool IsValid( void) const bool IsValid( void) const
{ return ( m_nType != ERR) ; } { return ( m_nType != ERR) ; }
int GetType( void) const int GetType( void) const
{ return m_nType ; } { return m_nType ;}
int GetZType( void) const int GetZType( void) const
{ return m_nZType ; } { return m_nZType ;}
const Point3d& Orig( void) const const Point3d& Orig( void) const
{ return m_ptOrig ; } { return m_ptOrig ;}
const Vector3d& VersX( void) const const Vector3d& VersX( void) const
{ return m_vtVersX ; } { return m_vtVersX ;}
const Vector3d& VersY( void) const const Vector3d& VersY( void) const
{ return m_vtVersY ; } { return m_vtVersY ;}
const Vector3d& VersZ( void) const const Vector3d& VersZ( void) const
{ return m_vtVersZ ; } { return m_vtVersZ ;}
bool GetRotationsCAC1( double& dAngC, double& dAngA, double& dAngC1) const ; bool GetRotationsCAC1( double& dAngC, double& dAngA, double& dAngC1) const ;
bool GetFixedAxesRotationsABC( double& dAngADeg, double& dAngBDeg, double& dAngCDeg) const ; bool GetFixedAxesRotationsABC( double& dAngADeg, double& dAngBDeg, double& dAngCDeg) const ;
@@ -97,67 +97,23 @@ const Frame3d GLOB_FRM ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Prodotto di due frame (porta il primo dal secondo nel globale) // Prodotto di due frame (porta il primo dal secondo nel globale)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Frame3d inline Frame3d
operator*( const Frame3d& frRef, const Frame3d& frOri) operator*( const Frame3d& frRef1, const Frame3d& frRef2)
{ {
Frame3d frNew = frRef ; Frame3d frRefR = frRef1 ;
frNew.ToGlob( frOri) ; frRefR.ToGlob( frRef2) ;
return frNew ; return frRefR ;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Divisione di due frame (porta il primo dal globale nel secondo) // Divisione di due frame (porta il primo dal globale nel secondo)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Frame3d inline Frame3d
operator/( const Frame3d& frRef, const Frame3d& frDest) operator/( const Frame3d& frRef1, const Frame3d& frRef2)
{ {
Frame3d frNew = frRef ; Frame3d frRefR = frRef1 ;
frNew.ToLoc( frDest) ; frRefR.ToLoc( frRef2) ;
return frNew ; return frRefR ;
}
//----------------------------------------------------------------------------
//! Restituisce il frame inverso di quello passato
//----------------------------------------------------------------------------
inline const Frame3d
GetInvert( const Frame3d& frRef)
{
Frame3d frNew = GLOB_FRM ;
frNew.ToLoc( frRef) ;
return frNew ;
}
//----------------------------------------------------------------------------
//! Restituisce una copia in locale del frame passato
//----------------------------------------------------------------------------
inline const Frame3d
GetToLoc( const Frame3d& frRef, const Frame3d& frDest)
{
Frame3d frNew = frRef ;
frNew.ToLoc( frDest) ;
return frNew ;
}
//----------------------------------------------------------------------------
//! Restituisce una copia in globale del frame passato
//----------------------------------------------------------------------------
inline const Frame3d
GetToGlob( const Frame3d& frRef, const Frame3d& frOri)
{
Frame3d frNew = frRef ;
frNew.ToGlob( frOri) ;
return frNew ;
}
//----------------------------------------------------------------------------
//! Restituisce una copia dal primo al secondo riferimento del frame passato
//----------------------------------------------------------------------------
inline const Frame3d
GetLocToLoc( const Frame3d& frRef, const Frame3d& frOri, const Frame3d& frDest)
{
Frame3d frNew = frRef ;
frNew.LocToLoc( frOri, frDest) ;
return frNew ;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -178,12 +134,3 @@ AreSameFrame( const Frame3d& frRef1, const Frame3d& frRef2)
return false ; return false ;
return true ; return true ;
} }
//----------------------------------------------------------------------------
// Verifica se il riferimento coincide con quello globale (o identità)
//----------------------------------------------------------------------------
inline bool
IsGlobFrame( const Frame3d& frRef)
{
return AreSameFrame( frRef, GLOB_FRM) ;
}
+1 -3
View File
@@ -58,8 +58,7 @@ enum GdbStatus { GDB_ST_OFF = 0,
//----------------- Costanti marcatura oggetti del DB geometrico --------------- //----------------- Costanti marcatura oggetti del DB geometrico ---------------
enum GdbMark { GDB_MK_OFF = 0, enum GdbMark { GDB_MK_OFF = 0,
GDB_MK_ON = 1, GDB_MK_ON = 1} ;
GDB_MK_ON_2 = 2} ;
//----------------- Costante per numero proprietà temporanee ------------------- //----------------- Costante per numero proprietà temporanee -------------------
const int GDB_NUM_TEMP_PROP = 2 ; const int GDB_NUM_TEMP_PROP = 2 ;
@@ -89,4 +88,3 @@ const std::string GDB_SI_DUPLIST = "!DLST" ; // Duplo Vettore Id entit
const std::string GDB_SI_DUPMODIF = "!DMOD" ; // Flag di sorgente per duplo modificato const std::string GDB_SI_DUPMODIF = "!DMOD" ; // Flag di sorgente per duplo modificato
const std::string GDB_SI_DUPLOCKED = "!DLOK" ; // Flag di duplo bloccato (da non aggiornare seguendo originale) const std::string GDB_SI_DUPLOCKED = "!DLOK" ; // Flag di duplo bloccato (da non aggiornare seguendo originale)
const std::string GDB_SI_DUPTOUPDATE = "!DTUP" ; // Flag di duplo da aggiornare quando sbloccato const std::string GDB_SI_DUPTOUPDATE = "!DTUP" ; // Flag di duplo da aggiornare quando sbloccato
const std::string GDB_SI_SHOWEDGES = "!SEDG" ; // Flag per forzare visualizzazione spigoli vivi anche in shading
+1 -1
View File
@@ -80,7 +80,7 @@ CalcMark( int nObjMark, int nParentMark)
if ( nObjMark == GDB_MK_OFF && nParentMark == GDB_MK_OFF) if ( nObjMark == GDB_MK_OFF && nParentMark == GDB_MK_OFF)
return GDB_MK_OFF ; return GDB_MK_OFF ;
return ( nParentMark != GDB_MK_OFF ? nParentMark : nObjMark) ; return GDB_MK_ON ;
} }
// ovviamente la marcatura si combina con lo stato, nel senso che un oggetto // ovviamente la marcatura si combina con lo stato, nel senso che un oggetto
// non visibile non viene nemmeno marcato // non visibile non viene nemmeno marcato
+2 -6
View File
@@ -1,14 +1,13 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2013-2023 // EgalTech 2013-2023
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkGdbIterator.h Data : 09.07.23 Versione : 2.5g1 // File : EGkGdbIterator.h Data : 29.01.23 Versione : 2.5a2
// Contenuto : Dichiarazione della interfaccia IGdbIterator. // Contenuto : Dichiarazione della interfaccia IGdbIterator.
// //
// //
// //
// Modifiche : 04.12.13 DS Creazione modulo. // Modifiche : 04.12.13 DS Creazione modulo.
// 29.01.23 DS Aggiunte GetAllInfo e CopyAllInfoFrom. // 29.01.23 DS Aggiunte GetAllInfo e CopyAllInfoFrom.
// 09.07.23 DS Aggiunte SetStipple e GetStipple.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -104,7 +103,7 @@ class __declspec( novtable) IGdbIterator
virtual bool RevertStatus( void) = 0 ; virtual bool RevertStatus( void) = 0 ;
virtual bool GetStatus( int& nStat) const = 0 ; virtual bool GetStatus( int& nStat) const = 0 ;
virtual bool GetCalcStatus( int& nStat) const = 0 ; virtual bool GetCalcStatus( int& nStat) const = 0 ;
virtual bool SetMark( int nMark = GDB_MK_ON) = 0 ; virtual bool SetMark( void) = 0 ;
virtual bool ResetMark( void) = 0 ; virtual bool ResetMark( void) = 0 ;
virtual bool GetMark( int& nMark) const = 0 ; virtual bool GetMark( int& nMark) const = 0 ;
virtual bool GetCalcMark( int& nMark) const = 0 ; virtual bool GetCalcMark( int& nMark) const = 0 ;
@@ -145,9 +144,6 @@ class __declspec( novtable) IGdbIterator
virtual bool RemoveInfo( const std::string& sKey) = 0 ; virtual bool RemoveInfo( const std::string& sKey) = 0 ;
virtual bool GetAllInfo( STRVECTOR& vsInfo) const = 0 ; virtual bool GetAllInfo( STRVECTOR& vsInfo) const = 0 ;
virtual bool CopyAllInfoFrom( const IGdbIterator& iIter) = 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 // TextureData
virtual bool SetTextureName( const std::string& sTxrName) = 0 ; virtual bool SetTextureName( const std::string& sTxrName) = 0 ;
virtual bool SetTextureFrame( const Frame3d& frTxrRef) = 0 ; virtual bool SetTextureFrame( const Frame3d& frTxrRef) = 0 ;
+6 -31
View File
@@ -15,7 +15,6 @@
#include "/EgtDev/Include/EGkPoint3d.h" #include "/EgtDev/Include/EGkPoint3d.h"
#include "/EgtDev/Include/EGkBBox3d.h" #include "/EgtDev/Include/EGkBBox3d.h"
#include "/EgtDev/Include/EGkFrame3d.h"
#include "/EgtDev/Include/EGkCurvePointDiffGeom.h" #include "/EgtDev/Include/EGkCurvePointDiffGeom.h"
#include "/EgtDev/Include/EgtNumCollection.h" #include "/EgtDev/Include/EgtNumCollection.h"
@@ -33,15 +32,15 @@ typedef std::list<POINTI> PNTILIST ; // lista di coppie punto, intero
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Raccolte di coppie Point3d,dU // Raccolte di coppie Point3d,dU
typedef std::pair<Point3d,double> POINTU ; // coppia punto, parametro (o altro) typedef std::pair<Point3d,double> POINTU ; // coppia punto, parametro (o altro)
typedef std::vector<POINTU> PNTUVECTOR ; // vettore di coppie punto, parametro typedef std::vector<POINTU> PNTUVECTOR ; // vettore di coppie punto, parametro
typedef std::list<POINTU> PNTULIST ; // lista di coppie punto, parametro typedef std::list<POINTU> PNTULIST ; // lista di coppie punto, parametro
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Raccolte di coppie Point3d,Point3d // Raccolte di coppie Point3d,Point3d
typedef std::pair<Point3d,Point3d> BIPOINT ; // coppia punto1, punto2 typedef std::pair<Point3d,Point3d> BIPOINT ; // coppia punto1, punto2
typedef std::vector<BIPOINT> BIPNTVECTOR ; // vettore di coppie punto1, punto2 typedef std::vector<BIPOINT> BIPNTVECTOR ; // vettore di coppie punto1, punto2
typedef std::list<BIPOINT> BIPNTLIST ; // lista di coppie punto1, punto2 typedef std::list<BIPOINT> BIPNTLIST ; // lista di coppie punto1, punto2
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Raccolte di Punti di curva con loro geometria differenziale // Raccolte di Punti di curva con loro geometria differenziale
@@ -53,32 +52,8 @@ typedef std::list<CrvPointDiffGeom> CPDGLIST ; // lista di CrvPointDiffGe
typedef std::vector<Vector3d> VCT3DVECTOR ; // vettore di vettori 3d typedef std::vector<Vector3d> VCT3DVECTOR ; // vettore di vettori 3d
typedef std::list<Vector3d> VCT3DLIST ; // lista di vettori 3d typedef std::list<Vector3d> VCT3DLIST ; // lista di vettori 3d
//----------------------------------------------------------------------------
// Raccolte di Frame3d
typedef std::vector<Frame3d> FRAME3DVECTOR ; // vettore di riferimenti 3d
typedef std::list<Frame3d> FRAME3DLIST ; // lista di riferimenti 3d
typedef std::vector<std::pair<Frame3d,int>> FRAME3DIVECTOR ; // vettore di riferimenti 3d e Id
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Raccolte di BBox3d // Raccolte di BBox3d
typedef std::vector<BBox3d> BOXVECTOR ; // vettore di bounding box 3d typedef std::vector<BBox3d> BOXVECTOR ; // vettore di bounding box 3d
typedef std::list<BBox3d> BOXLIST ; // lista 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 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
//----------------------------------------------------------------------------
// Raccolte di coppie Point3d,Bool
typedef std::pair<Point3d, bool> PNTBOOL ; // coppia punto, bool
typedef std::vector<PNTBOOL> PNTBOOLVECTOR ; // vettore di coppie punto, bool
typedef std::list<PNTBOOL> PNTBOOLLIST ; // lista di coppie punto, bool
//----------------------------------------------------------------------------
// Raccolte di triplette Point3d,dU,vector<Vector3d>
typedef std::tuple<Point3d, double, VCT3DVECTOR> PNTUVVECT ; // tripletta punto, parametro, vettore di Vector3d
typedef std::vector<PNTUVVECT> PNTUVVECTVECTOR ; // vettore di triplette punto, parametro, vettore di Vector3d
typedef std::list<PNTUVVECT> PNTUVVECTLIST ; // lista di triplette punto, parametro, vettore di Vector3d
-2
View File
@@ -56,8 +56,6 @@ class __declspec( novtable) IGeoObj
virtual const IObjGraphics* GetObjGraphics( void) const = 0 ; virtual const IObjGraphics* GetObjGraphics( void) const = 0 ;
virtual void SetTempProp( int nProp, int nPropInd = 0) = 0 ; virtual void SetTempProp( int nProp, int nPropInd = 0) = 0 ;
virtual int GetTempProp( int nPropInd = 0) const = 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 ;
} ; } ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
+1 -214
View File
@@ -15,14 +15,13 @@
#include "/EgtDev/Include/EGkGeomDB.h" #include "/EgtDev/Include/EGkGeomDB.h"
#include "/EgtDev/Include/EgtPointerOwner.h" #include "/EgtDev/Include/EgtPointerOwner.h"
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
bool bool
SaveGeoObj( IGeoObj* pGObj, const std::string& sFile, int nFlag = GDB_SV_BIN) SaveGeoObj( IGeoObj* pGObj, const std::string& sFile, int nFlag = GDB_SV_BIN)
{ {
// verifico validità oggetto // verifico validità oggetto
if ( pGObj == nullptr || ! pGObj->IsValid()) if ( pGObj == nullptr || ! pGObj->IsValid())
return false ; return false ;
// creo GeomDB temporaneo // creo GeomDB temporaneo
@@ -40,217 +39,5 @@ SaveGeoObj( IGeoObj* pGObj, const std::string& sFile, int nFlag = GDB_SV_BIN)
// rimuovo l'oggetto dal GeomDB // rimuovo l'oggetto dal GeomDB
bOk = ( pGeomDB->RemoveGeoObjAndErase( nId) != nullptr) && bOk ; bOk = ( pGeomDB->RemoveGeoObjAndErase( nId) != nullptr) && bOk ;
return bOk ;
}
//----------------------------------------------------------------------------
bool
SaveGeoObj( std::vector<IGeoObj*> vpGObj, const std::string& sFile, int nFlag = GDB_SV_BIN)
{
for ( int i = 0 ; i < int( vpGObj.size()); ++i) {
// verifico validità oggetto
if ( vpGObj[i] == nullptr || ! vpGObj[i]->IsValid() )
return false ;
}
// creo GeomDB temporaneo
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
if ( IsNull( pGeomDB))
return false ;
INTVECTOR vIds ;
int nLayId = 0 ;
for ( int i = 0 ; i < int( vpGObj.size()); ++i) {
// inserisco l'oggetto nel GeomDB (sotto pezzo/layer)
if ( i == 0) {
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
}
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vpGObj[i]) ;
vIds.push_back( nId) ;
if ( nId == GDB_ID_NULL)
return false ;
}
// eseguo il salvataggio
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
// rimuovo l'oggetto dal GeomDB
for ( int i = 0 ; i < int( vIds.size()); ++i)
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr ) && bOk ;
return bOk ;
}
//----------------------------------------------------------------------------
bool
SaveGeoObj( std::vector<std::vector<IGeoObj*>> vvpGObj, std::vector<Color> vCol,
const std::string& sFile, int nFlag = GDB_SV_BIN)
{
// verifico validità oggetti
for ( int i = 0 ; i < int( vvpGObj.size()) ; ++ i) {
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j) {
if ( vvpGObj[i][j] == nullptr || ! vvpGObj[i][j]->IsValid())
return false ;
}
}
if ( int( vCol.size()) <= int( vvpGObj.size())) {
for ( int i = int( vCol.size()) ; i < int( vvpGObj.size()) ; ++ i)
vCol.push_back( BLACK) ;
}
else
return false ;
// creo GeomDB temporaneo
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
if ( IsNull( pGeomDB))
return false ;
INTVECTOR vIds ;
int nLayId = 0 ;
// creo il part
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
// per ogni elemento i-esimo, creo un layer
for ( int i = 0 ; i < int( vvpGObj.size()) ; ++i) {
// creo il layer
nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
pGeomDB->SetMaterial( nLayId, vCol[i]) ;
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j ) {
// inserisco gli oggetti corrispondenti
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vvpGObj[i][j]) ;
vIds.push_back( nId) ;
if ( nId == GDB_ID_NULL)
return false ;
}
}
// eseguo il salvataggio
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
// rimuovo l'oggetto dal GeomDB
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
return bOk ;
}
bool SaveSfrBooleans( const ISurfFlatRegion* pSfrA, const ISurfFlatRegion* pSfrB,
const std::string& sFile, int nFlag = GDB_SV_BIN,
Color cColA = Color( 0., .5, .75, .5), Color cColB = Color( 0., .5, 0., .5))
{
// verifico validità superfici
if ( pSfrA == nullptr || ! pSfrA->IsValid() ||
pSfrB == nullptr || ! pSfrB->IsValid())
return false ;
// creo GeomDB temporaneo
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
if ( IsNull( pGeomDB))
return false ;
// inserisco le superfici nel GeomDB (sotto pezzo/layer)
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
int nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
int nIdSfrA = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, static_cast<IGeoObj*>( CloneSurfFlatRegion( pSfrA))) ;
if ( nIdSfrA == GDB_ID_NULL)
return false ;
pGeomDB->SetMaterial( nIdSfrA, cColA) ;
int nIdSfrB = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, static_cast<IGeoObj*>( CloneSurfFlatRegion( pSfrB))) ;
if ( nIdSfrB == GDB_ID_NULL)
return false ;
pGeomDB->SetMaterial( nIdSfrB, cColB) ;
// vettor di indici aggiunti
INTVECTOR vIds = { nIdSfrA, nIdSfrB} ;
// eseguo il salvataggio
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
// rimuovo l'oggetto dal GeomDB
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
return bOk ;
}
//----------------------------------------------------------------------------
bool
SaveGeoObj( std::vector<std::vector<IGeoObj*>> vvpGObj, std::vector<std::vector<Color>> vvCol,
const std::string& sFile, int nFlag = GDB_SV_BIN)
{
// verifico validità oggetti
for ( int i = 0 ; i < int( vvpGObj.size()) ; ++ i) {
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j) {
if ( vvpGObj[i][j] == nullptr || ! vvpGObj[i][j]->IsValid())
return false ;
}
}
// creo GeomDB temporaneo
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
if ( IsNull( pGeomDB))
return false ;
INTVECTOR vIds ;
// creo il part
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
// per ogni elemento i-esimo, creo un layer
for ( int i = 0 ; i < int( vvpGObj.size()) ; ++i) {
// creo il layer
int nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
for ( int j = 0 ; j < int( vvpGObj[i].size()) ; ++ j ) {
// inserisco gli oggetti corrispondenti
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vvpGObj[i][j]) ;
if ( nId == GDB_ID_NULL)
return false ;
// setto il colore ( se definito)
if ( i < int( vvCol.size()) && j < int( vvCol[i].size()))
pGeomDB->SetMaterial( nId, vvCol[i][j]) ;
vIds.push_back( nId) ;
}
}
// eseguo il salvataggio
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
// rimuovo l'oggetto dal GeomDB
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
return bOk ;
}
//----------------------------------------------------------------------------
bool
SaveGeoObj( std::vector<IGeoObj*> vpGObj, std::vector<Color> vCol,
const std::string& sFile, int nFlag = GDB_SV_BIN)
{
// verifico validità oggetti
if ( int( vpGObj.size()) != int( vCol.size()))
return false ;
// creo GeomDB temporaneo
PtrOwner<IGeomDB> pGeomDB( CreateGeomDB()) ;
if ( IsNull( pGeomDB))
return false ;
INTVECTOR vIds ;
// creo il part
int nPartId = pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, Frame3d()) ;
// creo il layer
int nLayId = pGeomDB->AddGroup( GDB_ID_NULL, nPartId, Frame3d()) ;
// scorro gli elementi da visualizzare
for ( int i = 0 ; i < int( vpGObj.size()) ; ++ i) {
if ( vpGObj[i] == nullptr || ! vpGObj[i]->IsValid())
continue ;
// inserisco gli oggetti corrispondenti
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nLayId, vpGObj[i]) ;
if ( nId == GDB_ID_NULL)
return false ;
// setto il colore
pGeomDB->SetMaterial( nId, vCol[i]) ;
// aggiungo l'Id ottenuto
vIds.push_back( nId) ;
}
// eseguo il salvataggio
bool bOk = pGeomDB->Save( vIds, sFile, nFlag) ;
// rimuovo l'oggetto dal GeomDB
for ( int i = 0 ; i < int( vIds.size()) ; ++i)
bOk = ( pGeomDB->RemoveGeoObjAndErase( vIds[i]) != nullptr) && bOk ;
return bOk ; return bOk ;
} }
+2 -7
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2013-2023 // EgalTech 2013-2023
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkGeomDB.h Data : 09.07.23 Versione : 2.5g1 // File : EGkGeomDB.h Data : 29.01.23 Versione : 2.5a
// Contenuto : Dichiarazione della interfaccia IGeomDB. // Contenuto : Dichiarazione della interfaccia IGeomDB.
// //
// //
@@ -12,7 +12,6 @@
// 30.05.14 DS Agg. metodi di Shear. // 30.05.14 DS Agg. metodi di Shear.
// 03.12.14 DS Aggiunta gestione riferimento di griglia. // 03.12.14 DS Aggiunta gestione riferimento di griglia.
// 29.01.23 DS Aggiunta GetAllInfo. // 29.01.23 DS Aggiunta GetAllInfo.
// 09.07.23 DS Aggiunte DumpStipple, SetStipple e GetStipple.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -134,7 +133,7 @@ class __declspec( novtable) IGeomDB
virtual bool RevertStatus( int nId) = 0 ; virtual bool RevertStatus( int nId) = 0 ;
virtual bool GetStatus( int nId, int& nStat) const = 0 ; virtual bool GetStatus( int nId, int& nStat) const = 0 ;
virtual bool GetCalcStatus( int nId, int& nStat) const = 0 ; virtual bool GetCalcStatus( int nId, int& nStat) const = 0 ;
virtual bool SetMark( int nId, int nMark = GDB_MK_ON) = 0 ; virtual bool SetMark( int nId) = 0 ;
virtual bool ResetMark( int nId) = 0 ; virtual bool ResetMark( int nId) = 0 ;
virtual bool GetMark( int nId, int& nMark) const = 0 ; virtual bool GetMark( int nId, int& nMark) const = 0 ;
virtual bool GetCalcMark( int nId, int& nMark) const = 0 ; virtual bool GetCalcMark( int nId, int& nMark) const = 0 ;
@@ -180,10 +179,6 @@ class __declspec( novtable) IGeomDB
virtual bool RemoveInfo( int nId, const std::string& sKey) = 0 ; virtual bool RemoveInfo( int nId, const std::string& sKey) = 0 ;
virtual bool GetAllInfo( int nId, STRVECTOR& vsInfo) const = 0 ; virtual bool GetAllInfo( int nId, STRVECTOR& vsInfo) const = 0 ;
virtual bool CopyAllInfoFrom( int nId, int nSouId) = 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 // TextureData
virtual bool DumpTextureData( int nId, std::string& sOut, bool bMM = true, const char* szNewLine = "\n") const = 0 ; 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 ; virtual bool SetTextureName( int nId, const std::string& sTxrName) = 0 ;
+3 -3
View File
@@ -56,11 +56,11 @@ private :
typedef std::list<ObjData> ObjList ; typedef std::list<ObjData> ObjList ;
typedef std::vector<ObjData*> PtrObjVector ; typedef std::vector<ObjData*> PtrObjVector ;
typedef std::unordered_map<int,ObjData*> IntPObjUmap ; typedef std::unordered_map<int,ObjData*> IntPObjUmap ;
typedef std::list<HashGrid1d*> GridList ;
private : private :
HashGrids1d( const HashGrids1d&) = delete ; typedef std::list<HashGrid1d*> GridList ; // Tipo per lista di hash grid
HashGrids1d& operator=( const HashGrids1d&) = delete ;
private :
void addGrid( ObjData& obj) ; void addGrid( ObjData& obj) ;
void addList( ObjData& obj) ; void addList( ObjData& obj) ;
+3 -3
View File
@@ -56,11 +56,11 @@ class HashGrids2d
typedef std::list<ObjData> ObjList ; typedef std::list<ObjData> ObjList ;
typedef std::vector<ObjData*> PtrObjVector ; typedef std::vector<ObjData*> PtrObjVector ;
typedef std::unordered_map<int,ObjData*> IntPObjUmap ; typedef std::unordered_map<int,ObjData*> IntPObjUmap ;
typedef std::list<HashGrid2d*> GridList ;
private : private :
HashGrids2d( const HashGrids2d&) = delete ; typedef std::list<HashGrid2d*> GridList ; // Tipo per lista di hash grid
HashGrids2d& operator=( const HashGrids2d&) = delete ;
private :
void addGrid( ObjData& obj) ; void addGrid( ObjData& obj) ;
void addList( ObjData& obj) ; void addList( ObjData& obj) ;
+3 -3
View File
@@ -56,11 +56,11 @@ class HashGrids3d
typedef std::list<ObjData> ObjList ; typedef std::list<ObjData> ObjList ;
typedef std::vector<ObjData*> PtrObjVector ; typedef std::vector<ObjData*> PtrObjVector ;
typedef std::unordered_map<int,ObjData*> IntPObjUmap ; typedef std::unordered_map<int,ObjData*> IntPObjUmap ;
typedef std::list<HashGrid3d*> GridList ;
private : private :
HashGrids3d( const HashGrids3d&) = delete ; typedef std::list<HashGrid3d*> GridList ; // Tipo per lista di hash grid
HashGrids3d& operator=( const HashGrids3d&) = delete ;
private :
void addGrid( ObjData& obj) ; void addGrid( ObjData& obj) ;
void addList( ObjData& obj) ; void addList( ObjData& obj) ;
-109
View File
@@ -1,109 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2025
//----------------------------------------------------------------------------
// File : EGkIntersCurvePlane.h Data : 07.11.25 Versione : 2.7k1
// Contenuto : Dichiarazione della classe intersezione curva-piano.
//
//
//
// Modifiche : 07.11.25 DB Creazione modulo.
//
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkPoint3d.h"
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkIntersCurves.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
//-----------------------------------------------------------------------------
// Tipo di intersezione
// nulla
// puntiforme
// sovrapposizione
// Costanti per tipo di approccio/allontanamento dall'intersezione
const int ICPT_NULL = 0 ; //!< Approccio/allontanamento non definito
const int ICPT_IN = 1 ; //!< Approccio/allontanamento interno
const int ICPT_OUT = 2 ; //!< Approccio/allontanamento esterno
const int ICPT_ON = 3 ; //!< Approccio/allontanamento sovrapposto
//! dati di intersezione tra una curva e un piano
struct IntCrvPlnInfo {
bool bOverlap ; //!< intersezione con overlap
IntCrvInfo Ici[2] ; //!< Ici[0] intersez. isolata o inizio overlap, Ici[1] fine overlap
// costruttore
IntCrvPlnInfo( void)
: bOverlap( false) {}
} ;
//! vettore di IntCrvPlnInfo
typedef std::vector<IntCrvPlnInfo> ICPIVECTOR ;
//-----------------------------------------------------------------------------
//! Classificazione di parti di curva rispetto ad un piano
struct CrvPlaneClass {
double dParS ;
double dParE ;
int nClass ;
// costruttori
CrvPlaneClass( void)
: dParS( 0), dParE( 0), nClass( 0) {}
CrvPlaneClass( double dPS, double dPE, int nC)
: dParS( dPS), dParE( dPE), nClass( nC) {}
} ;
//! Vettore di CrvPlaneClass
typedef std::vector<CrvPlaneClass> CRVPLNCVECTOR ;
//-----------------------------------------------------------------------------
// Costanti per classe parti di curva rispetto ad un piano
const int CRVPLN_NULL = 0 ; //!< Parte di curva non classificabile
const int CRVPLN_IN = 1 ; //!< Parte di curva interna ( dal lato negativo della normale)
const int CRVPLN_OUT = 2 ; //!< Parte di curva esterna ( dal lato positivo della normale)
const int CRVPLN_ON = 3 ; //!< Parte di curva sovrapposta al piano
//-----------------------------------------------------------------------------
//! Classe per calcolo intersezione tra una curve e un piano, nel riferimento locale del piano
class IntersCurvePlane
{
public :
//! Le intersezioni sono calcolate nel piano XY locale.<br>
EGK_EXPORT IntersCurvePlane( const ICurve& CurveA, const Point3d& ptOrig, const Vector3d& vtN) ;
public :
//! Indica la presenza di intersezioni con sovrapposizioni
EGK_EXPORT bool GetOverlaps( void) ;
//! Restituisce il numero di intersezioni (intersezioni doppie coincidenti e sovrapposte contano uno)
EGK_EXPORT int GetIntersCount( void) ;
//! Restituisce informazioni sull'intersezione di indice nInd ( 0 based)
EGK_EXPORT bool GetIntCrvPlnInfo( int nInd, IntCrvPlnInfo& aInfo) ;
//! Restituisce il punto di intersezione più vicino al punto passato
EGK_EXPORT bool GetIntersPointNearTo( const Point3d& ptNear, Point3d& ptI, double& dParam) ;
//! Restituisce la classificazione di una curva rispetto al piano
EGK_EXPORT bool GetCurveClassification( double dLenMin, CRVPLNCVECTOR& ccClass) ;
private :
IntersCurvePlane( void) ;
bool CalcIntersLinePlane( const Plane3d& plPlane, const ICurve& Curve, int nCrv = 0) ;
bool IsArcToApprox( const ICurve& Curve) ;
bool AdjustIntersParams( bool bAdjCrv) ;
bool CalcCurveClassification( const ICurve* pCurve, const ICPIVECTOR& Info, double dLenMin, CRVPLNCVECTOR& ccClass) ;
bool CalcCurveInOrOut( const ICurve* pCurve, CRVPLNCVECTOR& ccClass) ;
void OrderAndCompleteIntersections() ;
private :
int m_nIntersType ;
int m_nIntersCount ;
ICPIVECTOR m_Info ;
const ICurve* m_pCurve ; // puntatore alla curva
Plane3d m_plPlane ;
} ;
-63
View File
@@ -1,63 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkIntersCurveSurfTm.h Data : 23.02.24 Versione : 2.6b4
// Contenuto : Dichiarazione della classe intersezione Curva/SurfTriMesh.
//
//
//
// Modifiche : 23.02.24 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h"
#include "/EgtDev/Include/EGkIntersLineTria.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
//! dati di intersezione curva - superficie trimesh
struct IntCrvStmInfo {
int nILTT ; //!< tipo di intersezione curva-triangolo
double dU ; //!< parametro sulla curva (non distanza)
double dU2 ; //!< secondo parametro sulla curva (non distanza)
int nT ; //!< indice del triangolo della superficie trimesh
double dCosDN ; //!< coseno dell'angolo tra la direzione della curva e la normale del triangolo
Point3d ptI ; //!< punto di intersezione
Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto)
// costruttori
IntCrvStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2() {}
IntCrvStmInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP)
: nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {}
IntCrvStmInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2)
: nILTT( nIL), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {}
} ;
//! vettore di IntCrvStmInfo
typedef std::vector<IntCrvStmInfo> ICSIVECTOR ;
//-----------------------------------------------------------------------------
// Costanti tipo intersezione filtrata Curva-Superficie
enum CSiType { CSIT_NONE = 0,
CSIT_OUT_IN = 1,
CSIT_IN_OUT = 2,
CSIT_IN_IN = 3,
CSIT_OUT_OUT = 4,
CSIT_IN_ON = 5,
CSIT_ON_IN = 6,
CSIT_OUT_ON = 7,
CSIT_ON_OUT = 8} ;
//-----------------------------------------------------------------------------
EGK_EXPORT bool IntersCurveSurfTm( const ICurve& Curve, const ISurfTriMesh& Stm, double dLinTol, ICSIVECTOR& vInfo) ;
EGK_EXPORT bool IntersCurveSurfTmExt( const ICurve& Curve, const ISurfTriMesh& Stm, double dLinTol, INTDBLVECTOR& vInters) ;
EGK_EXPORT bool FilterCurveSurfTmInters( const ICurve& Curve, const ICSIVECTOR& vInfo, INTDBLVECTOR& vInters) ;
-89
View File
@@ -1,89 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024
//----------------------------------------------------------------------------
// File : EGkIntersLineSurfBez.h Data : 06.02.24 Versione : 2.6b1
// Contenuto : Dichiarazione della classe intersezione Linea/SurfTriMesh.
//
//
//
// Modifiche : 06.02.24 DB Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkSurfTriMesh.h"
#include "/EgtDev/Include/EGkIntersLineTria.h"
#include "/EgtDev/Include/EGkHashGrids2d.h"
#include "/EgtDev/Include/EGkSurfBezier.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
// Costanti tipo intersezione Linea SurfTriMesh dopo filtraggio
enum LSBiType { LSBT_NONE = 0,
LSBT_IN = 1,
LSBT_OUT = 2,
LSBT_TG_INI = 3,
LSBT_TG_FIN = 4,
LSBT_TOUCH = 5} ;
//-----------------------------------------------------------------------------
// Tipo di intersezione linea-triangolo ausiliario (della trimesh ausilaria)
enum IntLineTriaAuxType { ILTA_NO_TRIA = -1, // l'intersezione è stata calcolata direttamente con la superficie bezier
ILTA_NO = 0, // non c'è intersezione
ILTA_SEGM = 1, // una parte di linea appartiene all'interno del triangolo
ILTA_SEGM_ON_EDGE = 2, // una parte di linea appartiene ad un lato del triangolo
ILTA_VERT = 3, // intersezione coincide con un vertice
ILTA_EDGE = 4, // intersezione coincide con interno di un lato
ILTA_IN = 5} ; // intersezione in interno del triangolo
//-----------------------------------------------------------------------------
//! dati di intersezione linea - superficie trimesh
struct IntLinSbzInfo {
int nILTA ; //!< tipo di intersezione linea-triangolo // se -1 vuol dire che l'intersezione stata calcolata direttamente, senza usare la trimesh
double dU ; //!< parametro sulla linea
double dU2 ; //!< secondo parametro sulla linea
int nT ; //!< indice del triangolo della superficie trimesh // se -1 vuol dire che l'intersezione stata calcolata direttamente, senza usare la trimesh
double dCosDN ; //!< coseno dell'angolo tra la direzione della linea e la normale del triangolo
Point3d ptI ; //!< punto di intersezione
Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto)
Point3d ptUV ; //!< coordinate del punto nello spazio parametrico
Point3d ptUV2 ; //!< coordinate del secondo punto nello spazio parametrico
// costruttori
IntLinSbzInfo( void) : nILTA( ILTA_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2(), ptUV(), ptUV2(){}
IntLinSbzInfo( int nILT, double dUU, int nTT, double dCos, const Point3d& ptP, const Point3d ptSP)
: nILTA( nILT), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2(), ptUV( ptSP), ptUV2() {}
IntLinSbzInfo( int nILT, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2, const Point3d& ptSP, const Point3d& ptSP2)
: nILTA( nILT), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2), ptUV( ptSP), ptUV2( ptSP2) {}
} ;
//! vettore di IntLinSbzInfo
typedef std::vector<IntLinSbzInfo> ILSBIVECTOR ;
//-----------------------------------------------------------------------------
EGK_EXPORT bool IntersLineSurfBz( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfBezier* pSBz,
ILSBIVECTOR& vInfo, bool bFinite = true) ;
//-----------------------------------------------------------------------------
class IntersParLinesSurfBz
{
public :
EGK_EXPORT IntersParLinesSurfBz( const Frame3d& frLines, const ISurfBezier& SBz) ;
EGK_EXPORT bool GetInters( const Point3d& ptL, double dLen, ILSBIVECTOR& vInfo, bool bFinite = true) const ;
private :
bool m_bOk ;
const Frame3d m_frLines ;
const ISurfBezier* m_pSBz ;
HashGrids2d m_HGrids ;
} ;
//-----------------------------------------------------------------------------
EGK_EXPORT bool FilterLineSurfBzInters( const ILSBIVECTOR& vInfo, INTDBLVECTOR& vInters) ;
+11 -29
View File
@@ -29,31 +29,21 @@
//! dati di intersezione linea - superficie trimesh //! dati di intersezione linea - superficie trimesh
struct IntLinStmInfo { struct IntLinStmInfo {
int nILTT ; //!< tipo di intersezione linea-triangolo int nILTT ; //!< tipo di intersezione linea-triangolo
double dU ; //!< distanza sulla linea double dU ; //!< parametro sulla linea
double dU2 ; //!< seconda distanza sulla linea double dU2 ; //!< secondo parametro sulla linea
int nStm ; //!< indice della superficie TriMesh di intersezione
int nT ; //!< indice del triangolo della superficie trimesh int nT ; //!< indice del triangolo della superficie trimesh
double dCosDN ; //!< coseno dell'angolo tra la direzione della linea e la normale del triangolo double dCosDN ; //!< coseno dell'angolo tra la direzione della linea e la normale del triangolo
Point3d ptI ; //!< punto di intersezione Point3d ptI ; //!< punto di intersezione
Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto) Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto)
// costruttori // costruttori
IntLinStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nStm( 0), nT( 0), dCosDN( 0), ptI(), ptI2() {} IntLinStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2() {}
IntLinStmInfo( int nIL, double dUU, int nSurfTm, int nTT, double dCos, const Point3d& ptP) IntLinStmInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP)
: nILTT( nIL), dU( dUU), dU2( 0), nStm( nSurfTm), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {} : nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {}
IntLinStmInfo( int nIL, double dUU, double dUU2, int nSurfTm, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2) IntLinStmInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2)
: nILTT( nIL), dU( dUU), dU2( dUU2), nStm( nSurfTm), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {} : nILTT( nIL), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {}
} ; } ;
//! vettore di IntLinStmInfo //! vettore di IntLinStmInfo
typedef std::vector<IntLinStmInfo> ILSIVECTOR ; typedef std::vector<IntLinStmInfo> ILSIVECTOR ;
//-----------------------------------------------------------------------------
// Costanti tipo intersezione Linea SurfTriMesh dopo filtraggio
enum LSiType { LST_NONE = 0,
LST_IN = 1,
LST_OUT = 2,
LST_TG_INI = 3,
LST_TG_FIN = 4,
LST_TOUCH = 5} ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
EGK_EXPORT bool IntersLineSurfTm( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfTriMesh& Stm, EGK_EXPORT bool IntersLineSurfTm( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfTriMesh& Stm,
@@ -64,19 +54,11 @@ class IntersParLinesSurfTm
{ {
public : public :
EGK_EXPORT IntersParLinesSurfTm( const Frame3d& frLines, const ISurfTriMesh& Stm) ; EGK_EXPORT IntersParLinesSurfTm( const Frame3d& frLines, const ISurfTriMesh& Stm) ;
EGK_EXPORT IntersParLinesSurfTm( const Frame3d& frLines, const CISURFTMPVECTOR& vStm) ;
EGK_EXPORT bool GetInters( const Point3d& ptL, double dLen, ILSIVECTOR& vInfo, bool bFinite = true) const ; EGK_EXPORT bool GetInters( const Point3d& ptL, double dLen, ILSIVECTOR& vInfo, bool bFinite = true) const ;
private :
int GetSurfInd( int nT) const ;
private : private :
bool m_bOk ; bool m_bOk ;
const Frame3d m_frLines ; // direzione della linea come versore Z const Frame3d m_frLines ;
CISURFTMPVECTOR m_vpSTm ; // vettore delle superfici con cui calcolare le intersezioni con le linee const ISurfTriMesh* m_pSTm ;
INTVECTOR m_vBaseInd ; // [0, nTriaStm0, nTriaStm0 + nTriaStm1, nTriaStm0 + nTriaStm1 + nTriaStm2, ...] HashGrids2d m_HGrids ;
HashGrids2d m_HGrids ; // HasGrid di ottimizzazione per ricerca triangoli
} ; } ;
//-----------------------------------------------------------------------------
EGK_EXPORT bool FilterLineSurfTmInters( const ILSIVECTOR& vInfo, INTDBLVECTOR& vInters) ;
+6 -6
View File
@@ -23,6 +23,12 @@
#define EGK_EXPORT __declspec( dllimport) #define EGK_EXPORT __declspec( dllimport)
#endif #endif
//-----------------------------------------------------------------------------
EGK_EXPORT int IntersLineTria( const Point3d& ptL1, const Point3d& ptL2, const Triangle3d& trTria,
Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ;
EGK_EXPORT int IntersLineTria( const Point3d& ptL, const Vector3d& vtL, double dLen, const Triangle3d& trTria,
Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Tipo di intersezione linea-triangolo // Tipo di intersezione linea-triangolo
enum IntLineTriaType { ILTT_NO = 0, // non c'è intersezione enum IntLineTriaType { ILTT_NO = 0, // non c'è intersezione
@@ -31,9 +37,3 @@ enum IntLineTriaType { ILTT_NO = 0, // non c'
ILTT_VERT = 3, // intersezione coincide con un vertice ILTT_VERT = 3, // intersezione coincide con un vertice
ILTT_EDGE = 4, // intersezione coincide con interno di un lato ILTT_EDGE = 4, // intersezione coincide con interno di un lato
ILTT_IN = 5} ; // intersezione in interno del triangolo ILTT_IN = 5} ; // intersezione in interno del triangolo
//-----------------------------------------------------------------------------
EGK_EXPORT int IntersLineTria( const Point3d& ptL1, const Point3d& ptL2, const Triangle3d& trTria,
Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ;
EGK_EXPORT int IntersLineTria( const Point3d& ptL, const Vector3d& vtL, double dLen, const Triangle3d& trTria,
Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ;
-62
View File
@@ -1,62 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkIntersLineVolZmap.h Data : 22.02.24 Versione : 2.6b4
// Contenuto : Dichiarazione prototipi intersezione Linea/VolZmap.
//
//
//
// Modifiche : 22.02.24 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkVolZmap.h"
#include "/EgtDev/Include/EGkIntersLineTria.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
// dati di intersezione linea - volume Zmap
struct IntLineZmapInfo {
int nILTT ; // Tipo di intersezione linea-triangolo
double dU ; // Distanza sulla linea
double dU2 ; // Seconda distanza sulla linea
int nVox ; // Indice del voxel del triangolo
int nBlock ; // Indice del blocco del triangolo
Triangle3d trTria ; // Triangolo
double dCosDN ; // Coseno dell'angolo tra la direzione della linea e la normale del triangolo
Point3d ptI ; // Punto di intersezione
Point3d ptI2 ; // Secondo punto di intersezione (termine di tratto sovrapposto)
// Costruttori
IntLineZmapInfo( void)
: nILTT( ILTT_NO), dU( 0), dU2( 0), nVox( -1), nBlock( -1), trTria(), dCosDN( 0), ptI(), ptI2() {}
IntLineZmapInfo( int nIL, double dUU, int nVx, int nBl, Triangle3d& trTr, double dCos, const Point3d& ptP)
: nILTT( nIL), dU( dUU), dU2( 0), nVox( nVx), nBlock( nBl), dCosDN( dCos), trTria( trTr), ptI( ptP), ptI2() {}
IntLineZmapInfo( int nIL, double dUU, double dUU2, int nVx, int nBl, Triangle3d& trTr, double dCos,
const Point3d& ptP, const Point3d& ptP2)
: nILTT( nIL), dU( dUU), dU2( dUU2), nVox( nVx), nBlock( nBl), trTria( trTr), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {}
} ;
// Vettore di IntLineZmapInfo
typedef std::vector<IntLineZmapInfo> ILZIVECTOR ;
//-----------------------------------------------------------------------------
// Costanti tipo intersezione Linea VolZmap dopo filtraggio
enum LZiType { LZT_NONE = 0,
LZT_IN = 1,
LZT_OUT = 2,
LZT_TG_INI = 3,
LZT_TG_FIN = 4,
LZT_TOUCH = 5} ;
//-----------------------------------------------------------------------------
EGK_EXPORT bool IntersLineVolZmap( const Point3d& ptL, const Vector3d& vtL, const IVolZmap& Vzm, ILZIVECTOR& vInfo) ;
EGK_EXPORT bool FilterLineVolZmapInters( const ILZIVECTOR& vInfo, INTDBLVECTOR& vInters) ;
+8 -8
View File
@@ -32,13 +32,13 @@ EGK_EXPORT bool IntersPlaneSurfTm( const Plane3d& plPlane, const ISurfTriMesh& S
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
class IntersParPlanesSurfTm class IntersParPlanesSurfTm
{ {
public : public :
EGK_EXPORT IntersParPlanesSurfTm( const Frame3d& frPlanes, const ISurfTriMesh& Stm) ; EGK_EXPORT IntersParPlanesSurfTm( const Frame3d& frPlanes, const ISurfTriMesh& Stm) ;
EGK_EXPORT bool GetInters( double dDist, PNTVECTOR& vPnt, BIPNTVECTOR& vBpt, TRIA3DVECTOR& vTria) const ; EGK_EXPORT bool GetInters( double dDist, PNTVECTOR& vPnt, BIPNTVECTOR& vBpt, TRIA3DVECTOR& vTria) const ;
private : private :
bool m_bOk ; bool m_bOk ;
const Frame3d m_frPlanes ; const Frame3d m_frPlanes ;
const ISurfTriMesh* m_pSTm ; const ISurfTriMesh* m_pSTm ;
HashGrids1d m_HGrids ; HashGrids1d m_HGrids ;
} ; } ;
-27
View File
@@ -1,27 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkIntersPlaneVolZmap.h Data : 22.02.24 Versione : 2.6b4
// Contenuto : Dichiarazione prototipi intersezione Piano/VolZmap.
//
//
//
// Modifiche : 22.02.24 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkVolZmap.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
EGK_EXPORT bool IntersPlaneVolZmap( const Plane3d& plPlane, const IVolZmap& Vzm, ICURVEPOVECTOR& vpLoop) ;
+5 -89
View File
@@ -1,14 +1,13 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2024 // EgalTech 2015-2015
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkLuaAux.h Data : 08.05.24 Versione : 2.6e2 // File : EGkLuaAux.h Data : 21.03.15 Versione : 1.6c6
// Contenuto : Funzioni per gestione parametri geometrici con LUA. // Contenuto : Funzioni per gestione parametri geometrici con LUA.
// //
// //
// //
// Modifiche : 21.03.15 DS Creazione modulo. // Modifiche : 21.03.15 DS Creazione modulo.
// 14.04.24 DS Aggiunta gestione Quaternion. //
// 08.05.24 DS Aggiunta LuaSetParam per VCT3DVECTOR.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -18,7 +17,6 @@
#include "/EgtDev/Include/EGkPoint3d.h" #include "/EgtDev/Include/EGkPoint3d.h"
#include "/EgtDev/Include/EGkFrame3d.h" #include "/EgtDev/Include/EGkFrame3d.h"
#include "/EgtDev/Include/EGkBBox3d.h" #include "/EgtDev/Include/EGkBBox3d.h"
#include "/EgtDev/Include/EGkQuaternion.h"
#include "/EgtDev/Include/EGkColor.h" #include "/EgtDev/Include/EGkColor.h"
#include "/EgtDev/Include/EGkGeoCollection.h" #include "/EgtDev/Include/EGkGeoCollection.h"
#include "/EgtDev/Include/EGkSelection.h" #include "/EgtDev/Include/EGkSelection.h"
@@ -27,16 +25,12 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline bool inline bool
LuaGetParam( lua_State* L, int nInd, Vector3d& vtPar) LuaGetParam( lua_State* L, int nInd, Vector3d& vtPar)
{ { return LuaGetParam( L, nInd, vtPar.v) ; }
return LuaGetParam( L, nInd, vtPar.v) ;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline bool inline bool
LuaGetParam( lua_State* L, int nInd, Point3d& ptPar) LuaGetParam( lua_State* L, int nInd, Point3d& ptPar)
{ { return LuaGetParam( L, nInd, ptPar.v) ; }
return LuaGetParam( L, nInd, ptPar.v) ;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline bool inline bool
@@ -120,13 +114,6 @@ LuaGetParam( lua_State* L, int nInd, BBox3d& b3Par)
return true ; return true ;
} }
//----------------------------------------------------------------------------
inline bool
LuaGetParam( lua_State* L, int nInd, Quaternion& qtPar)
{
return LuaGetParam( L, nInd, qtPar.v) ;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline bool inline bool
LuaGetParam( lua_State* L, int nInd, Color& colPar) LuaGetParam( lua_State* L, int nInd, Color& colPar)
@@ -277,60 +264,6 @@ LuaSetParam( lua_State* L, const Vector3d& vtPar)
return true ; return true ;
} }
//-------------------------------------------------------------------------------
inline bool
LuaSetParam( lua_State* L, const PNTVECTOR& vPar)
{
try {
// recupero dimensione vettore
int nDim = int( vPar.size()) ;
// creo tavola principale
lua_createtable( L, nDim, 0) ;
// creo e inserisco tavola per ogni componente
for ( int i = 1 ; i <= nDim ; ++ i) {
// creo tavola componente
lua_createtable( L, 3, 0) ;
for ( int j = 1 ; j <= 3 ; ++ j) {
lua_pushnumber( L, vPar[i-1].v[j-1]) ;
lua_rawseti( L, -2, j) ;
}
// la metto nel vettore
lua_rawseti( L, -2, i) ;
}
}
catch( ...) {
return false ;
}
return true ;
}
//-------------------------------------------------------------------------------
inline bool
LuaSetParam( lua_State* L, const VCT3DVECTOR& vPar)
{
try {
// recupero dimensione vettore
int nDim = int( vPar.size()) ;
// creo tavola principale
lua_createtable( L, nDim, 0) ;
// creo e inserisco tavola per ogni componente
for ( int i = 1 ; i <= nDim ; ++ i) {
// creo tavola componente
lua_createtable( L, 3, 0) ;
for ( int j = 1 ; j <= 3 ; ++ j) {
lua_pushnumber( L, vPar[i-1].v[j-1]) ;
lua_rawseti( L, -2, j) ;
}
// la metto nel vettore
lua_rawseti( L, -2, i) ;
}
}
catch( ...) {
return false ;
}
return true ;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline bool inline bool
LuaSetParam( lua_State* L, const Point3d& ptPar) LuaSetParam( lua_State* L, const Point3d& ptPar)
@@ -436,23 +369,6 @@ LuaSetParam( lua_State* L, const BBox3d& b3Par)
return true ; return true ;
} }
//----------------------------------------------------------------------------
inline bool
LuaSetParam( lua_State* L, const Quaternion& qtPar)
{
try {
lua_createtable( L, 4, 0) ;
for ( int i = 1 ; i <= 4 ; ++ i) {
lua_pushnumber( L, qtPar.v[i-1]) ;
lua_rawseti( L, -2, i) ;
}
}
catch( ...) {
return false ;
}
return true ;
}
//------------------------------------------------------------------------------- //-------------------------------------------------------------------------------
inline bool inline bool
LuaSetParam( lua_State* L, const Color& colPar) LuaSetParam( lua_State* L, const Color& colPar)
-28
View File
@@ -1,28 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2025-2025
//----------------------------------------------------------------------------
// File : MultiGeomDB.h Data : 08.10.25 Versione : 2.7j1
// Contenuto : Dichiarazione delle funzioni tra due GeomDB.
//
//
//
// Modifiche : 08.10.25 DB Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkGeomDB.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 int Copy( IGeomDB* pSouGeomDB, int nSouId, IGeomDB* pDestGeomDB, int nDestId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) ;
EGK_EXPORT int CopyGlob( IGeomDB* pSouGeomDB, int nSouId, IGeomDB* pDestGeomDB, int nDestId, int nRefId, int nSonBeforeAfter = GDB_LAST_SON) ;
+2 -11
View File
@@ -1,13 +1,12 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2025 // EgalTech 2015-2019
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkOffsetCurve.h Data : 08.04.25 Versione : 2.7d1 // File : EGkOffsetCurve.h Data : 24.06.19 Versione : 2.1f2
// Contenuto : Dichiarazione classe per offset di ICurve. // Contenuto : Dichiarazione classe per offset di ICurve.
// //
// //
// Modifiche : 23.09.15 DS Creazione modulo. // Modifiche : 23.09.15 DS Creazione modulo.
// 24.06.19 DS Agg. GetShorterCurve. // 24.06.19 DS Agg. GetShorterCurve.
// 08.04.25 SP Agg. GetPointOffset.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -27,8 +26,6 @@
class OffsetCurve class OffsetCurve
{ {
public : public :
EGK_EXPORT OffsetCurve(): m_dLinTol( 10 * EPS_SMALL) {} ;
EGK_EXPORT OffsetCurve( double dLinTol) : m_dLinTol( dLinTol) {} ;
EGK_EXPORT ~OffsetCurve( void) ; EGK_EXPORT ~OffsetCurve( void) ;
public : public :
@@ -38,13 +35,7 @@ class OffsetCurve
EGK_EXPORT ICurve* GetCurve( void) ; EGK_EXPORT ICurve* GetCurve( void) ;
EGK_EXPORT ICurve* GetLongerCurve( void) ; EGK_EXPORT ICurve* GetLongerCurve( void) ;
EGK_EXPORT ICurve* GetShorterCurve( void) ; EGK_EXPORT ICurve* GetShorterCurve( void) ;
EGK_EXPORT bool GetPointOffset( Point3d& ptOffs, Vector3d& vtOut) ;
EGK_EXPORT double GetLinTol( void) const { return m_dLinTol ; }
EGK_EXPORT void SetLinTol( double dTol) { m_dLinTol = dTol ; }
private : private :
ICURVEPLIST m_CrvLst ; ICURVEPLIST m_CrvLst ;
Point3d m_ptOffs = P_INVALID ;
Vector3d m_vtOut = V_INVALID ;
double m_dLinTol ;
} ; } ;
-36
View File
@@ -8,7 +8,6 @@
// //
// Modifiche : 08.04.14 DS Creazione modulo. // Modifiche : 08.04.14 DS Creazione modulo.
// 25.02.15 DS Agg. PointInPlane*. // 25.02.15 DS Agg. PointInPlane*.
// 05.09.25 RE Agg. funzioni di confronto tra due piani
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -39,16 +38,6 @@ class Plane3d
m_dDist = ( ptP - ORIG) * m_vtN ; m_dDist = ( ptP - ORIG) * m_vtN ;
return true ; return true ;
} }
bool Set( const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptP3)
{ if ( AreSamePointApprox( ptP1, ptP2) ||
AreSamePointApprox( ptP2, ptP3) ||
AreSamePointApprox( ptP3, ptP1)) {
m_vtN = V_NULL ;
return false ;
}
Vector3d vtN = ( ptP2 - ptP1) ^ ( ptP3 - ptP2) ;
return Set( ptP1, vtN) ;
}
void Reset( void) void Reset( void)
{ m_vtN = V_NULL ; { m_vtN = V_NULL ;
m_dDist = 0 ; m_dDist = 0 ;
@@ -155,28 +144,3 @@ PointInPlaneExact( const Point3d& ptP, const Plane3d& plPlane)
{ {
return ( abs( (( ptP - ORIG) * plPlane.GetVersN()) - plPlane.GetDist()) < EPS_ZERO) ; return ( abs( (( ptP - ORIG) * plPlane.GetVersN()) - plPlane.GetDist()) < EPS_ZERO) ;
} }
//-----------------------------------------------------------------------------
inline bool
AreSamePlaneEpsilon( const Plane3d& plPlaneA, const Plane3d& plPlaneB, double dToler)
{
return ( AreSameVectorEpsilon( plPlaneA.GetVersN(), plPlaneB.GetVersN(), dToler) &&
PointInPlaneEpsilon( plPlaneA.GetPoint(), plPlaneB, dToler)) ;
}
//-----------------------------------------------------------------------------
inline bool
AreSamePlaneApprox( const Plane3d& plPlaneA, const Plane3d& plPlaneB)
{
return ( AreSameVectorApprox( plPlaneA.GetVersN(), plPlaneB.GetVersN()) &&
PointInPlaneApprox( plPlaneA.GetPoint(), plPlaneB)) ;
}
//-----------------------------------------------------------------------------
inline bool
AreSamePlaneExact( const Plane3d plPlaneA, const Plane3d& plPlaneB)
{
return ( AreSameVectorExact( plPlaneA.GetVersN(), plPlaneB.GetVersN()) &&
PointInPlaneExact( plPlaneA.GetPoint(), plPlaneB)) ;
}
+23 -56
View File
@@ -1,13 +1,12 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2013-2023 // EgalTech 2013-2022
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkPoint3d.h Data : 23.08.23 Versione : 2.5h2 // File : EGkPoint3d.h Data : 22.08.224 Versione : 2.4h2
// Contenuto : Dichiarazione della classe Punto 3d. // Contenuto : Dichiarazione della classe Punto 3d.
// //
// //
// //
// Modifiche : 30.12.12 DS Creazione modulo. // Modifiche : 30.12.12 DS Creazione modulo.
// 23.08.23 DS Aggiunto P_INVALID.
// //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -43,9 +42,6 @@ class EGK_EXPORT Point3d
void Set( double dX, double dY, double dZ) { x = dX ; y = dY ; z = dZ ;} void Set( double dX, double dY, double dZ) { x = dX ; y = dY ; z = dZ ;}
public : public :
//! Verifica la validità delle coordinate del punto
bool IsValid( void) const
{ return ( std::isfinite( x) && std::isfinite( y) && std::isfinite( z)) ; }
//! Verifica se il punto è quasi l'origine //! Verifica se il punto è quasi l'origine
bool IsSmall( void) const bool IsSmall( void) const
{ return ( ( x * x + y * y + z * z) < SQ_EPS_SMALL) ; } { return ( ( x * x + y * y + z * z) < SQ_EPS_SMALL) ; }
@@ -54,19 +50,19 @@ class EGK_EXPORT Point3d
{ return ( ( x * x + y * y + z * z) < SQ_EPS_ZERO) ; } { return ( ( x * x + y * y + z * z) < SQ_EPS_ZERO) ; }
//! Somma sul posto con un vettore //! Somma sul posto con un vettore
Point3d& operator +=( const Vector3d& vtV) Point3d& operator +=( const Vector3d& vtV)
{ x += vtV.x ; y += vtV.y ; z += vtV.z ; return *this ; } { this->x += vtV.x ; this->y += vtV.y ; this->z += vtV.z ; return *this ; }
//! Sottrazione sul posto con un vettore //! Sottrazione sul posto con un vettore
Point3d& operator -=( const Vector3d& vtV) Point3d& operator -=( const Vector3d& vtV)
{ x -= vtV.x ; y -= vtV.y ; z -= vtV.z ; return *this ; } { this->x -= vtV.x ; this->y -= vtV.y ; this->z -= vtV.z ; return *this ; }
//! Somma sul posto con un altro punto (valida solo se equivalente ad una combinazione baricentrica) //! Somma sul posto con un altro punto (valida solo se equivalente ad una combinazione baricentrica)
Point3d& operator +=( const Point3d& ptP) Point3d& operator +=( const Point3d& ptP)
{ x += ptP.x ; y += ptP.y ; z += ptP.z ; return *this ; } { this->x += ptP.x ; this->y += ptP.y ; this->z += ptP.z ; return *this ; }
//! Moltiplicazione sul posto con un numero //! Moltiplicazione sul posto con un numero
Point3d& operator *=( double dMul) Point3d& operator *=( double dMul)
{ x *= dMul ; y *= dMul ; z *= dMul ; return *this ; } { this->x *= dMul ; this->y *= dMul ; this->z *= dMul ; return *this ; }
//! Divisione sul posto con un numero //! Divisione sul posto con un numero
Point3d& operator /=( double dDiv) Point3d& operator /=( double dDiv)
{ double dMul = 1 / dDiv ; x *= dMul ; y *= dMul ; z *= dMul ; return *this ; } { double dMul = 1 / dDiv ; this->x *= dMul ; this->y *= dMul ; this->z *= dMul ; return *this ; }
//! Traslazione dato il vettore di movimento //! Traslazione dato il vettore di movimento
void Translate( const Vector3d& vtMove) ; void Translate( const Vector3d& vtMove) ;
//! Rotazione attorno ad un asse per un punto, dato l'angolo in gradi //! Rotazione attorno ad un asse per un punto, dato l'angolo in gradi
@@ -100,15 +96,13 @@ class EGK_EXPORT Point3d
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Punti notevoli // Punti notevoli
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Punto non valido
const Point3d P_INVALID( NAN, NAN, NAN) ;
//! Punto origine //! Punto origine
const Point3d ORIG( 0, 0, 0) ; const Point3d ORIG( 0, 0, 0) ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Somma di due punti (valida solo se equivalente ad una combinazione baricentrica) //! Somma di due punti (valida solo se equivalente ad una combinazione baricentrica)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Point3d inline Point3d
operator+( const Point3d& ptP1, const Point3d& ptP2) operator+( const Point3d& ptP1, const Point3d& ptP2)
{ {
return Point3d( ptP1.x + ptP2.x, ptP1.y + ptP2.y, ptP1.z + ptP2.z) ; return Point3d( ptP1.x + ptP2.x, ptP1.y + ptP2.y, ptP1.z + ptP2.z) ;
@@ -117,16 +111,16 @@ operator+( const Point3d& ptP1, const Point3d& ptP2)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Somma di un punto e un vettore //! Somma di un punto e un vettore
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Point3d inline Point3d
operator+( const Point3d& ptP1, const Vector3d& vtV2) operator+( const Point3d& ptP1, const Vector3d& vtV2)
{ {
return Point3d( ptP1.x + vtV2.x, ptP1.y + vtV2.y, ptP1.z + vtV2.z) ; return Point3d( ptP1.x + vtV2.x, ptP1.y + vtV2.y, ptP1.z + vtV2.z) ;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Opposto di un punto, genera un vettore //! Opposto di un punto
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
operator-( const Point3d& ptP) operator-( const Point3d& ptP)
{ {
return Vector3d( - ptP.x, - ptP.y, - ptP.z) ; return Vector3d( - ptP.x, - ptP.y, - ptP.z) ;
@@ -135,7 +129,7 @@ operator-( const Point3d& ptP)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Differenza di due punti, genera un vettore //! Differenza di due punti, genera un vettore
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
operator-( const Point3d& ptP1, const Point3d& ptP2) operator-( const Point3d& ptP1, const Point3d& ptP2)
{ {
return Vector3d( ptP1.x - ptP2.x, ptP1.y - ptP2.y, ptP1.z - ptP2.z) ; return Vector3d( ptP1.x - ptP2.x, ptP1.y - ptP2.y, ptP1.z - ptP2.z) ;
@@ -144,7 +138,7 @@ operator-( const Point3d& ptP1, const Point3d& ptP2)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Sottrazione di un punto e un vettore //! Sottrazione di un punto e un vettore
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Point3d inline Point3d
operator-( const Point3d& ptP1, const Vector3d& vtV2) operator-( const Point3d& ptP1, const Vector3d& vtV2)
{ {
return Point3d( ptP1.x - vtV2.x, ptP1.y - vtV2.y, ptP1.z - vtV2.z) ; return Point3d( ptP1.x - vtV2.x, ptP1.y - vtV2.y, ptP1.z - vtV2.z) ;
@@ -153,7 +147,7 @@ operator-( const Point3d& ptP1, const Vector3d& vtV2)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Prodotto con uno scalare //! Prodotto con uno scalare
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Point3d inline Point3d
operator*( const Point3d& ptP, double dMul) operator*( const Point3d& ptP, double dMul)
{ {
return Point3d( ptP.x * dMul, ptP.y * dMul, ptP.z * dMul) ; return Point3d( ptP.x * dMul, ptP.y * dMul, ptP.z * dMul) ;
@@ -162,7 +156,7 @@ operator*( const Point3d& ptP, double dMul)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Prodotto di uno scalare con un punto //! Prodotto di uno scalare con un punto
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Point3d inline Point3d
operator*( double dMul, const Point3d& ptP) operator*( double dMul, const Point3d& ptP)
{ {
return Point3d( ptP.x * dMul, ptP.y * dMul, ptP.z * dMul) ; return Point3d( ptP.x * dMul, ptP.y * dMul, ptP.z * dMul) ;
@@ -171,7 +165,7 @@ operator*( double dMul, const Point3d& ptP)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Divisione per uno scalare //! Divisione per uno scalare
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Point3d inline Point3d
operator/( const Point3d& ptP, double dDiv) operator/( const Point3d& ptP, double dDiv)
{ {
double dMul ; double dMul ;
@@ -183,7 +177,7 @@ operator/( const Point3d& ptP, double dDiv)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Somma mediata di due punti (baricentrica) //! Somma mediata di due punti (baricentrica)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Point3d inline Point3d
Media( const Point3d& ptP1, const Point3d& ptP2, double dCoeff = 0.5) Media( const Point3d& ptP1, const Point3d& ptP2, double dCoeff = 0.5)
{ {
return Point3d( ( 1 - dCoeff) * ptP1.x + dCoeff * ptP2.x, return Point3d( ( 1 - dCoeff) * ptP1.x + dCoeff * ptP2.x,
@@ -323,16 +317,7 @@ DirDist( const Point3d& ptP1, const Point3d& ptP2, Vector3d& vtDir, double& dDis
inline bool inline bool
AreSamePointEpsilon( const Point3d& ptP1, const Point3d& ptP2, double dToler) AreSamePointEpsilon( const Point3d& ptP1, const Point3d& ptP2, double dToler)
{ {
double dX = ptP1.x - ptP2.x ; return ( SqDist( ptP1, ptP2) < ( dToler * dToler)) ;
if ( abs( dX) > dToler)
return false ;
double dY = ptP1.y - ptP2.y ;
if ( abs( dY) > dToler)
return false ;
double dZ = ptP1.z - ptP2.z ;
if ( abs( dZ) > dToler)
return false ;
return ( ( dX * dX + dY * dY + dZ * dZ) < ( dToler * dToler)) ;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -350,16 +335,7 @@ AreSamePointXYEpsilon( const Point3d& ptP1, const Point3d& ptP2, double dToler)
inline bool inline bool
AreSamePointApprox( const Point3d& ptP1, const Point3d& ptP2) AreSamePointApprox( const Point3d& ptP1, const Point3d& ptP2)
{ {
double dX = ptP1.x - ptP2.x ; return ( SqDist( ptP1, ptP2) < SQ_EPS_SMALL) ;
if ( abs( dX) > EPS_SMALL)
return false ;
double dY = ptP1.y - ptP2.y ;
if ( abs( dY) > EPS_SMALL)
return false ;
double dZ = ptP1.z - ptP2.z ;
if ( abs( dZ) > EPS_SMALL)
return false ;
return ( ( dX * dX + dY * dY + dZ * dZ) < SQ_EPS_SMALL) ;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -377,16 +353,7 @@ AreSamePointXYApprox( const Point3d& ptP1, const Point3d& ptP2)
inline bool inline bool
AreSamePointExact( const Point3d& ptP1, const Point3d& ptP2) AreSamePointExact( const Point3d& ptP1, const Point3d& ptP2)
{ {
double dX = ptP1.x - ptP2.x ; return ( SqDist( ptP1, ptP2) < SQ_EPS_ZERO) ;
if ( abs( dX) > EPS_ZERO)
return false ;
double dY = ptP1.y - ptP2.y ;
if ( abs( dY) > EPS_ZERO)
return false ;
double dZ = ptP1.z - ptP2.z ;
if ( abs( dZ) > EPS_ZERO)
return false ;
return ( ( dX * dX + dY * dY + dZ * dZ) < SQ_EPS_ZERO) ;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -401,7 +368,7 @@ AreSamePointXYExact( const Point3d& ptP1, const Point3d& ptP2)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Restituisce una copia in locale del punto passato //! Restituisce una copia in locale del punto passato
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Point3d inline Point3d
GetToLoc( const Point3d& ptP, const Frame3d& frRef) GetToLoc( const Point3d& ptP, const Frame3d& frRef)
{ {
Point3d ptQ = ptP ; Point3d ptQ = ptP ;
@@ -412,7 +379,7 @@ GetToLoc( const Point3d& ptP, const Frame3d& frRef)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Restituisce una copia in globale del punto passato //! Restituisce una copia in globale del punto passato
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Point3d inline Point3d
GetToGlob( const Point3d& ptP, const Frame3d& frRef) GetToGlob( const Point3d& ptP, const Frame3d& frRef)
{ {
Point3d ptQ = ptP ; Point3d ptQ = ptP ;
@@ -423,7 +390,7 @@ GetToGlob( const Point3d& ptP, const Frame3d& frRef)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Restituisce una copia dal primo al secondo riferimento del punto passato //! Restituisce una copia dal primo al secondo riferimento del punto passato
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Point3d inline Point3d
GetLocToLoc( const Point3d& ptP, const Frame3d& frOri, const Frame3d& frDest) GetLocToLoc( const Point3d& ptP, const Frame3d& frOri, const Frame3d& frDest)
{ {
Point3d ptQ = ptP ; Point3d ptQ = ptP ;
+5 -20
View File
@@ -113,39 +113,25 @@ class PolyLine
EGK_EXPORT bool MakeConvex( const Vector3d& vtN, bool bLeftSide) ; EGK_EXPORT bool MakeConvex( const Vector3d& vtN, bool bLeftSide) ;
EGK_EXPORT bool Invert( bool bInvertU = true) ; EGK_EXPORT bool Invert( bool bInvertU = true) ;
EGK_EXPORT bool Flatten( double dZ = 0) ; EGK_EXPORT bool Flatten( double dZ = 0) ;
EGK_EXPORT bool FlattenInAutoPlane( double dToler = 10 * EPS_SMALL) ;
EGK_EXPORT bool GetConvexHullXY( PNTVECTOR& vConvHull) const ; EGK_EXPORT bool GetConvexHullXY( PNTVECTOR& vConvHull) const ;
EGK_EXPORT bool GetMinAreaRectangleXY( Point3d& ptCen, Vector3d& vtAx, double& dLen, double& dHeight) 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 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) ; }
EGK_EXPORT bool FromPointVector( const PNTVECTOR& vPnt)
{ Clear() ;
for( int i = 0 ; i < int( vPnt.size()) ; ++i)
{ AddUPoint( i, vPnt[i]) ; }
return GetPointNbr() > 0 ; }
private : private :
bool MyChangeStart( int nPos) ; bool MyChangeStart( int nPos) ;
bool MyApproxOnSide( const Vector3d& vtN, bool bLeftSide, double dToler = EPS_SMALL) ; bool MyApproxOnSide( const Vector3d& vtN, bool bLeftSide, double dToler = EPS_SMALL) ;
bool MyMakeConvex( const Vector3d& vtN, bool bLeftSide) ; bool MyMakeConvex( const Vector3d& vtN, bool bLeftSide) ;
bool MyRemoveSamePoints( double dToler = EPS_SMALL) ;
private : private :
int m_nRejected ; // numero punti rifiutati perchè coincidenti int m_nRejected ;
int m_nTempProp[2] ; // vettore proprietà temporanee PNTULIST m_lUPoints ;
PNTULIST m_lUPoints ; // lista dei punti mutable PNTULIST::const_iterator m_iter ;
mutable PNTULIST::const_iterator m_iter ; // iteratore corrente
} ; } ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Raccolte di PolyLine // Raccolte di PolyLine
typedef std::vector<PolyLine> POLYLINEVECTOR ; // vettore di PolyLine typedef std::vector<PolyLine> POLYLINEVECTOR ; // vettore di PolyLine
typedef std::list<PolyLine> POLYLINELIST ; // lista 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) ; EGK_EXPORT bool DistPointPolyLine( const Point3d& ptP, const PolyLine& plPoly, double& dDist) ;
@@ -155,4 +141,3 @@ EGK_EXPORT bool GetPointParamOnPolyLine( const Point3d& ptP, const PolyLine& plP
EGK_EXPORT bool ChangePolyLineStart( PolyLine& plPoly, const Point3d& ptNewStart, double dToler) ; EGK_EXPORT bool ChangePolyLineStart( PolyLine& plPoly, const Point3d& ptNewStart, double dToler) ;
EGK_EXPORT bool SplitPolyLineAtPoint( const PolyLine& plPoly, const Point3d& ptP, double dToler, PolyLine& plPoly1, PolyLine& plPoly2) ; EGK_EXPORT bool SplitPolyLineAtPoint( const PolyLine& plPoly, const Point3d& ptP, double dToler, PolyLine& plPoly1, PolyLine& plPoly2) ;
EGK_EXPORT bool AssociatePolyLinesMinDistPoints( const PolyLine& PL1, const PolyLine& PL2, PNTIVECTOR& vPnt1, PNTIVECTOR& vPnt2, bool& bCommonInternalPoints) ; EGK_EXPORT bool AssociatePolyLinesMinDistPoints( const PolyLine& PL1, const PolyLine& PL2, PNTIVECTOR& vPnt1, PNTIVECTOR& vPnt2, bool& bCommonInternalPoints) ;
EGK_EXPORT bool MatchPolyLinesAddingPoints( const PolyLine& PL1, const PolyLine& PL2, int nType, PNTIVECTOR& vPnt1, PNTIVECTOR& vPnt2) ;
+3 -3
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2023 // EgalTech 2015-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkPolygon3d.h Data : 17.12.23 Versione : 2.5l3 // File : Polygon3d.h Data : 02.10.20 Versione : 2.2j1
// Contenuto : Dichiarazione della classe Polygon3d (poligono nello spazio). // Contenuto : Dichiarazione della classe Polygon3d (poligono nello spazio).
// //
// //
@@ -58,7 +58,7 @@ class Polygon3d
EGK_EXPORT bool ToGlob( const Frame3d& frRef) ; EGK_EXPORT bool ToGlob( const Frame3d& frRef) ;
EGK_EXPORT bool ToLoc( const Frame3d& frRef) ; EGK_EXPORT bool ToLoc( const Frame3d& frRef) ;
EGK_EXPORT bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ; EGK_EXPORT bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest) ;
EGK_EXPORT bool GetLocalBBox( BBox3d& b3Loc) const ;
EGK_EXPORT bool IsValid( void) const EGK_EXPORT bool IsValid( void) const
{ return ! m_Plane.GetVersN().IsSmall() ; } { return ! m_Plane.GetVersN().IsSmall() ; }
EGK_EXPORT const Plane3d& GetPlane( void) const EGK_EXPORT const Plane3d& GetPlane( void) const
-32
View File
@@ -1,32 +0,0 @@
//----------------------------------------------------------------------------
// 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) ;
-56
View File
@@ -1,56 +0,0 @@
//----------------------------------------------------------------------------
// 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/EGkGeoPoint3d.h"
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurf.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 vtDir1 ;
Vector3d vtDir2 ;
double dPar ;
int nFlag ;
Point5ax( void) : ptP(), vtDir1(), vtDir2(), dPar(), nFlag() {} ;
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, double dU, int nData)
: ptP( ptBase), vtDir1( vtTool), vtDir2(), dPar( dU), nFlag( nData) {} ;
Point5ax( const Point3d& ptBase, const Vector3d& vtTool, const Vector3d& vtTool2, double dU, int nData)
: ptP( ptBase), vtDir1( vtTool), vtDir2( vtTool2), dPar( dU), nFlag( nData) {} ;
} ;
typedef std::vector<Point5ax> PNT5AXVECTOR ; // vettore di Punti 5assi
//----------------------------------------------------------------------------
// Proiezione di una curva su una o più superfici lungo la direzione data
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const Vector3d& vtDir,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una o più superfici in direzione del punto
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const IGeoPoint3d& gpRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una o più superfici in direzione della curva
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const ICurve& crRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
// Proiezione di una curva su una o più superfici in direzione della superficie
EGK_EXPORT bool ProjectCurveOnSurf( const ICurve& crCrv, const CISURFPVECTOR& vpSurf, const ISurf& sfRef,
double dLinTol, double dMaxSegmLen, bool bSharpEdges, PNT5AXVECTOR& vPt5ax) ;
-174
View File
@@ -1,174 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkQuaternion.h Data : 13.04.243 Versione : 2.6d4
// Contenuto : Dichiarazione della classe Quaternion.
//
//
//
// Modifiche : 31.12.13 DS Creazione modulo.
//
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkFrame3d.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
//-----------------------------------------------------------------------------
class EGK_EXPORT Quaternion
{
public :
Quaternion( double dW = 0, double dX = 0, double dY = 0, double dZ = 0) : w( dW), x( dX), y( dY), z( dZ) {}
public :
bool IsValid( void) const
{ return ( std::isfinite( w) && std::isfinite( x) && std::isfinite( y) && std::isfinite( z)) ; }
bool IsSmall( void) const
{ return ( ( w * w + x * x + y * y + z * z) < SQ_EPS_SMALL) ; }
bool IsZero( void) const
{ return ( ( w * w + x * x + y * y + z * z) < SQ_EPS_ZERO) ; }
bool IsUnit( void) const
{ return ( abs( w - 1) < EPS_ZERO && ( x * x + y * y + z * z) < SQ_EPS_ZERO) ; }
double SqLen( void) const
{ return ( w * w + x * x + y * y + z * z) ; }
double Len( void) const ;
bool Normalize( double dEps = EPS_SMALL) ;
bool IsNormalized( void) const
{ return ( abs( 1.0 - ( w * w + x * x + y * y + z * z)) < ( 2 * EPS_ZERO)) ; }
Quaternion& operator +=( const Quaternion& qtQ)
{ w += qtQ.w ; x += qtQ.x ; y += qtQ.y ; z += qtQ.z ; return *this ; }
Quaternion& operator -=( const Quaternion& qtQ)
{ w -= qtQ.w ; x -= qtQ.x ; y -= qtQ.y ; z -= qtQ.z ; return *this ; }
Quaternion& operator *=( double dMul)
{ w *= dMul ; x *= dMul ; y *= dMul ; z *= dMul ; return *this ; }
Quaternion& operator /=( double dDiv)
{ double dMul = 1 / dDiv ; w *= dMul ; x *= dMul ; y *= dMul ; z *= dMul ; return *this ; }
public :
union {
struct {
double w ;
double x ;
double y ;
double z ;
} ;
double v[4] ;
} ;
} ;
//----------------------------------------------------------------------------
// Quaternioni notevoli
//----------------------------------------------------------------------------
// Quaternione non valido
const Quaternion Q_INVALID( NAN, NAN, NAN, NAN) ;
// Quaternione unità
const Quaternion Q_UNIT( 1, 0, 0, 0) ;
// Quaternione nullo
const Quaternion Q_NULL( 0, 0, 0, 0) ;
//----------------------------------------------------------------------------
// Definizione da rotazione definita con asse e angolo e inverso
//----------------------------------------------------------------------------
EGK_EXPORT Quaternion FromAxisAngle( const Vector3d& vtAx, double dAngDeg) ;
EGK_EXPORT bool ToAxisAngle( const Quaternion& qtQ, Vector3d& vtAx, double& dAngDeg) ;
//----------------------------------------------------------------------------
// Definizione da parte rotazione di un sistema di riferimento e inverso
//----------------------------------------------------------------------------
EGK_EXPORT Quaternion FromFrame( const Frame3d& frRef) ;
EGK_EXPORT bool ToFrame( const Quaternion& qtQ, Frame3d& frRef) ;
//----------------------------------------------------------------------------
// Coniugato di un quaternione
//----------------------------------------------------------------------------
inline const Quaternion
Conjugate( const Quaternion& qtQ)
{
return ( Quaternion( qtQ.w, -qtQ.x, -qtQ.y, -qtQ.z)) ;
}
//----------------------------------------------------------------------------
// Opposto di un quaternione
//----------------------------------------------------------------------------
inline const Quaternion
operator-( const Quaternion& qtQ)
{
return ( Quaternion( -qtQ.w, - qtQ.x, - qtQ.y, - qtQ.z)) ;
}
//----------------------------------------------------------------------------
// Somma di due quaternioni
//----------------------------------------------------------------------------
inline const Quaternion
operator+( const Quaternion& qtQ1, const Quaternion& qtQ2)
{
return ( Quaternion( qtQ1.w + qtQ2.w, qtQ1.x + qtQ2.x, qtQ1.y + qtQ2.y, qtQ1.z + qtQ2.z)) ;
}
//----------------------------------------------------------------------------
// Sottrazione di due quaternioni
//----------------------------------------------------------------------------
inline const Quaternion
operator-( const Quaternion& qtQ1, const Quaternion& qtQ2)
{
return ( Quaternion( qtQ1.w - qtQ2.w, qtQ1.x - qtQ2.x, qtQ1.y - qtQ2.y, qtQ1.z - qtQ2.z)) ;
}
//----------------------------------------------------------------------------
// Prodotto di un quaternione con uno scalare
//----------------------------------------------------------------------------
inline const Quaternion
operator*( const Quaternion& qtQ, double dMul)
{
return ( Quaternion( qtQ.w * dMul, qtQ.x * dMul, qtQ.y * dMul, qtQ.z * dMul)) ;
}
//----------------------------------------------------------------------------
// Prodotto di uno scalare con un quaternione
//----------------------------------------------------------------------------
inline const Quaternion
operator*( double dMul, const Quaternion& qtQ)
{
return ( Quaternion( qtQ.w * dMul, qtQ.x * dMul, qtQ.y * dMul, qtQ.z * dMul)) ;
}
//----------------------------------------------------------------------------
// Divisione con uno scalare
//----------------------------------------------------------------------------
inline const Quaternion
operator/( const Quaternion& qtQ, double dDiv)
{
double dMul = 1 / dDiv ;
return ( Quaternion( qtQ.w * dMul, qtQ.x * dMul, qtQ.y * dMul, qtQ.z * dMul)) ;
}
//----------------------------------------------------------------------------
// Prodotto scalare due quaternioni
//----------------------------------------------------------------------------
inline double
Scalar( const Quaternion& qtQ1, const Quaternion& qtQ2)
{
return ( qtQ1.w * qtQ2.w + qtQ1.x * qtQ2.x + qtQ2.y * qtQ2.y + qtQ1.z * qtQ2.z) ;
}
//----------------------------------------------------------------------------
// Prodotto di due quaternioni
//----------------------------------------------------------------------------
inline const Quaternion
operator*( const Quaternion& qtQ1, const Quaternion& qtQ2)
{
return ( Quaternion( qtQ1.w * qtQ2.w - qtQ1.x * qtQ2.x - qtQ1.y * qtQ2.y - qtQ1.z * qtQ2.z,
qtQ1.w * qtQ2.x + qtQ1.x * qtQ2.w + qtQ1.y * qtQ2.z - qtQ1.z * qtQ2.y,
qtQ1.w * qtQ2.y + qtQ1.y * qtQ2.w + qtQ1.z * qtQ2.x - qtQ1.x * qtQ2.z,
qtQ1.w * qtQ2.z + qtQ1.z * qtQ2.w + qtQ1.x * qtQ2.y - qtQ1.y * qtQ2.x)) ;
}
-50
View File
@@ -1,50 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkRotationMinimizingFrame.h Data : 05.04.24 Versione : 2.6d1
// Contenuto : Dichiarazione della classe RotationMinimizingFrame.
//
//
//
// Modifiche : 05.04.24 RE Creazione modulo.
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkCurve.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
//----------------------------------------------------------------------------
class EGK_EXPORT RotationMinimizingFrame
{
public :
RotationMinimizingFrame( void)
: m_pCrv( nullptr), m_Frame0() {}
~RotationMinimizingFrame( void)
{ Clear() ; }
bool Set( const ICurve* pCrv, const Frame3d& fr_Start) ;
public :
bool GetFramesByStep( double dStep, bool bUniform, FRAME3DVECTOR& vRMFrames) ;
bool GetFramesBySplit( int nIntervals, FRAME3DVECTOR& vRMFrames) ;
bool GetFramesByTolerance( double dTol, FRAME3DVECTOR& vRMFrames) ;
private :
bool Clear( void) ;
bool IsValid( void) ;
bool GetFrameAtParam( const Frame3d& frAct, const double dParNext, Frame3d& frNext) ;
private :
ICurve* m_pCrv ; // curva per il calcolo del rotation Xplane frame
Frame3d m_Frame0 ; // frame iniziale della curva
} ;
-51
View File
@@ -1,51 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkRotationXplaneFrame.h Data : 05.04.24 Versione : 2.6d1
// Contenuto : Dichiarazione della classe RotationXplaneFrame.
//
//
//
// Modifiche : 05.04.24 DS Creazione modulo.
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkCurve.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
//----------------------------------------------------------------------------
class EGK_EXPORT RotationXplaneFrame
{
public :
RotationXplaneFrame( void)
: m_pCrv( nullptr), m_vtNorm(), m_vtNearX() {}
~RotationXplaneFrame( void)
{ Clear() ; }
bool Set( const ICurve* pCrv, const Vector3d& vtNorm, const Vector3d& vtNearX = V_NULL) ;
public :
bool GetFramesByStep( double dStep, bool bUniform, FRAME3DVECTOR& vRXFrames) ;
bool GetFramesBySplit( int nIntervals, FRAME3DVECTOR& vRXFrames) ;
bool GetFramesByTolerance( double dTol, FRAME3DVECTOR& vRXFrames) ;
private :
bool Clear( void) ;
bool IsValid( void) ;
bool GetFrameAtParam( const Frame3d& frAct, const double dParNext, Frame3d& frNext) ;
private :
ICurve* m_pCrv ; // curva per il calcolo del rotation Xplane frame
Vector3d m_vtNorm ; // vettore normale al piano in cui deve sempre giacere l'asse X
Vector3d m_vtNearX ; // vettore a cui deve essere il più vicino possibile la direzione X iniziale
} ;
-50
View File
@@ -1,50 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkSbzFromCurves.h Data : 07.05.24 Versione : 2.6d2
// Contenuto : Prototipi funzioni di creazione TriMesh a partire da curve.
//
//
//
// Modifiche : 07.05.24 DB Creazione modulo.
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h"
#include "/EgtDev/Include/EGkSurfBezier.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
////----------------------------------------------------------------------------
//enum RS_CAP { RSCAP_NONE = 0, RSCAP_FLAT = 1, RSCAP_ROUND = 2, RSCAP_BEVEL = 3} ;
//----------------------------------------------------------------------------
EGK_EXPORT ISurfBezier* GetSurfBezierByFlatContour( const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfBezier* GetSurfBezierByRegion( const CICURVEPVECTOR& vpCurve, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfBezier* GetSurfBezierByExtrusion( const ICurve* pCurve, const Vector3d& vtExtr,
bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
//EGK_EXPORT ISurfBezier* GetSurfBezierByRegionExtrusion( const CICURVEPVECTOR& vpCurve, const Vector3d& vtExtr,
// double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfBezier* GetSurfBezierByRevolve( const ICurve* pCurve, const Point3d& ptAx,
const Vector3d& vtAx, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfBezier* GetSurfBezierByScrewing( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx,
double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
//EGK_EXPORT ISurfBezier* GetSurfBezierRectSwept( double dDimH, double dDimV, double dBevelH, double dBevelV,
// const ICurve* pGuide, int nCapType, double dLinTol = 10 * EPS_SMALL) ;
//EGK_EXPORT ISurfBezier* GetSurfBezierTransSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfBezier* GetSurfBezierRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfBezier* GetSurfBezierRuled( const ICurve* pCurve1, const ICurve* pCurve2, int nType, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfBezier* GetSurfBezierRuledGuided( const ICurve* pCurve1, const ICurve* pCurve2, const ICURVEPOVECTOR& vCrv, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfBezier* GetSurfBezierSkinned( const CICURVEPVECTOR& vCrv, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfBezier* GetSurfBezierSweptInPlane( const ICurve* pSect, const ICurve* pGuide, const Vector3d& vtNorm, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfBezier* GetSurfBezierSwept3d( const ICurve* pSect, const ICurve* pGuide, const Vector3d& vtNorm, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
-27
View File
@@ -1,27 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2024
//----------------------------------------------------------------------------
// File : EGkSbzStandard.h Data : 14.02.24 Versione : 2.6b2
// Contenuto : Dichiarazione funzioni per creazione superfici Sbz
// standard : Box, Pyramid, Cylinder, Sphere, Cone.
//
//
// Modifiche : 14.02.24 DB Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkSurfBezier.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//----------------------------------------------------------------------------
EGK_EXPORT ISurfBezier* GetSurfBezierSphere( const Point3d& ptCenter, double dR) ;
-2
View File
@@ -36,8 +36,6 @@ struct SelData {
: nId( nI), nSub( SEL_SUB_ALL) {} : nId( nI), nSub( SEL_SUB_ALL) {}
SelData( int nI, int nS) SelData( int nI, int nS)
: nId( nI), nSub( nS) {} : nId( nI), nSub( nS) {}
bool operator == ( const SelData& other) const
{ return ( nId == other.nId && nSub == other.nSub) ; }
} ; } ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
+1 -4
View File
@@ -30,14 +30,11 @@ EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionRectangle( double dWidth, double dL
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionStadium( double dWidth, double dLen) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionStadium( double dWidth, double dLen) ;
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionDisk( double dRadius) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionDisk( double dRadius) ;
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius, EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius,
bool bSquareEnds, bool bSquareMids, double dOffsLinTol = 10 * EPS_SMALL, bool bSquareEnds, bool bSquareMids) ;
bool bMergeOnlySameProps = true) ;
// NB : la curva ingrassata non deve autointersecarsi // NB : la curva ingrassata non deve autointersecarsi
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromTriangle( const Triangle3d& Tria) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromTriangle( const Triangle3d& Tria) ;
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLine( const PolyLine& ContourPolyLine) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLine( const PolyLine& ContourPolyLine) ;
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLineVector( const POLYLINEVECTOR& vContoursPolyLineVec) ; EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLineVector( const POLYLINEVECTOR& vContoursPolyLineVec) ;
EGK_EXPORT bool CalcRegionPolyLines( const POLYLINEVECTOR& vPL, Vector3d& vtN, INTMATRIX& vnPLIndMat, BOOLVECTOR& vbInvert) ; // la funzione restituisce una matrice con la struttura dei chunk e un vettore che indica se invertire le polyline
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
class SurfFlatRegionByContours class SurfFlatRegionByContours
+6 -11
View File
@@ -1,20 +1,19 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2024 // EgalTech 2015-2015
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkStmFromCurves.h Data : 27.02.24 Versione : 2.6d1 // File : EGkStmFromCurves.h Data : 01.02.15 Versione : 1.6b1
// Contenuto : Prototipi funzioni di creazione TriMesh a partire da curve. // Contenuto : Dichiarazione della classe StmFromTriangleSoup.
// //
// //
// //
// Modifiche : 19.05.14 DS Creazione modulo. // Modifiche : 19.05.14 DS Creazione modulo.
// 27.02.24 DS Aggiunta GetSurfTriMeshTransSwept. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#pragma once #pragma once
#include "/EgtDev/Include/EGkCurve.h" #include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h" #include "/EgtDev/Include/EGkSurfTriMesh.h"
//----------------------- Macro per import/export ---------------------------- //----------------------- Macro per import/export ----------------------------
@@ -40,11 +39,7 @@ EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByRevolve( const ICurve* pCurve, const Po
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByScrewing( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx, EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByScrewing( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx,
double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ; double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRectSwept( double dDimH, double dDimV, double dBevelH, double dBevelV, EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRectSwept( double dDimH, double dDimV, double dBevelH, double dBevelV,
const ICurve* pGuide, int nCapType, double dLinTol = 10 * EPS_SMALL) ; const ICurve* pGuide, int nCapType, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ICurve* pSect, const ICurve* pGuide, const Vector3d& vtAx, EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ISurfFlatRegion* pSfrSect, const ICurve* pGuide, const Vector3d& vtAx,
bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshTransSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const ICurve* pCurve1, const ICurve* pCurve2, int nType, double dLinTol = 10 * EPS_SMALL) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const ICurve* pCurve1, const ICurve* pCurve2, int nType, double dLinTol = 10 * EPS_SMALL) ;
+4 -6
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2014-2023 // EgalTech 2014-2014
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkStmFromTriangleSoup.h Data : 07.05.23 Versione : 2.5e2 // File : EGkStmFromTriangleSoup.h Data : 19.05.14 Versione : 1.5e7
// Contenuto : Dichiarazione della classe StmFromTriangleSoup. // Contenuto : Dichiarazione della classe StmFromTriangleSoup.
// //
// //
@@ -35,14 +35,12 @@ class StmFromTriangleSoup
EGK_EXPORT ~StmFromTriangleSoup( void) ; EGK_EXPORT ~StmFromTriangleSoup( void) ;
EGK_EXPORT bool Start( int nBuckets = GRID_STD_BUCKETS) ; EGK_EXPORT bool Start( int nBuckets = GRID_STD_BUCKETS) ;
EGK_EXPORT bool AddTriangle( const Triangle3d& Tria) ; 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 bool End( void) ;
EGK_EXPORT ISurfTriMesh* GetSurf( void) ; EGK_EXPORT ISurfTriMesh* GetSurf( void) ;
private : private :
inline int AddVertex( const Point3d& ptP, double dU = -1, double dV = -1) ; inline int AddVertex( const Point3d& ptP) ;
private : private :
ISurfTriMesh* m_pSTM ; ISurfTriMesh* m_pSTM ;
+3 -6
View File
@@ -1,13 +1,13 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2024 // EgalTech 2015-2015
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkStmStandard.h Data : 04.12.24 Versione : 2.6l2 // File : EGkStmStandard.h Data : 31.03.15 Versione : 1.6c7
// Contenuto : Dichiarazione funzioni per creazione superfici Stm // Contenuto : Dichiarazione funzioni per creazione superfici Stm
// standard : Box, Pyramid, Cylinder, Sphere, Cone. // standard : Box, Pyramid, Cylinder, Sphere, Cone.
// //
// //
// Modifiche : 31.03.15 DS Creazione modulo. // Modifiche : 31.03.15 DS Creazione modulo.
// 04.12.24 DS Aggiunta GetSurfTriMeshEmpty. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -24,13 +24,10 @@
#endif #endif
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshEmpty( void) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshBox( double dDimX, double dDimY, double dHeight, bool bRegular = false) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshBox( double dDimX, double dDimY, double dHeight, bool bRegular = false) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPyramid( double dDimX, double dDimY, double dHeight) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPyramid( double dDimX, double dDimY, double dHeight) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshCylinder( double dRadius, double dHeight, double dLinTol) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshCylinder( double dRadius, double dHeight, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshCone( double dRadius, double dHeight, double dLinTol) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshCone( double dRadius, double dHeight, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSphere( double dRadius, double dLinTol) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSphere( double dRadius, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPyramidFrustum( double dBaseDimX, double dBaseDimY, double dTopDimX, double dTopDimY, double dHeight) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshConeFrustum( double dBaseRad, double dTopRad, double dHeight, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPlaneInBox( const Plane3d& plPlane, const BBox3d& b3Box, bool bOnEq = false, bool bOnCt = false) ; EGK_EXPORT ISurfTriMesh* GetSurfTriMeshPlaneInBox( const Plane3d& plPlane, const BBox3d& b3Box, bool bOnEq = false, bool bOnCt = false) ;
-29
View File
@@ -1,29 +0,0 @@
//----------------------------------------------------------------------------
// 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) ;
-67
View File
@@ -1,67 +0,0 @@
//----------------------------------------------------------------------------
// 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/EGkSurfFlatRegion.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) ;
//! Per rendere uniforme lo spazio parametrico passando da Nurbs a MultiBezier
EGK_EXPORT bool MakeUniform( ISurfFlatRegion*& pSfr, bool& bRescaled, const DBLVECTOR& vU0, const DBLVECTOR& vV0,
int nDegU, int nDegV, double dScaleU, double dScaleV, bool bRetry) ;
//! Per identificare su che edge è il punto
EGK_EXPORT bool OnWhichEdge( double u0, double u1, double v0, double v1, const Point3d& ptToAssign, int& nEdge) ;
+5 -55
View File
@@ -1,31 +1,21 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2020-2025 // EgalTech 2020-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkSurfBezier.h Data : 22.08.25 Versione : 2.7h1 // File : EGkSurfBezier.h Data : 22.03.20 Versione : 2.2c3
// Contenuto : Dichiarazione della interfaccia ISurfBezier. // Contenuto : Dichiarazione della interfaccia ISurfBezier.
// //
// //
// //
// Modifiche : 22.03.20 DS Creazione modulo. // Modifiche : 22.03.20 DS Creazione modulo.
// 22.08.25 DS Aggiunte funzioni globali di impostazione tolleranze. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#pragma once #pragma once
#include "/EgtDev/Include/EGkSurf.h" #include "/EgtDev/Include/EGkSurf.h"
#include "/EgtDev/Include/EGkCurveComposite.h"
#include "/EgtDev/Include/EgtPointerOwner.h" #include "/EgtDev/Include/EgtPointerOwner.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
//----------------------- Forward --------------------------------------------
class PolyLine ; class PolyLine ;
class ICurveComposite ; class ICurveComposite ;
class ISurfFlatRegion ; class ISurfFlatRegion ;
@@ -37,15 +27,6 @@ class __declspec( novtable) ISurfBezier : public ISurf
public : public :
enum Side { FROM_MINUS = -1, // da valori inferiori del parametro enum Side { FROM_MINUS = -1, // da valori inferiori del parametro
FROM_PLUS = 1} ; // da valori superiori del parametro FROM_PLUS = 1} ; // da valori superiori del parametro
public :
enum RuledType { RLT_B_ISOPAR = 0, // con parametrizzazione simile tra le due curve
RLT_B_MINDIST = 1, // con distanza minima tra le due curve, usando start e end delle curve presenti
RLT_B_MINDIST_PLUS = 2, // con distanza minima tra le due curve, aggiungendo punti lungo le curve dove necessario
RLT_B_LENPAR = 3} ; // aggiungo punti alla curve in modo da matchare meglio le sottocurve, inoltre parametrizzo le curve in base alla lunghezza e non al numero di curve
enum Is_Planar { NOT_CALCULATED = -1,
NOT_PLANAR_SURF = 0 ,
PLANAR_SURF = 1} ;
public : // IGeoObj public : // IGeoObj
ISurfBezier* Clone( void) const override = 0 ; ISurfBezier* Clone( void) const override = 0 ;
public : public :
@@ -55,15 +36,13 @@ class __declspec( novtable) ISurfBezier : public ISurf
virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl) = 0 ; virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl) = 0 ;
virtual bool SetControlPoint( int nIndU, int nIndV, const Point3d& ptCtrl, double dW) = 0 ; virtual bool SetControlPoint( int nIndU, int nIndV, const Point3d& ptCtrl, double dW) = 0 ;
virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl, double dW) = 0 ; virtual bool SetControlPoint( int nInd, const Point3d& ptCtrl, double dW) = 0 ;
virtual bool SetTrimRegion( ISurfFlatRegion& sfrTrimReg, bool bIntersectOrSubtrct = true) = 0 ; virtual bool SetTrimRegion( const ISurfFlatRegion& sfrTrimReg) = 0 ;
virtual ISurfFlatRegion* GetTrimRegion( void) const = 0 ;
virtual bool GetInfo( int& nDegU, int& nDegV, int& nSpanU, int& nSpanV, bool& bIsRat, bool& bTrimmed) const = 0 ; virtual bool GetInfo( int& nDegU, int& nDegV, int& nSpanU, int& nSpanV, bool& bIsRat, bool& bTrimmed) const = 0 ;
virtual const Point3d& GetControlPoint( int nIndU, int nIndV, bool* pbOk) const = 0 ; virtual const Point3d& GetControlPoint( int nIndU, int nIndV, bool* pbOk) const = 0 ;
virtual const Point3d& GetControlPoint( int nInd, bool* pbOk) const = 0 ; virtual const Point3d& GetControlPoint( int nInd, bool* pbOk) const = 0 ;
virtual double GetControlWeight( int nIndU, int nIndV, bool* pbOk) const = 0 ; virtual double GetControlWeight( int nIndU, int nIndV, bool* pbOk) const = 0 ;
virtual double GetControlWeight( int nInd, bool* pbOk) const = 0 ; virtual double GetControlWeight( int nInd, bool* pbOk) const = 0 ;
virtual bool IsAPoint( void) const = 0 ; virtual bool IsAPoint( void) const = 0 ;
virtual bool GetPoint( double dU, double dV, Side nUs, Side nVs, Point3d& ptPos) const = 0;
virtual bool GetPointD1D2( double dU, double dV, Side nUs, Side nVs, virtual bool GetPointD1D2( double dU, double dV, Side nUs, Side nVs,
Point3d& ptPos, Point3d& ptPos,
Vector3d* pvtDerU = nullptr, Vector3d* pvtDerV = nullptr, Vector3d* pvtDerU = nullptr, Vector3d* pvtDerV = nullptr,
@@ -78,33 +57,10 @@ class __declspec( novtable) ISurfBezier : public ISurf
virtual bool GetControlCurveOnU( int nIndV, PolyLine& plCtrlU) const = 0 ; virtual bool GetControlCurveOnU( int nIndV, PolyLine& plCtrlU) const = 0 ;
virtual bool GetControlCurveOnV( int nIndU, PolyLine& plCtrlV) const = 0 ; virtual bool GetControlCurveOnV( int nIndU, PolyLine& plCtrlV) const = 0 ;
virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ; virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ;
virtual const ISurfTriMesh* GetAuxSurfRefined( void) const = 0 ;
virtual ISurfTriMesh* GetApproxSurf( double dTol, double dSideMin = 100 * EPS_SMALL, bool bUpdateEdges = false) const = 0 ;
virtual bool GetLeaves ( std::vector<std::tuple<int, Point3d, Point3d>>& vLeaves) const = 0 ;
virtual bool GetTriangles2D( std::vector<std::tuple<int,Point3d, Point3d, Point3d>>& vTria2D) const = 0 ;
virtual bool UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, int nIL = 5) const = 0 ;
virtual bool UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, int nIL, const Point3d& ptIPrev, bool* bTroughEdge = nullptr) const = 0 ;
virtual bool UnprojectPoint( const Point3d& pt3D, Point3d& ptParam, const Point3d& ptIPrev, bool* bTroughEdge = nullptr, const Plane3d* plCut = nullptr) const = 0 ;
virtual bool UnprojectCurveFromStm( const ICurveComposite* pCC, ICRVCOMPOPVECTOR& vpCC, const Plane3d* pPlCut) const = 0 ;
// taglio la parte della superficie dalla parte positiva del versore del piano.
// Il booleano indica se tenere eventuali triangoli della trimesh ausiliaria che sono coplanari ed equiversi al piano di taglio
virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ;
virtual bool IncreaseUV( double& dU, double dx, bool bUOrV, double* dUVCopy = nullptr, bool bModifyOrig = true) const = 0 ;
virtual bool IncreaseUV( Point3d& ptUV, Vector3d vtH , Point3d* ptUVCopy, bool bModifyOrig) const = 0 ;
virtual bool GetLoops( ICRVCOMPOPOVECTOR& vCC, bool bLineOrBezier) const = 0 ;
virtual ICurveComposite* GetSingleEdge3D( bool bLineOrBezier, int nEdge) const = 0 ;
virtual bool IsPlanar( void) const = 0 ;
virtual bool CreateByFlatContour( const PolyLine& PL) = 0 ;
virtual bool CreateByRegion( const POLYLINEVECTOR& vPL) = 0 ;
virtual bool CreateByExtrusion( const ICurve* pCrv, const Vector3d& vtExtr, bool bDeg3OrDeg2 = false) = 0 ;
virtual bool CreateByScrewing( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx, double dAngRotDeg, double dMove) = 0 ;
virtual bool CreateByPointCurve( const Point3d& pt, const ICurve* pCurve) = 0 ;
virtual bool CreateByTwoCurves( const ICurve* pCurve1, const ICurve* pCurve2, int nType) = 0 ;
virtual bool CreateBySetOfCurves( const ICURVEPOVECTOR& vCrvBez, bool bReduceToDeg3 = true) = 0 ;
} ; } ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static const double SBZ_TREG_COEFF = 1024 ; static const double SBZ_TREG_COEFF = 1000 ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
inline ISurfBezier* CreateSurfBezier( void) inline ISurfBezier* CreateSurfBezier( void)
@@ -122,12 +78,6 @@ inline ISurfBezier* GetSurfBezier( IGeoObj* pGObj)
return nullptr ; return nullptr ;
return (static_cast<ISurfBezier*>(pGObj)) ; } return (static_cast<ISurfBezier*>(pGObj)) ; }
//----------------------------------------------------------------------------
EGK_EXPORT void SetSurfBezierAuxSurfTol( double dTol) ;
EGK_EXPORT double GetSurfBezierAuxSurfTol( void) ;
EGK_EXPORT void SetSurfBezierAuxSurfRefinedTol( double dTol) ;
EGK_EXPORT double GetSurfBezierAuxSurfRefinedTol( void) ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Raccolte di puntatori a ISurfBezier // Raccolte di puntatori a ISurfBezier
typedef std::vector<const ISurfBezier*> CISURFBEZPVECTOR ; // vettore di puntatori a const ISurfBezier typedef std::vector<const ISurfBezier*> CISURFBEZPVECTOR ; // vettore di puntatori a const ISurfBezier
+9 -30
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2024 // EgalTech 2015-2015
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkSurfFlatRegion.h Data : 18.07.24 Versione : 2.6g5 // File : EGkSurfFlatRegion.h Data : 05.08.15 Versione : 1.6h2
// Contenuto : Dichiarazione della interfaccia ISurfFlatRegion. // Contenuto : Dichiarazione della interfaccia ISurfFlatRegion.
// //
// //
@@ -27,7 +27,7 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf
ISurfFlatRegion* Clone( void) const override = 0 ; ISurfFlatRegion* Clone( void) const override = 0 ;
public : public :
virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ; virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ;
virtual bool Clear( void) = 0 ; virtual bool Clear( void) ;
virtual bool AddExtLoop( const ICurve& cCrv) = 0 ; virtual bool AddExtLoop( const ICurve& cCrv) = 0 ;
virtual bool AddExtLoop( ICurve* pCrv) = 0 ; virtual bool AddExtLoop( ICurve* pCrv) = 0 ;
virtual bool AddIntLoop( const ICurve& cCrv) = 0 ; virtual bool AddIntLoop( const ICurve& cCrv) = 0 ;
@@ -36,34 +36,19 @@ class __declspec( novtable) ISurfFlatRegion : public ISurf
virtual bool Subtract( const ISurfFlatRegion& Other) = 0 ; virtual bool Subtract( const ISurfFlatRegion& Other) = 0 ;
virtual bool Intersect( const ISurfFlatRegion& Other) = 0 ; virtual bool Intersect( const ISurfFlatRegion& Other) = 0 ;
virtual bool Offset( double dDist, int nType) = 0 ; virtual bool Offset( double dDist, int nType) = 0 ;
virtual ISurfFlatRegion* CreateOffsetSurf( double dDist, int nType) const = 0 ;
virtual bool GetGrossArea( double& dArea) const = 0 ; virtual bool GetGrossArea( double& dArea) const = 0 ;
virtual const Point3d& GetPlanePoint( void) const = 0 ; virtual const Point3d& GetPlanePoint( void) const = 0 ;
virtual const Vector3d& GetNormVersor( void) const = 0 ; virtual const Vector3d& GetNormVersor( void) const = 0 ;
virtual bool CalcVoronoiDiagram( ICURVEPOVECTOR& vCrvs, int nBound = 3) const = 0 ;
virtual void ResetVoronoiObject( void) const = 0 ;
virtual bool GetMaxOffset( double& dOffs) const = 0 ;
virtual bool CalcMedialAxis( ICURVEPOVECTOR& vCrvs, int nSide = 1) const = 0 ;
virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ;
virtual bool GetCurveClassification( const ICurve& Crv, double dLenMin, CRVCVECTOR& ccClass) const = 0 ;
virtual int GetChunkCount( void) const = 0 ; virtual int GetChunkCount( void) const = 0 ;
virtual ISurfFlatRegion* CloneChunk( int nChunk) const = 0 ;
virtual bool EraseChunk(int nChunk) = 0 ;
virtual bool GetChunkCentroid( int nChunk, Point3d& ptCen) const = 0 ;
virtual bool GetChunkArea( int nChunk, double& dArea) const = 0 ;
virtual bool GetChunkPerimeter( int nChunk, double& dLen) const = 0 ;
virtual int GetChunkSimpleClassification( int nChunk, const ISurfFlatRegion& Other, int nOthChunk) const ; // compare only outsides
virtual bool GetChunkMaxOffset( int nChunk, double& dOffs) const = 0 ;
virtual int GetLoopCount( int nChunk) const = 0 ; virtual int GetLoopCount( int nChunk) const = 0 ;
virtual int GetLoopCurveCount( int nChunk, int nLoop) const = 0 ;
virtual ICurve* GetLoop( int nChunk, int nLoop) const = 0 ; // nChunk 0-based, nLoop 0-based (1°esterno, successivi interni) virtual ICurve* GetLoop( int nChunk, int nLoop) const = 0 ; // nChunk 0-based, nLoop 0-based (1°esterno, successivi interni)
virtual bool ApproxLoopWithLines( int nChunk, int nLoop, double dLinTol, double dAngTolDeg, int nType, PolyLine& PL) const = 0 ; virtual bool ApproxLoopWithLines( int nChunk, int nLoop, double dLinTol, double dAngTolDeg, int nType, PolyLine& PL) const = 0 ;
virtual bool SetCurveTempProp( int nChunk, int nLoop, int nCrv, int nProp, int nPropInd = 0) = 0 ; virtual const ISurfTriMesh* GetAuxSurf( void) const = 0 ;
virtual bool GetCurveTempProp( int nChunk, int nLoop, int nCrv, int& nProp, int nPropInd = 0) const = 0 ; virtual ISurfFlatRegion* CloneChunk( int nChunk) const = 0 ;
virtual bool ResetAllCurveTempProps( void) = 0 ; virtual bool GetChunkCentroid( int nChunk, Point3d& ptCen) const ;
virtual bool SetCurveTempParam( int nChunk, int nLoop, int nCrv, double dParam, int nParamInd = 0) = 0 ; virtual bool GetCurveClassification( const ICurve& Crv, double dLenMin, CRVCVECTOR& ccClass) const = 0 ;
virtual bool GetCurveTempParam( int nChunk, int nLoop, int nCrv, double& dParam, int nParamInd = 0) const = 0 ; virtual int GetChunkSimpleClassification( int nChunk, const ISurfFlatRegion& Other, int nOthChunk) const ; // compare only outsides
virtual bool ResetAllCurveTempParams( void) = 0 ; virtual bool GetZigZagInfill( double dSideStep, bool bAllowStepCorrection, bool bInvert, ICRVCOMPOPOVECTOR& vpCrvs) const = 0 ;
} ; } ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -97,9 +82,3 @@ const int REGC_IN2 = 2 ; //!< La seconda regione
const int REGC_SAME = 3 ; //!< Le due regioni coincidono const int REGC_SAME = 3 ; //!< Le due regioni coincidono
const int REGC_OUT = 4 ; //!< Le due regioni sono esterne const int REGC_OUT = 4 ; //!< Le due regioni sono esterne
const int REGC_INTERS = 5 ; //!< Le due regioni si intersecano const int REGC_INTERS = 5 ; //!< Le due regioni si intersecano
//-----------------------------------------------------------------------------
// Costanti per zona calcolo medial axis della regione
const int WMAT_IN_OUT = 0 ;
const int WMAT_IN = 1 ;
const int WMAT_OUT = 2 ;
+2 -21
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2017-2024 // EgalTech 2017-2017
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkSurfLocal.h Data : 08.04.24 Versione : 2.6d2 // File : EGkSurfLocal.h Data : 29.03.17 Versione : 1.8c3
// Contenuto : Classe gestione superfici nel locale desiderato. // Contenuto : Classe gestione superfici nel locale desiderato.
// //
// //
@@ -45,25 +45,6 @@ class SurfLocal
m_pCopy->LocToLoc( frSrf, frLoc) ; m_pCopy->LocToLoc( frSrf, frLoc) ;
m_pSrf = m_pCopy ; m_pSrf = m_pCopy ;
} }
SurfLocal( const ISurf* pSurf, const Frame3d& frSrf, const Frame3d& frLoc)
: m_pSrf( nullptr), m_pCopy( nullptr)
{ // verifica dei parametri
if ( pSurf == nullptr || &frSrf == nullptr || &frLoc == nullptr)
return ;
// assegno la superficie originale
m_pSrf = pSurf ;
// se i riferimenti coincidono non devo fare altro
if ( AreSameFrame( frSrf, frLoc))
return ;
// copio la superficie e la porto in locale
m_pCopy = m_pSrf->Clone() ;
if ( m_pCopy == nullptr) {
m_pSrf = nullptr ;
return ;
}
m_pCopy->LocToLoc( frSrf, frLoc) ;
m_pSrf = m_pCopy ;
}
SurfLocal( const SurfLocal& Other) SurfLocal( const SurfLocal& Other)
: m_pSrf( nullptr), m_pCopy( nullptr) : m_pSrf( nullptr), m_pCopy( nullptr)
{ // se non devo clonare { // se non devo clonare
+6 -30
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2014-2025 // EgalTech 2014-2022
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkSurfTriMesh.h Data : 28.03.25 Versione : 2.7c4 // File : EGkSurfTriMesh.h Data : 10.10.22 Versione : 2.4i4
// Contenuto : Dichiarazione della interfaccia ISurfTriMesh. // Contenuto : Dichiarazione della interfaccia ISurfTriMesh.
// //
// //
@@ -43,14 +43,12 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
virtual void SetLinearTolerance( double dLinTol) = 0 ; virtual void SetLinearTolerance( double dLinTol) = 0 ;
virtual void SetBoundaryAngle( double dBoundaryAngDeg) = 0 ; virtual void SetBoundaryAngle( double dBoundaryAngDeg) = 0 ;
virtual void SetSmoothAngle( double dSmoothAngDeg) = 0 ; virtual void SetSmoothAngle( double dSmoothAngDeg) = 0 ;
virtual void SetShowEdges( bool bShow) = 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 int AddTriangle( const int nIdVert[3], int nTFlag = 0) = 0 ;
virtual bool RemoveTriangle( int nId) = 0 ; virtual bool RemoveTriangle( int nId) = 0 ;
virtual bool AdjustTopology( void) = 0 ; virtual bool AdjustTopology( void) = 0 ;
virtual bool CreateByFlatContour( const PolyLine& PL) = 0 ; virtual bool CreateByFlatContour( const PolyLine& PL) = 0 ;
virtual bool CreateByPolygonWithHoles( const POLYLINEVECTOR& vPL) = 0 ; virtual bool CreateByRegion( const POLYLINEVECTOR& vPL) = 0 ;
virtual bool CreateByExtrusion( const PolyLine& PL, const Vector3d& vtExtr) = 0 ; virtual bool CreateByExtrusion( const PolyLine& PL, const Vector3d& vtExtr) = 0 ;
virtual bool CreateByPointCurve( const Point3d& ptP, const PolyLine& PL) = 0 ; virtual bool CreateByPointCurve( const Point3d& ptP, const PolyLine& PL) = 0 ;
virtual bool CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2, int nRuledType) = 0 ; virtual bool CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2, int nRuledType) = 0 ;
@@ -68,9 +66,7 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
virtual int GetTriangleSize( void) const = 0 ; virtual int GetTriangleSize( void) const = 0 ;
virtual double GetLinearTolerance( void) const = 0 ; virtual double GetLinearTolerance( void) const = 0 ;
virtual double GetSmoothAngle( void) const = 0 ; virtual double GetSmoothAngle( void) const = 0 ;
virtual bool GetShowEdges( void) const = 0 ;
virtual bool GetVertex( int nId, Point3d& ptP) 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 GetFirstVertex( Point3d& ptP) const = 0 ;
virtual int GetNextVertex( int nId, Point3d& ptP) const = 0 ; virtual int GetNextVertex( int nId, Point3d& ptP) const = 0 ;
virtual bool GetTriangle( int nId, int nIdVert[3]) const = 0 ; virtual bool GetTriangle( int nId, int nIdVert[3]) const = 0 ;
@@ -88,13 +84,11 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
virtual bool GetTriangleSmoothNormals( int nId, TriNormals3d& TNrms) const = 0 ; virtual bool GetTriangleSmoothNormals( int nId, TriNormals3d& TNrms) const = 0 ;
virtual ISurfTriMesh* CloneTriangle( int nTria) const = 0 ; virtual ISurfTriMesh* CloneTriangle( int nTria) const = 0 ;
virtual bool GetLoops( POLYLINEVECTOR& vPL) const = 0 ; virtual bool GetLoops( POLYLINEVECTOR& vPL) const = 0 ;
virtual bool GetSilhouette( const Vector3d& vtDir, double dTol, POLYLINEVECTOR& vPL, bool bAllTria = false) const = 0 ; virtual bool GetSilhouette( const Vector3d& vtDir, double dTol, POLYLINEVECTOR& vPL) const = 0 ;
virtual bool GetSilhouette( const Plane3d& plPlane, double dTol, POLYLINEVECTOR& vPL, bool bAllTria = false) const = 0 ;
virtual int GetFacetCount( void) const = 0 ; virtual int GetFacetCount( void) const = 0 ;
virtual int GetFacetSize( void) const = 0 ; virtual int GetFacetSize( void) const = 0 ;
virtual int GetFacetFromTria( int nT) const = 0 ; virtual int GetFacetFromTria( int nT) const = 0 ;
virtual bool GetAllTriaInFacet( int nF, INTVECTOR& vT) 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 GetFacetLoops( int nF, POLYLINEVECTOR& vPL) const = 0 ;
virtual bool GetFacetAdjacencies( int nF, INTMATRIX& vAdj) 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 ; virtual bool GetFacetNearestEndPoint( int nF, const Point3d& ptNear, Point3d& ptEnd, Vector3d& vtN) const = 0 ;
@@ -108,38 +102,20 @@ class __declspec( novtable) ISurfTriMesh : public ISurf
virtual bool SwapFacets( int nF1, int nF2) = 0 ; virtual bool SwapFacets( int nF1, int nF2) = 0 ;
virtual bool GetFacetLocalBBox( int nF, BBox3d& b3Loc, int nFlag = BBF_STANDARD) const = 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 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 GetCurvature( int nV,
double& dMinK, Vector3d& vtMinK, double& dMaxK, Vector3d& vtMaxK, bool& bPlanar, Vector3d& vtNorm) const = 0 ;
virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ; virtual bool Cut( const Plane3d& plPlane, bool bSaveOnEq) = 0 ;
virtual bool GeneralizedCut( const ICurve& cvCurve, bool bSaveOnEq) = 0 ; virtual bool GeneralizedCut( const ICurve& cvCurve, bool bSaveOnEq) = 0 ;
virtual bool Add( const ISurfTriMesh& Other) = 0 ; virtual bool Add( const ISurfTriMesh& Other) = 0 ;
virtual bool Intersect( const ISurfTriMesh& Other) = 0 ; virtual bool Intersect( const ISurfTriMesh& Other) = 0 ;
virtual bool Subtract( const ISurfTriMesh& Other) = 0 ; virtual bool Subtract( const ISurfTriMesh& Other) = 0 ;
virtual bool GetSurfClassification( const ISurfTriMesh& ClassifierSurf, virtual bool GetSurfClassification( const ISurfTriMesh& ClassifierSurf,
INTVECTOR& vTriaIn, INTVECTOR& vTriaOut, INTVECTOR& vTriaOnP, INTVECTOR& vTriaOnM, INTVECTOR& vTriaIndef) = 0 ; INTVECTOR& vTriaIn, INTVECTOR& vTriaOut, INTVECTOR& vTriaOnP, INTVECTOR& vTriaOnM, INTVECTOR& vTriaIndef) = 0 ;
virtual bool CutWithOtherSurf( const ISurfTriMesh& CutterSurf, bool bInVsOut, bool bSaveOnEq) = 0 ; virtual bool CutWithOtherSurf( const ISurfTriMesh& CutterSurf, bool bInVsOut, bool bSaveOnEq) = 0 ;
virtual bool Repair( double dMaxEdgeLen = MAX_EDGE_LEN_STD) = 0 ; virtual bool Repair( double dMaxEdgeLen = MAX_EDGE_LEN_STD) = 0 ;
virtual bool GetAllTriaOverlapBox( const BBox3d& b3Box, INTVECTOR& vT) const = 0 ; virtual bool GetAllTriaOverlapBox( const BBox3d& b3Box, INTVECTOR& vT) const = 0 ;
virtual const BBox3d& GetAllTriaBox( void) const = 0 ; virtual const BBox3d& GetAllTriaBox( void) const = 0 ;
virtual int GetShellCount( void) const = 0 ;
virtual bool GetShellArea( int nShell, double& dArea) const = 0 ;
virtual bool RemoveShell( int nShell) = 0 ;
virtual ISurfTriMesh* CloneShell( int nShell) const = 0 ;
virtual bool GetPartLocalBBox( int nP, BBox3d& b3Loc) const = 0 ;
virtual bool GetPartBBox( int nP, const Frame3d& frRef, BBox3d& b3Ref) const = 0 ;
virtual int GetPartCount( void) const = 0 ; virtual int GetPartCount( void) const = 0 ;
virtual bool GetPartArea( int nPart, double& dArea) const = 0 ;
virtual bool GetPartVolume( int nPart, double& dVolume) const = 0 ;
virtual bool GetPartLoops( int nPart, POLYLINEVECTOR& vPL) const = 0 ;
virtual bool RemovePart( int nPart) = 0 ; virtual bool RemovePart( int nPart) = 0 ;
virtual ISurfTriMesh* ClonePart( int nPart) const = 0 ; virtual ISurfTriMesh* ClonePart( int nPart) const = 0 ;
virtual bool SetTFlag( int nId, int nTFlag) = 0 ;
virtual bool GetTFlag( int nId, int& nFlag) const = 0 ;
virtual int GetMaxTFlag( void) const = 0 ; virtual int GetMaxTFlag( void) const = 0 ;
virtual bool ResetTFlags( void) = 0 ; virtual bool ResetTFlags( void) = 0 ;
} ; } ;
-30
View File
@@ -1,30 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2025-2025
//----------------------------------------------------------------------------
// File : EGkSurfTriMeshAux.h Data : 07.07.25 Versione : 2.7g1
// Contenuto : Funzioni ausiliarie per ISurfTriMesh.
//
//
//
// Modifiche : 07.07.25 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkSurfTriMesh.h"
//----------------------------------------------------------------------------
// Costanti per offset
static int STMOFF_FILLET = 0 ;
static int STMOFF_CHAMFER = 1 ;
static int STMOFF_EXTEND = 2 ;
//----------------------------------------------------------------------------
// Funzioni per Offset di singola superficie
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshOffset( const ISurfTriMesh* pStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshThickeningOffset( const ISurfTriMesh* pStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
// Funzioni per Offset di più superfici
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshesOffset( const CISURFTMPVECTOR& vStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
EGK_EXPORT ISurfTriMesh* CreateSurfTriMeshesThickeningOffset( const CISURFTMPVECTOR& vStm, double dOffs, double dPrec, int nType = STMOFF_FILLET) ;
-7
View File
@@ -455,13 +455,6 @@ CalcNormal( const Point3d& ptP, const Triangle3d& Tria, const TriNormals3d& Tnor
return vtNorm.Normalize( EPS_ZERO) ; return vtNorm.Normalize( EPS_ZERO) ;
} }
//----------------------------------------------------------------------------
inline bool
CalcNormal( const Point3d& ptP, const Triangle3dEx& Tria, Vector3d& vtNorm)
{
return CalcNormal( ptP, Tria, Tria.GetTriNormals(), vtNorm) ;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
enum TriangleType { OPEN = -1, EXACT = 0, CLOSED = 1 }; enum TriangleType { OPEN = -1, EXACT = 0, CLOSED = 1 };
+25 -25
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2025 // EgalTech 2015-2015
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkUserObjFactory.h Data : 31.10.25 Versione : 2.7k1 // File : EGkUserObjFactory.h Data : 22.05.15 Versione : 1.6e3
// Contenuto : Factory della classe IUserObj. // Contenuto : Factory della classe IUserObj.
// //
// //
@@ -32,6 +32,29 @@
#define USEROBJ_CREATE( sName) UserObjFactory::Create( sName) #define USEROBJ_CREATE( sName) UserObjFactory::Create( sName)
#define USEROBJ_GETLIST( vsList) UserObjFactory::GetList( vsList) #define USEROBJ_GETLIST( vsList) UserObjFactory::GetList( vsList)
//----------------------------------------------------------------------------
template <class T>
class UserObjRegister
{
public :
static bool DoRegister( const std::string& sName)
{ if ( ! UserObjFactory::Register( sName, Create))
return false ;
GetNamePrivate() = sName ;
return true ; }
static IUserObj* Create( void)
{ return new(nothrow) T ; }
static const std::string& GetName( void)
{ return GetNamePrivate() ; }
private :
UserObjRegister( void) {}
~UserObjRegister( void) {}
static std::string& GetNamePrivate( void)
{ static std::string s_sName ;
return s_sName ; }
} ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
class UserObjFactory class UserObjFactory
{ {
@@ -53,26 +76,3 @@ class UserObjFactory
// metodo di accesso alla mappa statica // metodo di accesso alla mappa statica
static CreatorMap& GetCreatorMap( void) ; static CreatorMap& GetCreatorMap( void) ;
} ; } ;
//----------------------------------------------------------------------------
template <class T>
class UserObjRegister
{
public :
static bool DoRegister( const std::string& sName)
{ if ( ! UserObjFactory::Register( sName, Create))
return false ;
GetNamePrivate() = sName ;
return true ; }
static IUserObj* Create( void)
{ return new( std::nothrow) T ; }
static const std::string& GetName( void)
{ return GetNamePrivate() ; }
private :
UserObjRegister( void) {}
~UserObjRegister( void) {}
static std::string& GetNamePrivate( void)
{ static std::string s_sName ;
return s_sName ; }
} ;
+37 -66
View File
@@ -1,14 +1,13 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2013-2023 // EgalTech 2013-2022
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkVector3d.h Data : 23.08.23 Versione : 2.5h2 // File : EGkVector3d.h Data : 27.08.22 Versione : 2.4h2
// Contenuto : Dichiarazione della classe Vettore 3d. // Contenuto : Dichiarazione della classe Vettore 3d.
// //
// //
// //
// Modifiche : 31.12.13 DS Creazione modulo. // Modifiche : 31.12.13 DS Creazione modulo.
// 14.12.19 DS Aggiunti confronti con Epsilon. // 14.12.19 DS Aggiunti confronti con Epsilon.
// 23.08.23 DS Aggiunto V_INVALID.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -45,9 +44,6 @@ class EGK_EXPORT Vector3d
void Set( double dX, double dY, double dZ) { x = dX ; y = dY ; z = dZ ; } void Set( double dX, double dY, double dZ) { x = dX ; y = dY ; z = dZ ; }
public : public :
//! Verifica la validità delle coordinate del vettore
bool IsValid( void) const
{ return ( std::isfinite( x) && std::isfinite( y) && std::isfinite( z)) ; }
//! Quadrato della lunghezza del vettore //! Quadrato della lunghezza del vettore
double SqLen( void) const double SqLen( void) const
{ return ( x * x + y * y + z * z) ; } { return ( x * x + y * y + z * z) ; }
@@ -58,89 +54,77 @@ class EGK_EXPORT Vector3d
{ return ( x * x + y * y ) ; } { return ( x * x + y * y ) ; }
//! Lunghezza del vettore nel piano XY //! Lunghezza del vettore nel piano XY
double LenXY( void) const ; double LenXY( void) const ;
//! Verifica se il vettore è quasi nullo //! Verifica se il vettore è quasi nullo
bool IsSmall( void) const bool IsSmall( void) const
{ return ( ( x * x + y * y + z * z) < SQ_EPS_SMALL) ; } { return ( ( x * x + y * y + z * z) < SQ_EPS_SMALL) ; }
//! Verifica se il vettore è esattamente nullo //! Verifica se il vettore è esattamente nullo
bool IsZero( void) const bool IsZero( void) const
{ return ( ( x * x + y * y + z * z) < SQ_EPS_ZERO) ; } { return ( ( x * x + y * y + z * z) < SQ_EPS_ZERO) ; }
//! Verifica se il vettore è quasi nullo nel piano XY //! Verifica se il vettore è quasi nullo nel piano XY
bool IsSmallXY( void) const bool IsSmallXY( void) const
{ return ( ( x * x + y * y) < SQ_EPS_SMALL) ; } { return ( ( x * x + y * y) < SQ_EPS_SMALL) ; }
//! Verifica se il vettore è esattamente nullo nel piano XY //! Verifica se il vettore è esattamente nullo nel piano XY
bool IsZeroXY( void) const bool IsZeroXY( void) const
{ return ( ( x * x + y * y) < SQ_EPS_ZERO) ; } { return ( ( x * x + y * y) < SQ_EPS_ZERO) ; }
//! Verifica se il vettore è normalizzato (è un versore) //! Verifica se il vettore è normalizzato (è un versore)
bool IsNormalized( void) const bool IsNormalized( void) const
{ return ( abs( 1.0 - (x * x + y * y + z * z)) < ( 2 * EPS_ZERO)) ; } { return ( abs( 1.0 - (x * x + y * y + z * z)) < ( 2 * EPS_ZERO)) ; }
//! Verifica se il vettore è parallelo ed equiverso con X+ //! Verifica se il vettore è parallelo ed equiverso con X+
bool IsXplus( void) const bool IsXplus( void) const
{ double dMO = std::max( abs( y), abs( z)) ; { double dMO = std::max( abs( y), abs( z)) ;
return ( x > EPS_ZERO && dMO < 10 * EPS_ZERO && x > KV_BIG * dMO) ; } return ( x > EPS_ZERO && dMO < 10 * EPS_ZERO && x > KV_BIG * dMO) ; }
//! Verifica se il vettore è parallelo ed equiverso con X- //! Verifica se il vettore è parallelo ed equiverso con X-
bool IsXminus( void) const bool IsXminus( void) const
{ double dMO = std::max( abs( y), abs( z)) ; { double dMO = std::max( abs( y), abs( z)) ;
return ( x < -EPS_ZERO && dMO < 10 * EPS_ZERO && x < -KV_BIG * dMO) ; } return ( x < -EPS_ZERO && dMO < 10 * EPS_ZERO && x < -KV_BIG * dMO) ; }
//! Verifica se il vettore è parallelo a X //! Verifica se il vettore è parallelo a X
bool IsX( void) const bool IsX( void) const
{ double dMO = std::max( abs( y), abs( z)) ; { double dMO = std::max( abs( y), abs( z)) ;
return ( abs( x) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( x) > KV_BIG * dMO) ; } return ( abs( x) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( x) > KV_BIG * dMO) ; }
//! Verifica se il vettore è circa parallelo a x //! Verifica se il vettore è parallelo ed equiverso con Y+
bool IsXEpsilon( double dToler) const
{ double dMO = std::max( abs( y), abs( z)) ;
return ( abs( x) > dToler && dMO < 10 * dToler && abs( x) > KV_BIG * dMO) ; }
//! Verifica se il vettore è parallelo ed equiverso con Y+
bool IsYplus( void) const bool IsYplus( void) const
{ double dMO = std::max( abs( z), abs( x)) ; { double dMO = std::max( abs( z), abs( x)) ;
return ( y > EPS_ZERO && dMO < 10 * EPS_ZERO && y > KV_BIG * dMO) ; } return ( y > EPS_ZERO && dMO < 10 * EPS_ZERO && y > KV_BIG * dMO) ; }
//! Verifica se il vettore è parallelo ed equiverso con Y- //! Verifica se il vettore è parallelo ed equiverso con Y-
bool IsYminus( void) const bool IsYminus( void) const
{ double dMO = std::max( abs( z), abs( x)) ; { double dMO = std::max( abs( z), abs( x)) ;
return ( y < -EPS_ZERO && dMO < 10 * EPS_ZERO && y < -KV_BIG * dMO) ; } return ( y < -EPS_ZERO && dMO < 10 * EPS_ZERO && y < -KV_BIG * dMO) ; }
//! Verifica se il vettore è parallelo a Y //! Verifica se il vettore è parallelo a Y
bool IsY( void) const bool IsY( void) const
{ double dMO = std::max( abs( z), abs( x)) ; { double dMO = std::max( abs( z), abs( x)) ;
return ( abs( y) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( y) > KV_BIG * dMO) ; } return ( abs( y) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( y) > KV_BIG * dMO) ; }
//! Verifica se il vettore è circa parallelo a y //! Verifica se il vettore è parallelo ed equiverso con Z+
bool IsYEpsilon( double dToler) const
{ double dMO = std::max( abs( z), abs( x)) ;
return ( abs( y) > dToler && dMO < 10 * dToler && abs( y) > KV_BIG * dMO) ; }
//! Verifica se il vettore è parallelo ed equiverso con Z+
bool IsZplus( void) const bool IsZplus( void) const
{ double dMO = std::max( abs( x), abs( y)) ; { double dMO = std::max( abs( x), abs( y)) ;
return ( z > EPS_ZERO && dMO < 10 * EPS_ZERO && z > KV_BIG * dMO) ; } return ( z > EPS_ZERO && dMO < 10 * EPS_ZERO && z > KV_BIG * dMO) ; }
//! Verifica se il vettore è parallelo ed equiverso con Z- //! Verifica se il vettore è parallelo ed equiverso con Z-
bool IsZminus( void) const bool IsZminus( void) const
{ double dMO = std::max( abs( x), abs( y)) ; { double dMO = std::max( abs( x), abs( y)) ;
return ( z < -EPS_ZERO && dMO < 10 * EPS_ZERO && z < -KV_BIG * dMO) ; } return ( z < -EPS_ZERO && dMO < 10 * EPS_ZERO && z < -KV_BIG * dMO) ; }
//! Verifica se il vettore è parallelo a Z //! Verifica se il vettore è parallelo a Z
bool IsZ( void) const bool IsZ( void) const
{ double dMO = std::max( abs( x), abs( y)) ; { double dMO = std::max( abs( x), abs( y)) ;
return ( abs( z) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( z) > KV_BIG * dMO) ; } return ( abs( z) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( z) > KV_BIG * dMO) ; }
//! Verifica se il vettore è circa parallelo a Z //! Verifica se il vettore è generico
bool IsZEpsilon( double dToler) const
{ double dMO = std::max( abs( x), abs( y)) ;
return ( abs( z) > dToler && dMO < 10 * dToler && abs( z) > KV_BIG * dMO) ; }
//! Verifica se il vettore è generico
bool IsGeneric( void) const bool IsGeneric( void) const
{ return ( ! IsX() && ! IsY() && ! IsZ()) ; } { return ( ! IsX() && ! IsY() && ! IsZ()) ; }
//! Somma sul posto con altro vettore //! Somma sul posto con altro vettore
Vector3d& operator +=( const Vector3d& vtV) Vector3d& operator +=( const Vector3d& vtV)
{ x += vtV.x ; y += vtV.y ; z += vtV.z ; return *this ; } { this->x += vtV.x ; this->y += vtV.y ; this->z += vtV.z ; return *this ; }
//! Sottrazione sul posto con altro vettore //! Sottrazione sul posto con altro vettore
Vector3d& operator -=( const Vector3d& vtV) Vector3d& operator -=( const Vector3d& vtV)
{ x -= vtV.x ; y -= vtV.y ; z -= vtV.z ; return *this ; } { this->x -= vtV.x ; this->y -= vtV.y ; this->z -= vtV.z ; return *this ; }
//! Moltiplicazione sul posto con un numero //! Moltiplicazione sul posto con un numero
Vector3d& operator *=( double dMul) Vector3d& operator *=( double dMul)
{ x *= dMul ; y *= dMul ; z *= dMul ; return *this ; } { this->x *= dMul ; this->y *= dMul ; this->z *= dMul ; return *this ; }
//! Divisione sul posto con un numero //! Divisione sul posto con un numero
Vector3d& operator /=( double dDiv) Vector3d& operator /=( double dDiv)
{ double dMul = 1 / dDiv ; x *= dMul ; y *= dMul ; z *= dMul ; return *this ; } { double dMul = 1 / dDiv ; this->x *= dMul ; this->y *= dMul ; this->z *= dMul ; return *this ; }
//! Ritorna la rappresentazione in coordinate sferiche //! Ritorna la rappresentazione in coordinate sferiche
void ToSpherical( double* pdLen, double* pdAngVertDeg, double* pdAngOrizzDeg) const ; void ToSpherical( double* pdLen, double* pdAngVertDeg, double* pdAngOrizzDeg) const ;
//! Inversione del vettore //! Inversione del vettore
void Invert( void) void Invert( void)
{ x = -x ; y = -y ; z = -z ; } { x = - x ; y = - y ; z = - z ; }
//! Normalizzazione del vettore (trasformazione in versore) //! Normalizzazione del vettore (trasformazione in versore)
bool Normalize( double dEps = EPS_SMALL) ; bool Normalize( double dEps = EPS_SMALL) ;
//! Rotazione attorno ad un asse, dato l'angolo in gradi //! Rotazione attorno ad un asse, dato l'angolo in gradi
@@ -183,8 +167,6 @@ class EGK_EXPORT Vector3d
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Vettori notevoli // Vettori notevoli
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Vettore non valido
const Vector3d V_INVALID( NAN, NAN, NAN) ;
//! Vettore nullo //! Vettore nullo
const Vector3d V_NULL( 0, 0, 0) ; const Vector3d V_NULL( 0, 0, 0) ;
//! Versore asse X //! Versore asse X
@@ -205,19 +187,19 @@ EGK_EXPORT Vector3d FromSpherical( double dLen, double dAngVertDeg, double dAngO
EGK_EXPORT Vector3d FromPolar( double dLen, double dAngDeg) ; EGK_EXPORT Vector3d FromPolar( double dLen, double dAngDeg) ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Definizione come più verticale dei vettori ortogonali a quello ricevuto //! Definizione come più verticale dei vettori ortogonali a quello ricevuto
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
EGK_EXPORT Vector3d FromUprightOrtho( const Vector3d& vtV) ; EGK_EXPORT Vector3d FromUprightOrtho( const Vector3d& vtV) ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Definizione come ortogonale al primo ricevuto, orizzontale e più vicino al secondo //! Definizione come ortogonale al primo ricevuto, orizzontale e più vicino al secondo
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
EGK_EXPORT Vector3d FromNearestHorizontalOrtho( const Vector3d& vtV, const Vector3d& vtNear) ; EGK_EXPORT Vector3d FromNearestHorizontalOrtho( const Vector3d& vtV, const Vector3d& vtNear) ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Opposto di un vettore //! Opposto di un vettore
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
operator-( const Vector3d& vtV) operator-( const Vector3d& vtV)
{ {
return ( Vector3d( - vtV.x, - vtV.y, - vtV.z)) ; return ( Vector3d( - vtV.x, - vtV.y, - vtV.z)) ;
@@ -226,7 +208,7 @@ operator-( const Vector3d& vtV)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Somma di due vettori //! Somma di due vettori
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
operator+( const Vector3d& vtV1, const Vector3d& vtV2) operator+( const Vector3d& vtV1, const Vector3d& vtV2)
{ {
return ( Vector3d( vtV1.x + vtV2.x, vtV1.y + vtV2.y, vtV1.z + vtV2.z)) ; return ( Vector3d( vtV1.x + vtV2.x, vtV1.y + vtV2.y, vtV1.z + vtV2.z)) ;
@@ -235,7 +217,7 @@ operator+( const Vector3d& vtV1, const Vector3d& vtV2)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Sottrazione di due vettori //! Sottrazione di due vettori
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
operator-( const Vector3d& vtV1, const Vector3d& vtV2) operator-( const Vector3d& vtV1, const Vector3d& vtV2)
{ {
return ( Vector3d( vtV1.x - vtV2.x, vtV1.y - vtV2.y, vtV1.z - vtV2.z)) ; return ( Vector3d( vtV1.x - vtV2.x, vtV1.y - vtV2.y, vtV1.z - vtV2.z)) ;
@@ -244,7 +226,7 @@ operator-( const Vector3d& vtV1, const Vector3d& vtV2)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Prodotto con uno scalare //! Prodotto con uno scalare
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
operator*( const Vector3d& vtV, double dMul) operator*( const Vector3d& vtV, double dMul)
{ {
return ( Vector3d( vtV.x * dMul, vtV.y * dMul, vtV.z * dMul)) ; return ( Vector3d( vtV.x * dMul, vtV.y * dMul, vtV.z * dMul)) ;
@@ -253,7 +235,7 @@ operator*( const Vector3d& vtV, double dMul)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Prodotto di uno scalare con un vettore //! Prodotto di uno scalare con un vettore
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
operator*( double dMul, const Vector3d& vtV) operator*( double dMul, const Vector3d& vtV)
{ {
return ( Vector3d( vtV.x * dMul, vtV.y * dMul, vtV.z * dMul)) ; return ( Vector3d( vtV.x * dMul, vtV.y * dMul, vtV.z * dMul)) ;
@@ -262,7 +244,7 @@ operator*( double dMul, const Vector3d& vtV)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Divisione con uno scalare //! Divisione con uno scalare
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
operator/( const Vector3d& vtV, double dDiv) operator/( const Vector3d& vtV, double dDiv)
{ {
double dMul = 1 / dDiv ; double dMul = 1 / dDiv ;
@@ -290,7 +272,7 @@ ScalarXY( const Vector3d& vtV1, const Vector3d& vtV2)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Prodotto vettoriale //! Prodotto vettoriale
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
operator^( const Vector3d& vtV1, const Vector3d& vtV2) operator^( const Vector3d& vtV1, const Vector3d& vtV2)
{ {
return ( Vector3d( vtV1.y * vtV2.z - vtV1.z * vtV2.y, return ( Vector3d( vtV1.y * vtV2.z - vtV1.z * vtV2.y,
@@ -310,7 +292,7 @@ CrossXY( const Vector3d& vtV1, const Vector3d& vtV2)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Somma mediata di due vettori (baricentrica) //! Somma mediata di due vettori (baricentrica)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
Media( const Vector3d& vtV1, const Vector3d& vtV2, double dCoeff = 0.5) Media( const Vector3d& vtV1, const Vector3d& vtV2, double dCoeff = 0.5)
{ {
return ( Vector3d( ( 1 - dCoeff) * vtV1.x + dCoeff * vtV2.x, return ( Vector3d( ( 1 - dCoeff) * vtV1.x + dCoeff * vtV2.x,
@@ -321,7 +303,7 @@ Media( const Vector3d& vtV1, const Vector3d& vtV2, double dCoeff = 0.5)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Restituisce il componente del vettore parallelo a quello di riferimento //! Restituisce il componente del vettore parallelo a quello di riferimento
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
ParallCompo( const Vector3d& vtV, const Vector3d& vtRef) ParallCompo( const Vector3d& vtV, const Vector3d& vtRef)
{ {
if ( vtRef.IsNormalized()) if ( vtRef.IsNormalized())
@@ -333,7 +315,7 @@ ParallCompo( const Vector3d& vtV, const Vector3d& vtRef)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Restituisce il componente del vettore ortogonale a quello di riferimento //! Restituisce il componente del vettore ortogonale a quello di riferimento
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
OrthoCompo( const Vector3d& vtV, const Vector3d& vtRef) OrthoCompo( const Vector3d& vtV, const Vector3d& vtRef)
{ {
if ( vtRef.IsNormalized()) if ( vtRef.IsNormalized())
@@ -441,21 +423,10 @@ AreOrthoExact( const Vector3d& vtV1, const Vector3d& vtV2)
return ( abs( vtV1 * vtV2) < COS_ORTO_ANG_ZERO) ; return ( abs( vtV1 * vtV2) < COS_ORTO_ANG_ZERO) ;
} }
//----------------------------------------------------------------------------
//! Restituisce una copia ruotata del vettore passato
//----------------------------------------------------------------------------
inline const Vector3d
GetRotate( const Vector3d& vtV, const Vector3d& vtAx, double dAngDeg)
{
Vector3d vtW = vtV ;
vtW.Rotate( vtAx, dAngDeg) ;
return vtW ;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Restituisce una copia in locale del vettore passato //! Restituisce una copia in locale del vettore passato
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
GetToLoc( const Vector3d& vtV, const Frame3d& frRef) GetToLoc( const Vector3d& vtV, const Frame3d& frRef)
{ {
Vector3d vtW = vtV ; Vector3d vtW = vtV ;
@@ -466,7 +437,7 @@ GetToLoc( const Vector3d& vtV, const Frame3d& frRef)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Restituisce una copia in globale del vettore passato //! Restituisce una copia in globale del vettore passato
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
GetToGlob( const Vector3d& vtV, const Frame3d& frRef) GetToGlob( const Vector3d& vtV, const Frame3d& frRef)
{ {
Vector3d vtW = vtV ; Vector3d vtW = vtV ;
@@ -477,7 +448,7 @@ GetToGlob( const Vector3d& vtV, const Frame3d& frRef)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//! Restituisce una copia dal primo al secondo riferimento del vettore passato //! Restituisce una copia dal primo al secondo riferimento del vettore passato
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline const Vector3d inline Vector3d
GetLocToLoc( const Vector3d& vtV, const Frame3d& frOri, const Frame3d& frDest) GetLocToLoc( const Vector3d& vtV, const Frame3d& frOri, const Frame3d& frDest)
{ {
Vector3d vtW = vtV ; Vector3d vtW = vtV ;
+46 -32
View File
@@ -1,25 +1,48 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2024 // EgalTech 2015-2020
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGkVolZmap.h Data : 22.04.24 Versione : 2.6d4 // File : EGkVolZmap.h Data : 12.05.19 Versione : 2.2k1
// Contenuto : Dichiarazione della interfaccia IVolZmap. // Contenuto : Dichiarazione della interfaccia IVolZmap.
// //
// //
// //
// Modifiche : 22.01.15 DS Creazione modulo. // Modifiche : 22.01.15 DS Creazione modulo.
// 12.09.23 DS Aggiunto metodo IsTriDexel. //
// 09.03.24 DS Aggiunti SetShowEdges e GetShowEdges.
// 10.06.25 RE Aggiunte funzioni per Offset di superfici TriMesh chiuse
// 04.07.25 RE Aggiunte funzioni per Thickening Offset di superfici TriMesh generiche
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#pragma once #pragma once
#include "/EgtDev/Include/EGkGeoObj.h" #include "/EgtDev/Include/EGkGeoObj.h"
#include "/EgtDev/Include/EGkPolyLine.h"
#include "/EgtDev/Include/EGkCurveComposite.h" #include "/EgtDev/Include/EGkCurveComposite.h"
#include "/EgtDev/Include/EGkSurfFlatRegion.h" #include "/EgtDev/Include/EGkSurfFlatRegion.h"
#include "/EgtDev/Include/EGkSurfTriMeshAux.h" #include "/EgtDev/Include/EGkSurfTriMesh.h"
#include "/EgtDev/Include/EGkTriangle3d.h"
#include "/EgtDev/Include/EGkIntersLineTria.h"
// ------------------------- STRUTTURE -----------------------------------------------------------
// Informazioni su intersezione linea - volume Zmap
struct IntLineZmapInfo {
int nILTT ; // Tipo di intersezione linea-triangolo
double dU ; // Parametro sulla linea
double dU2 ; // Secondo parametro sulla linea
int nVox ; // Indice del voxel del triangolo
int nBlock ; // Indice del blocco del triangolo
Point3d ptI ; // Punto di intersezione
Point3d ptI2 ; // Secondo punto di intersezione (termine di tratto sovrapposto)
Triangle3d trTria ; // Triangolo
// Costruttori
IntLineZmapInfo( void)
: nILTT( ILTT_NO), dU( 0), dU2( 0), nVox( -1), nBlock( -1), ptI(), ptI2(), trTria() {}
IntLineZmapInfo( int nIL, double dUU, int nVx, int nBl, const Point3d& ptP, Triangle3d& trTr)
: nILTT( nIL), dU( dUU), dU2( 0), nVox( nVx), nBlock( nBl), ptI( ptP), ptI2(), trTria( trTr) {}
IntLineZmapInfo( int nIL, double dUU, double dUU2, int nVx, int nBl,
const Point3d& ptP, const Point3d& ptP2, Triangle3d& trTr)
: nILTT( nIL), dU( dUU), dU2( dUU2), nVox( nVx), nBlock( nBl), ptI( ptP), ptI2( ptP2), trTria( trTr) {}
} ;
// Vettore di IntLineZmapInfo
typedef std::vector<IntLineZmapInfo> ILZIVECTOR ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
class __declspec( novtable) IVolZmap : public IGeoObj class __declspec( novtable) IVolZmap : public IGeoObj
@@ -29,22 +52,17 @@ class __declspec( novtable) IVolZmap : public IGeoObj
public : public :
virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ; virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ;
virtual bool Clear( void) = 0 ; virtual bool Clear( void) = 0 ;
virtual bool Create( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dStep, bool bTriDex) = 0 ; virtual bool Create( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dPrec, bool bTriDex) = 0 ;
virtual bool CreateEmpty( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dStep, bool bTriDex) = 0 ; virtual bool CreateFromFlatRegion( const ISurfFlatRegion& Surf, double dDimZ, double dPrec, bool bTriDex) = 0 ;
virtual bool CreateFromFlatRegion( const ISurfFlatRegion& Surf, double dDimZ, double dStep, bool bTriDex) = 0 ; virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dPrec, bool bTriDex) = 0 ;
virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dStep, bool bTriDex, double dExtraBox = 0) = 0 ;
virtual int GetBlockCount( void) const = 0 ; virtual int GetBlockCount( void) const = 0 ;
virtual int GetBlockUpdatingCounter( int nBlock) const = 0 ; virtual int GetBlockUpdatingCounter( int nBlock) const = 0 ;
virtual bool GetBlockTriangles( int nBlock, TRIA3DEXVECTOR& vTria) const = 0 ; virtual bool GetBlockTriangles( int nBlock, TRIA3DEXVECTOR& vTria) const = 0 ;
virtual ISurfTriMesh* GetSurfTriMesh( void) const = 0 ;
virtual bool GetEdges( ICURVEPOVECTOR& vpCurve) const = 0 ; virtual bool GetEdges( ICURVEPOVECTOR& vpCurve) const = 0 ;
virtual bool GetVolume( double& dVol) 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 bool GetDexelLines( int nDir, int nPos1, int nPos2, POLYLINELIST& lstPL) const = 0 ;
virtual int GetResolution( void) const = 0 ; virtual int GetResolution( void) const = 0 ;
virtual bool ChangeResolution( int nDexvoxRatio) = 0 ; virtual bool ChangeResolution( int nDexvoxRatio) = 0 ;
virtual void SetShowEdges( bool bShow) = 0 ;
virtual bool GetShowEdges( void) const = 0 ;
virtual bool SetToolTolerances( double dLinTol, double dAngTolDeg = 90) = 0 ; virtual bool SetToolTolerances( double dLinTol, double dAngTolDeg = 90) = 0 ;
virtual bool SetStdTool( const std::string& sToolName, virtual bool SetStdTool( const std::string& sToolName,
double dH, double dR, double dCornR, double dCutterH, int nFlag, bool bFirst) = 0 ; double dH, double dR, double dCornR, double dCutterH, int nFlag, bool bFirst) = 0 ;
@@ -58,8 +76,6 @@ class __declspec( novtable) IVolZmap : public IGeoObj
double dH, double dW, double dTh, double dRc, int nFlag, bool bFirst) = 0 ; double dH, double dW, double dTh, double dRc, int nFlag, bool bFirst) = 0 ;
virtual bool SetChiselTool( const std::string& sToolName, virtual bool SetChiselTool( const std::string& sToolName,
double dH, double dW, double dTh, int nFlag, bool bFirst) = 0 ; double dH, double dW, double dTh, int nFlag, bool bFirst) = 0 ;
virtual bool SetAdditiveTool( const std::string& sToolName,
double dH, double dR, double dRc, int nFlag, bool bFirst) = 0 ;
virtual int GetToolCount( void) const = 0 ; virtual int GetToolCount( void) const = 0 ;
virtual bool SetCurrTool( int nCurrTool) = 0 ; virtual bool SetCurrTool( int nCurrTool) = 0 ;
virtual bool ResetTools( void) = 0 ; virtual bool ResetTools( void) = 0 ;
@@ -71,17 +87,19 @@ class __declspec( novtable) IVolZmap : public IGeoObj
const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs, const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs,
const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe) = 0 ; const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe) = 0 ;
virtual bool GetDepth( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength, bool bExact) const = 0 ; virtual bool GetDepth( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength, bool bExact) const = 0 ;
virtual bool CDeBox( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, bool bPrecise = false) const = 0 ; virtual bool GetLineIntersection( const Point3d& ptP, const Vector3d& vtD, ILZIVECTOR& vIntersInfo) const = 0 ;
virtual bool CDeSphere( const Point3d& ptCenter, double dRad, double dSafeDist, bool bPrecise = false) const = 0 ; virtual bool GetPlaneIntersection( const Plane3d& plPlane, ICURVEPOVECTOR& vpLoop) const = 0 ;
virtual bool CDeCylinder( const Frame3d& frCyl, double dR, double dH, double dSafeDist, bool bPrecise = false) const = 0 ; virtual bool AvoidBox( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool CDeConeFrustum( const Frame3d& frCone, double dRadBot, double dRadTop, double dHeight, virtual bool AvoidSphere( const Point3d& ptCenter, double dRad, double dSafeDist, bool bPrecise = false) const = 0 ;
double dSafeDist, bool bPrecise = false) const = 0 ; virtual bool AvoidCylinder( const Frame3d& frCyl, double dR, double dH, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool CDeRectPrismoid( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY, virtual bool AvoidConeFrustum( const Frame3d& frCone, double dRadBot, double dRadTop, double dHeight,
double dLenghtTopX, double dLenghtTopY, double dHeight, double dSafeDist, bool bPrecise = false) const = 0 ;
double dSafeDist, bool bPrecise = false) const = 0 ; virtual bool AvoidRectPrismoid( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY,
virtual bool CDeTorus( const Frame3d& frTorus, double dRadMax, double dRadMin, double dLenghtTopX, double dLenghtTopY, double dHeight,
double dSafeDist, bool bPrecise = false) const = 0 ; double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool CDeSurfTm( const ISurfTriMesh& tmSurf, double dSafeDist, bool bPrecise = false) const = 0 ; virtual bool AvoidTorus( const Frame3d& frTorus, double dRadMax, double dRadMin,
double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool AvoidSurfTm( const ISurfTriMesh& tmSurf, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool Cut( const Plane3d& plPlane) = 0 ; virtual bool Cut( const Plane3d& plPlane) = 0 ;
virtual bool Compact( void) = 0 ; virtual bool Compact( void) = 0 ;
virtual int GetPartCount( void) const = 0 ; virtual int GetPartCount( void) const = 0 ;
@@ -91,10 +109,6 @@ class __declspec( novtable) IVolZmap : public IGeoObj
virtual IVolZmap* ClonePart( int nPart) const = 0 ; virtual IVolZmap* ClonePart( int nPart) const = 0 ;
virtual bool RemovePart( int nPart) = 0 ; virtual bool RemovePart( int nPart) = 0 ;
virtual int GetPartMinDistFromPoint( const Point3d& ptP) const = 0 ; virtual int GetPartMinDistFromPoint( const Point3d& ptP) const = 0 ;
virtual bool AddSurfTm( const ISurfTriMesh* pStm) = 0 ;
virtual bool SubtractSurfTm( const ISurfTriMesh* pStm) = 0 ;
virtual bool MakeUniform( double dToler, bool bIsExtensionFirst = true, int nToolNum = 0) = 0 ;
virtual bool Offset( double dOffs, int nType) = 0 ;
} ; } ;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
-6
View File
@@ -28,9 +28,3 @@ class ILogger ;
EGN_EXPORT const char* GetEGnVersion( void) ; EGN_EXPORT const char* GetEGnVersion( void) ;
// permette di impostare il logger per la Dll // permette di impostare il logger per la Dll
EGN_EXPORT void SetEGnLogger( ILogger* pLogger) ; EGN_EXPORT void SetEGnLogger( ILogger* pLogger) ;
// imposta la chiave di protezione
EGN_EXPORT void SetEGnKey( const std::string& sKey) ;
// imposta il tipo di chiave di protezione
EGN_EXPORT void SetEGnKeyType( int nType) ;
// imposta se chiave hardware di rete
EGN_EXPORT void SetEGnNetHwKey( bool bNetHwKey) ;
-36
View File
@@ -1,36 +0,0 @@
//----------------------------------------------------------------------------
// EgalTech 2023-2023
//----------------------------------------------------------------------------
// File : EGnGetKeyData.h Data : 29.05.23 Versione : 2.5e3
// Contenuto : Prototipo funzioni gestione dati chiavi di protezione.
//
//
//
// Modifiche : 29.05.23 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#define NOMINMAX
#include <windows.h>
#include <string>
//----------------------- Macro per import/export ----------------------------
#undef EGN_EXPORT
#if defined( I_AM_EGN) // da definirsi solo nella DLL
#define EGN_EXPORT __declspec( dllexport)
#else
#define EGN_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
EGN_EXPORT bool SetEGnKeyLevel( int nRet, int nKeyLev, int nKeyExpDays) ;
EGN_EXPORT int GetEGnKeyLevel( int nProd, int nVer, int nLev, int& nKeyLev, int& nKeyExpDays) ;
EGN_EXPORT bool SetEGnKeyOptions( int nRet, int nKeyOpt1, int nKeyOpt2, int nKeyOptExpDays) ;
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) ;
+17 -103
View File
@@ -229,11 +229,7 @@ LuaGetTabFieldParam( lua_State* L, int nInd, const char* szField, T& Val)
{ {
if ( ! lua_istable( L, nInd)) if ( ! lua_istable( L, nInd))
return false ; return false ;
int nField ; lua_getfield( L, nInd, szField) ;
if ( FromString( szField, nField))
lua_rawgeti( L, nInd, nField) ;
else
lua_getfield( L, nInd, szField) ;
bool bOk = LuaGetParam( L, -1, Val) ; bool bOk = LuaGetParam( L, -1, Val) ;
lua_pop( L, 1) ; lua_pop( L, 1) ;
return bOk ; return bOk ;
@@ -327,24 +323,6 @@ LuaSetParam( lua_State* L, const std::string& sPar)
return true ; return true ;
} }
//----------------------------------------------------------------------------
inline bool
LuaSetParam( lua_State* L, const BOOLVECTOR& vPar)
{
try {
int nSize = int( vPar.size()) ;
lua_createtable( L, nSize, 0) ;
for ( int i = 1 ; i <= nSize ; ++ i) {
lua_pushboolean( L, ( vPar[i-1] ? 1 : 0)) ;
lua_rawseti( L, -2, i) ;
}
}
catch( ...) {
return false ;
}
return true ;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline bool inline bool
LuaSetParam( lua_State* L, const INTVECTOR& vPar) LuaSetParam( lua_State* L, const INTVECTOR& vPar)
@@ -466,11 +444,7 @@ LuaSetTabFieldParam( lua_State* L, int nInd, const char* szField)
if ( ! LuaSetParam( L)) if ( ! LuaSetParam( L))
return false ; return false ;
int nPos = ( nInd > 0 ? nInd : nInd - 1) ; int nPos = ( nInd > 0 ? nInd : nInd - 1) ;
int nField ; lua_setfield( L, nPos, szField) ;
if ( FromString( szField, nField))
lua_rawseti( L, nPos, nField) ;
else
lua_setfield( L, nPos, szField) ;
return true ; return true ;
} }
@@ -491,11 +465,7 @@ LuaSetTabFieldParam( lua_State* L, int nInd, const char* szField, const T& Val)
if ( ! LuaSetParam( L, Val)) if ( ! LuaSetParam( L, Val))
return false ; return false ;
int nPos = ( nInd > 0 ? nInd : nInd - 1) ; int nPos = ( nInd > 0 ? nInd : nInd - 1) ;
int nField ; lua_setfield( L, nPos, szField) ;
if ( FromString( szField, nField))
lua_rawseti( L, nPos, nField) ;
else
lua_setfield( L, nPos, szField) ;
return true ; return true ;
} }
@@ -523,29 +493,11 @@ LuaGetGlobVar( lua_State* L, const std::string& sVar, T& Val)
} }
// altrimenti campo di tabella // altrimenti campo di tabella
else { else {
STRVECTOR vsTokens ; std::string sTab, sField ;
Tokenize( sVar, ".", vsTokens) ; SplitFirst( sVar, ".", sTab, sField) ;
int nTokenCnt = int( vsTokens.size()) ; lua_getglobal( L, sTab.c_str()) ;
if ( nTokenCnt < 2) bool bOk = LuaGetTabFieldParam( L, -1, sField.c_str(), Val) ;
return false ; lua_pop( L, 1) ;
if ( lua_getglobal( L, vsTokens[0].c_str()) != LUA_TTABLE) {
lua_pop( L, 1) ;
return false ;
}
for ( int nInd = 1 ; nInd <= nTokenCnt - 2 ; ++ nInd) {
bool bOk ;
int nField ;
if ( FromString( vsTokens[nInd], nField))
bOk = ( lua_rawgeti( L, -1, nField) == LUA_TTABLE) ;
else
bOk = ( lua_getfield( L, -1, vsTokens[nInd].c_str()) == LUA_TTABLE) ;
if ( ! bOk) {
lua_pop( L, nInd + 1) ;
return false ;
}
}
bool bOk = LuaGetTabFieldParam( L, -1, vsTokens[nTokenCnt-1].c_str(), Val) ;
lua_pop( L, nTokenCnt - 1) ;
return bOk ; return bOk ;
} }
} }
@@ -566,30 +518,11 @@ LuaSetGlobVar( lua_State* L, const std::string& sVar, const T& Val)
} }
// altrimenti campo di tabella // altrimenti campo di tabella
else { else {
STRVECTOR vsTokens ; std::string sTab, sField ;
Tokenize( sVar, ".", vsTokens) ; SplitFirst( sVar, ".", sTab, sField) ;
int nTokenCnt = int( vsTokens.size()) ; lua_getglobal( L, sTab.c_str()) ;
if ( nTokenCnt < 2) bool bOk = LuaSetTabFieldParam( L, -1, sField.c_str(), Val) ;
return false ; lua_pop( L, 1) ;
if ( lua_getglobal( L, vsTokens[0].c_str()) != LUA_TTABLE) {
lua_pop( L, 1) ;
return false ;
}
for ( int nInd = 1 ; nInd <= nTokenCnt - 2 ; ++ nInd) {
int nField ;
bool bNumber = FromString( vsTokens[nInd], nField) ;
if ( ( bNumber ? lua_rawgeti( L, -1, nField) : lua_getfield( L, -1, vsTokens[nInd].c_str())) != LUA_TTABLE) {
lua_pop( L, 1) ;
lua_newtable( L) ;
lua_pushvalue( L, -1) ;
if ( bNumber)
lua_rawseti( L, -3, nField) ;
else
lua_setfield( L, -3, vsTokens[nInd].c_str()) ;
}
}
bool bOk = LuaSetTabFieldParam( L, -1, vsTokens[nTokenCnt-1].c_str(), Val) ;
lua_pop( L, nTokenCnt - 1) ;
return bOk ; return bOk ;
} }
} }
@@ -609,29 +542,10 @@ LuaResetGlobVar( lua_State* L, const std::string& sVar)
} }
// altrimenti campo di tabella // altrimenti campo di tabella
else { else {
STRVECTOR vsTokens ; std::string sTab, sField ;
Tokenize( sVar, ".", vsTokens) ; SplitFirst( sVar, ".", sTab, sField) ;
int nTokenCnt = int( vsTokens.size()) ; lua_getglobal( L, sTab.c_str()) ;
if ( nTokenCnt < 2) bool bOk = LuaSetTabFieldParam( L, -1, sField.c_str()) ;
return false ;
if ( lua_getglobal( L, vsTokens[0].c_str()) != LUA_TTABLE) {
lua_pop( L, 1) ;
return false ;
}
for ( int nInd = 1 ; nInd <= nTokenCnt - 2 ; ++ nInd) {
int nField ;
bool bNumber = FromString( vsTokens[nInd], nField) ;
if ( ( bNumber ? lua_rawgeti( L, -1, nField) : lua_getfield( L, -1, vsTokens[nInd].c_str())) != LUA_TTABLE) {
lua_pop( L, 1) ;
lua_newtable( L) ;
lua_pushvalue( L, -1) ;
if ( bNumber)
lua_rawseti( L, -3, nField) ;
else
lua_setfield( L, -3, vsTokens[nInd].c_str()) ;
}
}
bool bOk = LuaSetTabFieldParam( L, -1, vsTokens[nTokenCnt-1].c_str()) ;
lua_pop( L, 1) ; lua_pop( L, 1) ;
return bOk ; return bOk ;
} }
+4 -39
View File
@@ -101,14 +101,14 @@ GetVal( const std::string& sString, const std::string& sKey, T& Val)
inline bool inline bool
SetValInNotes( const std::string& sKey, const std::string& sVal, std::string& sNotes) SetValInNotes( const std::string& sKey, const std::string& sVal, std::string& sNotes)
{ {
// verifiche validità chiave // verifiche validità chiave
if ( ! IsValidKey( sKey) || ! IsValidVal( sVal)) if ( ! IsValidKey( sKey) || ! IsValidVal( sVal))
return false ; return false ;
// chiave con carattere finale speciale // chiave con carattere finale speciale
std::string sTkey = sKey ; std::string sTkey = sKey ;
if ( sKey.back() != COLON) if ( sKey.back() != COLON)
sTkey += EQUAL ; sTkey += EQUAL ;
// ricerca se già presente // ricerca se già presente
STRVECTOR vsTokens ; STRVECTOR vsTokens ;
Tokenize( sNotes, ";", vsTokens) ; Tokenize( sNotes, ";", vsTokens) ;
bool bFound = false ; bool bFound = false ;
@@ -143,7 +143,7 @@ SetValInNotes( const std::string& sKey, T& Val, std::string& sNotes)
inline bool inline bool
GetValInNotes( const std::string& sNotes, const std::string& sKey, std::string& sVal) GetValInNotes( const std::string& sNotes, const std::string& sKey, std::string& sVal)
{ {
// verifiche validità chiave // verifiche validità chiave
if ( sNotes.empty() || ! IsValidKey( sKey)) if ( sNotes.empty() || ! IsValidKey( sKey))
return false ; return false ;
// chiave con carattere finale speciale // chiave con carattere finale speciale
@@ -171,46 +171,11 @@ GetValInNotes( const std::string& sNotes, const std::string& sKey, T& Val)
return ( GetValInNotes( sNotes, sKey, sVal) && FromString( sVal, Val)) ; return ( GetValInNotes( sNotes, sKey, sVal) && FromString( sVal, Val)) ;
} }
//----------------------------------------------------------------------------
inline bool
GetValInNotes( const std::string& sNotes, const std::string& sKey, const std::string& sToken, std::string& sVal)
{
// verifiche validità chiave
if ( sNotes.empty() || ! IsValidKey( sKey))
return false ;
// verifiche validità del token
if ( sToken.empty())
return false ;
// chiave con carattere finale speciale
std::string sTkey = sKey ;
if ( sKey.back() != COLON)
sTkey += EQUAL ;
// ricerca
STRVECTOR vsTokens ;
Tokenize( sNotes, sToken, vsTokens) ;
for ( const auto& sToken : vsTokens) {
if ( FindKey( sToken, sTkey, true)) {
sVal = sToken.substr( sTkey.length()) ;
return true ;
}
}
return false ;
}
//----------------------------------------------------------------------------
template <class T>
inline bool
GetValInNotes( const std::string& sNotes, const std::string& sKey, const std::string& sToken, T& Val)
{
std::string sVal ;
return ( GetValInNotes( sNotes, sKey, sToken, sVal) && FromString( sVal, Val)) ;
}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
inline bool inline bool
RemoveValInNotes( const std::string& sKey, std::string& sNotes) RemoveValInNotes( const std::string& sKey, std::string& sNotes)
{ {
// verifiche validità chiave // verifiche validità chiave
if ( sNotes.empty() || ! IsValidKey( sKey)) if ( sNotes.empty() || ! IsValidKey( sKey))
return false ; return false ;
// chiave con carattere finale speciale // chiave con carattere finale speciale
+67 -84
View File
@@ -1,14 +1,13 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2013-2025 // EgalTech 2013-2014
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGnStringUtils.h Data : 18.09.25 Versione : 2.7i1 // File : EGnStringUtils.h Data : 17.03.14 Versione : 1.5c2
// Contenuto : Dichiarazione delle funzioni di utilità per le stringhe. // Contenuto : Dichiarazione delle funzioni di utilità per le stringhe.
// //
// //
// //
// Modifiche : 20.11.13 DS Creazione modulo. // Modifiche : 20.11.13 DS Creazione modulo.
// 20.10.15 DS Agg. FromString e ToString per std::array<double,N>. // 20.10.15 DS Agg. FromString e ToString per std::array<double,N>.
// 18.09.25 DS Agg. FromString e ToString per long long.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -16,10 +15,8 @@
#include "/EgtDev/Include/EgtStringBase.h" #include "/EgtDev/Include/EgtStringBase.h"
#include "/EgtDev/Include/EgtNumCollection.h" #include "/EgtDev/Include/EgtNumCollection.h"
#include "/EgtDev/Extern/fast_float/fast_float.h"
#include <algorithm> #include <algorithm>
#include <array> #include <array>
#include <charconv>
//----------------------- Macro per import/export ----------------------------- //----------------------- Macro per import/export -----------------------------
#undef EGN_EXPORT #undef EGN_EXPORT
@@ -126,20 +123,20 @@ ValidateDxfName( std::string& sName, bool bAdvanced)
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#define FAST_FLOAT_FMT fast_float::chars_format::general | fast_float::chars_format::allow_leading_plus | fast_float::chars_format::skip_white_space
#define FAST_FLOAT_OPTS fast_float::parse_options( FAST_FLOAT_FMT)
inline bool inline bool
FromString( const std::string& sVal, int& nVal) FromString( const std::string& sVal, int& nVal)
{ auto answer = fast_float::from_chars_advanced( sVal.data(), sVal.data() + sVal.size(), nVal, FAST_FLOAT_OPTS) ; { const char* pStart = sVal.c_str() ;
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; } char* pStop ;
errno = 0 ;
nVal = strtol( pStart, &pStop, 10) ;
return ( pStop != pStart && errno == 0) ; }
inline bool inline bool
FromString( const std::string& sVal, unsigned int& nVal) FromString( const std::string& sVal, unsigned int& nVal)
{ auto answer = fast_float::from_chars_advanced( sVal.data(), sVal.data() + sVal.size(), nVal, FAST_FLOAT_OPTS) ; { const char* pStart = sVal.c_str() ;
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; } char* pStop ;
inline bool errno = 0 ;
FromString( const std::string& sVal, long long& nVal) nVal = strtoul( pStart, &pStop, 10) ;
{ auto answer = fast_float::from_chars_advanced( sVal.data(), sVal.data() + sVal.size(), nVal, FAST_FLOAT_OPTS) ; return ( pStop != pStart && errno == 0) ; }
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; }
inline bool inline bool
FromString( const std::string& sVal, bool& bVal) FromString( const std::string& sVal, bool& bVal)
{ int nTmp ; { int nTmp ;
@@ -149,108 +146,94 @@ FromString( const std::string& sVal, bool& bVal)
return true ; } return true ; }
inline bool inline bool
FromString( const std::string& sVal, double& dVal) FromString( const std::string& sVal, double& dVal)
{ auto answer = fast_float::from_chars( sVal.data(), sVal.data() + sVal.size(), dVal, FAST_FLOAT_FMT) ; { const char* pStart = sVal.c_str() ;
return ( answer.ec == std::errc() && answer.ptr != sVal.data()) ; } char* pStop ;
errno = 0 ;
dVal = strtod( pStart, &pStop) ;
return ( pStop != pStart && errno == 0) ; }
template <size_t size> template <size_t size>
bool FromString( const std::string& sVal, int (&nVal)[size]) bool FromString( const std::string& sVal, int (&nVal)[size])
{ const char* pFirst = sVal.data() ; { const char* pStart = sVal.c_str() ;
char* pStop ;
errno = 0 ;
for ( int i = 0 ; i < size ; ++ i) { for ( int i = 0 ; i < size ; ++ i) {
auto answer = fast_float::from_chars_advanced( pFirst, sVal.data() + sVal.size(), nVal[i], FAST_FLOAT_OPTS) ; nVal[i] = strtol( pStart, &pStop, 10) ;
if ( answer.ec != std::errc() || ( i < size - 1 && answer.ptr[0] != ',')) if ( ( i < size - 1 && *pStop != ',') || errno != 0)
return false ; return false ;
pFirst = answer.ptr + 1 ; pStart = pStop + 1 ;
} }
return true ; return ( errno == 0) ;
} }
template <size_t size> template <size_t size>
bool FromString( const std::string& sVal, double (&dVal)[size]) bool FromString( const std::string& sVal, double (&dVal)[size])
{ const char* pFirst = sVal.data() ; { const char* pStart = sVal.c_str() ;
char* pStop ;
errno = 0 ;
for ( int i = 0 ; i < size ; ++ i) { for ( int i = 0 ; i < size ; ++ i) {
auto answer = fast_float::from_chars( pFirst, sVal.data() + sVal.size(), dVal[i], FAST_FLOAT_FMT) ; dVal[i] = strtod( pStart, &pStop) ;
if ( answer.ec != std::errc() || ( i < size - 1 && answer.ptr[0] != ',')) if ( ( i < size - 1 && *pStop != ',') || errno != 0)
return false ; return false ;
pFirst = answer.ptr + 1 ; pStart = pStop + 1 ;
} }
return true ; return ( errno == 0) ;
} }
template <size_t size> template <size_t size>
bool FromString( const std::string& sVal, std::array<double,size>& dVal) bool FromString( const std::string& sVal, std::array<double,size>& dVal)
{ const char* pFirst = sVal.data() ; { const char* pStart = sVal.c_str() ;
char* pStop ;
errno = 0 ;
for ( int i = 0 ; i < size ; ++ i) { for ( int i = 0 ; i < size ; ++ i) {
auto answer = fast_float::from_chars( pFirst, sVal.data() + sVal.size(), dVal[i], FAST_FLOAT_FMT) ; dVal[i] = strtod( pStart, &pStop) ;
if ( answer.ec != std::errc() || ( i < size - 1 && answer.ptr[0] != ',')) if ( ( i < size - 1 && *pStop != ',') || errno != 0)
return false ; return false ;
pFirst = answer.ptr + 1 ; pStart = pStop + 1 ;
} }
return true ; return ( errno == 0) ;
} }
EGN_EXPORT bool FromString( const std::string& sVal, INTVECTOR& vnVal) ; EGN_EXPORT bool FromString( const std::string& sVal, INTVECTOR& vnVal) ;
EGN_EXPORT bool FromString( const std::string& sVal, DBLVECTOR& vdVal) ; EGN_EXPORT bool FromString( const std::string& sVal, DBLVECTOR& vdVal) ;
EGN_EXPORT bool FromString( const std::string& sVal, STRVECTOR& vsVal) ; EGN_EXPORT bool FromString( const std::string& sVal, STRVECTOR& vsVal) ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
EGN_EXPORT const std::string ToStringAdv( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ;
inline const std::string inline const std::string
ToString( int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ToString( int nVal, int nPrec = 1)
{ {
// se necessario processing avanzato
if ( nPrec > 1 || nRadix < 6)
return ToStringAdv( nVal, nPrec, nRadix, pnErr) ;
// eseguo conversione // eseguo conversione
const int nBuffSize = 16 ; char szBuff[24] ;
char szBuff[nBuffSize]{} ; int nErr = _itoa_s( nVal, szBuff, 10) ;
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ; // se errore, ritorno stringa opportuna
if ( Res.ec != std::errc()) { if ( nErr != 0) {
if ( pnErr != nullptr) _ASSERT( 0) ;
*pnErr = int( Res.ec) ;
return "#Error" ; return "#Error" ;
} }
// gestione codice di errore // verifico lunghezza minima
if ( pnErr != nullptr) int nLen = (int) strlen( szBuff) ;
*pnErr = 0 ; if ( nLen >= nPrec)
return szBuff ; return szBuff ;
// porto la stringa alla minima lunghezza
std::string sBuff( szBuff) ;
sBuff.insert( 0, ( nPrec - nLen), '0') ;
return sBuff ;
} }
EGN_EXPORT const std::string ToStringAdv( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ;
inline const std::string inline const std::string
ToString( unsigned int nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ToString( unsigned int nVal, int nPrec = 1)
{ {
// se necessario processing avanzato
if ( nPrec > 1 || nRadix < 6)
return ToStringAdv( nVal, nPrec, nRadix, pnErr) ;
// eseguo conversione // eseguo conversione
const int nBuffSize = 16 ; char szBuff[24] ;
char szBuff[nBuffSize]{} ; int nErr = _ui64toa_s( nVal, szBuff, 24, 10) ;
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ; // se errore, ritorno stringa opportuna
if ( Res.ec != std::errc()) { if ( nErr != 0) {
if ( pnErr != nullptr) _ASSERT( 0) ;
*pnErr = int( Res.ec) ;
return "#Error" ; return "#Error" ;
} }
// gestione codice di errore // verifico lunghezza minima
if ( pnErr != nullptr) int nLen = (int) strlen( szBuff) ;
*pnErr = 0 ; if ( nLen >= nPrec)
return szBuff ; return szBuff ;
} // porto la stringa alla minima lunghezza
EGN_EXPORT const std::string ToStringAdv( long long nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) ; std::string sBuff( szBuff) ;
inline const std::string sBuff.insert( 0, ( nPrec - nLen), '0') ;
ToString( long long nVal, int nPrec = 1, int nRadix = 10, int* pnErr = nullptr) return sBuff ;
{
// se necessario processing avanzato
if ( nPrec > 1 || nRadix < 6)
return ToStringAdv( nVal, nPrec, nRadix, pnErr) ;
// eseguo conversione
const int nBuffSize = 16 ;
char szBuff[nBuffSize]{} ;
auto Res = std::to_chars( szBuff, szBuff + nBuffSize - 1, nVal, nRadix) ;
if ( Res.ec != std::errc()) {
if ( pnErr != nullptr)
*pnErr = int( Res.ec) ;
return "#Error" ;
}
// gestione codice di errore
if ( pnErr != nullptr)
*pnErr = 0 ;
return szBuff ;
} }
template <size_t size> template <size_t size>
const std::string ToString( const int (&nVal)[size], int nPrec = 1) const std::string ToString( const int (&nVal)[size], int nPrec = 1)
@@ -262,7 +245,7 @@ const std::string ToString( const int (&nVal)[size], int nPrec = 1)
inline const std::string inline const std::string
ToString( bool bVal) ToString( bool bVal)
{ return std::string( ( bVal ? "1" : "0")) ; } { return std::string( ( bVal ? "1" : "0")) ; }
EGN_EXPORT const std::string ToString( double dVal, int nPrec = 6, int* pnErr = nullptr) ; EGN_EXPORT const std::string ToString( double dVal, int nPrec = 6) ;
template <size_t size> template <size_t size>
const std::string ToString( const double (&dVal)[size], int nPrec = 6) const std::string ToString( const double (&dVal)[size], int nPrec = 6)
{ std::string sDest ; sDest.reserve( 14 * size) ; { std::string sDest ; sDest.reserve( 14 * size) ;
+3 -13
View File
@@ -1,13 +1,13 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2014-2024 // EgalTech 2014-2022
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EGrScene.h Data : 16.02.24 Versione : 2.6b4 // File : EGrScene.h Data : 22.10.22 Versione : 2.4j1
// Contenuto : Dichiarazione della interfaccia IEGrScene per scena OpenGL. // Contenuto : Dichiarazione della interfaccia IEGrScene per scena OpenGL.
// //
// //
// //
// Modifiche : 13.02.14 DS Creazione modulo. // Modifiche : 13.02.14 DS Creazione modulo.
// 16.02.24 DS Aggiunte Set/Get CameraDirOrizzOffset. //
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -57,12 +57,10 @@ class IEGrScene
virtual void Destroy( void) = 0 ; virtual void Destroy( void) = 0 ;
// Camera // Camera
virtual bool SetCenter( const Point3d& ptCenter) = 0 ; virtual bool SetCenter( const Point3d& ptCenter) = 0 ;
virtual bool SetCameraDirOrizzOffset( int nRightStepOffset = 0) = 0 ;
virtual bool SetCamera( double dAngVertDeg, double dAngOrizzDeg, double dDist) = 0 ; virtual bool SetCamera( double dAngVertDeg, double dAngOrizzDeg, double dDist) = 0 ;
virtual bool SetCamera( int nDir, double dDist = 0) = 0 ; virtual bool SetCamera( int nDir, double dDist = 0) = 0 ;
virtual const Point3d& GetCenter( void) const = 0 ; virtual const Point3d& GetCenter( void) const = 0 ;
virtual Point3d GetProjectedCenter( void) const = 0 ; virtual Point3d GetProjectedCenter( void) const = 0 ;
virtual int GetCameraDirOrizzOffset( void) const = 0 ;
virtual void GetCamera( double* pdAngVertDeg, double* pdAngOrizzDeg, double* pdDist = nullptr) const = 0 ; virtual void GetCamera( double* pdAngVertDeg, double* pdAngOrizzDeg, double* pdDist = nullptr) const = 0 ;
virtual int GetCameraDir( void) const = 0 ; virtual int GetCameraDir( void) const = 0 ;
virtual const Vector3d& GetCameraUp( void) const = 0 ; virtual const Vector3d& GetCameraUp( void) const = 0 ;
@@ -75,8 +73,6 @@ class IEGrScene
virtual bool ZoomChange( double dCoeff) = 0 ; virtual bool ZoomChange( double dCoeff) = 0 ;
virtual bool ZoomOnPoint( const Point3d& ptWin, double dCoeff) = 0 ; virtual bool ZoomOnPoint( const Point3d& ptWin, double dCoeff) = 0 ;
virtual bool ZoomWin( const Point3d& ptWin1, const Point3d& ptWin2) = 0 ; virtual bool ZoomWin( const Point3d& ptWin1, const Point3d& ptWin2) = 0 ;
virtual bool SetCameraType( bool bOrthoOrPersp) = 0 ;
virtual bool SetZoomType( int nZoomMode) = 0 ;
// ShowMode // ShowMode
virtual bool SetShowMode( int nShowMode) = 0 ; virtual bool SetShowMode( int nShowMode) = 0 ;
virtual int GetShowMode( void) const = 0 ; virtual int GetShowMode( void) const = 0 ;
@@ -92,14 +88,11 @@ class IEGrScene
virtual bool SetExtension( const BBox3d& b3Ext) = 0 ; virtual bool SetExtension( const BBox3d& b3Ext) = 0 ;
virtual bool UpdateExtension( void) = 0 ; virtual bool UpdateExtension( void) = 0 ;
virtual bool SetMark( Color colMark) = 0 ; virtual bool SetMark( Color colMark) = 0 ;
virtual bool SetMark2( Color colMark) = 0 ;
virtual bool SetSelSurf( Color colSelSurf) = 0 ; virtual bool SetSelSurf( Color colSelSurf) = 0 ;
virtual bool SetLineWidth( int nW) = 0 ; virtual bool SetLineWidth( int nW) = 0 ;
// Grid // Grid
virtual bool SetGridShow( bool bShowGrid, bool bShowFrame) = 0 ; virtual bool SetGridShow( bool bShowGrid, bool bShowFrame) = 0 ;
virtual bool SetGridGeo( double dSnapStep, int nMinLineSstep, int nMajLineSstep, int nExtSstep) = 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 bool SetGridColor( Color colMinLine, Color colMajLine) = 0 ;
virtual void GetGridParam( double& dSnapStep, int& nExtStep) const = 0 ; virtual void GetGridParam( double& dSnapStep, int& nExtStep) const = 0 ;
virtual bool GetShowGrid( void) = 0 ; virtual bool GetShowGrid( void) = 0 ;
@@ -173,9 +166,6 @@ enum CameraDir { CT_NONE = 0,
CT_ISO_NE = 9, CT_ISO_NE = 9,
CT_ISO_NW = 10, CT_ISO_NW = 10,
CT_CPLANE = 11} ; CT_CPLANE = 11} ;
//------------------------ Costanti per tipologia di zoom nel caso prospettico ---------------------
enum PerspZoom { ZT_STD = 0,
ZT_DOLLY = 1} ;
//------------------------ Costanti per tipo di visualizzazione -------------- //------------------------ Costanti per tipo di visualizzazione --------------
enum ShowMode { SM_WIREFRAME = 0, enum ShowMode { SM_WIREFRAME = 0,
SM_HIDDENLINE = 1, SM_HIDDENLINE = 1,
+32 -92
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2014-2024 // EgalTech 2014-2022
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EInAPI.h Data : 09.01.24 Versione : 2.5l6 // File : EInAPI.h Data : 06.05.22 Versione : 2.4e1
// Contenuto : API (application programming interface). // Contenuto : API (application programming interface).
// //
// //
@@ -34,8 +34,6 @@ extern "C" {
// General // General
EIN_EXPORT BOOL __stdcall EgtInit( int nDebug, const wchar_t* wsLogFile, const wchar_t* wsLogMsg) ; EIN_EXPORT BOOL __stdcall EgtInit( int nDebug, const wchar_t* wsLogFile, const wchar_t* wsLogMsg) ;
EIN_EXPORT BOOL __stdcall EgtExit( void) ; EIN_EXPORT BOOL __stdcall EgtExit( void) ;
typedef bool (__stdcall * psfOnTerminateProcess) ( int) ;
EIN_EXPORT BOOL __stdcall EgtSetOnTerminateProcess( psfOnTerminateProcess pFun) ;
EIN_EXPORT BOOL __stdcall EgtSetUserLevel( int nUserLev) ; EIN_EXPORT BOOL __stdcall EgtSetUserLevel( int nUserLev) ;
EIN_EXPORT int __stdcall EgtGetUserLevel( void) ; EIN_EXPORT int __stdcall EgtGetUserLevel( void) ;
EIN_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* wsKey) ; EIN_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* wsKey) ;
@@ -52,23 +50,20 @@ EIN_EXPORT void __stdcall EgtDisableCommandLogger( void) ;
EIN_EXPORT BOOL __stdcall EgtGetVersionInfo( wchar_t*& wsVer) ; EIN_EXPORT BOOL __stdcall EgtGetVersionInfo( wchar_t*& wsVer) ;
EIN_EXPORT BOOL __stdcall EgtGetKeyInfo( wchar_t*& wsKey) ; EIN_EXPORT BOOL __stdcall EgtGetKeyInfo( wchar_t*& wsKey) ;
EIN_EXPORT BOOL __stdcall EgtSetLockType( int nType) ; EIN_EXPORT BOOL __stdcall EgtSetLockType( int nType) ;
EIN_EXPORT BOOL __stdcall EgtSetLockId( const wchar_t* wsLockId) ;
EIN_EXPORT BOOL __stdcall EgtSetNetHwKey( BOOL bNetHwKey) ; EIN_EXPORT BOOL __stdcall EgtSetNetHwKey( BOOL bNetHwKey) ;
EIN_EXPORT BOOL __stdcall EgtGetKeyLevel( int nProd, int nVer, int nLev, int* pnKLev) ; EIN_EXPORT BOOL __stdcall EgtGetKeyLevel( int nProd, int nVer, int nLev, int* pnKLev) ;
EIN_EXPORT BOOL __stdcall EgtGetKeyOptions( int nProd, int nVer, int nLev, unsigned int* pnOpt2) ; EIN_EXPORT BOOL __stdcall EgtGetKeyOptions( int nProd, int nVer, int nLev, unsigned int* pnOpt2) ;
EIN_EXPORT BOOL __stdcall EgtGetKeyLeftDays( int* pnLeftDays) ; EIN_EXPORT BOOL __stdcall EgtGetKeyLeftDays( int* pnLeftDays) ;
EIN_EXPORT BOOL __stdcall EgtGetKeyAssLeftDays( int* pnAssLeftDays) ;
EIN_EXPORT BOOL __stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays) ; EIN_EXPORT BOOL __stdcall EgtGetKeyOptLeftDays( int* pnOptLeftDays) ;
EIN_EXPORT BOOL __stdcall EgtGetNetHwKey( void) ;
EIN_EXPORT BOOL __stdcall EgtGetOsInfo( wchar_t*& wsOs) ; EIN_EXPORT BOOL __stdcall EgtGetOsInfo( wchar_t*& wsOs) ;
EIN_EXPORT BOOL __stdcall EgtGetCpuInfo( wchar_t*& wsCpu) ; EIN_EXPORT BOOL __stdcall EgtGetCpuInfo( wchar_t*& wsCpu) ;
EIN_EXPORT BOOL __stdcall EgtGetMemoryInfo( wchar_t*& wsMem) ; EIN_EXPORT BOOL __stdcall EgtGetMemoryInfo( wchar_t*& wsMem) ;
EIN_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ; EIN_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ;
EIN_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg) ; EIN_EXPORT BOOL __stdcall EgtOutLog( const wchar_t* wsMsg) ;
typedef int (__stdcall * psfProcEvents) (int, int) ; typedef int (__stdcall * pfProcEvents) (int, int) ;
EIN_EXPORT BOOL __stdcall EgtSetProcessEvents( psfProcEvents pFun) ; EIN_EXPORT BOOL __stdcall EgtSetProcessEvents( pfProcEvents pFun) ;
typedef BOOL (__stdcall * psfOutTextW) (wchar_t*&) ; typedef BOOL (__stdcall * pfOutTextW) (wchar_t*&) ;
EIN_EXPORT BOOL __stdcall EgtSetOutText( psfOutTextW pFun) ; EIN_EXPORT BOOL __stdcall EgtSetOutText( pfOutTextW pFun) ;
EIN_EXPORT BOOL __stdcall EgtSetTempDir( const wchar_t* wsTempDir) ; EIN_EXPORT BOOL __stdcall EgtSetTempDir( const wchar_t* wsTempDir) ;
EIN_EXPORT BOOL __stdcall EgtGetTempDir( wchar_t*& wsTempDir) ; EIN_EXPORT BOOL __stdcall EgtGetTempDir( wchar_t*& wsTempDir) ;
EIN_EXPORT BOOL __stdcall EgtSetMainWindowHandle( HWND hMainWnd) ; EIN_EXPORT BOOL __stdcall EgtSetMainWindowHandle( HWND hMainWnd) ;
@@ -103,8 +98,8 @@ EIN_EXPORT BOOL __stdcall EgtNewFile( void) ;
EIN_EXPORT BOOL __stdcall EgtOpenFile( const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtOpenFile( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtInsertFile( const wchar_t* wsFilePath) ; EIN_EXPORT BOOL __stdcall EgtInsertFile( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtSaveFile( const wchar_t* wsFilePath, int nFlag) ; EIN_EXPORT BOOL __stdcall EgtSaveFile( const wchar_t* wsFilePath, int nFlag) ;
EIN_EXPORT BOOL __stdcall EgtSaveObjToFile( int nNumId, const int nIds[], const wchar_t* wsFilePath, int nFlag) ; EIN_EXPORT BOOL __stdcall EgtSaveObjToFile( int nId, const wchar_t* wsFilePath, int nFlag) ;
EIN_EXPORT BOOL __stdcall EgtSaveMachGroupToFile( int nMGroupId, int nNumPlusId, const int nPlusIds[], const wchar_t* wsFilePath, int nFlag) ; EIN_EXPORT BOOL __stdcall EgtSaveMachGroupToFile( int nMGroupId, const wchar_t* wsFilePath, int nFlag) ;
// Exchange // Exchange
EIN_EXPORT int __stdcall EgtGetFileType( const wchar_t* wsFilePath) ; EIN_EXPORT int __stdcall EgtGetFileType( const wchar_t* wsFilePath) ;
@@ -116,16 +111,12 @@ EIN_EXPORT BOOL __stdcall EgtImportCsf( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtImportDxf( const wchar_t* wsFilePath, double dScaleFactor) ; EIN_EXPORT BOOL __stdcall EgtImportDxf( const wchar_t* wsFilePath, double dScaleFactor) ;
EIN_EXPORT BOOL __stdcall EgtImportPnt( const wchar_t* wsFilePath, int nFlag) ; EIN_EXPORT BOOL __stdcall EgtImportPnt( const wchar_t* wsFilePath, int nFlag) ;
EIN_EXPORT BOOL __stdcall EgtImportStl( const wchar_t* wsFilePath, double dScaleFactor) ; EIN_EXPORT BOOL __stdcall EgtImportStl( const wchar_t* wsFilePath, double dScaleFactor) ;
EIN_EXPORT BOOL __stdcall EgtImportOff( const wchar_t* wsFilePath, double dScaleFactor) ; EIN_EXPORT BOOL __stdcall EgtImport3MF( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtImportPly( const wchar_t* wsFilePath, double dScaleFactor) ;
EIN_EXPORT BOOL __stdcall EgtImport3MF( const wchar_t* wsFilePath, int nFlag) ;
EIN_EXPORT BOOL __stdcall EgtImport3dm( const wchar_t* wsFilePath) ;
EIN_EXPORT BOOL __stdcall EgtAdvancedImportIsEnabled( void) ; EIN_EXPORT BOOL __stdcall EgtAdvancedImportIsEnabled( void) ;
EIN_EXPORT BOOL __stdcall EgtAdvancedImport( const wchar_t* wsFilePath, double dLinToler, int nFlag) ; 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 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 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 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 EgtExportSvg( int nId, const wchar_t* wsFilePath, int nFilter) ;
EIN_EXPORT BOOL __stdcall EgtSetThreeJSLibDir( const wchar_t* wsThreeJSLibDir) ; EIN_EXPORT BOOL __stdcall EgtSetThreeJSLibDir( const wchar_t* wsThreeJSLibDir) ;
EIN_EXPORT BOOL __stdcall EgtExportThreeJS( int nId, const wchar_t* wsFilePath, int nFilter) ; EIN_EXPORT BOOL __stdcall EgtExportThreeJS( int nId, const wchar_t* wsFilePath, int nFilter) ;
@@ -156,13 +147,11 @@ EIN_EXPORT int __stdcall EgtBeamModifyProcess( int nGeomId, int nGroup, int nPr
int nCrvId, int nCrv2Id, BOOL bUpdate) ; int nCrvId, int nCrv2Id, BOOL bUpdate) ;
EIN_EXPORT BOOL __stdcall EgtBeamEraseProcess( int nGeomId, BOOL bUpdate) ; EIN_EXPORT BOOL __stdcall EgtBeamEraseProcess( int nGeomId, BOOL bUpdate) ;
EIN_EXPORT BOOL __stdcall EgtBeamEnableProcess( int nGeomId, BOOL bEnable, BOOL bUpdate) ; EIN_EXPORT BOOL __stdcall EgtBeamEnableProcess( int nGeomId, BOOL bEnable, BOOL bUpdate) ;
EIN_EXPORT BOOL __stdcall EgtBeamCalcAllSolids( BOOL bShow, BOOL bRecalc) ;
EIN_EXPORT BOOL __stdcall EgtBeamShowAllSolids( BOOL bShow) ;
EIN_EXPORT BOOL __stdcall EgtBeamCalcSolid( int nPartId, BOOL bRecalc) ; EIN_EXPORT BOOL __stdcall EgtBeamCalcSolid( int nPartId, BOOL bRecalc) ;
EIN_EXPORT int __stdcall EgtBeamGetSolid( int nPartId) ; EIN_EXPORT int __stdcall EgtBeamGetSolid( int nPartId) ;
EIN_EXPORT BOOL __stdcall EgtBeamShowSolid( int nPartId, BOOL bShow) ; EIN_EXPORT BOOL __stdcall EgtBeamShowSolid( int nPartId, BOOL bShow) ;
EIN_EXPORT BOOL __stdcall EgtBeamGetBuildingIsOn( int nAssGrpId) ; EIN_EXPORT BOOL __stdcall EgtBeamGetBuildingIsOn( void) ;
EIN_EXPORT BOOL __stdcall EgtBeamShowBuilding( int nAssGrpId, BOOL bShow) ; EIN_EXPORT BOOL __stdcall EgtBeamShowBuilding( BOOL bShow) ;
// Tsc Executor // Tsc Executor
EIN_EXPORT BOOL __stdcall EgtInitTscExec( void) ; EIN_EXPORT BOOL __stdcall EgtInitTscExec( void) ;
@@ -216,15 +205,6 @@ EIN_EXPORT int __stdcall EgtCreateVerticalDimension( int nParentId, const doubl
const double ptDim[3], const wchar_t* wsText, int nRefType) ; const double ptDim[3], const wchar_t* wsText, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateAlignedDimension( int nParentId, const double ptP1[3], const double ptP2[3], EIN_EXPORT int __stdcall EgtCreateAlignedDimension( int nParentId, const double ptP1[3], const double ptP2[3],
const double ptDim[3], const wchar_t* wsText, int nRefType) ; const double ptDim[3], const wchar_t* wsText, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateAngularDimension( int nParentId, const double ptV[3], const double ptP1[3], const double ptP2[3],
const double ptDim[3], const wchar_t* wsText, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateAngularDimensionEx( int nParentId, const double ptV1[3], const double ptP1[3],
const double ptV2[3], const double ptP2[3], const double ptDim[3],
const wchar_t* wsText, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateDiametralDimension( int nParentId, int nCrvId, const double ptDim[3],
const wchar_t* wsText, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateRadialDimension( int nParentId, int nCrvId, const double ptDim[3],
const wchar_t* wsText, int nRefType) ;
// GeomDB Create Curve // GeomDB Create Curve
EIN_EXPORT int __stdcall EgtCreateLine( int nParentId, EIN_EXPORT int __stdcall EgtCreateLine( int nParentId,
@@ -256,8 +236,6 @@ EIN_EXPORT int __stdcall EgtCreateArcC2PEx( int nParentId, const double ptCen[3
const double ptNearEnd[3], int nRefType) ; const double ptNearEnd[3], int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateArc3P( int nParentId, const double ptP1[3], EIN_EXPORT int __stdcall EgtCreateArc3P( int nParentId, const double ptP1[3],
const double ptP2[3], const double ptP3[3], int nRefType) ; const double ptP2[3], const double ptP3[3], int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateArc2PR( int nParentId, const double ptStart[3], const double ptEnd[3],
double dRad, BOOL bCCW, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateArc2PD( int nParentId, const double ptStart[3], const double ptEnd[3], EIN_EXPORT int __stdcall EgtCreateArc2PD( int nParentId, const double ptStart[3], const double ptEnd[3],
double dDirSDeg, int nRefType) ; double dDirSDeg, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateArc2PDEx( int nParentId, const double ptStart[3], EIN_EXPORT int __stdcall EgtCreateArc2PDEx( int nParentId, const double ptStart[3],
@@ -322,10 +300,9 @@ EIN_EXPORT int __stdcall EgtCreateSurfTmByRevolve( int nParentId, int nCrvId,
const double ptAx[3], const double vtAx[3], const double ptAx[3], const double vtAx[3],
BOOL bCapEnds, double dLinTol, int nRefType) ; BOOL bCapEnds, double dLinTol, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmByScrewing( int nParentId, int nCrvId, EIN_EXPORT int __stdcall EgtCreateSurfTmByScrewing( int nParentId, int nCrvId,
const double ptAx[3], const double vtAx[3], const double ptAx[3], const double vtAx[3],
double dAngRotDeg, double dMove, BOOL bCapEnds, double dLinTol, int nRefType) ; double dAngRotDeg, double dMove, BOOL bCapEnds, double dLinTol, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, const double vtAx[3], EIN_EXPORT int __stdcall EgtCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, BOOL bCapEnds, double dLinTol) ;
BOOL bCapEnds, double dLinTol, int nRefType) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmRuled( int nParentId, int nPntOrCrvId1, int nCrvId2, int nType, double dLinTol) ; EIN_EXPORT int __stdcall EgtCreateSurfTmRuled( int nParentId, int nPntOrCrvId1, int nCrvId2, int nType, double dLinTol) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmByTriangles( int nParentId, int nNumId, const int nIds[], BOOL bErase) ; EIN_EXPORT int __stdcall EgtCreateSurfTmByTriangles( int nParentId, int nNumId, const int nIds[], BOOL bErase) ;
EIN_EXPORT int __stdcall EgtCreateSurfTmBySewing( int nParentId, int nNumId, const int nIds[], BOOL bErase) ; EIN_EXPORT int __stdcall EgtCreateSurfTmBySewing( int nParentId, int nNumId, const int nIds[], BOOL bErase) ;
@@ -357,8 +334,6 @@ EIN_EXPORT BOOL __stdcall EgtSelectPathObjs( int nId, BOOL bHaltOnFork) ;
EIN_EXPORT int __stdcall EgtDuploNew( int nSouId) ; EIN_EXPORT int __stdcall EgtDuploNew( int nSouId) ;
EIN_EXPORT BOOL __stdcall EgtDuploCount( int nSouId, int* pnCount) ; EIN_EXPORT BOOL __stdcall EgtDuploCount( int nSouId, int* pnCount) ;
EIN_EXPORT BOOL __stdcall EgtDuploList( int nSouId, int*& vInd, 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 EgtDuploSetModified( int nSouId) ;
EIN_EXPORT BOOL __stdcall EgtDuploGetModified( int nSouId, BOOL* pbModif) ; EIN_EXPORT BOOL __stdcall EgtDuploGetModified( int nSouId, BOOL* pbModif) ;
EIN_EXPORT BOOL __stdcall EgtDuploSetLocked( int nDupId) ; EIN_EXPORT BOOL __stdcall EgtDuploSetLocked( int nDupId) ;
@@ -392,9 +367,7 @@ EIN_EXPORT BOOL __stdcall EgtGetBBoxRef( int nId, int nFlag, const double ptOrig
const double vtX[3], const double vtY[3], const double vtZ[3], const double vtX[3], const double vtY[3], const double vtZ[3],
double ptMin[3], double ptMax[3]) ; double ptMin[3], double ptMax[3]) ;
EIN_EXPORT int __stdcall EgtCopy( int nSouId, int nRefId, int nSonBeforeAfter) ; EIN_EXPORT int __stdcall EgtCopy( int nSouId, int nRefId, int nSonBeforeAfter) ;
EIN_EXPORT int __stdcall EgtCopyEx( int nSouCtx, int nSouId, int nDestCtx, int nRefId, int nSonBeforeAfter) ;
EIN_EXPORT int __stdcall EgtCopyGlob( int nSouId, int nRefId, int nSonBeforeAfter) ; EIN_EXPORT int __stdcall EgtCopyGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
EIN_EXPORT int __stdcall EgtCopyGlobEx( int nSouCtx, int nSouId, int nDestCtx, int nRefId, int nSonBeforeAfter) ;
EIN_EXPORT BOOL __stdcall EgtRelocate( int nSouId, int nRefId, int nSonBeforeAfter) ; EIN_EXPORT BOOL __stdcall EgtRelocate( int nSouId, int nRefId, int nSonBeforeAfter) ;
EIN_EXPORT BOOL __stdcall EgtRelocateGlob( int nSouId, int nRefId, int nSonBeforeAfter) ; EIN_EXPORT BOOL __stdcall EgtRelocateGlob( int nSouId, int nRefId, int nSonBeforeAfter) ;
EIN_EXPORT BOOL __stdcall EgtGroupSwap( int nId1, int nId2, BOOL bSwapRef, BOOL bMark) ; EIN_EXPORT BOOL __stdcall EgtGroupSwap( int nId1, int nId2, BOOL bSwapRef, BOOL bMark) ;
@@ -419,7 +392,7 @@ EIN_EXPORT BOOL __stdcall EgtSetStatus( int nId, int nStat) ;
EIN_EXPORT BOOL __stdcall EgtRevertStatus( int nId) ; EIN_EXPORT BOOL __stdcall EgtRevertStatus( int nId) ;
EIN_EXPORT BOOL __stdcall EgtGetStatus( int nId, int* pnStat) ; EIN_EXPORT BOOL __stdcall EgtGetStatus( int nId, int* pnStat) ;
EIN_EXPORT BOOL __stdcall EgtGetCalcStatus( int nId, int* pnStat) ; EIN_EXPORT BOOL __stdcall EgtGetCalcStatus( int nId, int* pnStat) ;
EIN_EXPORT BOOL __stdcall EgtSetMark( int nId, int nMark) ; EIN_EXPORT BOOL __stdcall EgtSetMark( int nId) ;
EIN_EXPORT BOOL __stdcall EgtResetMark( int nId) ; EIN_EXPORT BOOL __stdcall EgtResetMark( int nId) ;
EIN_EXPORT BOOL __stdcall EgtGetMark( int nId, BOOL* pnMark) ; EIN_EXPORT BOOL __stdcall EgtGetMark( int nId, BOOL* pnMark) ;
EIN_EXPORT BOOL __stdcall EgtGetCalcMark( int nId, BOOL* pnMark) ; EIN_EXPORT BOOL __stdcall EgtGetCalcMark( int nId, BOOL* pnMark) ;
@@ -453,7 +426,6 @@ EIN_EXPORT BOOL __stdcall EgtGetInfoBBox( int nId, const wchar_t* wsKey,
double ptMin[3], double ptMax[3]) ; double ptMin[3], double ptMax[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetInfoFrame( int nId, const wchar_t* wsKey, double ptOrig[3], EIN_EXPORT BOOL __stdcall EgtGetInfoFrame( int nId, const wchar_t* wsKey, double ptOrig[3],
double vtX[3], double vtY[3], double vtZ[3]) ; double vtX[3], double vtY[3], double vtZ[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetAllInfo( int nId, wchar_t*& wsInfos) ;
EIN_EXPORT BOOL __stdcall EgtExistsInfo( int nId, const wchar_t* wsKey) ; EIN_EXPORT BOOL __stdcall EgtExistsInfo( int nId, const wchar_t* wsKey) ;
EIN_EXPORT BOOL __stdcall EgtRemoveInfo( int nId, const wchar_t* wsKey) ; EIN_EXPORT BOOL __stdcall EgtRemoveInfo( int nId, const wchar_t* wsKey) ;
EIN_EXPORT BOOL __stdcall EgtSetTextureName( int nId, const wchar_t* wsTxrName) ; EIN_EXPORT BOOL __stdcall EgtSetTextureName( int nId, const wchar_t* wsTxrName) ;
@@ -549,8 +521,6 @@ EIN_EXPORT BOOL __stdcall EgtSurfFrAdd( int nId1, int nId2) ;
EIN_EXPORT BOOL __stdcall EgtSurfFrSubtract( int nId1, int nId2) ; EIN_EXPORT BOOL __stdcall EgtSurfFrSubtract( int nId1, int nId2) ;
EIN_EXPORT BOOL __stdcall EgtSurfFrIntersect( int nId1, int nId2) ; EIN_EXPORT BOOL __stdcall EgtSurfFrIntersect( int nId1, int nId2) ;
EIN_EXPORT BOOL __stdcall EgtSurfFrOffset( int nId, double dDist, int nType) ; EIN_EXPORT BOOL __stdcall EgtSurfFrOffset( int nId, double dDist, int nType) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmMoveVertex( int nId, int nVert, const double ptNewVert[3], int nRefType, BOOL bUpdate) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmMoveFacet( int nId, int nFacet, const double vtMove[3], int nRefType, BOOL bUpdate) ;
EIN_EXPORT int __stdcall EgtSurfTmToTriangles( int nId, int* pnCount) ; EIN_EXPORT int __stdcall EgtSurfTmToTriangles( int nId, int* pnCount) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmRemoveFacet( int nId, int nFacet) ; EIN_EXPORT BOOL __stdcall EgtSurfTmRemoveFacet( int nId, int nFacet) ;
EIN_EXPORT BOOL __stdcall EgtCutSurfTmPlane( int nId, const double ptOn[3], const double vtN[3], BOOL bSaveOnEq, int nRefType) ; EIN_EXPORT BOOL __stdcall EgtCutSurfTmPlane( int nId, const double ptOn[3], const double vtN[3], BOOL bSaveOnEq, int nRefType) ;
@@ -558,7 +528,6 @@ EIN_EXPORT BOOL __stdcall EgtCutSurfTmClosedCurve( int nSurfId, int nCurveId, BO
EIN_EXPORT BOOL __stdcall EgtSurfTmAdd( int nId1, int nId2, BOOL bTwoColors) ; EIN_EXPORT BOOL __stdcall EgtSurfTmAdd( int nId1, int nId2, BOOL bTwoColors) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmSubtract( int nId1, int nId2, BOOL bTwoColors) ; EIN_EXPORT BOOL __stdcall EgtSurfTmSubtract( int nId1, int nId2, BOOL bTwoColors) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmIntersect( int nId1, int nId2, BOOL bTwoColors) ; EIN_EXPORT BOOL __stdcall EgtSurfTmIntersect( int nId1, int nId2, BOOL bTwoColors) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmSetFaceColor( int nId, int nFacet, int nColor) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmResetTwoColors( int nId) ; EIN_EXPORT BOOL __stdcall EgtSurfTmResetTwoColors( int nId) ;
EIN_EXPORT int __stdcall EgtSurfTmSplit( int nId, int nSplitterId, int* pnCount) ; EIN_EXPORT int __stdcall EgtSurfTmSplit( int nId, int nSplitterId, int* pnCount) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmCut( int nId, int nCutterId, BOOL bInVsOut, BOOL bSaveOnEq) ; EIN_EXPORT BOOL __stdcall EgtSurfTmCut( int nId, int nCutterId, BOOL bInVsOut, BOOL bSaveOnEq) ;
@@ -582,9 +551,6 @@ EIN_EXPORT BOOL __stdcall EgtCurveParamAtLength( int nId, double dLen, double* p
EIN_EXPORT BOOL __stdcall EgtCurveLengthAtPoint( int nId, const double ptOn[3], double dExtend, double* pdLen) ; EIN_EXPORT BOOL __stdcall EgtCurveLengthAtPoint( int nId, const double ptOn[3], double dExtend, double* pdLen) ;
EIN_EXPORT BOOL __stdcall EgtCurveIsClosed( int nId) ; EIN_EXPORT BOOL __stdcall EgtCurveIsClosed( int nId) ;
EIN_EXPORT BOOL __stdcall EgtCurveIsFlat( int nId, BOOL bUseExtrusion, double dToler, double vtN[3], double* pdDist) ; EIN_EXPORT BOOL __stdcall EgtCurveIsFlat( int nId, BOOL bUseExtrusion, double dToler, double vtN[3], double* pdDist) ;
EIN_EXPORT BOOL __stdcall EgtCurveIsACircle( int nId, double dToler, double ptC[3], double vtN[3], double* pdRad, BOOL* pbCCW) ;
EIN_EXPORT BOOL __stdcall EgtCurveIsARectangle( int nId, double dToler, double ptP[3], double vtL1[3], double vtL2[3]) ;
EIN_EXPORT BOOL __stdcall EgtCurveIsATrapezoid( int nId, double dToler, double ptP[3], double vtB1[3], double vtL1[3], double vtB2[3]) ;
EIN_EXPORT BOOL __stdcall EgtCurveAreaXY( int nId, double* pdArea) ; EIN_EXPORT BOOL __stdcall EgtCurveAreaXY( int nId, double* pdArea) ;
EIN_EXPORT BOOL __stdcall EgtCurveArea( int nId, double vtN[3], double* pdDist, double* pdArea) ; EIN_EXPORT BOOL __stdcall EgtCurveArea( int nId, double vtN[3], double* pdDist, double* pdArea) ;
EIN_EXPORT BOOL __stdcall EgtCurveNearestExtremityToPoint( int nId, const double ptP[3], BOOL* pbStart) ; EIN_EXPORT BOOL __stdcall EgtCurveNearestExtremityToPoint( int nId, const double ptP[3], BOOL* pbStart) ;
@@ -600,8 +566,6 @@ EIN_EXPORT BOOL __stdcall EgtArcAngCenter( int nId, double* pdAngDeg) ;
EIN_EXPORT BOOL __stdcall EgtArcDeltaN( int nId, double* pdDeltaN) ; EIN_EXPORT BOOL __stdcall EgtArcDeltaN( int nId, double* pdDeltaN) ;
EIN_EXPORT BOOL __stdcall EgtArcNormVersor( int nId, int nRefId, double vtNorm[3]) ; EIN_EXPORT BOOL __stdcall EgtArcNormVersor( int nId, int nRefId, double vtNorm[3]) ;
EIN_EXPORT BOOL __stdcall EgtCurveCompoCenter( int nId, int nSimpCrv, int nRefId, double ptCen[3]) ; EIN_EXPORT BOOL __stdcall EgtCurveCompoCenter( int nId, int nSimpCrv, int nRefId, double ptCen[3]) ;
EIN_EXPORT BOOL __stdcall EgtCopyCompoSubCurve( int nId, int nSubCrvToCopy, int nParentId) ;
EIN_EXPORT BOOL __stdcall EgtCopyParamRange( int nId, double dUStart, double dUEnd, int nParentId) ;
// GeomDb Surf Get // GeomDb Surf Get
EIN_EXPORT BOOL __stdcall EgtSurfArea( int nId, double* pdArea) ; EIN_EXPORT BOOL __stdcall EgtSurfArea( int nId, double* pdArea) ;
@@ -611,13 +575,10 @@ EIN_EXPORT BOOL __stdcall EgtSurfFrNormVersor( int nId, int nRefId, double vtNor
EIN_EXPORT BOOL __stdcall EgtSurfFrGrossArea( int nId, double* pdArea) ; EIN_EXPORT BOOL __stdcall EgtSurfFrGrossArea( int nId, double* pdArea) ;
EIN_EXPORT int __stdcall EgtSurfFrChunkCount( int nId) ; EIN_EXPORT int __stdcall EgtSurfFrChunkCount( int nId) ;
EIN_EXPORT int __stdcall EgtSurfFrChunkSimpleClassify( int nId1, int nChunk1, int nId2, int nChunk2, double dToler) ; EIN_EXPORT int __stdcall EgtSurfFrChunkSimpleClassify( int nId1, int nChunk1, int nId2, int nChunk2, double dToler) ;
EIN_EXPORT BOOL __stdcall EgtSurfFrChunkCenter( int nId, int nChunk, int nRefId, double ptCen[3], double vtNorm[3]) ;
EIN_EXPORT int __stdcall EgtExtractSurfFrChunkLoops( int nId, int nChunk, int nDestGrpId, int* pnCount) ; EIN_EXPORT int __stdcall EgtExtractSurfFrChunkLoops( int nId, int nChunk, int nDestGrpId, int* pnCount) ;
EIN_EXPORT int __stdcall EgtSurfTmPartCount( int nId) ; EIN_EXPORT int __stdcall EgtSurfTmPartCount( int nId) ;
EIN_EXPORT int __stdcall EgtSurfTmFacetCount( int nId) ; EIN_EXPORT int __stdcall EgtSurfTmFacetCount( int nId) ;
EIN_EXPORT int __stdcall EgtSurfTmFacetFromTria( int nId, int nT) ; EIN_EXPORT int __stdcall EgtSurfTmFacetFromTria( int nId, int nT) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmGetVertex( int nId, int nVert, int nRefId, double ptVert[3]) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmGetNearestVertex( int nId, const double ptNear[3], int nRefId, int* pnVert, double ptVert[3]) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmFacetNearestEndPoint( int nId, int nFacet, const double ptNear[3], int nRefId, EIN_EXPORT BOOL __stdcall EgtSurfTmFacetNearestEndPoint( int nId, int nFacet, const double ptNear[3], int nRefId,
double ptEnd[3], double vtNorm[3]) ; double ptEnd[3], double vtNorm[3]) ;
EIN_EXPORT BOOL __stdcall EgtSurfTmFacetNearestMidPoint( int nId, int nFacet, const double ptNear[3], int nRefId, EIN_EXPORT BOOL __stdcall EgtSurfTmFacetNearestMidPoint( int nId, int nFacet, const double ptNear[3], int nRefId,
@@ -633,7 +594,6 @@ EIN_EXPORT int __stdcall EgtGetSurfTmSilhouette( int nId, const double vtDir[3]
EIN_EXPORT int __stdcall EgtExtractSurfTmLoops( int nId, int nDestGrpId, int* pnCount) ; EIN_EXPORT int __stdcall EgtExtractSurfTmLoops( int nId, int nDestGrpId, int* pnCount) ;
EIN_EXPORT int __stdcall EgtExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ; EIN_EXPORT int __stdcall EgtExtractSurfTmFacetLoops( int nId, int nFacet, int nDestGrpId, int* pnCount) ;
EIN_EXPORT int __stdcall EgtCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ; EIN_EXPORT int __stdcall EgtCopySurfTmFacet( int nId, int nFacet, int nDestGrpId) ;
EIN_EXPORT int __stdcall EgtExtractSurfTmTriaLoop( int nId, int nT, int nDestGrpId) ;
EIN_EXPORT int __stdcall EgtExtractSurfBezierLoops( int nId, int nDestGrpId, int* pnCount) ; EIN_EXPORT int __stdcall EgtExtractSurfBezierLoops( int nId, int nDestGrpId, int* pnCount) ;
// Geo Snap Vector/Point/Frame // Geo Snap Vector/Point/Frame
@@ -755,9 +715,7 @@ EIN_EXPORT int __stdcall EgtGetLastMachGroup( void) ;
EIN_EXPORT int __stdcall EgtGetPrevMachGroup( int nId) ; EIN_EXPORT int __stdcall EgtGetPrevMachGroup( int nId) ;
EIN_EXPORT BOOL __stdcall EgtGetMachGroupNewName( const wchar_t* wsName, wchar_t*& wsNewName) ; 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 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 EgtRemoveMachGroup( int nMGroupId) ;
EIN_EXPORT BOOL __stdcall EgtChangeMachGroupName( int nMGroupInd, const wchar_t* wsNewName) ;
EIN_EXPORT BOOL __stdcall EgtGetMachGroupName( int nMGroupId, wchar_t*& wsName) ; EIN_EXPORT BOOL __stdcall EgtGetMachGroupName( int nMGroupId, wchar_t*& wsName) ;
EIN_EXPORT BOOL __stdcall EgtGetMachGroupMachineName( int nMGroupId, wchar_t*& wsMachineName) ; EIN_EXPORT BOOL __stdcall EgtGetMachGroupMachineName( int nMGroupId, wchar_t*& wsMachineName) ;
EIN_EXPORT int __stdcall EgtGetMachGroupId( const wchar_t* wsName) ; EIN_EXPORT int __stdcall EgtGetMachGroupId( const wchar_t* wsName) ;
@@ -779,7 +737,7 @@ EIN_EXPORT int __stdcall EgtAddRawPart( const double ptOrig[3],
EIN_EXPORT BOOL __stdcall EgtModifyRawPart( int nRawId, const double ptOrig[3], EIN_EXPORT BOOL __stdcall EgtModifyRawPart( int nRawId, const double ptOrig[3],
double dLength, double dWidth, double dHeight, const int vCol[4]) ; double dLength, double dWidth, double dHeight, const int vCol[4]) ;
EIN_EXPORT BOOL __stdcall EgtModifyRawPart2( int nRawId, int nCrvId, EIN_EXPORT BOOL __stdcall EgtModifyRawPart2( int nRawId, int nCrvId,
double dOverMat, double dHeight, const int vCol[4]) ; double dOverMat, double dZmin, double dHeight, const int vCol[4]) ;
EIN_EXPORT BOOL __stdcall EgtModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) ; EIN_EXPORT BOOL __stdcall EgtModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) ;
EIN_EXPORT BOOL __stdcall EgtModifyRawPartHeight( int nRawId, double dHeight) ; EIN_EXPORT BOOL __stdcall EgtModifyRawPartHeight( int nRawId, double dHeight) ;
EIN_EXPORT BOOL __stdcall EgtKeepRawPart( int nRawId, int nSouPhase) ; EIN_EXPORT BOOL __stdcall EgtKeepRawPart( int nRawId, int nSouPhase) ;
@@ -810,10 +768,7 @@ EIN_EXPORT BOOL __stdcall EgtGetTableArea( int nInd, double ptMin[3], double ptM
EIN_EXPORT BOOL __stdcall EgtGetTableAreaOffset( int nInd, double ptMinOffs[3], double ptMaxOffs[3]) ; EIN_EXPORT BOOL __stdcall EgtGetTableAreaOffset( int nInd, double ptMinOffs[3], double ptMaxOffs[3]) ;
EIN_EXPORT BOOL __stdcall EgtChangeTable( const wchar_t* wsTable, BOOL bUpdateDisp) ; EIN_EXPORT BOOL __stdcall EgtChangeTable( const wchar_t* wsTable, BOOL bUpdateDisp) ;
EIN_EXPORT BOOL __stdcall EgtShowOnlyTable( BOOL bVal) ; EIN_EXPORT BOOL __stdcall EgtShowOnlyTable( BOOL bVal) ;
EIN_EXPORT BOOL __stdcall EgtMoveDispAxis( const wchar_t* wsName, double dPos) ;
EIN_EXPORT BOOL __stdcall EgtRemoveDispAxis( const wchar_t* wsName) ;
EIN_EXPORT int __stdcall EgtAddFixture( const wchar_t* wsName, const double ptPos[3], double dAngRotDeg, double dMov) ; EIN_EXPORT int __stdcall EgtAddFixture( const wchar_t* wsName, const double ptPos[3], double dAngRotDeg, double dMov) ;
EIN_EXPORT BOOL __stdcall EgtKeepAllDispAxes( int nSouPhase) ;
EIN_EXPORT BOOL __stdcall EgtKeepFixture( int nFxtId, int nSouPhase) ; EIN_EXPORT BOOL __stdcall EgtKeepFixture( int nFxtId, int nSouPhase) ;
EIN_EXPORT BOOL __stdcall EgtRemoveFixture( int nFxtId) ; EIN_EXPORT BOOL __stdcall EgtRemoveFixture( int nFxtId) ;
EIN_EXPORT BOOL __stdcall EgtVerifyFixture( int nFxtId) ; EIN_EXPORT BOOL __stdcall EgtVerifyFixture( int nFxtId) ;
@@ -821,9 +776,7 @@ EIN_EXPORT int __stdcall EgtGetFirstFixture( void) ;
EIN_EXPORT int __stdcall EgtGetNextFixture( int nFxtId) ; EIN_EXPORT int __stdcall EgtGetNextFixture( int nFxtId) ;
EIN_EXPORT BOOL __stdcall EgtMoveFixture( int nFxtId, const double vtMove[3]) ; EIN_EXPORT BOOL __stdcall EgtMoveFixture( int nFxtId, const double vtMove[3]) ;
EIN_EXPORT BOOL __stdcall EgtRotateFixture( int nFxtId, double dDeltaAngDeg) ; EIN_EXPORT BOOL __stdcall EgtRotateFixture( int nFxtId, double dDeltaAngDeg) ;
EIN_EXPORT BOOL __stdcall EgtSetFixtureLink( int nFxtId, const wchar_t* wsTaLink) ;
EIN_EXPORT BOOL __stdcall EgtMoveFixtureMobile( int nFxtId, double dDeltaMov) ; EIN_EXPORT BOOL __stdcall EgtMoveFixtureMobile( int nFxtId, double dDeltaMov) ;
EIN_EXPORT BOOL __stdcall EgtSetFixtureMobile( int nFxtId, double dMov) ;
// Tools DataBase // Tools DataBase
EIN_EXPORT BOOL __stdcall EgtTdbGetToolNewName( const wchar_t* wsName, wchar_t*& wsNewName) ; EIN_EXPORT BOOL __stdcall EgtTdbGetToolNewName( const wchar_t* wsName, wchar_t*& wsNewName) ;
EIN_EXPORT BOOL __stdcall EgtTdbAddTool( const wchar_t* wsName, int nType) ; EIN_EXPORT BOOL __stdcall EgtTdbAddTool( const wchar_t* wsName, int nType) ;
@@ -903,16 +856,16 @@ EIN_EXPORT int __stdcall EgtGetFirstOperation( void) ;
EIN_EXPORT int __stdcall EgtGetNextOperation( int nId) ; EIN_EXPORT int __stdcall EgtGetNextOperation( int nId) ;
EIN_EXPORT int __stdcall EgtGetLastOperation( void) ; EIN_EXPORT int __stdcall EgtGetLastOperation( void) ;
EIN_EXPORT int __stdcall EgtGetPrevOperation( int nId) ; EIN_EXPORT int __stdcall EgtGetPrevOperation( int nId) ;
EIN_EXPORT int __stdcall EgtGetFirstActiveOperation( bool bNeedMachNotEmpty) ; EIN_EXPORT int __stdcall EgtGetFirstActiveOperation( void) ;
EIN_EXPORT int __stdcall EgtGetNextActiveOperation( int nId, bool bNeedMachNotEmpty) ; EIN_EXPORT int __stdcall EgtGetNextActiveOperation( int nId) ;
EIN_EXPORT int __stdcall EgtGetLastActiveOperation( bool bNeedMachNotEmpty) ; EIN_EXPORT int __stdcall EgtGetLastActiveOperation( void) ;
EIN_EXPORT int __stdcall EgtGetPrevActiveOperation( int nId, bool bNeedMachNotEmpty) ; EIN_EXPORT int __stdcall EgtGetPrevActiveOperation( int nId) ;
EIN_EXPORT int __stdcall EgtGetOperationType( int nId) ; EIN_EXPORT int __stdcall EgtGetOperationType( int nId) ;
EIN_EXPORT int __stdcall EgtGetOperationPhase( int nId) ; EIN_EXPORT int __stdcall EgtGetOperationPhase( int nId) ;
EIN_EXPORT BOOL __stdcall EgtSetOperationName( int nId, const wchar_t* wsName) ; EIN_EXPORT BOOL __stdcall EgtSetOperationName( int nId, const wchar_t* wsName) ;
EIN_EXPORT BOOL __stdcall EgtGetOperationName( int nId, wchar_t*& wsName) ; EIN_EXPORT BOOL __stdcall EgtGetOperationName( int nId, wchar_t*& wsName) ;
EIN_EXPORT int __stdcall EgtGetOperationId( const wchar_t* wsName) ; EIN_EXPORT int __stdcall EgtGetOperationId( const wchar_t* wsName) ;
EIN_EXPORT BOOL __stdcall EgtIsOperationEmpty( int nId, int nEmptyType) ; EIN_EXPORT BOOL __stdcall EgtIsOperationEmpty( int nId) ;
EIN_EXPORT BOOL __stdcall EgtRemoveOperation( int nId) ; EIN_EXPORT BOOL __stdcall EgtRemoveOperation( int nId) ;
EIN_EXPORT BOOL __stdcall EgtRemoveAllPhaseOperations( int nPhase) ; EIN_EXPORT BOOL __stdcall EgtRemoveAllPhaseOperations( int nPhase) ;
EIN_EXPORT BOOL __stdcall EgtRemoveAllOperations( void) ; EIN_EXPORT BOOL __stdcall EgtRemoveAllOperations( void) ;
@@ -947,14 +900,13 @@ EIN_EXPORT BOOL __stdcall EgtApplyMachining( BOOL bRecalc) ;
EIN_EXPORT BOOL __stdcall EgtUpdateMachining( void) ; EIN_EXPORT BOOL __stdcall EgtUpdateMachining( void) ;
EIN_EXPORT BOOL __stdcall EgtPreparePreviewMachiningTool( void) ; EIN_EXPORT BOOL __stdcall EgtPreparePreviewMachiningTool( void) ;
EIN_EXPORT BOOL __stdcall EgtRemovePreviewMachiningTool( void) ; EIN_EXPORT BOOL __stdcall EgtRemovePreviewMachiningTool( void) ;
EIN_EXPORT int __stdcall EgtGetPreviewMachiningToolStepCount( void) ; EIN_EXPORT int __stdcall EgtPreviewMachiningTool( int nEntId, int nFlag) ;
EIN_EXPORT int __stdcall EgtPreviewMachiningTool( int nEntId, int nStep) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningParamBool( int nType, BOOL* pbVal) ; EIN_EXPORT BOOL __stdcall EgtGetMachiningParamBool( int nType, BOOL* pbVal) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningParamInt( int nType, int* pnVal) ; EIN_EXPORT BOOL __stdcall EgtGetMachiningParamInt( int nType, int* pnVal) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningParamDouble( int nType, double* pdVal) ; EIN_EXPORT BOOL __stdcall EgtGetMachiningParamDouble( int nType, double* pdVal) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningParamString( int nType, wchar_t*& wsVal) ; EIN_EXPORT BOOL __stdcall EgtGetMachiningParamString( int nType, wchar_t*& wsVal) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningGeometry( int nInd, int* pnId, int* pnSub) ; EIN_EXPORT BOOL __stdcall EgtGetMachiningGeometry( int nInd, int* pnId, int* pnSub) ;
EIN_EXPORT BOOL __stdcall EgtIsMachiningEmpty( int nEmptyType) ; EIN_EXPORT BOOL __stdcall EgtIsMachiningEmpty( void) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningStartPoint( double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtGetMachiningStartPoint( double ptP[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetMachiningEndPoint( double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtGetMachiningEndPoint( double ptP[3]) ;
EIN_EXPORT BOOL __stdcall EgtApplyAllMachinings( BOOL bRecalc, BOOL bStopOnFirstErr, wchar_t*& wsErrList) ; EIN_EXPORT BOOL __stdcall EgtApplyAllMachinings( BOOL bRecalc, BOOL bStopOnFirstErr, wchar_t*& wsErrList) ;
@@ -966,7 +918,6 @@ EIN_EXPORT BOOL __stdcall EgtSimMove( int* pnStatus) ;
EIN_EXPORT BOOL __stdcall EgtSimHome( void) ; EIN_EXPORT BOOL __stdcall EgtSimHome( void) ;
EIN_EXPORT BOOL __stdcall EgtSimSetStep( double dStep) ; EIN_EXPORT BOOL __stdcall EgtSimSetStep( double dStep) ;
EIN_EXPORT BOOL __stdcall EgtSimSetUiStatus( int nUiStatus) ; EIN_EXPORT BOOL __stdcall EgtSimSetUiStatus( int nUiStatus) ;
EIN_EXPORT BOOL __stdcall EgtSimEnableToolTipTrace( BOOL bEnable) ;
EIN_EXPORT BOOL __stdcall EgtSimGetAxisInfoPos( int nI, wchar_t*& wsName, wchar_t*& wsToken, BOOL* pbLinear, double* pdVal) ; EIN_EXPORT BOOL __stdcall EgtSimGetAxisInfoPos( int nI, wchar_t*& wsName, wchar_t*& wsToken, BOOL* pbLinear, double* pdVal) ;
EIN_EXPORT BOOL __stdcall EgtSimGetToolInfo( wchar_t*& wsTool, double* pdSpeed) ; EIN_EXPORT BOOL __stdcall EgtSimGetToolInfo( wchar_t*& wsTool, double* pdSpeed) ;
EIN_EXPORT BOOL __stdcall EgtSimGetOperationInfo( wchar_t*& wsName, int* pnType) ; EIN_EXPORT BOOL __stdcall EgtSimGetOperationInfo( wchar_t*& wsName, int* pnType) ;
@@ -981,33 +932,28 @@ EIN_EXPORT int __stdcall EgtGetTableId( const wchar_t* wsTable) ;
EIN_EXPORT int __stdcall EgtGetAxisId( const wchar_t* wsAxis) ; EIN_EXPORT int __stdcall EgtGetAxisId( const wchar_t* wsAxis) ;
EIN_EXPORT int __stdcall EgtGetHeadId( const wchar_t* wsHead) ; EIN_EXPORT int __stdcall EgtGetHeadId( const wchar_t* wsHead) ;
EIN_EXPORT int __stdcall EgtGetHeadExitCount( const wchar_t* wsHead) ; EIN_EXPORT int __stdcall EgtGetHeadExitCount( const wchar_t* wsHead) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisType( const wchar_t* wsAxis, BOOL* pbLinear) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisDir( const wchar_t* wsAxis, double vtDir[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisInvert( const wchar_t* wsAxis, BOOL* pbInvert) ; EIN_EXPORT BOOL __stdcall EgtGetAxisInvert( const wchar_t* wsAxis, BOOL* pbInvert) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisOffset( const wchar_t* wsAxis, double* pdOffset) ; EIN_EXPORT BOOL __stdcall EgtGetAxisOffset( const wchar_t* wsAxis, double* pdOffset) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisPos( const wchar_t* wsAxis, double* pdVal) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisMin( const wchar_t* wsAxis, double* pdMin) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisMax( const wchar_t* wsAxis, double* pdMax) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisHomePos( const wchar_t* wsAxis, double* pdHome) ;
EIN_EXPORT BOOL __stdcall EgtGetAllHeadsNames( wchar_t*& wsNames) ; EIN_EXPORT BOOL __stdcall EgtGetAllHeadsNames( wchar_t*& wsNames) ;
EIN_EXPORT BOOL __stdcall EgtGetAllTablesNames( wchar_t*& wsNames) ; EIN_EXPORT BOOL __stdcall EgtGetAllTablesNames( wchar_t*& wsNames) ;
// Machine Calc // Machine Calc
EIN_EXPORT BOOL __stdcall EgtSetCalcTool( const wchar_t* wsTool, const wchar_t* wsHead, int nExit) ; EIN_EXPORT BOOL __stdcall EgtSetCalcTool( const wchar_t* wsTool, const wchar_t* wsHead, int nExit) ;
EIN_EXPORT BOOL __stdcall EgtGetCalcTool( wchar_t*& wsTool, wchar_t*& wsHead, int* pnExit) ; EIN_EXPORT BOOL __stdcall EgtGetCalcTool( wchar_t*& wsTool, wchar_t*& wsHead, int* pnExit) ;
EIN_EXPORT BOOL __stdcall EgtGetAllCurrAxesNames( wchar_t*& wsAxNames) ;
EIN_EXPORT BOOL __stdcall EgtGetCalcAngles( const double vtDirT[3], const double vtDirA[3], EIN_EXPORT BOOL __stdcall EgtGetCalcAngles( const double vtDirT[3], const double vtDirA[3],
int* pnStat, double* pdAngA1, double* pdAngB1, double* pdAngA2, double* pdAngB2) ; int* pnStat, double* pdAngA1, double* pdAngB1, double* pdAngA2, double* pdAngB2) ;
EIN_EXPORT BOOL __stdcall EgtGetCalcAnglesEx( const double vtDirT[3], const double vtDirA[3], EIN_EXPORT BOOL __stdcall EgtGetCalcPositions( const double ptP[3], double dAngA, double dAngB,
int* pnStat, double*& vAngs1, double*& vAngs2, int* pnCount) ;
EIN_EXPORT BOOL __stdcall EgtGetCalcPositions( const double ptP[3], int nCount, const double dAngs[],
int* pnStat, double* pdX, double* pdY, double* pdZ) ; int* pnStat, double* pdX, double* pdY, double* pdZ) ;
EIN_EXPORT BOOL __stdcall EgtGetCalcTipFromPositions( double dX, double dY, double dZ, int nCount, const double dAngs[], EIN_EXPORT BOOL __stdcall EgtGetCalcTipFromPositions( double dX, double dY, double dZ, double dAngA, double dAngB,
BOOL bBottom, double ptTip[3]) ; BOOL bBottom, double ptTip[3]) ;
EIN_EXPORT BOOL __stdcall EgtGetCalcToolDirFromAngles( int nCount, const double dAngs[], double vtDir[3]) ; EIN_EXPORT BOOL __stdcall EgtGetCalcToolDirFromAngles( double dAngA, double dAngB, double vtDir[3]) ;
EIN_EXPORT BOOL __stdcall EgtVerifyOutstroke( double dX, double dY, double dZ, double dAngA, double dAngB, int* pnStat) ; EIN_EXPORT BOOL __stdcall EgtVerifyOutstroke( double dX, double dY, double dZ, double dAngA, double dAngB, int* pnStat) ;
EIN_EXPORT BOOL __stdcall EgtGetOutstrokeInfo( wchar_t*& wsInfo) ; EIN_EXPORT BOOL __stdcall EgtGetOutstrokeInfo( wchar_t*& wsInfo) ;
// Machine Move // Machine Move
EIN_EXPORT BOOL __stdcall EgtSetAxisPos( const wchar_t* wsAxis, double dVal) ; EIN_EXPORT BOOL __stdcall EgtSetAxisPos( const wchar_t* wsAxis, double dVal) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisPos( const wchar_t* wsAxis, double* pdVal) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisMin( const wchar_t* wsAxis, double* pdMin) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisMax( const wchar_t* wsAxis, double* pdMax) ;
EIN_EXPORT BOOL __stdcall EgtGetAxisHomePos( const wchar_t* wsAxis, double* pdHome) ;
EIN_EXPORT BOOL __stdcall EgtLoadTool( const wchar_t* wsHead, int nExit, const wchar_t* wsTool) ; EIN_EXPORT BOOL __stdcall EgtLoadTool( const wchar_t* wsHead, int nExit, const wchar_t* wsTool) ;
EIN_EXPORT BOOL __stdcall EgtResetHeadSet( const wchar_t* wsHead) ; EIN_EXPORT BOOL __stdcall EgtResetHeadSet( const wchar_t* wsHead) ;
EIN_EXPORT BOOL __stdcall EgtSetMachineLook( int nFlag) ; EIN_EXPORT BOOL __stdcall EgtSetMachineLook( int nFlag) ;
@@ -1017,7 +963,7 @@ EIN_EXPORT BOOL __stdcall EgtInitScene( HWND hWnd, int nDriver, BOOL b2Buff, int
EIN_EXPORT BOOL __stdcall EgtGetSceneInfo( wchar_t*& wsInfo) ; EIN_EXPORT BOOL __stdcall EgtGetSceneInfo( wchar_t*& wsInfo) ;
EIN_EXPORT BOOL __stdcall EgtSetBackground( const int nTopCol[4], const int nBottomCol[4], BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtSetBackground( const int nTopCol[4], const int nBottomCol[4], BOOL bRedraw) ;
EIN_EXPORT BOOL __stdcall EgtSetLineAttribs( int nWidth) ; EIN_EXPORT BOOL __stdcall EgtSetLineAttribs( int nWidth) ;
EIN_EXPORT BOOL __stdcall EgtSetMarkAttribs( const int MarkCol[4], const int Mark2Col[4]) ; EIN_EXPORT BOOL __stdcall EgtSetMarkAttribs( const int MarkCol[4]) ;
EIN_EXPORT BOOL __stdcall EgtSetSelSurfAttribs( const int SelSurfCol[4]) ; EIN_EXPORT BOOL __stdcall EgtSetSelSurfAttribs( const int SelSurfCol[4]) ;
EIN_EXPORT BOOL __stdcall EgtSetGeoLineAttribs( const int GlCol[4]) ; EIN_EXPORT BOOL __stdcall EgtSetGeoLineAttribs( const int GlCol[4]) ;
EIN_EXPORT BOOL __stdcall EgtSetGeoTriaAttribs( const int GtCol[4]) ; EIN_EXPORT BOOL __stdcall EgtSetGeoTriaAttribs( const int GtCol[4]) ;
@@ -1025,8 +971,6 @@ EIN_EXPORT BOOL __stdcall EgtSetWinRectAttribs( BOOL bOutline, const int WrCol[4
EIN_EXPORT BOOL __stdcall EgtSetGlobFrameShow( BOOL bShow) ; EIN_EXPORT BOOL __stdcall EgtSetGlobFrameShow( BOOL bShow) ;
EIN_EXPORT BOOL __stdcall EgtSetGridShow( BOOL bShowGrid, BOOL bShowFrame) ; 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 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 EgtSetGridColor( const int nMinCol[4], const int nMajCol[4]) ;
EIN_EXPORT BOOL __stdcall EgtResize( int nW, int nH) ; EIN_EXPORT BOOL __stdcall EgtResize( int nW, int nH) ;
EIN_EXPORT BOOL __stdcall EgtDraw( void) ; EIN_EXPORT BOOL __stdcall EgtDraw( void) ;
@@ -1049,8 +993,6 @@ EIN_EXPORT BOOL __stdcall EgtSetShowCurveDirection( BOOL bShow, BOOL bRedraw) ;
EIN_EXPORT BOOL __stdcall EgtGetShowCurveDirection( void) ; EIN_EXPORT BOOL __stdcall EgtGetShowCurveDirection( void) ;
EIN_EXPORT BOOL __stdcall EgtSetShowTriaAdv( BOOL bAdvanced, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtSetShowTriaAdv( BOOL bAdvanced, BOOL bRedraw) ;
EIN_EXPORT BOOL __stdcall EgtGetShowTriaAdv( void) ; EIN_EXPORT BOOL __stdcall EgtGetShowTriaAdv( void) ;
EIN_EXPORT BOOL __stdcall EgtSetShowSurfBezierTol( double dLinTol, BOOL bRedraw) ;
EIN_EXPORT double __stdcall EgtGetShowSurfBezierTol( void) ;
EIN_EXPORT BOOL __stdcall EgtSetShowZmap( int nMode, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtSetShowZmap( int nMode, BOOL bRedraw) ;
EIN_EXPORT int __stdcall EgtGetShowZmap( void) ; EIN_EXPORT int __stdcall EgtGetShowZmap( void) ;
EIN_EXPORT BOOL __stdcall EgtZoom( int nZoom, BOOL bRedraw) ; EIN_EXPORT BOOL __stdcall EgtZoom( int nZoom, BOOL bRedraw) ;
@@ -1084,8 +1026,6 @@ EIN_EXPORT BOOL __stdcall EgtGetTextureDimensions( const wchar_t* wsName, double
EIN_EXPORT BOOL __stdcall EgtChangeTextureDimensions( const wchar_t* wsName, double dDimX, double dDimY) ; EIN_EXPORT BOOL __stdcall EgtChangeTextureDimensions( const wchar_t* wsName, double dDimX, double dDimY) ;
EIN_EXPORT BOOL __stdcall EgtGetImage( int nShowMode, const int TopCol[4], const int BottomCol[4], EIN_EXPORT BOOL __stdcall EgtGetImage( int nShowMode, const int TopCol[4], const int BottomCol[4],
int nWidth, int nHeight, const wchar_t* wsName) ; int nWidth, int nHeight, const wchar_t* wsName) ;
EIN_EXPORT BOOL __stdcall EgtSetCameraType( BOOL bOrthoOrPersp, BOOL bRedraw) ;
EIN_EXPORT BOOL __stdcall EgtSetZoomType( int nZoomType, BOOL bRedraw) ;
// Image // Image
EIN_EXPORT BOOL __stdcall EgtGetImagePixels( const wchar_t* wsFile, int* pnPixelX, int* pnPixelY) ; EIN_EXPORT BOOL __stdcall EgtGetImagePixels( const wchar_t* wsFile, int* pnPixelX, int* pnPixelY) ;
-2
View File
@@ -30,7 +30,5 @@ enum RawPartCenterPos { MCH_CE_TC = 1, // top center
//------------------------ Costanti per fixtures ------------------------------ //------------------------ Costanti per fixtures ------------------------------
static std::string FXT_MOBILE = "MOBILE" ; // gruppo parte mobile static std::string FXT_MOBILE = "MOBILE" ; // gruppo parte mobile
static std::string FXT_MOB_MINPOS = "MINPOS" ; // posizione minima della parte mobile
static std::string FXT_MOB_MAXPOS = "MAXPOS" ; // posizione massima della parte mobile
static std::string FXT_MOB_CPOS = "CPOS" ; // posizione corrente della parte mobile static std::string FXT_MOB_CPOS = "CPOS" ; // posizione corrente della parte mobile
static std::string FXT_MOB_MOVEDIR = "MDIR" ; // direzione di movimento della parte mobile (default Z di gruppo) static std::string FXT_MOB_MOVEDIR = "MDIR" ; // direzione di movimento della parte mobile (default Z di gruppo)
+14 -43
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2025 // EgalTech 2015-2022
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EMkMachMgr.h Data : 09.09.25 Versione : 2.7i2 // File : EMkMachMgr.h Data : 21.09.22 Versione : 2.4i4
// Contenuto : Dichiarazione della interfaccia IMachMgr. // Contenuto : Dichiarazione della interfaccia IMachMgr.
// //
// //
@@ -13,13 +13,6 @@
// 10.11.20 DS Portate in interfaccia funzioni di calcolo con vettori di angoli. // 10.11.20 DS Portate in interfaccia funzioni di calcolo con vettori di angoli.
// 13.01.21 DS Aggiunte in interfaccia GetCalcHead e GetCalcExit. // 13.01.21 DS Aggiunte in interfaccia GetCalcHead e GetCalcExit.
// 21.09.22 DS Aggiunta in interfaccia GetAxisOffset. // 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.
// 30.03.24 DS Aggiunte in interfaccia GetAllAxesNames e GetCalcTable.
// 02.04.24 DS Aggiunta in interfaccia GetClEntAxesMask.
// 22.04.24 DS Aggiunta in interfaccia GetExitId.
// 25.11.24 DS Aggiunta in interfaccia GetMachiningSkippedGeometry.
// 09.09.25 DS Aggiunta in interfaccia GetRobotAngles.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -64,9 +57,7 @@ class __declspec( novtable) IMachMgr
virtual int GetPrevMachGroup( int nId) const = 0 ; virtual int GetPrevMachGroup( int nId) const = 0 ;
virtual bool GetMachGroupNewName( std::string& sName) const = 0 ; virtual bool GetMachGroupNewName( std::string& sName) const = 0 ;
virtual int AddMachGroup( const std::string& sName, const std::string& sMachineName) = 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 bool RemoveMachGroup( int nId) = 0 ;
virtual bool ChangeMachGroupName( int nId, const std::string& sNewName) = 0 ;
virtual std::string GetMachGroupName( int nId) const = 0 ; virtual std::string GetMachGroupName( int nId) const = 0 ;
virtual std::string GetMachGroupMachineName( int nId) const = 0 ; virtual std::string GetMachGroupMachineName( int nId) const = 0 ;
virtual int GetMachGroupId( const std::string& sName) const = 0 ; virtual int GetMachGroupId( const std::string& sName) const = 0 ;
@@ -87,7 +78,7 @@ class __declspec( novtable) IMachMgr
virtual int AddRawPart( const Point3d& ptOrig, double dLen, double dWidth, double dHeight, Color cCol) = 0 ; virtual int AddRawPart( const Point3d& ptOrig, double dLen, double dWidth, double dHeight, Color cCol) = 0 ;
virtual int AddRawPartWithPart( int nPartId, int nCrvSrfId, double dOverMat, Color cCol) = 0 ; virtual int AddRawPartWithPart( int nPartId, int nCrvSrfId, double dOverMat, Color cCol) = 0 ;
virtual bool ModifyRawPart( int nRawId, const Point3d& ptOrig, double dLen, double dWidth, double dHeight, Color cCol) = 0 ; virtual bool ModifyRawPart( int nRawId, const Point3d& ptOrig, double dLen, double dWidth, double dHeight, Color cCol) = 0 ;
virtual bool ModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dHeight, Color cCol) = 0 ; virtual bool ModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dZmin, double dHeight, Color cCol) = 0 ;
virtual bool ModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) = 0 ; virtual bool ModifyRawPartSize( int nRawId, double dLength, double dWidth, double dHeight) = 0 ;
virtual bool ModifyRawPartHeight( int nRawId, double dHeight) = 0 ; virtual bool ModifyRawPartHeight( int nRawId, double dHeight) = 0 ;
virtual bool KeepRawPart( int nRawId, int nSouPhase) = 0 ; virtual bool KeepRawPart( int nRawId, int nSouPhase) = 0 ;
@@ -119,9 +110,6 @@ class __declspec( novtable) IMachMgr
virtual bool GetTableAreaOffset( int nInd, BBox3d& b3Area) const = 0 ; virtual bool GetTableAreaOffset( int nInd, BBox3d& b3Area) const = 0 ;
virtual bool ChangeTable( const std::string& sTable, bool bUpdateDisp) = 0 ; virtual bool ChangeTable( const std::string& sTable, bool bUpdateDisp) = 0 ;
virtual bool ShowOnlyTable( bool bVal) = 0 ; virtual bool ShowOnlyTable( bool bVal) = 0 ;
virtual bool MoveDispAxis( const std::string& sName, double dPos) = 0 ;
virtual bool RemoveDispAxis( const std::string& sName) = 0 ;
virtual bool KeepAllDispAxes( int nSouPhase) = 0 ;
virtual int AddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg, double dMov) = 0 ; virtual int AddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg, double dMov) = 0 ;
virtual bool KeepFixture( int nFxtId, int nSouPhase) = 0 ; virtual bool KeepFixture( int nFxtId, int nSouPhase) = 0 ;
virtual bool RemoveFixture( int nFxtId) = 0 ; virtual bool RemoveFixture( int nFxtId) = 0 ;
@@ -130,9 +118,7 @@ class __declspec( novtable) IMachMgr
virtual int GetNextFixture( int nFxtId) const = 0 ; virtual int GetNextFixture( int nFxtId) const = 0 ;
virtual bool MoveFixture( int nId, const Vector3d& vtMove) = 0 ; virtual bool MoveFixture( int nId, const Vector3d& vtMove) = 0 ;
virtual bool RotateFixture( int nId, double dDeltaAngDeg) = 0 ; virtual bool RotateFixture( int nId, double dDeltaAngDeg) = 0 ;
virtual bool SetFixtureLink( int nId, const std::string& sTaLink) = 0 ;
virtual bool MoveFixtureMobile( int nId, double dDeltaMov) = 0 ; virtual bool MoveFixtureMobile( int nId, double dDeltaMov) = 0 ;
virtual bool SetFixtureMobile( int nId, double dMov) = 0 ;
// Tools DataBase // Tools DataBase
virtual bool TdbGetToolNewName( std::string& sName) const = 0 ; virtual bool TdbGetToolNewName( std::string& sName) const = 0 ;
virtual bool TdbAddTool( const std::string& sName, int nType) = 0 ; virtual bool TdbAddTool( const std::string& sName, int nType) = 0 ;
@@ -178,7 +164,6 @@ class __declspec( novtable) IMachMgr
virtual bool ImportSetup( const std::string& sName) = 0 ; virtual bool ImportSetup( const std::string& sName) = 0 ;
virtual bool VerifyCurrSetup( STRVECTOR& vsErrors) = 0 ; virtual bool VerifyCurrSetup( STRVECTOR& vsErrors) = 0 ;
virtual bool FindToolInCurrSetup( const std::string& sTool) = 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 GetToolsInCurrSetupPos( const std::string& sTcPos, STRVECTOR& vsTools) = 0 ;
virtual bool UpdateCurrSetup( void) = 0 ; virtual bool UpdateCurrSetup( void) = 0 ;
virtual bool EraseCurrSetup( void) = 0 ; virtual bool EraseCurrSetup( void) = 0 ;
@@ -214,22 +199,22 @@ class __declspec( novtable) IMachMgr
virtual bool MdbToBeImported( const std::string& sFile, STRVECTOR& vsMachiningsNames, INTVECTOR& vMachiningsTypes) const = 0 ; 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, virtual bool MdbImport( const std::string& sFile, const STRVECTOR& vsMachiningsToImport, const STRVECTOR& vsMachiningsNames,
STRVECTOR& vsImported) = 0 ; STRVECTOR& vsImported) = 0 ;
// Operations : general // Operations : general
virtual int GetOperationCount( void) const = 0 ; virtual int GetOperationCount( void) const = 0 ;
virtual int GetFirstOperation( void) const = 0 ; virtual int GetFirstOperation( void) const = 0 ;
virtual int GetNextOperation( int nId) const = 0 ; virtual int GetNextOperation( int nId) const = 0 ;
virtual int GetLastOperation( void) const = 0 ; virtual int GetLastOperation( void) const = 0 ;
virtual int GetPrevOperation( int nId) const = 0 ; virtual int GetPrevOperation( int nId) const = 0 ;
virtual int GetFirstActiveOperation( bool bNeedMachNotEmpty = false) const = 0 ; virtual int GetFirstActiveOperation( void) const = 0 ;
virtual int GetNextActiveOperation( int nId, bool bNeedMachNotEmpty = false) const = 0 ; virtual int GetNextActiveOperation( int nId) const = 0 ;
virtual int GetLastActiveOperation( bool bNeedMachNotEmpty = false) const = 0 ; virtual int GetLastActiveOperation( void) const = 0 ;
virtual int GetPrevActiveOperation( int nId, bool bNeedMachNotEmpty = false) const = 0 ; virtual int GetPrevActiveOperation( int nId) const = 0 ;
virtual int GetOperationType( int nId) const = 0 ; virtual int GetOperationType( int nId) const = 0 ;
virtual int GetOperationPhase( int nId) const = 0 ; virtual int GetOperationPhase( int nId) const = 0 ;
virtual bool SetOperationName( int nId, const std::string& sName) = 0 ; virtual bool SetOperationName( int nId, const std::string& sName) = 0 ;
virtual std::string GetOperationName( int nId) const = 0 ; virtual std::string GetOperationName( int nId) const = 0 ;
virtual int GetOperationId( const std::string& sName) const = 0 ; virtual int GetOperationId( const std::string& sName) const = 0 ;
virtual bool IsOperationEmpty( int nId, int nEmptyType = 0) const = 0 ; virtual bool IsOperationEmpty( int nId) const = 0 ;
virtual bool RemoveOperation( int nId) = 0 ; virtual bool RemoveOperation( int nId) = 0 ;
virtual bool RemoveAllPhaseOperations( int nPhase) = 0 ; virtual bool RemoveAllPhaseOperations( int nPhase) = 0 ;
virtual bool RemoveAllOperations( void) = 0 ; virtual bool RemoveAllOperations( void) = 0 ;
@@ -247,7 +232,6 @@ class __declspec( novtable) IMachMgr
virtual int GetPhaseDisposition( int nPhase) const = 0 ; virtual int GetPhaseDisposition( int nPhase) const = 0 ;
virtual bool DispositionSpecialApply( int nId, bool bRecalc) = 0 ; virtual bool DispositionSpecialApply( int nId, bool bRecalc) = 0 ;
virtual bool DispositionSpecialUpdate( int nId) = 0 ; virtual bool DispositionSpecialUpdate( int nId) = 0 ;
virtual bool GetDispositionToolData( int nId, std::string& sName, std::string& sHead, int& nExit, std::string& sTcPos) = 0 ;
// Operations : machinings // Operations : machinings
virtual int AddMachining( const std::string& sName, const std::string& sMachining) = 0 ; virtual int AddMachining( const std::string& sName, const std::string& sMachining) = 0 ;
virtual int AddMachining( const std::string& sName, int nMchType, const std::string& sTool) = 0 ; virtual int AddMachining( const std::string& sName, int nMchType, const std::string& sTool) = 0 ;
@@ -267,24 +251,19 @@ class __declspec( novtable) IMachMgr
virtual bool MachiningUpdate( bool bPostApply = true) = 0 ; virtual bool MachiningUpdate( bool bPostApply = true) = 0 ;
virtual bool PreparePreviewMachiningTool( void) const = 0 ; virtual bool PreparePreviewMachiningTool( void) const = 0 ;
virtual bool RemovePreviewMachiningTool( void) const = 0 ; virtual bool RemovePreviewMachiningTool( void) const = 0 ;
virtual int GetPreviewMachiningToolStepCount( void) const = 0 ; virtual int PreviewMachiningTool( int nEntId, int nFlag) const = 0 ;
virtual int PreviewMachiningTool( int nEntId, int nStep) const = 0 ;
virtual bool GetMachiningParam( int nType, bool& bVal) const = 0 ; virtual bool GetMachiningParam( int nType, bool& bVal) const = 0 ;
virtual bool GetMachiningParam( int nType, int& nVal) const = 0 ; virtual bool GetMachiningParam( int nType, int& nVal) const = 0 ;
virtual bool GetMachiningParam( int nType, double& dVal) const = 0 ; virtual bool GetMachiningParam( int nType, double& dVal) const = 0 ;
virtual bool GetMachiningParam( int nType, std::string& sVal) const = 0 ; virtual bool GetMachiningParam( int nType, std::string& sVal) const = 0 ;
virtual bool GetMachiningGeometry( SELVECTOR& vIds) const = 0 ; virtual bool GetMachiningGeometry( SELVECTOR& vIds) const = 0 ;
virtual bool GetMachiningSkippedGeometry( SELVECTOR& vIds) const = 0 ; virtual bool IsMachiningEmpty( void) const = 0 ;
virtual bool IsMachiningEmpty( int nEmptyType = 0) const = 0 ;
virtual bool GetMachiningStartPoint( Point3d& ptStart) const = 0 ; virtual bool GetMachiningStartPoint( Point3d& ptStart) const = 0 ;
virtual bool GetMachiningEndPoint( Point3d& ptEnd) const = 0 ; virtual bool GetMachiningEndPoint( Point3d& ptEnd) const = 0 ;
// CL Entities Interrogations // CL Entities Interrogations
virtual bool GetClEntMove( int nEntId, int& nMove) const = 0 ; virtual bool GetClEntMove( int nEntId, int& nMove) const = 0 ;
virtual bool GetClEntFlag( int nEntId, int& nFlag, int& nFlag2) const = 0 ; virtual bool GetClEntFlag( int nEntId, int& nFlag) const = 0 ;
virtual bool GetClEntIndex( int nEntId, int& nIndex) const = 0 ; virtual bool GetClEntIndex( int nEntId, int& nIndex) const = 0 ;
virtual bool GetClEntAxesStatus( int nEntId, int& nStatus) const = 0 ;
virtual bool GetClEntAxesMask( int nEntId, int& nMask) const = 0 ;
virtual bool GetClEntAxesVal( int nEntId, DBLVECTOR& vAxes) const = 0 ;
// Simulation // Simulation
virtual bool SimInit( void) = 0 ; virtual bool SimInit( void) = 0 ;
virtual bool SimStart( bool bFirst) = 0 ; virtual bool SimStart( bool bFirst) = 0 ;
@@ -295,7 +274,6 @@ class __declspec( novtable) IMachMgr
virtual bool SimGetMoveInfo( int& nGmove, double& dFeed) const = 0 ; virtual bool SimGetMoveInfo( int& nGmove, double& dFeed) const = 0 ;
virtual bool SimSetStep( double dStep) = 0 ; virtual bool SimSetStep( double dStep) = 0 ;
virtual bool SimSetUiStatus( int nUiStatus) = 0 ; virtual bool SimSetUiStatus( int nUiStatus) = 0 ;
virtual bool SimEnableToolTipTrace( bool bEnable) = 0 ;
virtual bool SimGoHome( void) = 0 ; virtual bool SimGoHome( void) = 0 ;
virtual bool SimExit( void) = 0 ; virtual bool SimExit( void) = 0 ;
// Generation // Generation
@@ -304,10 +282,8 @@ class __declspec( novtable) IMachMgr
// Machine Calc // Machine Calc
virtual bool SetCalcTable( const std::string& sTable) = 0 ; virtual bool SetCalcTable( const std::string& sTable) = 0 ;
virtual bool SetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) = 0 ; virtual bool SetCalcTool( const std::string& sTool, const std::string& sHead, int nExit) = 0 ;
virtual bool GetAllCurrAxesNames( STRVECTOR& vAxName) const = 0 ;
virtual bool SetRotAxisBlock( const std::string& sAxis, double dVal) = 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 GetRotAxisBlocked( int nInd, std::string& sAxis, double& dVal) const = 0 ;
virtual bool GetCalcTable( std::string& sTable) const = 0 ;
virtual bool GetCalcTool( std::string& sTool) const = 0 ; virtual bool GetCalcTool( std::string& sTool) const = 0 ;
virtual bool GetCalcHead( std::string& sHead) const = 0 ; virtual bool GetCalcHead( std::string& sHead) const = 0 ;
virtual bool GetCalcExit( int& nExit) const = 0 ; virtual bool GetCalcExit( int& nExit) const = 0 ;
@@ -316,11 +292,9 @@ class __declspec( novtable) IMachMgr
virtual bool GetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA, virtual bool GetCalcAngles( const Vector3d& vtDirT, const Vector3d& vtDirA,
int& nStat, DBLVECTOR& vAng1, DBLVECTOR& vAng2) const = 0 ; int& nStat, DBLVECTOR& vAng1, DBLVECTOR& vAng2) const = 0 ;
virtual bool GetCalcPositions( const Point3d& ptP, double dAngA, double dAngB, virtual bool GetCalcPositions( const Point3d& ptP, double dAngA, double dAngB,
double& dX, double& dY, double& dZ) const = 0 ; int& nStat, double& dX, double& dY, double& dZ) const = 0 ;
virtual bool GetCalcPositions( const Point3d& ptP, const DBLVECTOR& vAng, virtual bool GetCalcPositions( const Point3d& ptP, const DBLVECTOR& vAng,
double& dX, double& dY, double& dZ) const = 0 ; int& nStat, double& dX, double& dY, double& dZ) const = 0 ;
virtual bool GetRobotAngles( const Point3d& ptP, const Vector3d& vtDirT, const Vector3d& vtDirA,
DBLVECTOR& vAng1, DBLVECTOR& vAng2) const = 0 ;
virtual bool GetCalcTipFromPositions( double dX, double dY, double dZ, double dAngA, double dAngB, virtual bool GetCalcTipFromPositions( double dX, double dY, double dZ, double dAngA, double dAngB,
bool bOverall, bool bBottom, Point3d& ptTip) const = 0 ; bool bOverall, bool bBottom, Point3d& ptTip) const = 0 ;
virtual bool GetCalcTipFromPositions( double dX, double dY, double dZ, const DBLVECTOR& vAng, virtual bool GetCalcTipFromPositions( double dX, double dY, double dZ, const DBLVECTOR& vAng,
@@ -337,11 +311,9 @@ class __declspec( novtable) IMachMgr
virtual int GetAxisId( const std::string& sAxis) const = 0 ; virtual int GetAxisId( const std::string& sAxis) const = 0 ;
virtual int GetHeadId( const std::string& sHead) const = 0 ; virtual int GetHeadId( const std::string& sHead) const = 0 ;
virtual int GetHeadExitCount( const std::string& sHead) const = 0 ; virtual int GetHeadExitCount( const std::string& sHead) const = 0 ;
virtual int GetExitId( const std::string& sHead, int nExit) const = 0 ;
virtual int GetTcPosId( const std::string& sTcPos) const = 0 ; virtual int GetTcPosId( const std::string& sTcPos) const = 0 ;
virtual bool GetAxisToken( const std::string& sAxis, std::string& sToken) const = 0 ; virtual bool GetAxisToken( const std::string& sAxis, std::string& sToken) const = 0 ;
virtual bool GetAxisType( const std::string& sAxis, bool& bLinear) const = 0 ; virtual bool GetAxisType( const std::string& sAxis, bool& bLinear) const = 0 ;
virtual bool GetAxisDir( const std::string& sAxis, Vector3d& vtDir) const = 0 ;
virtual bool GetAxisInvert( const std::string& sAxis, bool& bInvert) const = 0 ; virtual bool GetAxisInvert( const std::string& sAxis, bool& bInvert) const = 0 ;
virtual bool GetAxisOffset( const std::string& sAxis, double& dOffset) const = 0 ; virtual bool GetAxisOffset( const std::string& sAxis, double& dOffset) const = 0 ;
virtual bool SetAxisPos( const std::string& sAxis, double dVal, double* pdNewVal = nullptr) = 0 ; virtual bool SetAxisPos( const std::string& sAxis, double dVal, double* pdNewVal = nullptr) = 0 ;
@@ -352,7 +324,6 @@ class __declspec( novtable) IMachMgr
virtual bool ResetAxisPos( const std::string& sAxis) = 0 ; virtual bool ResetAxisPos( const std::string& sAxis) = 0 ;
virtual bool ResetAllAxesPos( void) = 0 ; virtual bool ResetAllAxesPos( void) = 0 ;
virtual bool GetAllTablesNames( STRVECTOR& vNames) const = 0 ; virtual bool GetAllTablesNames( STRVECTOR& vNames) const = 0 ;
virtual bool GetAllAxesNames( STRVECTOR& vNames) const = 0 ;
virtual bool GetAllHeadsNames( STRVECTOR& vNames) const = 0 ; virtual bool GetAllHeadsNames( STRVECTOR& vNames) const = 0 ;
virtual bool GetAllTcPosNames( STRVECTOR& vNames) const = 0 ; virtual bool GetAllTcPosNames( STRVECTOR& vNames) const = 0 ;
virtual bool LoadTool( const std::string& sHead, int nExit, const std::string& sTool) = 0 ; virtual bool LoadTool( const std::string& sHead, int nExit, const std::string& sTool) = 0 ;
+13 -46
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2025 // EgalTech 2015-2022
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EmkMachiningConst.h Data : 20.01.25 Versione : 2.7a1 // File : EmkMachiningConst.h Data : 04.02.22 Versione : 2.4b1
// Contenuto : Costanti delle lavorazioni. // Contenuto : Costanti delle lavorazioni.
// //
// //
@@ -12,10 +12,6 @@
// 03.06.20 DS Agg. MPA_TABMIN e MPA_TABMAX. // 03.06.20 DS Agg. MPA_TABMIN e MPA_TABMAX.
// 09.11.20 DS Agg. MPA_SIDEANGFEED e MPA_STEPLAST. // 09.11.20 DS Agg. MPA_SIDEANGFEED e MPA_STEPLAST.
// 04.02.22 DS Agg. MPA_EPICYCLESRAD e MPA_EPICYCLESDIST. // 04.02.22 DS Agg. MPA_EPICYCLESRAD e MPA_EPICYCLESDIST.
// 06.09.23 DS Agg. 5AxMachining.
// 29.03.24 DS Agg. MGP_APPROXLINTOL.
// 04.12.24 ES Agg. SURFFIN_SUB_Z_CONST e SURFFIN_SUB_OPTIMAL.
// 20.01.25 ES Agg. SURFFIN_SUB_PROJECT.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -42,8 +38,7 @@ enum MgpType { MGP_NONE = 0,
MGP_EXTSAWARCMINRAD = ( MGP_DOU + 4), MGP_EXTSAWARCMINRAD = ( MGP_DOU + 4),
MGP_INTSAWARCMAXSIDEANG =( MGP_DOU + 5), MGP_INTSAWARCMAXSIDEANG =( MGP_DOU + 5),
MGP_SAFEAGGRBOTTZ = ( MGP_DOU + 6), MGP_SAFEAGGRBOTTZ = ( MGP_DOU + 6),
MGP_MAXDEPTHSAFE = ( MGP_DOU + 7), MGP_MAXDEPTHSAFE = ( MGP_DOU + 7)} ;
MGP_APPROXLINTOL = ( MGP_DOU + 8)} ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Costanti per tipologia di split arcs // Costanti per tipologia di split arcs
@@ -67,9 +62,7 @@ enum MachiningType {
MT_CHISELING = OPER_CHISELING, MT_CHISELING = OPER_CHISELING,
MT_SURFROUGHING = OPER_SURFROUGHING, MT_SURFROUGHING = OPER_SURFROUGHING,
MT_SURFFINISHING = OPER_SURFFINISHING, MT_SURFFINISHING = OPER_SURFFINISHING,
MT_WATERJETTING = OPER_WATERJETTING, MT_WATERJETTING = OPER_WATERJETTING
MT_FIVEAXISMILLING = OPER_FIVEAXISMILLING,
MT_PROBING = OPER_PROBING
} ; } ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@@ -159,7 +152,6 @@ enum MpaType { MPA_NONE = 0,
MPA_STEPLAST = ( MPA_DOU + 51), // per tagli con lama MPA_STEPLAST = ( MPA_DOU + 51), // per tagli con lama
MPA_EPICYCLESRAD = ( MPA_DOU + 52), // per svuotature con epicicli MPA_EPICYCLESRAD = ( MPA_DOU + 52), // per svuotature con epicicli
MPA_EPICYCLESDIST = ( MPA_DOU + 53), // per svuotature con epicicli MPA_EPICYCLESDIST = ( MPA_DOU + 53), // per svuotature con epicicli
MPA_SUBSTEP = ( MPA_DOU + 54), // per sgrossature superfici
MPA_NAME = ( MPA_STR + 0), MPA_NAME = ( MPA_STR + 0),
MPA_TOOL = ( MPA_STR + 1), MPA_TOOL = ( MPA_STR + 1),
MPA_DEPTH_STR = ( MPA_STR + 2), MPA_DEPTH_STR = ( MPA_STR + 2),
@@ -301,12 +293,10 @@ enum { SAWROU_HS_LEFT = 1,
SAWROU_HS_RIGHT = 2} ; SAWROU_HS_RIGHT = 2} ;
// Tipo di lavorazione a step // Tipo di lavorazione a step
enum { SAWROU_ST_ZIGZAG = 0, enum { SAWROU_ST_ZIGZAG = 0,
SAWROU_ST_ONEWAY = 1, SAWROU_ST_ONEWAY = 1} ;
SAWROU_ST_ZCONST = 2} ;
// Tipo di attacco/uscita/link // Tipo di attacco/uscita/link
enum { SAWROU_LL_CENT = 0, enum { SAWROU_LL_CENT = 0,
SAWROU_LL_OUT = 1, SAWROU_LL_OUT = 1} ;
SAWROU_LL_INT = 2} ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Parametri per finitura con lama // Parametri per finitura con lama
@@ -330,9 +320,7 @@ enum { SAWFIN_LL_STD = 0,
enum { POCKET_SUB_ZIGZAG = 0, enum { POCKET_SUB_ZIGZAG = 0,
POCKET_SUB_ONEWAY = 1, POCKET_SUB_ONEWAY = 1,
POCKET_SUB_SPIRALIN = 2, POCKET_SUB_SPIRALIN = 2,
POCKET_SUB_SPIRALOUT = 3, POCKET_SUB_SPIRALOUT = 3} ;
POCKET_SUB_CONFORMAL_ZIGZAG = 4,
POCKET_SUB_CONFORMAL_ONEWAY = 5} ;
// Tipo di attacco // Tipo di attacco
enum { POCKET_LI_NONE = 0, enum { POCKET_LI_NONE = 0,
POCKET_LI_GLIDE = 1, POCKET_LI_GLIDE = 1,
@@ -369,26 +357,7 @@ enum { MORTISE_PLUNGE_STEP = 0,
MORTISE_PLUNGE_START = 1, MORTISE_PLUNGE_START = 1,
MORTISE_PLUNGE_END = 2, MORTISE_PLUNGE_END = 2,
MORTISE_PLUNGE_START_END = 3, MORTISE_PLUNGE_START_END = 3,
MORTISE_PLUNGE_START_TO_END = 4, MORTISE_PLUNGE_START_TO_END = 4} ;
MORTISE_PLUNGE_STEP_NO_SAFEZ = 10} ;
//----------------------------------------------------------------------------
// Parametri per sgrossatura superfici
// Sottotipo di lavorazione
enum { SURFROU_SUB_ZIGZAG = 0,
SURFROU_SUB_ONEWAY = 1,
SURFROU_SUB_SPIRALIN = 2,
SURFROU_SUB_SPIRALOUT = 3,
SURFROU_SUB_CONFORMAL_ZIGZAG = 4,
SURFROU_SUB_CONFORMAL_ONEWAY = 5} ;
// Tipo di attacco
enum { SURFROU_LI_NONE = 0,
SURFROU_LI_GLIDE = 1,
SURFROU_LI_ZIGZAG = 2,
SURFROU_LI_HELIX = 3} ;
// Tipo di uscita
enum { SURFROU_LO_NONE = 0,
SURFROU_LO_GLIDE = 1} ;
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// Parametri per finitura superfici // Parametri per finitura superfici
@@ -396,15 +365,14 @@ enum { SURFROU_LO_NONE = 0,
enum { SURFFIN_SUB_ZIGZAG = 0, enum { SURFFIN_SUB_ZIGZAG = 0,
SURFFIN_SUB_ONEWAY = 1, SURFFIN_SUB_ONEWAY = 1,
SURFFIN_SUB_SPIRALIN = 2, SURFFIN_SUB_SPIRALIN = 2,
SURFFIN_SUB_SPIRALOUT = 3, SURFFIN_SUB_SPIRALOUT = 3} ;
SURFFIN_SUB_Z_CONST = 4,
SURFFIN_SUB_OPTIMAL = 5,
SURFFIN_SUB_PROJECT = 6,
SURFFIN_SUB_PENCIL = 7} ;
// Tipo di attacco // Tipo di attacco
enum { SURFFIN_LI_NONE = 0, enum { SURFFIN_LI_NONE = 0,
SURFFIN_LI_LINEAR = 1, SURFFIN_LI_LINEAR = 1,
SURFFIN_LI_TANGENT = 2} ; SURFFIN_LI_TANGENT = 2} ;
// Tipo di link
enum { SURFFIN_LL_STD = 0,
SURFFIN_LL_CENT = 1} ;
// Tipo di uscita // Tipo di uscita
enum { SURFFIN_LO_NONE = 0, enum { SURFFIN_LO_NONE = 0,
SURFFIN_LO_LINEAR = 1, SURFFIN_LO_LINEAR = 1,
@@ -423,8 +391,7 @@ enum { WJET_EC_NONE = 0,
WJET_EC_LOOP = 2} ; WJET_EC_LOOP = 2} ;
// Comportamento su angolo interno // Comportamento su angolo interno
enum { WJET_IC_NONE = 0, enum { WJET_IC_NONE = 0,
WJET_IC_SLOW = 1, WJET_IC_SLOW = 1} ;
WJET_IC_SLOW_FULL = 2} ;
// Tipo di attacco // Tipo di attacco
enum { WJET_LI_NONE = 0, enum { WJET_LI_NONE = 0,
WJET_LI_LINEAR = 1, WJET_LI_LINEAR = 1,
+6 -17
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2016-2024 // EgalTech 2016-2016
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EmkMachiningGeoConst.h Data : 25.11.24 Versione : 2.6k5 // File : EmkMachiningGeoConst.h Data : 06.01.16 Versione : 1.6l6
// Contenuto : Costanti per le geometrie delle lavorazioni. // Contenuto : Costanti per le geometrie delle lavorazioni.
// //
// //
@@ -26,8 +26,6 @@ static std::string KEY_STRAIGHT = "STR" ;
static std::string KEY_NUM = "NUM" ; static std::string KEY_NUM = "NUM" ;
// Chiave per stato di aggiornamento di lavorazione // Chiave per stato di aggiornamento di lavorazione
static std::string KEY_STAT = "STAT" ; static std::string KEY_STAT = "STAT" ;
// Chiave per elenco identificativi non lavorati
static std::string KEY_SKIPS = "SKIPS" ;
// Sottogruppi delle lavorazioni // Sottogruppi delle lavorazioni
static std::string MCH_AUX = "AUX" ; static std::string MCH_AUX = "AUX" ;
static std::string MCH_AUXVIEW = "AVIEW" ; static std::string MCH_AUXVIEW = "AVIEW" ;
@@ -35,21 +33,18 @@ static std::string MCH_TABS = "TABS" ;
static std::string MCH_PV = "PV" ; static std::string MCH_PV = "PV" ;
static std::string MCH_ST = "ST" ; static std::string MCH_ST = "ST" ;
static std::string MCH_CL = "CL" ; static std::string MCH_CL = "CL" ;
static std::string MCH_DBL = "DBL" ;
static std::string MCH_PATH = "P" ; static std::string MCH_PATH = "P" ;
// Nomi di entità CL speciali // Nomi di entità CL speciali
static std::string MCH_CL_CLIMB = "CLIMB" ; static std::string MCH_CL_CLIMB = "CLIMB" ;
static std::string MCH_CL_RISE = "RISE" ; static std::string MCH_CL_RISE = "RISE" ;
static std::string MCH_CL_HOME = "HOME" ; static std::string MCH_CL_HOME = "HOME" ;
static std::string MCH_CL_SAFEIN = "SI" ;
static std::string MCH_CL_LEADIN = "LI" ; static std::string MCH_CL_LEADIN = "LI" ;
static std::string MCH_CL_LEADOUT = "LO" ; static std::string MCH_CL_LEADOUT = "LO" ;
static std::string MCH_CL_SAFEOUT = "SO" ;
static std::string MCH_CL_AGB_DWN = "AGBD" ; static std::string MCH_CL_AGB_DWN = "AGBD" ;
static std::string MCH_CL_AGB_IN = "AGBI" ; static std::string MCH_CL_AGB_IN = "AGBI" ;
static std::string MCH_CL_AGB_OUT = "AGBO" ; static std::string MCH_CL_AGB_OUT = "AGBO" ;
static std::string MCH_CL_AGB_UP = "AGBU" ; static std::string MCH_CL_AGB_UP = "AGBU" ;
// Nomi di entità di preview // Nomi di entità di preview
static std::string MCH_PV_CUT = "CUT" ; static std::string MCH_PV_CUT = "CUT" ;
static std::string MCH_PV_PRE_CUT = "PRC" ; static std::string MCH_PV_PRE_CUT = "PRC" ;
static std::string MCH_PV_POST_CUT = "POC" ; static std::string MCH_PV_POST_CUT = "POC" ;
@@ -64,8 +59,6 @@ static std::string MCH_PV_DOWN_RCUT = "DRCUT" ;
static std::string MCH_PV_DOWN_RRCUT = "DRRCUT" ; static std::string MCH_PV_DOWN_RRCUT = "DRRCUT" ;
static std::string MCH_PV_DOWN_RLICUT = "DRLICUT" ; static std::string MCH_PV_DOWN_RLICUT = "DRLICUT" ;
static std::string MCH_PV_DOWN_RLOCUT = "DRLOCUT" ; static std::string MCH_PV_DOWN_RLOCUT = "DRLOCUT" ;
static std::string MCH_PV_UP_RAWCUT = "RUPCUT" ;
static std::string MCH_PV_DOWN_RAWCUT = "RDWNCUT" ;
// Chiave info con WidthT, DeltaTi, DeltaT, ExtraCut e RawBottomHeight lama in Preview // Chiave info con WidthT, DeltaTi, DeltaT, ExtraCut e RawBottomHeight lama in Preview
static std::string MCH_PV_KEY_WT = "WT" ; static std::string MCH_PV_KEY_WT = "WT" ;
static std::string MCH_PV_KEY_DTI = "DTI" ; static std::string MCH_PV_KEY_DTI = "DTI" ;
@@ -74,10 +67,10 @@ static std::string MCH_PV_KEY_EC = "EC" ;
static std::string MCH_PV_KEY_RBH = "RBH" ; static std::string MCH_PV_KEY_RBH = "RBH" ;
// Chiave info per rinvio a preview spostato nel pezzo in Preview // Chiave info per rinvio a preview spostato nel pezzo in Preview
static std::string MCH_PV_KEY_RELOCATE = "PvId" ; static std::string MCH_PV_KEY_RELOCATE = "PvId" ;
// Chiave info per angoli in XY con entità successiva e precedente // Chiave info per angoli in XY con entità successiva e precedente
static std::string MCH_KEY_NEXTANG = "NextAng" ; static std::string MCH_KEY_NEXTANG = "NextAng" ;
static std::string MCH_KEY_PREVANG = "PrevAng" ; static std::string MCH_KEY_PREVANG = "PrevAng" ;
// Chiave info per direzione libera in XY all'inizio e alla fine dell'entità (in assenza infinito) // Chiave info per direzione libera in XY all'inizio e alla fine dell'entità (in assenza infinito)
static std::string MCH_KEY_START_FREELEN = "SFL" ; static std::string MCH_KEY_START_FREELEN = "SFL" ;
static std::string MCH_KEY_END_FREELEN = "EFL" ; static std::string MCH_KEY_END_FREELEN = "EFL" ;
// Angolo esterno minimo per calcolare la direzione libera sull'arco // Angolo esterno minimo per calcolare la direzione libera sull'arco
@@ -112,10 +105,6 @@ static std::string KEY_MMAX = "MMAX" ;
// Chiavi info in gruppo CL per punti assi minimo e massimo di ingombro di tutta la lavorazione // Chiavi info in gruppo CL per punti assi minimo e massimo di ingombro di tutta la lavorazione
static std::string KEY_MAXMIN = "MAXMIN" ; static std::string KEY_MAXMIN = "MAXMIN" ;
static std::string KEY_MAXMAX = "MAXMAX" ; static std::string KEY_MAXMAX = "MAXMAX" ;
// Chiave info in sottogruppo di CL per uscite attivate (per forature con gang drill)
static std::string KEY_DRACEX = "DRACEX" ;
// Chiave info in sottogruppo di testa per abilitarne visualizzazione in Preview (0/1 default)
static std::string KEY_PREVIEWSHOW = "PreviewShow" ;
//----------------- Costanti posizione per preview utensile in lavorazione ------ //----------------- Costanti posizione per preview utensile in lavorazione ------
enum MchToolShow { MCH_TPM_CURR = 0, enum MchToolShow { MCH_TPM_CURR = 0,
+17 -23
View File
@@ -1,7 +1,7 @@
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// EgalTech 2015-2025 // EgalTech 2015-2019
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// File : EmkOperationConst.h Data : 09.06.25 Versione : 2.7f2 // File : EmkOperationConst.h Data : 08.07.19 Versione : 2.1g2
// Contenuto : Costanti delle operazioni. // Contenuto : Costanti delle operazioni.
// //
// //
@@ -12,30 +12,26 @@
// 03.02.17 DS Agg. Chiseling. // 03.02.17 DS Agg. Chiseling.
// 25.05.19 DS Agg. SurfRoughing e SurfFinishing. // 25.05.19 DS Agg. SurfRoughing e SurfFinishing.
// 08.07.19 DS Agg. WaterJetting. // 08.07.19 DS Agg. WaterJetting.
// 06.09.23 DS Agg. 5AxMachining.
// 09.06.25 DS Agg. Probing.
// //
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
#pragma once #pragma once
//------------------------ Costanti per tipo Operazioni ----------------------- //------------------------ Costanti per tipo Operazioni -----------------------
enum OperType { OPER_NULL = 0, // nulla enum OperType { OPER_NULL = 0, // nulla
OPER_DISP = 0x000100, // disposizione OPER_DISP = 0x000100, // disposizione
OPER_DRILLING = 0x000200, // foratura OPER_DRILLING = 0x000200, // foratura
OPER_SAWING = 0x000400, // taglio di lama OPER_SAWING = 0x000400, // taglio di lama
OPER_MILLING = 0x000800, // fresatura OPER_MILLING = 0x000800, // fresatura
OPER_POCKETING = 0x001000, // svuotatura OPER_POCKETING = 0x001000, // svuotatura
OPER_MORTISING = 0x002000, // mortasatura OPER_MORTISING = 0x002000, // mortasatura
OPER_SAWROUGHING = 0x004000, // sgrossatura con lama OPER_SAWROUGHING = 0x004000, // sgrossatura con lama
OPER_SAWFINISHING = 0x008000, // finitura con lama OPER_SAWFINISHING = 0x008000, // finitura con lama
OPER_GENMACHINING = 0x010000, // lavorazione generica OPER_GENMACHINING = 0x010000, // lavorazione generica
OPER_CHISELING = 0x020000, // scalpellatura OPER_CHISELING = 0x020000, // scalpellatura
OPER_SURFROUGHING = 0x040000, // sgrossatura superficie OPER_SURFROUGHING = 0x040000, // sgrossatura superficie
OPER_SURFFINISHING = 0x080000, // finitura superficie OPER_SURFFINISHING = 0x080000, // finitura superficie
OPER_WATERJETTING = 0x100000, // taglio water jet OPER_WATERJETTING = 0x100000} ; // taglio water jet
OPER_FIVEAXISMILLING = 0x200000, // lavorazione 5 assi
OPER_PROBING = 0x400000} ; // tastatura
// Controllo tipo valido // Controllo tipo valido
bool inline IsValidDispositionType( int nType) bool inline IsValidDispositionType( int nType)
{ {
@@ -54,7 +50,5 @@ bool inline IsValidMachiningType( int nType)
nType == OPER_CHISELING || nType == OPER_CHISELING ||
nType == OPER_SURFROUGHING || nType == OPER_SURFROUGHING ||
nType == OPER_SURFFINISHING || nType == OPER_SURFFINISHING ||
nType == OPER_WATERJETTING || nType == OPER_WATERJETTING ) ;
nType == OPER_FIVEAXISMILLING ||
nType == OPER_PROBING) ;
} }

Some files were not shown because too many files have changed in this diff Show More