EgtGeomKernel :

- corretta rotazione senza collisioni di regioni
- migliorata determinazione parametro su curve composite vicino a singolarità.
This commit is contained in:
Dario Sassi
2016-01-12 18:30:57 +00:00
parent 97aa368ab9
commit b41b583b3f
2 changed files with 16 additions and 6 deletions
+10 -4
View File
@@ -140,7 +140,7 @@ MySimpleCDSurfFrMove::Translate( const Vector3d& vtDir, double& dLen)
if ( pLine1 == nullptr || pLine2 == nullptr ||
! TranslateLineNoCollisionLine( pLine1, pLine2, vtDirL, dNewLenXY, scInfoCurr))
return false ;
if ( abs( dNewLenXY - dPrevLenXY) < EPS_SMALL && dNewLenXY < dLenXY - EPS_SMALL ) {
if ( abs( dNewLenXY - dPrevLenXY) < EPS_SMALL) {
if ( scInfoCurr.nType == SCI_LINE_LINE || scInfoCurr.nType == SCI_PNT_LINE) {
m_SCollInfo = scInfoCurr ;
m_SCollInfo.nChunkM = j ;
@@ -363,10 +363,12 @@ MySimpleCDSurfFrMove::TranslateLineNoCollisionLine( const CurveLine* pLine1, con
}
}
// confronto con movimento corrente
if ( abs( dNewLen) < EPS_SMALL)
if ( dNewLen > - 5 * EPS_SMALL && dNewLen < EPS_SMALL)
dLen = 0 ;
else if ( dNewLen > 0)
dLen = min( dLen, dNewLen) ;
else if ( dNewLen > 0 && dNewLen < dLen)
dLen = dNewLen ;
else // non c'è collisione, reset Info
scInfo.nType = SCI_NONE ;
return true ;
}
@@ -460,12 +462,16 @@ MySimpleCDSurfFrMove::RotateLineNoCollisionLine( const CurveLine* pLine1, const
// verifico se gli intervalli radiali si sovrappongono
Vector3d vtDirS1 = ptS1 - ptCen ;
vtDirS1.z = 0 ;
double dRadS1 = vtDirS1.LenXY() ;
Vector3d vtDirE1 = ptE1 - ptCen ;
vtDirE1.z = 0 ;
double dRadE1 = vtDirE1.LenXY() ;
Vector3d vtDirS2 = ptS2 - ptCen ;
vtDirS2.z = 0 ;
double dRadS2 = vtDirS2.LenXY() ;
Vector3d vtDirE2 = ptE2 - ptCen ;
vtDirE2.z = 0 ;
double dRadE2 = vtDirE2.LenXY() ;
// ordino l'intervallo della prima linea secondo raggi crescenti