Correzioni/UtensileSferico/NB:CiSonoLineePerTest
This commit is contained in:
+29
-15
@@ -726,8 +726,11 @@ VolZmap::MillingTranslationStep( const Point3d& ptPs, const Point3d& ptPe, const
|
||||
Vector3d vtLs[N_MAPS] ;
|
||||
Vector3d vtALs[N_MAPS] ;
|
||||
InitializePointsAndVectors( ptPs, ptPe, vtD, vtA, ptLs, ptLe, vtLs, vtALs) ;
|
||||
for ( int i = 0 ; i < m_nMapNum ; ++ i) {
|
||||
SelectMotion( i, ptLs[i], ptLe[i], vtLs[i], vtALs[i]) ;
|
||||
}
|
||||
// Ciclo sulle mappe
|
||||
vector< future<bool>> vRes ;
|
||||
/*vector< future<bool>> vRes ;
|
||||
vRes.resize( m_nMapNum) ;
|
||||
for ( int i = 0 ; i < m_nMapNum ; ++ i) {
|
||||
vRes[i] = async( launch::async, &VolZmap::SelectMotion, this, i, cref( ptLs[i]), cref( ptLe[i]), cref( vtLs[i]), cref( vtALs[i])) ;
|
||||
@@ -741,7 +744,7 @@ VolZmap::MillingTranslationStep( const Point3d& ptPs, const Point3d& ptPe, const
|
||||
++ nTerminated ;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -7799,12 +7802,23 @@ VolZmap::AddingMotion( int nGrid, const Point3d& ptS, const Point3d& ptE, const
|
||||
double dRad = m_vTool[m_nCurrTool].GetRadius() ;
|
||||
double dCornerRad = m_vTool[m_nCurrTool].GetCornRadius() ;
|
||||
|
||||
if ( dCornerRad < EPS_SMALL) {
|
||||
// Utensile sfiancato
|
||||
if ( dCornerRad * dCornerRad - 0.25 * dHei * dHei > 0) {
|
||||
AddingGeneral( nGrid, ptS, ptE, vtAx) ;
|
||||
}
|
||||
// Utensile sferico
|
||||
else if ( dRad - dCornerRad < EPS_SMALL) {
|
||||
;
|
||||
}
|
||||
// Utensile cilindro
|
||||
else if ( dCornerRad < EPS_SMALL) {
|
||||
AddingCylinder( nGrid, ptS, ptE, vtAx, dHei, dRad) ;
|
||||
}
|
||||
// Utensile naso di toro
|
||||
else {
|
||||
AddingGeneral( nGrid, ptS, ptE, vtAx) ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -8122,10 +8136,10 @@ VolZmap::AddingTruncatedCone( int nGrid, const Point3d& ptS, const Point3d& ptE,
|
||||
|
||||
// Intersezione con la prima faccia
|
||||
if ( abs( vtPoly * vtNs) > COS_ORTO_ANG_ZERO) {
|
||||
if ( dLenY * ptPoly1.x >= dLenX * ptPoly1.y &&
|
||||
dLenY * ( ptPoly1.x - dDeltaX) <= dLenX * ( ptPoly1.y - dDeltaY) &&
|
||||
dDeltaX * ptPoly1.y >= dDeltaY * ptPoly1.x &&
|
||||
dDeltaX * ( ptPoly1.y - dLenY) <= dDeltaY * ( ptPoly1.x - dLenX)) {
|
||||
if ( dLenY * ( ptPoly1.x + EPS_SMALL) > dLenX * ptPoly1.y &&
|
||||
dLenY * ( ptPoly1.x - dDeltaX - EPS_SMALL) < dLenX * ( ptPoly1.y - dDeltaY) &&
|
||||
dDeltaX * ( ptPoly1.y + EPS_SMALL) > dDeltaY * ptPoly1.x &&
|
||||
dDeltaX * ( ptPoly1.y - dLenY - EPS_SMALL) < dDeltaY * ( ptPoly1.x - dLenX)) {
|
||||
ptInt1 = ptPoly1 ;
|
||||
vtN1 = - vtNs ;
|
||||
if ( ! ( vtArcNormMaxR.IsSmall() || vtArcNormMinR.IsSmall())) {
|
||||
@@ -8143,10 +8157,10 @@ VolZmap::AddingTruncatedCone( int nGrid, const Point3d& ptS, const Point3d& ptE,
|
||||
}
|
||||
// Intersezione con la seconda faccia
|
||||
if ( abs( vtPoly * vtNd) > COS_ORTO_ANG_ZERO) {
|
||||
if ( dLenY * ptPoly2.x >= dLenX * ptPoly2.y &&
|
||||
dLenY * ( ptPoly2.x - dDeltaX) <= dLenX * ( ptPoly2.y - dDeltaY) &&
|
||||
dDeltaX * ptPoly2.y >= dDeltaY * ptPoly2.x &&
|
||||
dDeltaX * ( ptPoly2.y - dLenY) <= dDeltaY * ( ptPoly2.x - dLenX)) {
|
||||
if ( dLenY * ( ptPoly2.x + EPS_SMALL) > dLenX * ptPoly2.y &&
|
||||
dLenY * ( ptPoly2.x - dDeltaX - EPS_SMALL) < dLenX * ( ptPoly2.y - dDeltaY) &&
|
||||
dDeltaX * ( ptPoly2.y + EPS_SMALL) > dDeltaY * ptPoly2.x &&
|
||||
dDeltaX * ( ptPoly2.y - dLenY - EPS_SMALL) < dDeltaY * ( ptPoly2.x - dLenX)) {
|
||||
|
||||
if ( nIntNum == 0) {
|
||||
ptInt1 = ptPoly2 ;
|
||||
@@ -8183,8 +8197,8 @@ VolZmap::AddingTruncatedCone( int nGrid, const Point3d& ptS, const Point3d& ptE,
|
||||
// Intersezione con la terza faccia
|
||||
if ( abs( vtPoly * vtIF) > COS_ORTO_ANG_ZERO) {
|
||||
if ( nIntNum < 2 &&
|
||||
ptPoly3.x >= 0 && ptPoly3.x <= dDeltaX &&
|
||||
dDeltaX * abs( ptPoly3.z) < dDeltaX * dLenZ + dDeltaZ * ptPoly3.x) {
|
||||
ptPoly3.x > - EPS_SMALL && ptPoly3.x < dDeltaX + EPS_SMALL &&
|
||||
dDeltaX * abs( ptPoly3.z) < dDeltaX * dLenZ + dDeltaZ * ptPoly3.x + dDeltaX * EPS_SMALL) {
|
||||
|
||||
if ( nIntNum == 0) {
|
||||
ptInt1 = ptPoly3 ;
|
||||
@@ -8202,8 +8216,8 @@ VolZmap::AddingTruncatedCone( int nGrid, const Point3d& ptS, const Point3d& ptE,
|
||||
// Intersezione con la quarta faccia
|
||||
if ( abs( vtPoly * vtIF) > COS_ORTO_ANG_ZERO) {
|
||||
if ( nIntNum < 2 &&
|
||||
ptPoly4.x >= dLenX && ptPoly4.x <= dLenX + dDeltaX &&
|
||||
dDeltaX * abs( ptPoly4.z) < dDeltaX * dLenZ + dDeltaZ * ( ptPoly4.x - dLenX)) {
|
||||
ptPoly4.x > dLenX - EPS_SMALL && ptPoly4.x < dLenX + dDeltaX + EPS_SMALL &&
|
||||
dDeltaX * abs( ptPoly4.z) < dDeltaX * dLenZ + dDeltaZ * ( ptPoly4.x - dLenX) + dDeltaX * EPS_SMALL) {
|
||||
|
||||
if ( nIntNum == 0) {
|
||||
ptInt1 = ptPoly4 ;
|
||||
|
||||
Reference in New Issue
Block a user