EgtMachKernel :

- corretto errore in assegnazione versione 2.5a1 di R32
- reso più stabile ingresso in tasche con lati aperti.
This commit is contained in:
DarioS
2023-01-09 10:15:52 +01:00
parent e076e09ab3
commit 961fce5aa4
4 changed files with 44 additions and 21 deletions
+12 -8
View File
@@ -1107,13 +1107,15 @@ Operation::CalcAndSetBBox( int nClId)
Vector3d vtN = pCamData->GetNormDir() ;
double dDeltaN = pCamData->GetDeltaN() ;
// ricavo i punti
const double ANG_STEP = 15.0 ;
const double ANG_STEP = 4.9 ;
int nStep = 1 + int( abs( dAngCen) / ANG_STEP) ;
double dCoeff = -1. / nStep ;
double dCosRot = cos( dCoeff * dAngCen * DEGTORAD) ;
double dSinRot = sin( dCoeff * dAngCen * DEGTORAD) ;
Point3d ptT = ptP ;
for ( int i = 1 ; i < nStep ; ++ i) {
Point3d ptT = ptP ;
ptT.Rotate( ptCen, vtN, i * dCoeff * dAngCen) ;
ptT.Translate( vtN * ( i * dCoeff * dDeltaN)) ;
ptT.Rotate( ptCen, vtN, dCosRot, dSinRot) ;
ptT.Translate( vtN * ( dCoeff * dDeltaN)) ;
b3Grp.Add( ptT) ;
}
}
@@ -1182,14 +1184,16 @@ Operation::CalcAndSetAxesBBox( void)
Vector3d vtN = pCamData->GetAxesNormDir() ;
double dDeltaN = ( ptAxEnd - ptCen) * vtN ;
// ricavo i punti
const double ANG_STEP = 15.0 ;
const double ANG_STEP = 4.9 ;
int nStep = 1 + int( abs( dAngCen) / ANG_STEP) ;
double dCoeff = -1. / nStep ;
double dCosRot = cos( dCoeff * dAngCen * DEGTORAD) ;
double dSinRot = sin( dCoeff * dAngCen * DEGTORAD) ;
Point3d ptAxT = ptAxEnd ;
for ( int i = 1 ; i < nStep ; ++ i) {
// assi lineari
Point3d ptAxT = ptAxEnd ;
ptAxT.Rotate( ptCen, vtN, i * dCoeff * dAngCen) ;
ptAxT.Translate( vtN * ( i * dCoeff * dDeltaN)) ;
ptAxT.Rotate( ptCen, vtN, dCosRot, dSinRot) ;
ptAxT.Translate( vtN * ( dCoeff * dDeltaN)) ;
for ( int i = 0 ; i < min( nLinAxes, 3) ; ++ i)
vMmAxGrp[i].Add( ptAxT.v[i]) ;
}