Compare commits

..

12 Commits

Author SHA1 Message Date
Riccardo Elitropi 736131c937 Include :
- modifica prototipi.
2024-03-15 13:18:01 +01:00
Riccardo Elitropi fa7dc81a0f Include :
- modifiche prototipi funzioni per creazioni superfici swept.
2024-03-15 10:28:30 +01:00
Dario Sassi 6d06630d0a Include :
- aggiornamento mensile codici protezione librerie.
2024-03-02 11:53:49 +01:00
Dario Sassi 52d64962cd Merge branch 'master' of https://gitlab.steamware.net/egaltech/include 2024-02-27 18:21:03 +01:00
Dario Sassi 3b1ffa6f4a Include :
- aggiornamento prototipi.
2024-02-27 18:19:14 +01:00
Daniele Bariletti 0f84188120 Include :
- aggiornamento prototitpi.
2024-02-27 16:40:13 +01:00
Dario Sassi b3d5483564 Include :
- aggiornamento prototipi.
2024-02-26 15:16:24 +01:00
Dario Sassi 270bb60b26 Include :
- aggiornamento prototipi.
2024-02-19 14:50:36 +01:00
Dario Sassi 98bcfa2230 Include :
- aggiornamento prototipi.
2024-02-16 08:41:32 +01:00
Dario Sassi 447719df31 Include :
- aggiornamento prototipi.
2024-02-13 14:32:46 +01:00
Riccardo Elitropi 841523fb00 Merge commit '2ded5d72ed40e455fef44fe6065f73188ee97634' 2024-02-13 12:31:42 +01:00
Daniele Bariletti ba18004154 Merge remote-tracking branch 'origin/HEAD' 2024-02-06 16:19:02 +01:00
20 changed files with 291 additions and 87 deletions
+8 -1
View File
@@ -24,4 +24,11 @@
#endif
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeBoxClosedSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, const ISurfTriMesh& Stm) ;
// Il sistema di riferimento è allineato con il box e ha origine in un suo vertice.
// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL.
// Il sistema di riferimento del box è riferito a quello della superficie.
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeBoxClosedSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, const ISurfTriMesh& Stm, double dSafeDist) ;
+6 -4
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2020-2023
// EgalTech 2020-2024
//----------------------------------------------------------------------------
// File : EGkCDeClosedSurfTmClosedSurfTm.h Data : 14.06.23 Versione : 2.5f3
// File : EGkCDeClosedSurfTmClosedSurfTm.h Data : 15.02.24 Versione : 2.6b2
// Contenuto : Dichiarazione funzione verifica collisione tra
// SurfTm e SurfTm.
//
@@ -23,8 +23,10 @@
#endif
//----------------------------------------------------------------------------
// La funzione restituisce true in caso di collisone, false in caso di assenza
// di collisione o inconsistenza dei parametri di input.
// Le due superfici devono essere espresse nel medesimo sistema di riferimento.
// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL.
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeClosedSurfTmClosedSurfTm( const ISurfTriMesh& SurfA, const ISurfTriMesh& SurfB, double dSafeDist) ;
+9 -6
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2020-2020
// EgalTech 2020-2024
//----------------------------------------------------------------------------
// File : EGkCDeConeFrustumClosedSurfTm.h Data : 09.11.20 Versione :
// File : EGkCDeConeFrustumClosedSurfTm.h Data : 15.02.24 Versione : 2.6b2
// Contenuto : Dichiarazione funzione verifica collisione tra
// Cone e Closed SurfTriMesh.
//
@@ -23,8 +23,11 @@
#endif
//----------------------------------------------------------------------------
// Il sisitema di riferimento deve avere l'asse di simmetria del cono come asse Z e origine nel centro della base.
// La distanza di sicurezza ha effetto solo se maggiore di epsilon, altrimenti è ignorata ed è ininfluente.
// Il sistema di riferimento del cono deve essere immerso in quello della superficie.
// Il sistema di riferimento deve avere l'asse di simmetria del cono come asse Z e origine nel centro della base.
// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL.
// Il sistema di riferimento del cono è riferito a quello della superficie.
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
EGK_EXPORT bool CDeConeFrustumClosedSurfTm( const Frame3d& frCone, double dBaseRad, double dTopRad, double dHeight,
double dSafeDist, const ISurfTriMesh& Stm) ;
const ISurfTriMesh& Stm, double dSafeDist) ;
+6 -3
View File
@@ -24,9 +24,12 @@
#endif
//----------------------------------------------------------------------------
// Il toro convesso è il disco limitato dalla sola parte esterna del toro.
// Il toro convesso è il disco solido limitato dalla sola parte esterna del toro.
// Raggio principale R1, raggio secondario R2.
// Il toro è posto nel piano XY del suo riferimento, centrato sull'origine.
// La funzione restituisce true in caso di collisione.
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeConvexTorusClosedSurfTm( const Frame3d& frTorus, double dRad1, double dRad2,
double dSafeDist, const ISurfTriMesh& tmSurf) ;
const ISurfTriMesh& tmSurf, double dSafeDist) ;
+8 -1
View File
@@ -23,4 +23,11 @@
#endif
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeCylClosedSurfTm( const Frame3d& frCyl, double dR, double dH, double dSafeDist, const ISurfTriMesh& Stm) ;
// Il sistema di riferimento deve avere l'asse di simmetria del cilindro come asse Z e origine nel centro della base.
// La distanza di sicurezza ha effetto solo se maggiore di EPS_SMALL, altrimenti è ignorata ed è ininfluente.
// Il sistema di riferimento del cilindro è riferito a quello della superficie.
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeCylClosedSurfTm( const Frame3d& frCyl, double dR, double dH, const ISurfTriMesh& Stm, double dSafeDist) ;
+5 -1
View File
@@ -26,6 +26,10 @@
// Il sistema di riferimento deve avere l'origine nel centro della Base, asse X lungo
// un segmento della stessa e asse Z ortogonale alle basi e diretto verso la base Top.
// Il sistema di riferimento della piramide deve essere immerso in quello della superficie.
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeRectPrismoidClosedSurfTm( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY,
double dLenghtTopX, double dLenghtTopY, double dHeight,
double dSafeDist, const ISurfTriMesh& Stm) ;
const ISurfTriMesh& Stm, double dSafeDist) ;
+5 -1
View File
@@ -23,4 +23,8 @@
#endif
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeSpheClosedSurfTm( const Point3d& ptCen, double dR, double dSafeDist, const ISurfTriMesh& Stm) ;
// La funzione restituisce :
// - true in caso di collisione o inconsistenza dei parametri di input
// - false in caso di assenza di collisione.
//----------------------------------------------------------------------------
EGK_EXPORT bool CDeSpheClosedSurfTm( const Point3d& ptCen, double dR, const ISurfTriMesh& Stm, double dSafeDist) ;
+35
View File
@@ -39,5 +39,40 @@ SaveGeoObj( IGeoObj* pGObj, const std::string& sFile, int nFlag = GDB_SV_BIN)
// rimuovo l'oggetto dal GeomDB
bOk = ( pGeomDB->RemoveGeoObjAndErase( nId) != nullptr) && bOk ;
return bOk ;
}
//----------------------------------------------------------------------------
bool
SaveGeoObj( std::vector<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 ;
}
+63
View File
@@ -0,0 +1,63 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkIntersCurveSurfTm.h Data : 23.02.24 Versione : 2.6b4
// Contenuto : Dichiarazione della classe intersezione Curva/SurfTriMesh.
//
//
//
// Modifiche : 23.02.24 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h"
#include "/EgtDev/Include/EGkIntersLineTria.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
//! dati di intersezione curva - superficie trimesh
struct IntCrvStmInfo {
int nILTT ; //!< tipo di intersezione curva-triangolo
double dU ; //!< parametro sulla curva (non distanza)
double dU2 ; //!< secondo parametro sulla curva (non distanza)
int nT ; //!< indice del triangolo della superficie trimesh
double dCosDN ; //!< coseno dell'angolo tra la direzione della curva e la normale del triangolo
Point3d ptI ; //!< punto di intersezione
Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto)
// costruttori
IntCrvStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2() {}
IntCrvStmInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP)
: nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {}
IntCrvStmInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2)
: nILTT( nIL), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {}
} ;
//! vettore di IntCrvStmInfo
typedef std::vector<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) ;
+15 -3
View File
@@ -29,14 +29,14 @@
//! dati di intersezione linea - superficie trimesh
struct IntLinStmInfo {
int nILTT ; //!< tipo di intersezione linea-triangolo
double dU ; //!< parametro sulla linea
double dU2 ; //!< secondo parametro sulla linea
double dU ; //!< distanza sulla linea
double dU2 ; //!< seconda distanza sulla linea
int nT ; //!< indice del triangolo della superficie trimesh
double dCosDN ; //!< coseno dell'angolo tra la direzione della linea e la normale del triangolo
Point3d ptI ; //!< punto di intersezione
Point3d ptI2 ; //!< secondo punto di intersezione (termine di tratto sovrapposto)
// costruttori
IntLinStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2() {}
IntLinStmInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT( 0), dCosDN( 0), ptI(), ptI2() {}
IntLinStmInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP)
: nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2() {}
IntLinStmInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2)
@@ -45,6 +45,15 @@ struct IntLinStmInfo {
//! vettore di IntLinStmInfo
typedef std::vector<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,
ILSIVECTOR& vInfo, bool bFinite = true) ;
@@ -62,3 +71,6 @@ class IntersParLinesSurfTm
const ISurfTriMesh* m_pSTm ;
HashGrids2d m_HGrids ;
} ;
//-----------------------------------------------------------------------------
EGK_EXPORT bool FilterLineSurfTmInters( const ILSIVECTOR& vInfo, INTDBLVECTOR& vInters) ;
+6 -6
View File
@@ -23,12 +23,6 @@
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
EGK_EXPORT int IntersLineTria( const Point3d& ptL1, const Point3d& ptL2, const Triangle3d& trTria,
Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ;
EGK_EXPORT int IntersLineTria( const Point3d& ptL, const Vector3d& vtL, double dLen, const Triangle3d& trTria,
Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ;
//-----------------------------------------------------------------------------
// Tipo di intersezione linea-triangolo
enum IntLineTriaType { ILTT_NO = 0, // non c'è intersezione
@@ -37,3 +31,9 @@ enum IntLineTriaType { ILTT_NO = 0, // non c'
ILTT_VERT = 3, // intersezione coincide con un vertice
ILTT_EDGE = 4, // intersezione coincide con interno di un lato
ILTT_IN = 5} ; // intersezione in interno del triangolo
//-----------------------------------------------------------------------------
EGK_EXPORT int IntersLineTria( const Point3d& ptL1, const Point3d& ptL2, const Triangle3d& trTria,
Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ;
EGK_EXPORT int IntersLineTria( const Point3d& ptL, const Vector3d& vtL, double dLen, const Triangle3d& trTria,
Point3d& ptInt, Point3d& ptInt2, bool bFinite = true) ;
+62
View File
@@ -0,0 +1,62 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkIntersLineVolZmap.h Data : 22.02.24 Versione : 2.6b4
// Contenuto : Dichiarazione prototipi intersezione Linea/VolZmap.
//
//
//
// Modifiche : 22.02.24 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkVolZmap.h"
#include "/EgtDev/Include/EGkIntersLineTria.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
// dati di intersezione linea - volume Zmap
struct IntLineZmapInfo {
int nILTT ; // Tipo di intersezione linea-triangolo
double dU ; // Distanza sulla linea
double dU2 ; // Seconda distanza sulla linea
int nVox ; // Indice del voxel del triangolo
int nBlock ; // Indice del blocco del triangolo
Triangle3d trTria ; // Triangolo
double dCosDN ; // Coseno dell'angolo tra la direzione della linea e la normale del triangolo
Point3d ptI ; // Punto di intersezione
Point3d ptI2 ; // Secondo punto di intersezione (termine di tratto sovrapposto)
// Costruttori
IntLineZmapInfo( void)
: nILTT( ILTT_NO), dU( 0), dU2( 0), nVox( -1), nBlock( -1), trTria(), dCosDN( 0), ptI(), ptI2() {}
IntLineZmapInfo( int nIL, double dUU, int nVx, int nBl, Triangle3d& trTr, double dCos, const Point3d& ptP)
: nILTT( nIL), dU( dUU), dU2( 0), nVox( nVx), nBlock( nBl), dCosDN( dCos), trTria( trTr), ptI( ptP), ptI2() {}
IntLineZmapInfo( int nIL, double dUU, double dUU2, int nVx, int nBl, Triangle3d& trTr, double dCos,
const Point3d& ptP, const Point3d& ptP2)
: nILTT( nIL), dU( dUU), dU2( dUU2), nVox( nVx), nBlock( nBl), trTria( trTr), dCosDN( dCos), ptI( ptP), ptI2( ptP2) {}
} ;
// Vettore di IntLineZmapInfo
typedef std::vector<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) ;
+27
View File
@@ -0,0 +1,27 @@
//----------------------------------------------------------------------------
// EgalTech 2024-2024
//----------------------------------------------------------------------------
// File : EGkIntersPlaneVolZmap.h Data : 22.02.24 Versione : 2.6b4
// Contenuto : Dichiarazione prototipi intersezione Piano/VolZmap.
//
//
//
// Modifiche : 22.02.24 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkVolZmap.h"
//----------------------- Macro per import/export ----------------------------
#undef EGK_EXPORT
#if defined( I_AM_EGK) // da definirsi solo nella DLL
#define EGK_EXPORT __declspec( dllexport)
#else
#define EGK_EXPORT __declspec( dllimport)
#endif
//-----------------------------------------------------------------------------
EGK_EXPORT bool IntersPlaneVolZmap( const Plane3d& plPlane, const IVolZmap& Vzm, ICURVEPOVECTOR& vpLoop) ;
+2 -2
View File
@@ -39,5 +39,5 @@ typedef std::vector<Point5ax> PNT5AXVECTOR ; // vettore di Punti 5assi
//----------------------------------------------------------------------------
// Proiezione di una curva su una superficie TriMesh lungo la direzione data.
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const Vector3d& vtDir, double dLinTol,
PNT5AXVECTOR& vPt5ax) ;
EGK_EXPORT bool ProjectCurveOnSurfTm( const ICurve& crCrv, const ISurfTriMesh& tmSurf, const Vector3d& vtDir,
double dLinTol, double dMaxSegmLen, PNT5AXVECTOR& vPt5ax) ;
+8 -5
View File
@@ -1,19 +1,20 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2015
// EgalTech 2015-2024
//----------------------------------------------------------------------------
// File : EGkStmFromCurves.h Data : 01.02.15 Versione : 1.6b1
// File : EGkStmFromCurves.h Data : 27.02.24 Versione : 2.6b4
// Contenuto : Dichiarazione della classe StmFromTriangleSoup.
//
//
//
// Modifiche : 19.05.14 DS Creazione modulo.
//
// 27.02.24 DS Aggiunta GetSurfTriMeshTransSwept.
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EGkCurve.h"
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h"
//----------------------- Macro per import/export ----------------------------
@@ -39,7 +40,9 @@ EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByRevolve( const ICurve* pCurve, const Po
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshByScrewing( const ICurve* pCurve, const Point3d& ptAx, const Vector3d& vtAx,
double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRectSwept( double dDimH, double dDimV, double dBevelH, double dBevelV,
const ICurve* pGuide, int nCapType, double dLinTol) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
const ICurve* pGuide, int nCapType, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL, Vector3d* vtStatic = nullptr) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshSwept( const ISurfFlatRegion* pSfrSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL, Vector3d* vtStatic = nullptr) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshTransSwept( const ICurve* pSect, const ICurve* pGuide, bool bCapEnds, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const Point3d& ptP, const ICurve* pCurve, double dLinTol = 10 * EPS_SMALL) ;
EGK_EXPORT ISurfTriMesh* GetSurfTriMeshRuled( const ICurve* pCurve1, const ICurve* pCurve2, int nType, double dLinTol = 10 * EPS_SMALL) ;
+11 -39
View File
@@ -15,35 +15,9 @@
#pragma once
#include "/EgtDev/Include/EGkGeoObj.h"
#include "/EgtDev/Include/EGkPolyLine.h"
#include "/EgtDev/Include/EGkCurveComposite.h"
#include "/EgtDev/Include/EGkSurfFlatRegion.h"
#include "/EgtDev/Include/EGkSurfTriMesh.h"
#include "/EgtDev/Include/EGkTriangle3d.h"
#include "/EgtDev/Include/EGkIntersLineTria.h"
// ------------------------- STRUTTURE -----------------------------------------------------------
// Informazioni su intersezione linea - volume Zmap
struct IntLineZmapInfo {
int nILTT ; // Tipo di intersezione linea-triangolo
double dU ; // Parametro sulla linea
double dU2 ; // Secondo parametro sulla linea
int nVox ; // Indice del voxel del triangolo
int nBlock ; // Indice del blocco del triangolo
Point3d ptI ; // Punto di intersezione
Point3d ptI2 ; // Secondo punto di intersezione (termine di tratto sovrapposto)
Triangle3d trTria ; // Triangolo
// Costruttori
IntLineZmapInfo( void)
: nILTT( ILTT_NO), dU( 0), dU2( 0), nVox( -1), nBlock( -1), ptI(), ptI2(), trTria() {}
IntLineZmapInfo( int nIL, double dUU, int nVx, int nBl, const Point3d& ptP, Triangle3d& trTr)
: nILTT( nIL), dU( dUU), dU2( 0), nVox( nVx), nBlock( nBl), ptI( ptP), ptI2(), trTria( trTr) {}
IntLineZmapInfo( int nIL, double dUU, double dUU2, int nVx, int nBl,
const Point3d& ptP, const Point3d& ptP2, Triangle3d& trTr)
: nILTT( nIL), dU( dUU), dU2( dUU2), nVox( nVx), nBlock( nBl), ptI( ptP), ptI2( ptP2), trTria( trTr) {}
} ;
// Vettore di IntLineZmapInfo
typedef std::vector<IntLineZmapInfo> ILZIVECTOR ;
//----------------------------------------------------------------------------
class __declspec( novtable) IVolZmap : public IGeoObj
@@ -89,19 +63,17 @@ class __declspec( novtable) IVolZmap : public IGeoObj
const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs,
const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe) = 0 ;
virtual bool GetDepth( const Point3d& ptP, const Vector3d& vtDir, double& dInLength, double& dOutLength, bool bExact) const = 0 ;
virtual bool GetLineIntersection( const Point3d& ptP, const Vector3d& vtD, ILZIVECTOR& vIntersInfo) const = 0 ;
virtual bool GetPlaneIntersection( const Plane3d& plPlane, ICURVEPOVECTOR& vpLoop) const = 0 ;
virtual bool AvoidBox( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool AvoidSphere( const Point3d& ptCenter, double dRad, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool AvoidCylinder( const Frame3d& frCyl, double dR, double dH, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool AvoidConeFrustum( const Frame3d& frCone, double dRadBot, double dRadTop, double dHeight,
double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool AvoidRectPrismoid( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY,
double dLenghtTopX, double dLenghtTopY, double dHeight,
double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool AvoidTorus( const Frame3d& frTorus, double dRadMax, double dRadMin,
double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool AvoidSurfTm( const ISurfTriMesh& tmSurf, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool CDeBox( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool CDeSphere( const Point3d& ptCenter, double dRad, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool CDeCylinder( const Frame3d& frCyl, double dR, double dH, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool CDeConeFrustum( const Frame3d& frCone, double dRadBot, double dRadTop, double dHeight,
double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool CDeRectPrismoid( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY,
double dLenghtTopX, double dLenghtTopY, double dHeight,
double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool CDeTorus( const Frame3d& frTorus, double dRadMax, double dRadMin,
double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool CDeSurfTm( const ISurfTriMesh& tmSurf, double dSafeDist, bool bPrecise = false) const = 0 ;
virtual bool Cut( const Plane3d& plPlane) = 0 ;
virtual bool Compact( void) = 0 ;
virtual int GetPartCount( void) const = 0 ;
+4 -2
View File
@@ -1,13 +1,13 @@
//----------------------------------------------------------------------------
// EgalTech 2014-2024
//----------------------------------------------------------------------------
// File : EGrScene.h Data : 09.01.24 Versione : 2.5l7
// File : EGrScene.h Data : 16.02.24 Versione : 2.6b4
// Contenuto : Dichiarazione della interfaccia IEGrScene per scena OpenGL.
//
//
//
// Modifiche : 13.02.14 DS Creazione modulo.
//
// 16.02.24 DS Aggiunte Set/Get CameraDirOrizzOffset.
//
//----------------------------------------------------------------------------
@@ -57,10 +57,12 @@ class IEGrScene
virtual void Destroy( void) = 0 ;
// Camera
virtual bool SetCenter( const Point3d& ptCenter) = 0 ;
virtual bool SetCameraDirOrizzOffset( int nRightStepOffset = 0) = 0 ;
virtual bool SetCamera( double dAngVertDeg, double dAngOrizzDeg, double dDist) = 0 ;
virtual bool SetCamera( int nDir, double dDist = 0) = 0 ;
virtual const Point3d& GetCenter( void) const = 0 ;
virtual Point3d GetProjectedCenter( void) const = 0 ;
virtual int GetCameraDirOrizzOffset( void) const = 0 ;
virtual void GetCamera( double* pdAngVertDeg, double* pdAngOrizzDeg, double* pdDist = nullptr) const = 0 ;
virtual int GetCameraDir( void) const = 0 ;
virtual const Vector3d& GetCameraUp( void) const = 0 ;
-8
View File
@@ -78,14 +78,6 @@ enum CLiType { CLT_NONE = 0,
CLT_TGINI_OUT = 7,
CLT_TGFIN_OUT = 8} ;
//----------------- Costanti tipo punto intersezione Linea SurfTriMesh ---------
enum SLiType { SLT_NONE = 0,
SLT_IN = 1,
SLT_OUT = 2,
SLT_TG_INI = 3,
SLT_TG_FIN = 4,
SLT_TOUCH = 5} ;
//----------------- Costanti tipo di costruzione di superficie rigata ----------
enum RuledType{ RUL_TYPE_ISOPAR = 0, // come ISurfTrimesh::RLT_ISOPAR
RUL_TYPE_MINDIST = 1, // come ISurfTrimesh::RLT_MINDIST
+9 -3
View File
@@ -354,7 +354,8 @@ EXE_EXPORT int ExeCreateSurfTmByScrewing( int nParentId, int nCrvId,
double dAngRotDeg, double dMove, bool bCapEnds, double dLinTol, int nRefType) ;
EXE_EXPORT int ExeCreateSurfTmRectSwept( int nParentId, double dDimH, double dDimV, double dBevelH, double dBevelV,
int nGuideId, int nCapType, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol, Vector3d* vtStatic = nullptr) ;
EXE_EXPORT int ExeCreateSurfTmTransSwept( int nParentId, int nSectId, int nGuideId, bool bCapEnds, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmRuled( int nParentId, int nPtOrCrvId1, int nPtOrCrvId2, int nType, double dLinTol) ;
EXE_EXPORT int ExeCreateSurfTmByTriangles( int nParentId, const INTVECTOR& vIds, bool bErase) ;
EXE_EXPORT int ExeCreateSurfTmBySewing( int nParentId, const INTVECTOR& vIds, bool bErase) ;
@@ -540,7 +541,7 @@ EXE_EXPORT bool ExeInvertCurve( const INTVECTOR& vIds) ;
EXE_EXPORT bool ExeOffsetCurve( int nId, double dDist, int nType) ;
EXE_EXPORT int ExeOffsetCurveAdv( int nId, double dDist, int nType, int* pnCount, double dLinTol = 10 * EPS_SMALL) ;
EXE_EXPORT int ExeCurveMedialAxis( int nId) ;
EXE_EXPORT bool ExeApproxCurve( int nId, int nApprType, double dLinTol) ;
EXE_EXPORT bool ExeApproxCurve( int nId, int nApprType, double dLinTol, double dMaxSegmLen = INFINITO) ;
EXE_EXPORT bool ExeProjectCurveOnPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, int nRefType) ;
EXE_EXPORT bool ExeChangeClosedCurveStart( int nId, double dU) ;
EXE_EXPORT bool ExeChangeClosedCurveStartPoint( int nId, const Point3d& ptP, int nRefType) ;
@@ -592,7 +593,8 @@ EXE_EXPORT bool ExeMergeCurvesInCurveCompo( int nId, double dLinTol, bool bStart
EXE_EXPORT bool ExeRemoveCurveCompoUndercutOnY( int nId, double dLinTol) ;
EXE_EXPORT bool ExeChainCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType) ;
EXE_EXPORT bool ExeReorderCurvesInGroup( int nGroupId, const Point3d& ptNear, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurfTm( int nCurveId, int nSurfTmId, const Vector3d& vtDir, int nDestGrpId, double dLinTol, int nRefType) ;
EXE_EXPORT bool ExeProjectCurveOnSurfTm( int nCurveId, int nSurfTmId, const Vector3d& vtDir, int nDestGrpId,
double dLinTol, double dMaxSegmLen, int nRefType) ;
EXE_EXPORT int ExeCurveGetVoronoi( int nId, int nDestGrpId, int nBound, int* pnCount) ;
EXE_EXPORT int ExeCurveGetMedialAxis( int nId, int nDestGrpId, int nSide, int* pnCount) ;
EXE_EXPORT int ExeCurveGetFatCurve( int nId, int nDestGrpId, double dRad, bool bSquareEnds, bool bSquareMids, int* pnCount) ;
@@ -821,6 +823,8 @@ EXE_EXPORT int ExePlaneVolZmapInters( const Point3d& ptOn, const Vector3d& vtN,
int* pnCount) ;
EXE_EXPORT int ExeCurveCurveInters( const int nId1, const int nId2, const int nDestGrpId,
int* pnPntCount, int* pnCrvCount) ;
EXE_EXPORT int ExeCurveSurfTmInters( const int nCrvId, const int nStmId, const int nDestGrpId,
int* pnPntCount, int* pnCrvCount) ;
EXE_EXPORT int ExeSurfTmSurfTmInters( int nId1, int nId2, int nDestGrpId, double dToler,
int* pnPntCount, int* pnCrvCount, int* pnSrfCount) ;
@@ -1262,11 +1266,13 @@ EXE_EXPORT bool ExeResetGeoTria( bool bRedraw) ;
EXE_EXPORT bool ExeSetWinRect( int nPrevX, int nPrevY, int nCurrX, int nCurrY, bool bRedraw) ;
EXE_EXPORT bool ExeResetWinRect( bool bRedraw) ;
EXE_EXPORT bool ExeZoomWin( int nPrevX, int nPrevY, int nCurrX, int nCurrY, bool bRedraw) ;
EXE_EXPORT bool ExeSetViewOrizzOffsStep( int nDirOffsStep = 0) ;
EXE_EXPORT bool ExeSetView( int nDir, bool bRedraw) ;
EXE_EXPORT bool ExeSetGenericView( double dAngVertDeg, double dAngHorizDeg, bool bRedraw) ;
EXE_EXPORT bool ExeSetViewCenter( const Point3d& ptP, bool bRedraw) ;
EXE_EXPORT bool ExePanView( int nPrevX, int nPrevY, int nCurrX, int nCurrY, bool bRedraw) ;
EXE_EXPORT bool ExeRotateView( int nPrevX, int nPrevY, int nCurrX, int nCurrY, bool bRedraw) ;
EXE_EXPORT bool ExeGetViewOrizzOffsStep( int* pnDirOffsStep) ;
EXE_EXPORT bool ExeGetView( int* pnDir) ;
EXE_EXPORT bool ExeGetGenericView( double* pdAngVertDeg, double* pdAngHorizDeg) ;
EXE_EXPORT bool ExeGetViewUp( Vector3d& vtUp) ;
+2 -2
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2024
//----------------------------------------------------------------------------
// File : EgtKeyCodes.h Data : 16.01.24 Versione : 2.65a1
// File : EgtKeyCodes.h Data : 16.01.24 Versione : 2.6a1
// Contenuto : Costanti per codici di protezione librerie di base.
//
//
@@ -25,7 +25,7 @@
//----------------------------------------------------------------------------
const int KEY_BASELIB_PROD = 207 ;
const int KEY_BASELIB_VER = 2602 ;
const int KEY_BASELIB_VER = 2603 ;
const int KEY_BASELIB_LEV = 1 ;
//----------------------------------------------------------------------------