//---------------------------------------------------------------------------- // 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 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) ;