EgtGeomKernel :

- correzioni a MillingStep di Zmap per distinguere il tipo di movimento.
This commit is contained in:
Dario Sassi
2018-05-14 08:13:48 +00:00
parent bc0d717410
commit 455d1e5f0c
+6 -5
View File
@@ -639,10 +639,10 @@ VolZmap::MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Vector3d&
// Versore utensile parallelo all'asse Z
if ( vtLsXY.SqLen() < EPS_SMALL * EPS_SMALL) {
Vector3d vtMove = ptLe[i] - ptLs[i] ; vtMove.Normalize() ;
Vector3d vtMove = ptLe[i] - ptLs[i] ;
// Foratura
if ( vtMove.SqLenXY() < EPS_SMALL) {
if ( vtMove.SqLenXY() < EPS_SMALL * EPS_SMALL) {
switch ( m_Tool.GetType()) {
case Tool::GEN :
GenTool_ZDrilling( i, ptLs[i], ptLe[i], vtLs[i]) ;
@@ -704,10 +704,11 @@ VolZmap::MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Vector3d&
// Versore utensile nel piano
else if ( abs( vtLs[i].z) < EPS_SMALL) {
Vector3d vtMove = ptLe[i] - ptLs[i] ; vtMove.Normalize() ;
Vector3d vtMove = ptLe[i] - ptLs[i] ;
Vector3d vtMLong = ( vtMove * vtLs[i]) * vtLs[i] ;
Vector3d vtMOrt = vtMove - vtMLong ;
double dSqLLong = vtMLong.SqLen() ;
double dSqLOrt = vtMOrt.SqLen() ;
// Foratura
@@ -732,7 +733,7 @@ VolZmap::MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Vector3d&
}
}
// Fresatura con vettore movimento perpendicolare all'utensile
else if ( 1 - dSqLOrt < EPS_SMALL * EPS_SMALL) {
else if ( dSqLLong < EPS_SMALL * EPS_SMALL) {
switch ( m_Tool.GetType()) {
case Tool::GEN :
GenTool_Milling( i, ptLs[i], ptLe[i], vtLs[i]) ;
@@ -771,7 +772,7 @@ VolZmap::MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Vector3d&
// Versore utensile con direzione generica
else {
Vector3d vtMove = ptLe[i] - ptLs[i] ; vtMove.Normalize() ;
Vector3d vtMove = ptLe[i] - ptLs[i] ;
Vector3d vtMLong = ( vtMove * vtLs[i]) * vtLs[i] ;
Vector3d vtMOrt = vtMove - vtMLong ;