diff --git a/EGkCDeBoxClosedSurfTm.h b/EGkCDeBoxClosedSurfTm.h new file mode 100644 index 0000000..5778093 --- /dev/null +++ b/EGkCDeBoxClosedSurfTm.h @@ -0,0 +1,27 @@ +//---------------------------------------------------------------------------- +// EgalTech 2016-2020 +//---------------------------------------------------------------------------- +// File : EGkCDeBoxClosedSurfTm.h Data : 09.01.20 Versione : 2.2a2 +// Contenuto : Dichiarazione funzione verifica collisione tra +// BoundingBox e Closed SurfTriMesh. +// +// Modifiche : 05.10.16 DS Creazione modulo. +// 09.01.20 DS Cambio nome alla funzione e cambio parametri. +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkBBox3d.h" +#include "/EgtDev/Include/EGkSurfTriMesh.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 CDeBoxClosedSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, const ISurfTriMesh& Stm) ; diff --git a/EGkCDeBoxTria.h b/EGkCDeBoxTria.h index 439c3a6..77e024a 100644 --- a/EGkCDeBoxTria.h +++ b/EGkCDeBoxTria.h @@ -1,12 +1,12 @@ //---------------------------------------------------------------------------- -// EgalTech 2016-2018 +// EgalTech 2016-2020 //---------------------------------------------------------------------------- -// File : EGkCDeBoxTria.h Data : 28.04.18 Versione : 1.9e1 +// File : EGkCDeBoxTria.h Data : 09.01.20 Versione : 2.2a2 // Contenuto : Dichiarazione funzione verifica collisione tra // BoundingBox e Triangle3d. // // Modifiche : 05.10.16 DS Creazione modulo. -// +// 09.01.20 DS Cambiati parametri. // //---------------------------------------------------------------------------- @@ -24,4 +24,4 @@ #endif //---------------------------------------------------------------------------- -EGK_EXPORT bool CDeBoxTria( const BBox3d& b3Box, const Triangle3d& trTria) ; +EGK_EXPORT bool CDeBoxTria( const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, const Triangle3d& trTria) ; diff --git a/EGkCDeCylClosedSurfTm.h b/EGkCDeCylClosedSurfTm.h new file mode 100644 index 0000000..2007e04 --- /dev/null +++ b/EGkCDeCylClosedSurfTm.h @@ -0,0 +1,26 @@ +//---------------------------------------------------------------------------- +// EgalTech 2020-2020 +//---------------------------------------------------------------------------- +// File : EGkCDeCylClosedSurfTm.h Data : 09.01.20 Versione : 2.2a2 +// Contenuto : Dichiarazione funzione verifica collisione tra +// Cylinder e Closed SurfTriMesh. +// +// Modifiche : 09.01.20 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkSurfTriMesh.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 CDeCylClosedSurfTm( const Frame3d& frCyl, double dH, double dR, double dSafeDist, const ISurfTriMesh& Stm) ; diff --git a/EGkCDeCylTria.h b/EGkCDeCylTria.h new file mode 100644 index 0000000..be7e305 --- /dev/null +++ b/EGkCDeCylTria.h @@ -0,0 +1,26 @@ +//---------------------------------------------------------------------------- +// EgalTech 2020-2020 +//---------------------------------------------------------------------------- +// File : EGkCDeCylTria.h Data : 09.01.20 Versione : 2.2a2 +// Contenuto : Dichiarazione funzione verifica collisione tra +// Cylinder e Triangle3d. +// +// Modifiche : 09.01.20 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkTriangle3d.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 CDeCylTria( const Frame3d& frCyl, double dH, double dR, double dSafeDist, const Triangle3d& trTria) ; diff --git a/EGkCDeBoxPolyhedron.h b/EGkCDeSpheClosedSurfTm.h similarity index 68% rename from EGkCDeBoxPolyhedron.h rename to EGkCDeSpheClosedSurfTm.h index 72c426a..abbb59a 100644 --- a/EGkCDeBoxPolyhedron.h +++ b/EGkCDeSpheClosedSurfTm.h @@ -1,18 +1,17 @@ //---------------------------------------------------------------------------- -// EgalTech 2016-2018 +// EgalTech 2020-2020 //---------------------------------------------------------------------------- -// File : EGkCDeBoxPolyhedron.h Data : 28.04.18 Versione : 1.9e1 +// File : EGkCDeSpheClosedSurfTm.h Data : 09.01.20 Versione : 2.2a2 // Contenuto : Dichiarazione funzione verifica collisione tra -// BoundingBox e Polyhedron. +// Sphere e Closed SurfTriMesh. // -// Modifiche : 05.10.16 DS Creazione modulo. +// Modifiche : 09.01.20 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once -#include "/EgtDev/Include/EGkBBox3d.h" #include "/EgtDev/Include/EGkSurfTriMesh.h" //----------------------- Macro per import/export ---------------------------- @@ -24,4 +23,4 @@ #endif //---------------------------------------------------------------------------- -EGK_EXPORT bool CDeBoxPolyhedron( const BBox3d& b3Box, const ISurfTriMesh& Stm) ; +EGK_EXPORT bool CDeSpheClosedSurfTm( const Point3d& ptCen, double dR, double dSafeDist, const ISurfTriMesh& Stm) ; diff --git a/EGkCDeSpheTria.h b/EGkCDeSpheTria.h new file mode 100644 index 0000000..f4b650e --- /dev/null +++ b/EGkCDeSpheTria.h @@ -0,0 +1,26 @@ +//---------------------------------------------------------------------------- +// EgalTech 2020-2020 +//---------------------------------------------------------------------------- +// File : EGkCDeSpheTria.h Data : 09.01.20 Versione : 2.2a2 +// Contenuto : Dichiarazione funzione verifica collisione tra +// Sphere e Triangle3d. +// +// Modifiche : 09.01.20 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkTriangle3d.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 CDeSpheTria( const Point3d& ptCen, double dR, double dSafeDist, const Triangle3d& trTria) ; diff --git a/EGkPolygon3d.h b/EGkPolygon3d.h index a2c581d..2a7c520 100644 --- a/EGkPolygon3d.h +++ b/EGkPolygon3d.h @@ -15,6 +15,7 @@ #pragma once #include "/EgtDev/Include/EGkPlane3d.h" +#include "/EgtDev/Include/EGkTriangle3d.h" #include "/EgtDev/Include/EGkPolyLine.h" #include "/EgtDev/Include/EGkGeoCollection.h" @@ -32,6 +33,7 @@ class Polygon3d public : EGK_EXPORT bool Clear( void) ; EGK_EXPORT bool ClearSides( void) ; + EGK_EXPORT bool FromTriangle( const Triangle3d& trTria) ; EGK_EXPORT bool FromRectangle( double dDimX, double dDimY) ; EGK_EXPORT bool FromPolyLine( const PolyLine& PL) ; EGK_EXPORT bool FromPlaneTrimmedWithBox( const Plane3d& plPlane, const Point3d& ptMin, const Point3d& ptMax) ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 9acdbed..72f361b 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -539,9 +539,6 @@ EXE_EXPORT bool ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vecto EXE_EXPORT bool ExeVolZmapGetDepth( int nId, const Point3d& ptP, const Vector3d& vtDir, int nRefType, bool bExact, double& dInLen, double& dOutLen) ; EXE_EXPORT int ExeVolZmapGetEdges( int nId, int nDestGrpId, int* pnCount) ; -EXE_EXPORT bool ExeVolZmapAvoidBox( int nId, const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, int nRefType) ; -EXE_EXPORT bool ExeVolZmapAvoidCylinder( int nId, const Frame3d& frCyl, double dL, double dR, double dSafeDist, int nRefType) ; -EXE_EXPORT bool ExeVolZmapAvoidSphere( int nId, const Point3d& ptCen, double dRad, double dSafeDist, int nRefType) ; EXE_EXPORT bool ExeCutVolZmapPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, int nRefType) ; // Geo Snap Vector/Point/Frame @@ -648,6 +645,14 @@ EXE_EXPORT bool ExeLineVolZmapInters( const Point3d& ptP, const Vector3d& vtDir, EXE_EXPORT int ExePlaneVolZmapInters( const Point3d& ptOn, const Vector3d& vtN, int nId, int nDestGrpId, int nRefType, int* pnCount) ; +// Collision Detection +EXE_EXPORT int ExeCDeBoxClosedSurfTm( const Frame3d& frBox, const Vector3d& vtDiag, int nSurfTmId, double dSafeDist, int nRefType) ; +EXE_EXPORT int ExeCDeCylClosedSurfTm( const Frame3d& frCyl, double dH, double dR, int nSurfTmId, double dSafeDist, int nRefType) ; +EXE_EXPORT int ExeCDeSpheClosedSurfTm( const Point3d& ptCen, double dR, int nSurfTmId, double dSafeDist, int nRefType) ; +EXE_EXPORT bool ExeVolZmapAvoidBox( int nId, const Frame3d& frBox, const Vector3d& vtDiag, double dSafeDist, int nRefType) ; +EXE_EXPORT bool ExeVolZmapAvoidCylinder( int nId, const Frame3d& frCyl, double dL, double dR, double dSafeDist, int nRefType) ; +EXE_EXPORT bool ExeVolZmapAvoidSphere( int nId, const Point3d& ptCen, double dRad, double dSafeDist, int nRefType) ; + // Nesting // CreateFlatParts EXE_EXPORT bool ExeCreateAdjustFlatParts( int nType, double dToler) ;