EgtGeomKernel :

- piccole modifiche a Collision Avoding.
This commit is contained in:
Dario Sassi
2018-05-21 07:24:19 +00:00
parent 5fb64bdb3f
commit 3ff5af8872
3 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -127,7 +127,7 @@ CAvToolSurfTm::MyTestMidPointHG( PNTULIST& lPntM, const PNTULIST::iterator& itPn
return false ;
// se oltre tolleranza dalla linea tra i punti includenti, devo aggiungerlo
double dSqDist ;
if ( DistPointLine( ptNewMid, itPntMPrev->first, itPntMCurr->first).GetSqDist( dSqDist) && dSqDist > dLinTol * dLinTol) {
if ( DistPointLine( ptNewMid, itPntMPrev->first, itPntMCurr->first).GetSqDist( dSqDist) && dSqDist > 0.25 * dLinTol * dLinTol) {
// aggiungo
lPntM.emplace( itPntMCurr, ptNewMid, - dMidMove) ;
auto itPntMMid = itPntMCurr ;
@@ -225,7 +225,7 @@ CAvToolSurfTm::PrepareHashGrid( void)
if ( m_pSTm == nullptr || ! m_pSTm->IsValid())
return false ;
// creo HashGrid 2d
const int LIM_HG_TRIA = 128 ;
const int LIM_HG_TRIA = 256 ;
m_HGrids.SetActivationGrid( m_pSTm->GetTriangleCount() > LIM_HG_TRIA) ;
// riempio HashGrid
Triangle3d Tria ;