From 4ffdb0ce199b164a762997c6053d4507494bfa40 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Mon, 28 Dec 2020 18:55:58 +0000 Subject: [PATCH] Include : - aggiornamenti prototipi vari. --- EGkCDeCylClosedSurfTm.h | 2 +- ...sedSurfTm.h => EGkCDeRectPrismoidClosedSurfTm.h | 14 +++++++------- EGkVolZmap.h | 14 +++++++------- EXeExecutor.h | 6 +++++- EgtKeyCodes.h | 2 +- EgtStringConverter.h | 4 ++-- 6 files changed, 23 insertions(+), 19 deletions(-) rename EGkCDeGenPyramidClosedSurfTm.h => EGkCDeRectPrismoidClosedSurfTm.h (61%) diff --git a/EGkCDeCylClosedSurfTm.h b/EGkCDeCylClosedSurfTm.h index 2007e04..189e1ae 100644 --- a/EGkCDeCylClosedSurfTm.h +++ b/EGkCDeCylClosedSurfTm.h @@ -23,4 +23,4 @@ #endif //---------------------------------------------------------------------------- -EGK_EXPORT bool CDeCylClosedSurfTm( const Frame3d& frCyl, double dH, double dR, double dSafeDist, const ISurfTriMesh& Stm) ; +EGK_EXPORT bool CDeCylClosedSurfTm( const Frame3d& frCyl, double dR, double dH, double dSafeDist, const ISurfTriMesh& Stm) ; diff --git a/EGkCDeGenPyramidClosedSurfTm.h b/EGkCDeRectPrismoidClosedSurfTm.h similarity index 61% rename from EGkCDeGenPyramidClosedSurfTm.h rename to EGkCDeRectPrismoidClosedSurfTm.h index 49daebd..5ad830a 100644 --- a/EGkCDeGenPyramidClosedSurfTm.h +++ b/EGkCDeRectPrismoidClosedSurfTm.h @@ -1,9 +1,9 @@ //---------------------------------------------------------------------------- // EgalTech 2020-2020 //---------------------------------------------------------------------------- -// File : EGkCDePyramidClosedSurfTm.h Data : 09.11.20 Versione : +// File : EGkCDeRectPrismoidClosedSurfTm.h Data : 09.11.20 Versione : // Contenuto : Dichiarazione funzione verifica collisione tra -// piramide e Closed SurfTriMesh. +// prismoide a basi rettangolari e Closed SurfTriMesh. // // Modifiche : 09.11.20 LM Creazione modulo. // @@ -23,9 +23,9 @@ #endif //---------------------------------------------------------------------------- -// Il sisitema di riferimento deve avere l'origine nel centro della base Base, asse X lungo -// un segmento della stessa e asse Z ortogonale alle basi e diretta verso la base Top. +// 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. -EGK_EXPORT bool CDeGenPyramidTria( const Frame3d& frPyrFrame, double dLenghtBaseX, double dLenghtBaseY, - double dLenghtTopX, double dLenghtTopY, double dHeight, - double dSafeDist, const ISurfTriMesh& Stm) ; \ No newline at end of file +EGK_EXPORT bool CDeRectPrismoidClosedSurfTm( const Frame3d& frPrismoid, double dLenghtBaseX, double dLenghtBaseY, + double dLenghtTopX, double dLenghtTopY, double dHeight, + double dSafeDist, const ISurfTriMesh& Stm) ; \ No newline at end of file diff --git a/EGkVolZmap.h b/EGkVolZmap.h index c30cff8..1424aec 100644 --- a/EGkVolZmap.h +++ b/EGkVolZmap.h @@ -82,13 +82,13 @@ class __declspec( novtable) IVolZmap : public IGeoObj 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 dH, double dR, double dSafeDist, bool bPrecise = false) const = 0 ; - virtual bool AvoidTruncatedCone( const Frame3d& frConeFrame, double dRadTop, double dRadBot, double dHeight, - double dSafeDist, bool bPrecise = false) const = 0 ; - virtual bool AvoidTruncatedPyramid( const Frame3d& frGenPyrFrame, double dLenghtBaseX, double dLenghtBaseY, - double dLenghtTopX, double dLenghtTopY, double dHeight, - double dSafeDist, bool bPrecise = false) const = 0 ; - virtual bool AvoidTorus( const Frame3d& frTorusFrame, double dRadMax, double dRadMin, + 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 Cut( const Plane3d& plPlane) = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index 1df4e0b..1ec7a24 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -707,7 +707,11 @@ EXE_EXPORT int ExePlaneVolZmapInters( const Point3d& ptOn, const Vector3d& vtN, // Collision Detection EXE_EXPORT int ExeCDeBoxSolid( const Frame3d& frBox, const Vector3d& vtDiag, int nSolidId, double dSafeDist, int nRefType) ; -EXE_EXPORT int ExeCDeCylSolid( const Frame3d& frCyl, double dH, double dR, int nSolidId, double dSafeDist, int nRefType) ; +EXE_EXPORT int ExeCDeRectPrismoidSolid( const Frame3d& frPrismoid, double dBaseLenX, double dBaseLenY, + double dTopLenX, double dTopLenY, double dHeight, + int nSolidId, double dSafeDist, int nRefType) ; +EXE_EXPORT int ExeCDeCylSolid( const Frame3d& frCyl, double dR, double dH, int nSolidId, double dSafeDist, int nRefType) ; +EXE_EXPORT int ExeCDeConeSolid( const Frame3d& frCone, double dR1, double dR2, double dH, int nSolidId, double dSafeDist, int nRefType) ; EXE_EXPORT int ExeCDeSpheSolid( const Point3d& ptCen, double dR, int nSolidId, double dSafeDist, int nRefType) ; // Maximum Filler diff --git a/EgtKeyCodes.h b/EgtKeyCodes.h index 78b2193..bcf6cad 100644 --- a/EgtKeyCodes.h +++ b/EgtKeyCodes.h @@ -21,7 +21,7 @@ //---------------------------------------------------------------------------- const int KEY_BASELIB_PROD = 207 ; -const int KEY_BASELIB_VER = 22 ; +const int KEY_BASELIB_VER = 2301 ; const int KEY_BASELIB_LEV = 1 ; //---------------------------------------------------------------------------- diff --git a/EgtStringConverter.h b/EgtStringConverter.h index 976c5de..c9d4c3d 100644 --- a/EgtStringConverter.h +++ b/EgtStringConverter.h @@ -232,7 +232,7 @@ class WtoAEX return ; } int nLengthW = lstrlenW( psz) + 1 ; - int nLengthA = std::max( 2 * nLengthW, t_nBufferLength) ; + int nLengthA = ( 2 * nLengthW >= t_nBufferLength ? 2 * nLengthW : t_nBufferLength) ; SmartAllocMemory( &m_psz, nLengthA, m_szBuffer, t_nBufferLength) ; @@ -275,7 +275,7 @@ class wcharBuffer wchar_t* data( void) { return m_wBuffer.data() ; } void terminate( size_t nLen) - { nLen = std::min( nLen, m_wBuffer.size() - 1) ; + { nLen = ( nLen <= m_wBuffer.size() - 1 ? nLen : m_wBuffer.size() - 1) ; m_wBuffer[nLen] = '\0' ; } private :