Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 33cd3aa310 | |||
| e2295d2502 | |||
| 328f571012 | |||
| 129dfa412e | |||
| 6f0c532456 | |||
| b3d649894f | |||
| bb030c1008 | |||
| 05243da50b | |||
| 80423a1eb6 | |||
| 0318d44994 | |||
| bd7ed86369 | |||
| 65fee5de7b | |||
| f614420f37 |
+41
-7
@@ -1,14 +1,14 @@
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// EgalTech 2013-2022
|
// EgalTech 2013-2023
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// File : EGkBBox3d.h Data : 17.08.22 Versione : 2.4h1
|
// File : EGkBBox3d.h Data : 12.05.23 Versione : 2.5e3
|
||||||
// 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.
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -90,10 +90,11 @@ 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& b3B) const ;
|
bool Overlaps( const BBox3d& b3Box) const ;
|
||||||
bool OverlapsXY( const BBox3d& b3B) const ;
|
bool OverlapsXY( const BBox3d& b3Box) const ;
|
||||||
bool FindIntersection( const BBox3d& b3B, BBox3d& b3Int) const ;
|
bool Overlaps( const Frame3d& frBox, const BBox3d& b3Box) const ;
|
||||||
bool FindIntersectionXY( const BBox3d& b3B, BBox3d& b3Int) const ;
|
bool FindIntersection( const BBox3d& b3Box, 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
|
||||||
@@ -126,3 +127,36 @@ 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 ;
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// EgalTech 2020-2020
|
// EgalTech 2020-2023
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// File : EGkCDeSurfTmSurfTm.h Data : 13.11.20 Versione :
|
// File : EGkCDeClosedSurfTmClosedSurfTm.h Data : 14.06.23 Versione : 2.5f3
|
||||||
// Contenuto : Dichiarazione funzione verifica collisione tra
|
// Contenuto : Dichiarazione funzione verifica collisione tra
|
||||||
// SurfTm e SurfTm.
|
// SurfTm e SurfTm.
|
||||||
//
|
//
|
||||||
@@ -27,4 +27,4 @@
|
|||||||
// di collisione o inconsistenza dei parametri di input.
|
// 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.
|
||||||
EGK_EXPORT bool CDeClosedSurfTmClosedSurfTm( const SurfTriMesh& SurfA, const SurfTriMesh& SurfB, double dSafeDist) ;
|
EGK_EXPORT bool CDeClosedSurfTmClosedSurfTm( const ISurfTriMesh& SurfA, const ISurfTriMesh& SurfB, double dSafeDist) ;
|
||||||
|
|||||||
@@ -28,5 +28,5 @@
|
|||||||
// 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 true in caso di collisione.
|
// La funzione restituisce true in caso di collisione.
|
||||||
EGK_EXPORT bool CDeConvexTorusClosedSurfTm( const Frame3d& frTorusFrame, double dRad1, double dRad2,
|
EGK_EXPORT bool CDeConvexTorusClosedSurfTm( const Frame3d& frTorus, double dRad1, double dRad2,
|
||||||
double dSafeDist, const ISurfTriMesh& tmSurf) ;
|
double dSafeDist, const ISurfTriMesh& tmSurf) ;
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ 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
|
||||||
|
|||||||
+1
-1
@@ -47,4 +47,4 @@ 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( pfProcEvents pFun) ;
|
EGK_EXPORT bool SetEGkProcessEvents( pfProcEvents pFun) ;
|
||||||
|
|||||||
+51
-18
@@ -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)
|
||||||
{ this->ToGlob( frRef) ; return *this ;}
|
{ ToGlob( frRef) ; return *this ; }
|
||||||
Frame3d& operator/=( const Frame3d& frRef)
|
Frame3d& operator/=( const Frame3d& frRef)
|
||||||
{ this->ToLoc( frRef) ; return *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,23 +97,56 @@ 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 Frame3d
|
inline const Frame3d
|
||||||
operator*( const Frame3d& frRef1, const Frame3d& frRef2)
|
operator*( const Frame3d& frRef, const Frame3d& frOri)
|
||||||
{
|
{
|
||||||
Frame3d frRefR = frRef1 ;
|
Frame3d frNew = frRef ;
|
||||||
frRefR.ToGlob( frRef2) ;
|
frNew.ToGlob( frOri) ;
|
||||||
return frRefR ;
|
return frNew ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// Divisione di due frame (porta il primo dal globale nel secondo)
|
// Divisione di due frame (porta il primo dal globale nel secondo)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Frame3d
|
inline const Frame3d
|
||||||
operator/( const Frame3d& frRef1, const Frame3d& frRef2)
|
operator/( const Frame3d& frRef, const Frame3d& frDest)
|
||||||
{
|
{
|
||||||
Frame3d frRefR = frRef1 ;
|
Frame3d frNew = frRef ;
|
||||||
frRefR.ToLoc( frRef2) ;
|
frNew.ToLoc( frDest) ;
|
||||||
return frRefR ;
|
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 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -38,6 +38,16 @@ 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 ;
|
||||||
|
|||||||
+21
-18
@@ -42,6 +42,9 @@ 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) ; }
|
||||||
@@ -50,19 +53,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)
|
||||||
{ this->x += vtV.x ; this->y += vtV.y ; this->z += vtV.z ; return *this ; }
|
{ x += vtV.x ; y += vtV.y ; 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)
|
||||||
{ this->x -= vtV.x ; this->y -= vtV.y ; this->z -= vtV.z ; return *this ; }
|
{ x -= vtV.x ; y -= vtV.y ; 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)
|
||||||
{ this->x += ptP.x ; this->y += ptP.y ; this->z += ptP.z ; return *this ; }
|
{ x += ptP.x ; y += ptP.y ; 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)
|
||||||
{ this->x *= dMul ; this->y *= dMul ; this->z *= dMul ; return *this ; }
|
{ x *= dMul ; y *= dMul ; 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 ; this->x *= dMul ; this->y *= dMul ; this->z *= dMul ; return *this ; }
|
{ double dMul = 1 / dDiv ; x *= dMul ; y *= dMul ; 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
|
||||||
@@ -102,7 +105,7 @@ 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 Point3d
|
inline const 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) ;
|
||||||
@@ -111,16 +114,16 @@ operator+( const Point3d& ptP1, const Point3d& ptP2)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Somma di un punto e un vettore
|
//! Somma di un punto e un vettore
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Point3d
|
inline const 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
|
//! Opposto di un punto, genera un vettore
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const 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) ;
|
||||||
@@ -129,7 +132,7 @@ operator-( const Point3d& ptP)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Differenza di due punti, genera un vettore
|
//! Differenza di due punti, genera un vettore
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const 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) ;
|
||||||
@@ -138,7 +141,7 @@ operator-( const Point3d& ptP1, const Point3d& ptP2)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Sottrazione di un punto e un vettore
|
//! Sottrazione di un punto e un vettore
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Point3d
|
inline const 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) ;
|
||||||
@@ -147,7 +150,7 @@ operator-( const Point3d& ptP1, const Vector3d& vtV2)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Prodotto con uno scalare
|
//! Prodotto con uno scalare
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Point3d
|
inline const 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) ;
|
||||||
@@ -156,7 +159,7 @@ operator*( const Point3d& ptP, double dMul)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Prodotto di uno scalare con un punto
|
//! Prodotto di uno scalare con un punto
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Point3d
|
inline const 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) ;
|
||||||
@@ -165,7 +168,7 @@ operator*( double dMul, const Point3d& ptP)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Divisione per uno scalare
|
//! Divisione per uno scalare
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Point3d
|
inline const Point3d
|
||||||
operator/( const Point3d& ptP, double dDiv)
|
operator/( const Point3d& ptP, double dDiv)
|
||||||
{
|
{
|
||||||
double dMul ;
|
double dMul ;
|
||||||
@@ -177,7 +180,7 @@ operator/( const Point3d& ptP, double dDiv)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Somma mediata di due punti (baricentrica)
|
//! Somma mediata di due punti (baricentrica)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Point3d
|
inline const 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,
|
||||||
@@ -368,7 +371,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 Point3d
|
inline const Point3d
|
||||||
GetToLoc( const Point3d& ptP, const Frame3d& frRef)
|
GetToLoc( const Point3d& ptP, const Frame3d& frRef)
|
||||||
{
|
{
|
||||||
Point3d ptQ = ptP ;
|
Point3d ptQ = ptP ;
|
||||||
@@ -379,7 +382,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 Point3d
|
inline const Point3d
|
||||||
GetToGlob( const Point3d& ptP, const Frame3d& frRef)
|
GetToGlob( const Point3d& ptP, const Frame3d& frRef)
|
||||||
{
|
{
|
||||||
Point3d ptQ = ptP ;
|
Point3d ptQ = ptP ;
|
||||||
@@ -390,7 +393,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 Point3d
|
inline const 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 ;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// EgalTech 2014-2014
|
// EgalTech 2014-2023
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// File : EGkStmFromTriangleSoup.h Data : 19.05.14 Versione : 1.5e7
|
// File : EGkStmFromTriangleSoup.h Data : 07.05.23 Versione : 2.5e2
|
||||||
// Contenuto : Dichiarazione della classe StmFromTriangleSoup.
|
// Contenuto : Dichiarazione della classe StmFromTriangleSoup.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -36,6 +36,7 @@ class StmFromTriangleSoup
|
|||||||
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) ;
|
||||||
|
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) ;
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class __declspec( novtable) ISurfBezier : public ISurf
|
|||||||
virtual bool SetControlPoint( int nIndU, int nIndV, const Point3d& ptCtrl, double dW) = 0 ;
|
virtual bool SetControlPoint( int 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( const ISurfFlatRegion& sfrTrimReg) = 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 ;
|
||||||
@@ -57,6 +58,7 @@ 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 bool GetLeaves ( std::vector<std::tuple<int, Point3d, Point3d>>& vLeaves) const = 0 ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|||||||
+21
-18
@@ -44,6 +44,9 @@ 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) ; }
|
||||||
@@ -110,21 +113,21 @@ class EGK_EXPORT Vector3d
|
|||||||
{ 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)
|
||||||
{ this->x += vtV.x ; this->y += vtV.y ; this->z += vtV.z ; return *this ; }
|
{ x += vtV.x ; y += vtV.y ; 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)
|
||||||
{ this->x -= vtV.x ; this->y -= vtV.y ; this->z -= vtV.z ; return *this ; }
|
{ x -= vtV.x ; y -= vtV.y ; 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)
|
||||||
{ this->x *= dMul ; this->y *= dMul ; this->z *= dMul ; return *this ; }
|
{ x *= dMul ; y *= dMul ; 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 ; this->x *= dMul ; this->y *= dMul ; this->z *= dMul ; return *this ; }
|
{ double dMul = 1 / dDiv ; x *= dMul ; y *= dMul ; 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
|
||||||
@@ -199,7 +202,7 @@ EGK_EXPORT Vector3d FromNearestHorizontalOrtho( const Vector3d& vtV, const Vecto
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Opposto di un vettore
|
//! Opposto di un vettore
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const 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)) ;
|
||||||
@@ -208,7 +211,7 @@ operator-( const Vector3d& vtV)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Somma di due vettori
|
//! Somma di due vettori
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const 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)) ;
|
||||||
@@ -217,7 +220,7 @@ operator+( const Vector3d& vtV1, const Vector3d& vtV2)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Sottrazione di due vettori
|
//! Sottrazione di due vettori
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const 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)) ;
|
||||||
@@ -226,7 +229,7 @@ operator-( const Vector3d& vtV1, const Vector3d& vtV2)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Prodotto con uno scalare
|
//! Prodotto con uno scalare
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const 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)) ;
|
||||||
@@ -235,7 +238,7 @@ operator*( const Vector3d& vtV, double dMul)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Prodotto di uno scalare con un vettore
|
//! Prodotto di uno scalare con un vettore
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const 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)) ;
|
||||||
@@ -244,7 +247,7 @@ operator*( double dMul, const Vector3d& vtV)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Divisione con uno scalare
|
//! Divisione con uno scalare
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const Vector3d
|
||||||
operator/( const Vector3d& vtV, double dDiv)
|
operator/( const Vector3d& vtV, double dDiv)
|
||||||
{
|
{
|
||||||
double dMul = 1 / dDiv ;
|
double dMul = 1 / dDiv ;
|
||||||
@@ -272,7 +275,7 @@ ScalarXY( const Vector3d& vtV1, const Vector3d& vtV2)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Prodotto vettoriale
|
//! Prodotto vettoriale
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const 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,
|
||||||
@@ -292,7 +295,7 @@ CrossXY( const Vector3d& vtV1, const Vector3d& vtV2)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Somma mediata di due vettori (baricentrica)
|
//! Somma mediata di due vettori (baricentrica)
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const 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,
|
||||||
@@ -303,7 +306,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 Vector3d
|
inline const Vector3d
|
||||||
ParallCompo( const Vector3d& vtV, const Vector3d& vtRef)
|
ParallCompo( const Vector3d& vtV, const Vector3d& vtRef)
|
||||||
{
|
{
|
||||||
if ( vtRef.IsNormalized())
|
if ( vtRef.IsNormalized())
|
||||||
@@ -315,7 +318,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 Vector3d
|
inline const Vector3d
|
||||||
OrthoCompo( const Vector3d& vtV, const Vector3d& vtRef)
|
OrthoCompo( const Vector3d& vtV, const Vector3d& vtRef)
|
||||||
{
|
{
|
||||||
if ( vtRef.IsNormalized())
|
if ( vtRef.IsNormalized())
|
||||||
@@ -426,7 +429,7 @@ AreOrthoExact( const Vector3d& vtV1, const Vector3d& vtV2)
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
//! Restituisce una copia in locale del vettore passato
|
//! Restituisce una copia in locale del vettore passato
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
inline Vector3d
|
inline const Vector3d
|
||||||
GetToLoc( const Vector3d& vtV, const Frame3d& frRef)
|
GetToLoc( const Vector3d& vtV, const Frame3d& frRef)
|
||||||
{
|
{
|
||||||
Vector3d vtW = vtV ;
|
Vector3d vtW = vtV ;
|
||||||
@@ -437,7 +440,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 Vector3d
|
inline const Vector3d
|
||||||
GetToGlob( const Vector3d& vtV, const Frame3d& frRef)
|
GetToGlob( const Vector3d& vtV, const Frame3d& frRef)
|
||||||
{
|
{
|
||||||
Vector3d vtW = vtV ;
|
Vector3d vtW = vtV ;
|
||||||
@@ -448,7 +451,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 Vector3d
|
inline const 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 ;
|
||||||
|
|||||||
@@ -28,3 +28,9 @@ 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) ;
|
||||||
|
|||||||
@@ -0,0 +1,35 @@
|
|||||||
|
//----------------------------------------------------------------------------
|
||||||
|
// 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) ;
|
||||||
@@ -50,6 +50,7 @@ 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) ;
|
||||||
|
|||||||
+2
-1
@@ -35,7 +35,8 @@ enum SimCollObjType { MCH_SIM_COB_NULL = 0,
|
|||||||
MCH_SIM_COB_BOX = 1,
|
MCH_SIM_COB_BOX = 1,
|
||||||
MCH_SIM_COB_CYL = 2,
|
MCH_SIM_COB_CYL = 2,
|
||||||
MCH_SIM_COB_SPHE = 3,
|
MCH_SIM_COB_SPHE = 3,
|
||||||
MCH_SIM_COB_CONE = 4} ;
|
MCH_SIM_COB_CONE = 4,
|
||||||
|
MCH_SIM_COB_POLY = 101} ;
|
||||||
|
|
||||||
//------------------------ Stato di visualizzazione della macchina ------------
|
//------------------------ Stato di visualizzazione della macchina ------------
|
||||||
enum MachLook { MCH_LOOK_NONE = -1,
|
enum MachLook { MCH_LOOK_NONE = -1,
|
||||||
|
|||||||
+5
-1
@@ -55,7 +55,8 @@ EXE_EXPORT bool ExeGetExecutableVersion( std::string& sVer) ;
|
|||||||
EXE_EXPORT bool ExeGetVersionInfo( std::string& sVer, const char* szNewLine) ;
|
EXE_EXPORT bool ExeGetVersionInfo( std::string& sVer, const char* szNewLine) ;
|
||||||
EXE_EXPORT bool ExeGetKeyInfo( std::string& sKey) ;
|
EXE_EXPORT bool ExeGetKeyInfo( std::string& sKey) ;
|
||||||
EXE_EXPORT bool ExeSetLockType( int nType) ;
|
EXE_EXPORT bool ExeSetLockType( int nType) ;
|
||||||
EXE_EXPORT bool ExeSetNetHwKey( bool bNetHwKey) ;
|
EXE_EXPORT bool ExeSetLockId( const std::string& sLockId) ;
|
||||||
|
EXE_EXPORT bool ExeSetNetHwKey( bool bNetHwKey, int nUserId = 0) ;
|
||||||
EXE_EXPORT bool ExeGetKeyLevel( int nProd, int nVer, int nLev, int& nKLev) ;
|
EXE_EXPORT bool ExeGetKeyLevel( int nProd, int nVer, int nLev, int& nKLev) ;
|
||||||
EXE_EXPORT bool ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& nOpt2) ;
|
EXE_EXPORT bool ExeGetKeyOptions( int nProd, int nVer, int nLev, unsigned int& nOpt2) ;
|
||||||
EXE_EXPORT bool ExeGetKeyLeftDays( int& nLeftDays) ;
|
EXE_EXPORT bool ExeGetKeyLeftDays( int& nLeftDays) ;
|
||||||
@@ -352,6 +353,7 @@ EXE_EXPORT int ExeCreateSurfTmBySurfBezier( int nParentId, int nSbezId) ;
|
|||||||
EXE_EXPORT int ExeCreateSurfTmByVolZmap( int nParentId, int nZmapId, int nPart) ;
|
EXE_EXPORT int ExeCreateSurfTmByVolZmap( int nParentId, int nZmapId, int nPart) ;
|
||||||
EXE_EXPORT int ExeCreateSurfBezier( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTVECTOR& vPnt, int nRefType) ;
|
EXE_EXPORT int ExeCreateSurfBezier( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTVECTOR& vPnt, int nRefType) ;
|
||||||
EXE_EXPORT int ExeCreateSurfBezierRational( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTUVECTOR& vPntW, int nRefType) ;
|
EXE_EXPORT int ExeCreateSurfBezierRational( int nParentId, int nDegU, int nDegV, int nSpanU, int nSpanV, const PNTUVECTOR& vPntW, int nRefType) ;
|
||||||
|
EXE_EXPORT int ExeCreateSurfBezierLeaves( int nParentId, int nSurfBzId, int nTextHeight) ;
|
||||||
|
|
||||||
// GeomDB Create Volume
|
// GeomDB Create Volume
|
||||||
EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX,
|
EXE_EXPORT int ExeCreateVolZmap( int nParentId, const Point3d& ptIni, double dDimX,
|
||||||
@@ -601,6 +603,7 @@ EXE_EXPORT bool ExeSurfTmIntersect( int nId1, int nId2, bool bTwoColors = false)
|
|||||||
EXE_EXPORT bool ExeSurfTmResetTwoColors( int nId) ;
|
EXE_EXPORT bool ExeSurfTmResetTwoColors( int nId) ;
|
||||||
EXE_EXPORT int ExeSurfTmSplit( int nId, int nSplitterId, int* pnCount) ;
|
EXE_EXPORT int ExeSurfTmSplit( int nId, int nSplitterId, int* pnCount) ;
|
||||||
EXE_EXPORT bool ExeSurfTmCut( int nId, int nCutterId, bool bInVsOut, bool bSaveOnEq) ;
|
EXE_EXPORT bool ExeSurfTmCut( int nId, int nCutterId, bool bInVsOut, bool bSaveOnEq) ;
|
||||||
|
EXE_EXPORT bool ExeSurfBzTrim( int nId, int nCutterId) ;
|
||||||
|
|
||||||
// GeomDb Volume Modify
|
// GeomDb Volume Modify
|
||||||
EXE_EXPORT int ExeExplodeVolume( int nId, int* pnCount) ;
|
EXE_EXPORT int ExeExplodeVolume( int nId, int* pnCount) ;
|
||||||
@@ -791,6 +794,7 @@ EXE_EXPORT int ExeCDeRectPrismoidSolid( const Frame3d& frPrismoid, double dBase
|
|||||||
EXE_EXPORT int ExeCDeCylSolid( const Frame3d& frCyl, double dR, double dH, int nSolidId, double dSafeDist, int nRefType) ;
|
EXE_EXPORT int ExeCDeCylSolid( const Frame3d& frCyl, double dR, double dH, int nSolidId, double dSafeDist, int nRefType) ;
|
||||||
EXE_EXPORT int ExeCDeConeSolid( const Frame3d& frCone, double dR1, double dR2, double dH, int nSolidId, double dSafeDist, int nRefType) ;
|
EXE_EXPORT int ExeCDeConeSolid( const Frame3d& frCone, double dR1, double dR2, double dH, int nSolidId, double dSafeDist, int nRefType) ;
|
||||||
EXE_EXPORT int ExeCDeSpheSolid( const Point3d& ptCen, double dR, int nSolidId, double dSafeDist, int nRefType) ;
|
EXE_EXPORT int ExeCDeSpheSolid( const Point3d& ptCen, double dR, int nSolidId, double dSafeDist, int nRefType) ;
|
||||||
|
EXE_EXPORT int ExeCDeSolidSolid( int nSolid1Id, int nSolid2Id, double dSafeDist) ;
|
||||||
|
|
||||||
// Maximum Filler
|
// Maximum Filler
|
||||||
EXE_EXPORT bool ExeMaxFillerStart( void) ;
|
EXE_EXPORT bool ExeMaxFillerStart( void) ;
|
||||||
|
|||||||
+1
-1
@@ -24,7 +24,7 @@
|
|||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
const int KEY_BASELIB_PROD = 207 ;
|
const int KEY_BASELIB_PROD = 207 ;
|
||||||
const int KEY_BASELIB_VER = 2504 ;
|
const int KEY_BASELIB_VER = 2506 ;
|
||||||
const int KEY_BASELIB_LEV = 1 ;
|
const int KEY_BASELIB_LEV = 1 ;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ int GetKeyLevel( const std::string& sKey, int nProd, int nVer, int nLev,
|
|||||||
int GetKeyOptions( const std::string& sKey, int nProd, int nVer, int nLev,
|
int GetKeyOptions( const std::string& sKey, int nProd, int nVer, int nLev,
|
||||||
unsigned int& nKOpt1, unsigned int& nKOpt2, int& nKOptExpDays) ;
|
unsigned int& nKOpt1, unsigned int& nKOpt2, int& nKOptExpDays) ;
|
||||||
int GetCurrDay( void) ;
|
int GetCurrDay( void) ;
|
||||||
|
int GetMinDay( void) ;
|
||||||
|
|
||||||
//-------------------------- Constants ----------------------------------------
|
//-------------------------- Constants ----------------------------------------
|
||||||
// Codici di ritorno
|
// Codici di ritorno
|
||||||
|
|||||||
+8
-5
@@ -1,13 +1,14 @@
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// EgalTech 2014-2022
|
// EgalTech 2014-2023
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// File : SELkLockId.cpp Data : 16.05.22 Versione : 2.4e3
|
// File : SELkLockId.cpp Data : 30.05.23 Versione : 2.5e5
|
||||||
// Contenuto : Dichiarazione funzioni per gestione/calcolo Id protezione,
|
// Contenuto : Dichiarazione funzioni per gestione/calcolo Id protezione,
|
||||||
// da macchina o da chiave hardware.
|
// da macchina o da chiave hardware.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Modifiche : 10.09.14 DS Creazione modulo.
|
// Modifiche : 10.09.14 DS Creazione modulo.
|
||||||
// 16.05.22 DS Aggiunta gestione chiave di rete.
|
// 16.05.22 DS Aggiunta gestione chiave di rete.
|
||||||
|
// 30.05.23 DS Aggiunta gestione utente di rete e rilascio chiave di rete.
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -16,10 +17,12 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
||||||
// Imposto il tipo di protezione
|
// Imposto il tipo di protezione ammessa (ANY, HW, SW)
|
||||||
bool SetLockType( int nType) ;
|
bool SetLockType( int nType) ;
|
||||||
// Forzo chiave di rete (se prevista protezione hardware)
|
// Imposto chiave di rete e identificativo utente (0-9)
|
||||||
bool SetNetHwKey( bool bNetHwKey) ;
|
bool SetNetHwKey( bool bNetHwKey, int nUserId) ;
|
||||||
|
// Libero chiave di rete (da eseguire al termine del programma)
|
||||||
|
bool CloseNetHwKey( void) ;
|
||||||
// Recupero l'identificativo in chiaro della protezione
|
// Recupero l'identificativo in chiaro della protezione
|
||||||
bool GetLockId( std::string& sLockId) ;
|
bool GetLockId( std::string& sLockId) ;
|
||||||
// Recupero l'identificativo cifrato della protezione
|
// Recupero l'identificativo cifrato della protezione
|
||||||
|
|||||||
Reference in New Issue
Block a user