EgtGeomKernel :

- piccole migliorie in Tool Collision Avoid.
This commit is contained in:
Dario Sassi
2018-07-25 06:58:29 +00:00
parent 280d414e30
commit d0fb939541
2 changed files with 10 additions and 7 deletions
+5 -6
View File
@@ -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 ;
+5 -1
View File
@@ -176,7 +176,7 @@ copy $(TargetPath) \EgtProg\DllD64</Command>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;_WINDOWS;I_AM_EGK;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<OpenMPSupport>true</OpenMPSupport>
<OpenMPSupport>false</OpenMPSupport>
<CompileAs>CompileAsCpp</CompileAs>
<FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
<InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
@@ -185,6 +185,10 @@ copy $(TargetPath) \EgtProg\DllD64</Command>
<OmitFramePointers>true</OmitFramePointers>
<FloatingPointModel>Precise</FloatingPointModel>
<EnablePREfast>false</EnablePREfast>
<AdditionalOptions>
</AdditionalOptions>
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
<EnableParallelCodeGeneration>false</EnableParallelCodeGeneration>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>