From b99b1ec6d397d919054f4d75fd6610da626403d5 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 13 May 2019 06:40:42 +0000 Subject: [PATCH] Include : - aggiornamento prototipi. --- EGkVolZmap.h | 28 ++++++++++++++++++++++++++-- EXeExecutor.h | 1 + 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/EGkVolZmap.h b/EGkVolZmap.h index 4e9f9ac..ee6fd14 100644 --- a/EGkVolZmap.h +++ b/EGkVolZmap.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2015-2015 +// EgalTech 2015-2019 //---------------------------------------------------------------------------- -// File : EgkVolZmap.h Data : 22.01.15 Versione : 1.6a4 +// File : EgkVolZmap.h Data : 12.05.19 Versione : 2.1e3 // Contenuto : Dichiarazione della interfaccia IVolZmap. // // @@ -19,7 +19,30 @@ #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 ILZIVECTOR ; //---------------------------------------------------------------------------- class __declspec( novtable) IVolZmap : public IGeoObj @@ -51,6 +74,7 @@ class __declspec( novtable) IVolZmap : public IGeoObj virtual bool MillingStep( 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) const = 0 ; virtual bool AvoidSphere( const Point3d& ptCenter, double dRad, double dSafeDist) const = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 7d0b0a5..eb60176 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -610,6 +610,7 @@ EXE_EXPORT int ExePlaneSurfTmInters( const Point3d& ptOn, const Vector3d& vtN, int* pnPntCount, int* pnCrvCount, int* pnSrfCount) ; EXE_EXPORT int ExeSurfTmSurfTmInters( int nId1, int nId2, int nDestGrpId, int* pnPntCount, int* pnCrvCount, int* pnSrfCount) ; +EXE_EXPORT bool ExeLineVolZmapInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRefType, INTDBLVECTOR& vInters) ; EXE_EXPORT int ExePlaneVolZmapInters( const Point3d& ptOn, const Vector3d& vtN, int nId, int nDestGrpId, int nRefType, int* pnCount) ;