diff --git a/EGkVector3d.h b/EGkVector3d.h index cc97a64..78157eb 100644 --- a/EGkVector3d.h +++ b/EGkVector3d.h @@ -45,7 +45,7 @@ class EGK_EXPORT Vector3d void Set( double dX, double dY, double dZ) { x = dX ; y = dY ; z = dZ ; } public : - //! Verifica la validità delle coordinate del vettore + //! 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 @@ -58,70 +58,70 @@ class EGK_EXPORT Vector3d { return ( x * x + y * y ) ; } //! Lunghezza del vettore nel piano XY double LenXY( void) const ; - //! Verifica se il vettore è quasi nullo + //! Verifica se il vettore è quasi nullo bool IsSmall( void) const { 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 { 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 { 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 { 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 { 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 { double dMO = std::max( abs( y), abs( z)) ; 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 { double dMO = std::max( abs( y), abs( z)) ; 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 { double dMO = std::max( abs( y), abs( z)) ; return ( abs( x) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( x) > KV_BIG * dMO) ; } - //! Verifica se il vettore è circa parallelo a x - bool IsXEpsilon( double dToll) const + //! Verifica se il vettore è circa parallelo a x + bool IsXEpsilon( double dToler) const { double dMO = std::max( abs( y), abs( z)) ; - return ( abs( x) > dToll && dMO < 10 * dToll && abs( x) > KV_BIG * dMO) ; } - //! Verifica se il vettore è parallelo ed equiverso con Y+ + 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 { double dMO = std::max( abs( z), abs( x)) ; 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 { double dMO = std::max( abs( z), abs( x)) ; 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 { double dMO = std::max( abs( z), abs( x)) ; return ( abs( y) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( y) > KV_BIG * dMO) ; } - //! Verifica se il vettore è circa parallelo a y - bool IsYEpsilon( double dToll) const + //! Verifica se il vettore è circa parallelo a y + bool IsYEpsilon( double dToler) const { double dMO = std::max( abs( z), abs( x)) ; - return ( abs( y) > dToll && dMO < 10 * dToll && abs( y) > KV_BIG * dMO) ; } - //! Verifica se il vettore è parallelo ed equiverso con Z+ + 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 { double dMO = std::max( abs( x), abs( y)) ; 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 { double dMO = std::max( abs( x), abs( y)) ; 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 { double dMO = std::max( abs( x), abs( y)) ; return ( abs( z) > EPS_ZERO && dMO < 10 * EPS_ZERO && abs( z) > KV_BIG * dMO) ; } - //! Verifica se il vettore è circa parallelo a Z - bool IsZEpsilon( double dToll) const + //! Verifica se il vettore è circa parallelo a Z + bool IsZEpsilon( double dToler) const { double dMO = std::max( abs( x), abs( y)) ; - return ( abs( z) > dToll && dMO < 10 * dToll && abs( z) > KV_BIG * dMO) ; } - //! Verifica se il vettore è generico + return ( abs( z) > dToler && dMO < 10 * dToler && abs( z) > KV_BIG * dMO) ; } + //! Verifica se il vettore è generico bool IsGeneric( void) const { return ( ! IsX() && ! IsY() && ! IsZ()) ; } //! Somma sul posto con altro vettore @@ -205,12 +205,12 @@ EGK_EXPORT Vector3d FromSpherical( double dLen, double dAngVertDeg, double dAngO 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) ; //---------------------------------------------------------------------------- -//! 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) ; diff --git a/EGkVolZmap.h b/EGkVolZmap.h index 0184877..27966e9 100644 --- a/EGkVolZmap.h +++ b/EGkVolZmap.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2015-2024 //---------------------------------------------------------------------------- -// File : EGkVolZmap.h Data : 09.03.24 Versione : 2.6c2 +// File : EGkVolZmap.h Data : 22.04.24 Versione : 2.6d4 // Contenuto : Dichiarazione della interfaccia IVolZmap. // // @@ -27,9 +27,10 @@ class __declspec( novtable) IVolZmap : public IGeoObj public : virtual bool CopyFrom( const IGeoObj* pGObjSrc) = 0 ; virtual bool Clear( void) = 0 ; - virtual bool Create( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dPrec, bool bTriDex) = 0 ; - virtual bool CreateFromFlatRegion( const ISurfFlatRegion& Surf, double dDimZ, double dPrec, bool bTriDex) = 0 ; - virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dPrec, bool bTriDex) = 0 ; + virtual bool Create( const Point3d& ptO, double dDimX, double dDimY, double dDimZ, double dStep, 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 dStep, bool bTriDex) = 0 ; + virtual bool CreateFromTriMesh( const ISurfTriMesh& Surf, double dStep, bool bTriDex) = 0 ; virtual int GetBlockCount( void) const = 0 ; virtual int GetBlockUpdatingCounter( int nBlock) const = 0 ; virtual bool GetBlockTriangles( int nBlock, TRIA3DEXVECTOR& vTria) const = 0 ; @@ -54,6 +55,8 @@ class __declspec( novtable) IVolZmap : public IGeoObj double dH, double dW, double dTh, double dRc, int nFlag, bool bFirst) = 0 ; virtual bool SetChiselTool( const std::string& sToolName, 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 bool SetCurrTool( int nCurrTool) = 0 ; virtual bool ResetTools( void) = 0 ; diff --git a/EInAPI.h b/EInAPI.h index bd59232..0dd5a04 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -252,6 +252,8 @@ EIN_EXPORT int __stdcall EgtCreateArcC2PEx( int nParentId, const double ptCen[3 const double ptNearEnd[3], int nRefType) ; EIN_EXPORT int __stdcall EgtCreateArc3P( int nParentId, const double ptP1[3], 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], double dDirSDeg, int nRefType) ; EIN_EXPORT int __stdcall EgtCreateArc2PDEx( int nParentId, const double ptStart[3], diff --git a/EMkMachMgr.h b/EMkMachMgr.h index b66290a..e6011f2 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- // EgalTech 2015-2024 //---------------------------------------------------------------------------- -// File : EMkMachMgr.h Data : 02.04.24 Versione : 2.6d1 +// File : EMkMachMgr.h Data : 22.04.24 Versione : 2.6d4 // Contenuto : Dichiarazione della interfaccia IMachMgr. // // @@ -17,6 +17,7 @@ // 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. // //---------------------------------------------------------------------------- @@ -322,6 +323,7 @@ class __declspec( novtable) IMachMgr virtual int GetAxisId( const std::string& sAxis) const = 0 ; virtual int GetHeadId( 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 bool GetAxisToken( const std::string& sAxis, std::string& sToken) const = 0 ; virtual bool GetAxisType( const std::string& sAxis, bool& bLinear) const = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index bfe7c8e..e410079 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -275,6 +275,8 @@ EXE_EXPORT int ExeCreateArcC2PEx( int nParentId, const Point3d& ptCen, const Point3d& ptNearEnd, int nRefType) ; EXE_EXPORT int ExeCreateArc3P( int nParentId, const Point3d& ptP1, const Point3d& ptP2, const Point3d& ptP3, int nRefType) ; +EXE_EXPORT int ExeCreateArc2PR( int nParentId, const Point3d& ptStart, const Point3d& ptEnd, + double dRad, bool bCCW, int nRefType) ; EXE_EXPORT int ExeCreateArc2PB( int nParentId, const Point3d& ptStart, const Point3d& ptEnd, double dBulge, int nRefType) ; EXE_EXPORT int ExeCreateArc2PD( int nParentId, const Point3d& ptStart, const Point3d& ptEnd, @@ -374,6 +376,8 @@ EXE_EXPORT int ExeCreateSurfBezierTria2D( int nParentId, int nSurfBzId, int nTe // GeomDB Create Volume EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX, double dDimY, double dDimZ, double dPrec, bool bTriDex, int nRefType) ; +EXE_EXPORT int ExeCreateVolZmapEmpty( int nParentId, const Point3d& ptIni, double dDimX, + double dDimY, double dDimZ, double dPrec, bool bTriDex, int nRefType) ; EXE_EXPORT int ExeCreateVolZmapByRegionExtrusion( int nParentId, int nSfrId, double dDimZ, double dPrec, bool bTriDex) ; EXE_EXPORT int ExeCreateVolZmapFromSurfTm( int nParentId, int nStmId, double dPrec, bool bTriDex) ; @@ -655,6 +659,8 @@ EXE_EXPORT bool ExeVolZmapSetMortiserTool( const INTVECTOR& vIds, const std::str double dLen, double dWidth, double dThick, double dCornR, int nFlag, bool bFirst) ; EXE_EXPORT bool ExeVolZmapSetChiselTool( const INTVECTOR& vIds, const std::string& sToolName, double dLen, double dWidth, double dThick, int nFlag, bool bFirst) ; +EXE_EXPORT bool ExeVolZmapSetAdditiveTool( const INTVECTOR& vIds, const std::string& sToolName, + double dLen, double dDiam, double dCornR, int nFlag, bool bFirst) ; EXE_EXPORT bool ExeVolZmapResetTools( const INTVECTOR& vIds) ; EXE_EXPORT int ExeVolZmapGetToolOutline( int nId, int nDestGrpId, bool bApprox = false) ; EXE_EXPORT bool ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vector3d& vtDs, @@ -1196,6 +1202,7 @@ EXE_EXPORT int ExeGetTableId( const std::string& sTable) ; EXE_EXPORT int ExeGetAxisId( const std::string& sAxis) ; EXE_EXPORT int ExeGetHeadId( const std::string& sHead) ; EXE_EXPORT int ExeGetHeadExitCount( const std::string& sHead) ; +EXE_EXPORT int ExeGetExitId( const std::string& sHead, int nExit) ; EXE_EXPORT int ExeGetTcPosId( const std::string& sTcPos) ; EXE_EXPORT bool ExeGetAxisToken( const std::string& sAxis, std::string& sToken) ; EXE_EXPORT bool ExeGetAxisType( const std::string& sAxis, bool& bLinear) ;