Include :

- aggiornamento prototipi.
This commit is contained in:
Dario Sassi
2024-02-26 15:16:24 +01:00
parent 270bb60b26
commit b3d5483564
8 changed files with 175 additions and 45 deletions
+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) ;
-28
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,8 +63,6 @@ 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 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 ;
-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
+2
View File
@@ -822,6 +822,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) ;