EgtGeomKernel :
- piccole modifiche a Collision Avoding.
This commit is contained in:
+2
-2
@@ -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 ;
|
||||
|
||||
@@ -27,6 +27,10 @@ class CAvToolSurfTm : public ICAvToolSurfTm
|
||||
bool SetMoveDir( const Vector3d& vtrMove) override ;
|
||||
bool SetStdTool( double dH, double dR, double dCornR) override ;
|
||||
bool SetAdvTool( double dH, double dR, double dTipH, double dTipR, double dCornR) override ;
|
||||
double GetToolRadius( void) override
|
||||
{ return m_Tool.GetRadius() ; }
|
||||
double GetToolHeight( void) override
|
||||
{ return m_Tool.GetHeigth() ; }
|
||||
bool TestPosition( const Point3d& ptT, const Vector3d& vtDir, double& dTotDist) override ;
|
||||
bool TestPath( PNTULIST& lPntM, const Vector3d& vtDir, double dLinTol) override ;
|
||||
|
||||
|
||||
@@ -654,8 +654,7 @@ SurfTriMesh::CloneFacet( int nF) const
|
||||
return nullptr ;
|
||||
// tabella hash per indici vertici (vecchi e nuovi indici)
|
||||
typedef unordered_map<int,int> VVMAP ;
|
||||
VVMAP PntMap ;
|
||||
PntMap.rehash( nTria + 2) ;
|
||||
VVMAP PntMap( nTria + 2) ;
|
||||
// inserisco i triangoli nella nuova superficie
|
||||
for ( int i = 0 ; i < nTria ; ++ i) {
|
||||
// indice del triangolo
|
||||
|
||||
Reference in New Issue
Block a user