From d0fb9395419d2c5044aa5d1f5eac8ce9cedff428 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 25 Jul 2018 06:58:29 +0000 Subject: [PATCH] EgtGeomKernel : - piccole migliorie in Tool Collision Avoid. --- CAvToolSurfTm.cpp | 11 +++++------ EgtGeomKernel.vcxproj | 6 +++++- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CAvToolSurfTm.cpp b/CAvToolSurfTm.cpp index 5872799..9b14181 100644 --- a/CAvToolSurfTm.cpp +++ b/CAvToolSurfTm.cpp @@ -122,7 +122,7 @@ CAvToolSurfTm::TestPath( PNTULIST& lPntM, const Vector3d& vtDir, double dLinTol) ptPrev = ptCurr ; itPntMPrev = itPntMCurr ; ++ itPntMCurr ; - // gestione eventi (ogni 200 punti) + // gestione eventi (ogni 50 punti) ++ nCurr ; if ( ( nCurr % 50) == 0) { int nRes = ProcessEvents( int( nCurr * 100. / nCount), 0) ; @@ -133,7 +133,7 @@ CAvToolSurfTm::TestPath( PNTULIST& lPntM, const Vector3d& vtDir, double dLinTol) } } } - // evnto completamento + // evento completamento ProcessEvents( 100, 0) ; // pulisco HashGrid 2d m_HGrids.Clear() ; @@ -230,7 +230,6 @@ CAvToolSurfTm::MyTestPositionHG( Point3d& ptT, const Vector3d& vtDir) b3Tool.Expand( m_Tool.GetRadius(), m_Tool.GetRadius(), 0) ; b3Tool.ToLoc( m_frMove) ; } - b3Tool.Expand( 10 * EPS_SMALL) ; // ciclo sui triangoli che intersecano box in 2d double dTotDist = 0 ; INTVECTOR vnIds ; @@ -239,15 +238,15 @@ CAvToolSurfTm::MyTestPositionHG( Point3d& ptT, const Vector3d& vtDir) int nT = vnIds[i] ; Triangle3d Tria ; if ( ! m_pSTm->GetTriangle( nT, Tria)) - return - 1 ; + return -1 ; ++ m_nTriaCAv ; double dDist = CAvToolTriangle( m_Tool, ptT, vtDir, Tria, m_frMove.VersZ()) ; - if ( dDist < - EPS_SMALL) - return -1 ; if ( dDist > EPS_SMALL) { dTotDist += dDist ; ptT += dDist * m_frMove.VersZ() ; } + else if ( dDist < -EPS_SMALL) + return -1 ; } } return dTotDist ; diff --git a/EgtGeomKernel.vcxproj b/EgtGeomKernel.vcxproj index 849934a..b270900 100644 --- a/EgtGeomKernel.vcxproj +++ b/EgtGeomKernel.vcxproj @@ -176,7 +176,7 @@ copy $(TargetPath) \EgtProg\DllD64 true true WIN32;_WINDOWS;I_AM_EGK;NDEBUG;%(PreprocessorDefinitions) - true + false CompileAsCpp Speed AnySuitable @@ -185,6 +185,10 @@ copy $(TargetPath) \EgtProg\DllD64 true Precise false + + + false + false Windows