EgtMachKernel :

- ottimizzate rotazioni di +/- 90 deg.
This commit is contained in:
Dario Sassi
2018-05-22 10:17:58 +00:00
parent f37abb39dc
commit 71ef4e79a1
8 changed files with 22 additions and 22 deletions
+4 -4
View File
@@ -1367,7 +1367,7 @@ Drilling::DoStandardDrilling( const Hole& hole, SelData Id, int nPathId)
// se rinvio da sotto che richiede speciale rotazione
if ( m_AggrBottom.nType == 1) {
Vector3d vtAux = m_vtAggrBottom ;
vtAux.Rotate( Z_AX, 90) ;
vtAux.Rotate( Z_AX, 0, 1) ;
SetAuxDir( vtAux) ;
if ( AddRapidStart( ptP00, MCH_CL_AGB_DWN) == GDB_ID_NULL)
return false ;
@@ -1442,7 +1442,7 @@ Drilling::DoStandardDrilling( const Hole& hole, SelData Id, int nPathId)
// se rinvio da sotto che richiede speciale rotazione
if ( m_AggrBottom.nType == 1) {
Vector3d vtAux = m_vtAggrBottom ;
vtAux.Rotate( Z_AX, 90) ;
vtAux.Rotate( Z_AX, 0, 1) ;
SetAuxDir( vtAux) ;
if ( AddRapidMove( ptP00, MCH_CL_AGB_UP) == GDB_ID_NULL)
return false ;
@@ -1496,7 +1496,7 @@ Drilling::DoPeckDrilling( const Hole& hole, SelData Id, int nPathId)
// se rinvio da sotto che richiede speciale rotazione
if ( m_AggrBottom.nType == 1) {
Vector3d vtAux = m_vtAggrBottom ;
vtAux.Rotate( Z_AX, 90) ;
vtAux.Rotate( Z_AX, 0, 1) ;
SetAuxDir( vtAux) ;
if ( AddRapidStart( ptP00, MCH_CL_AGB_DWN) == GDB_ID_NULL)
return false ;
@@ -1644,7 +1644,7 @@ Drilling::DoPeckDrilling( const Hole& hole, SelData Id, int nPathId)
// se rinvio da sotto che richiede speciale rotazione
if ( m_AggrBottom.nType == 1) {
Vector3d vtAux = m_vtAggrBottom ;
vtAux.Rotate( Z_AX, 90) ;
vtAux.Rotate( Z_AX, 0, 1) ;
SetAuxDir( vtAux) ;
if ( AddRapidMove( ptP00, MCH_CL_AGB_UP) == GDB_ID_NULL)
return false ;
+2 -2
View File
@@ -147,11 +147,11 @@ Machine::LoadTool( Exit* pExit, const string& sTool)
int nT = m_pGeomDB->GetFirstGroupInGroup( nExGrp) ;
if ( nT == GDB_ID_NULL)
return false ;
m_pGeomDB->Rotate( nT, ORIG, X_AX, 90) ;
m_pGeomDB->Rotate( nT, ORIG, X_AX, 0, 1) ;
// se mortasa, lo ruoto 90 deg attorno a Z
int nType ;
if ( m_pMchMgr->TdbGetCurrToolParam( TPA_TYPE, nType) && nType == TT_MORTISE_STD)
m_pGeomDB->Rotate( nT, ORIG, Z_AX, 90) ;
m_pGeomDB->Rotate( nT, ORIG, Z_AX, 0, 1) ;
pExit->SetTool( sTool) ;
return true ;
}
+6 -6
View File
@@ -2648,7 +2648,7 @@ Milling::AddApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ,
// se rinvio da sotto che richiede speciale rotazione
if ( m_AggrBottom.nType == 1) {
Vector3d vtAux = m_vtAggrBottom ;
vtAux.Rotate( Z_AX, 90) ;
vtAux.Rotate( Z_AX, 0, 1) ;
SetAuxDir( vtAux) ;
if ( AddRapidStart( ptP00, MCH_CL_AGB_DWN) == GDB_ID_NULL)
return false ;
@@ -2789,7 +2789,7 @@ Milling::AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ,
// se rinvio da sotto che richiede speciale rotazione
if ( m_AggrBottom.nType == 1) {
Vector3d vtAux = m_vtAggrBottom ;
vtAux.Rotate( Z_AX, 90) ;
vtAux.Rotate( Z_AX, 0, 1) ;
SetAuxDir( vtAux) ;
if ( AddRapidMove( ptP00, MCH_CL_AGB_UP) == GDB_ID_NULL)
return false ;
@@ -2859,7 +2859,7 @@ Milling::CalcLeadInStart( const Point3d& ptStart, const Vector3d& vtStart, const
case MILL_LI_LINEAR :
case MILL_LI_TANGENT : {
Vector3d vtPerp = vtStart ;
vtPerp.Rotate( vtN, ( bCcwRot ? 90 : - 90)) ;
vtPerp.Rotate( vtN, 0, ( bCcwRot ? 1 : - 1)) ;
ptP1 = ptStart - vtStart * dTang + vtPerp * dPerp + vtN * dElev ;
return true ;
}
@@ -3005,7 +3005,7 @@ Milling::AddLeadIn( const Point3d& ptP1, const Point3d& ptStart, const Vector3d&
bool bAtLeft = ( m_Params.m_nWorkSide != MILL_WS_RIGHT) ;
// vettore dal punto al centro elica
Vector3d vtCen = vtStart ;
vtCen.Rotate( vtN, ( bAtLeft ? ANG_RIGHT : - ANG_RIGHT)) ;
vtCen.Rotate( vtN, 0, ( bAtLeft ? 1 : - 1)) ;
// dati dell'elica
double dRad = 0.5 * min( m_Params.m_dLiTang, m_TParams.m_dDiam) ;
Point3d ptCen = ptP1 + vtCen * dRad ;
@@ -3086,7 +3086,7 @@ Milling::AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d
case MILL_LO_LINEAR :
{
Vector3d vtPerp = vtEnd ;
vtPerp.Rotate( vtN, ( bCcwRot ? 90 : - 90)) ;
vtPerp.Rotate( vtN, 0, ( bCcwRot ? 1 : - 1)) ;
ptP1 = ptEnd + vtEnd * dTang + vtPerp * dPerp + vtN * dElev ;
return ( AddLinearMove( ptP1, MCH_CL_LEADOUT) != GDB_ID_NULL) ;
}
@@ -3094,7 +3094,7 @@ Milling::AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d
{
// calcolo punto finale dell'uscita
Vector3d vtPerp = vtEnd ;
vtPerp.Rotate( vtN, ( bCcwRot ? 90 : - 90)) ;
vtPerp.Rotate( vtN, 0, ( bCcwRot ? 1 : - 1)) ;
ptP1 = ptEnd + vtEnd * dTang + vtPerp * dPerp + vtN * dElev ;
// inserisco uscita
PtrOwner<ICurve> pCrv( GetArc2PVN( ptEnd, ptP1, vtEnd, vtN)) ;
+1 -1
View File
@@ -365,7 +365,7 @@ Operation::GetMinDistanceFromRawSide( int nPhase, const Point3d& ptP, double& dD
if ( distPC.GetParamAtMinDistPoint( 0, dU, nFlag) &&
pCurve->GetPointTang( dU, ICurve::FROM_MINUS, ptML, vtTgL)) {
vtDir = vtTgL ;
vtDir.Rotate( Z_AX, - ANG_RIGHT) ;
vtDir.Rotate( Z_AX, 0, -1) ;
vtDir.ToGlob( frRaw) ;
vtDir.Normalize() ;
break ;
+3 -3
View File
@@ -2748,7 +2748,7 @@ Pocketing::AddApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafe
// se rinvio da sotto che richiede speciale rotazione
if ( m_AggrBottom.nType == 1) {
Vector3d vtAux = m_vtAggrBottom ;
vtAux.Rotate( Z_AX, 90) ;
vtAux.Rotate( Z_AX, 0, 1) ;
SetAuxDir( vtAux) ;
if ( AddRapidStart( ptP00, MCH_CL_AGB_DWN) == GDB_ID_NULL)
return false ;
@@ -2896,7 +2896,7 @@ Pocketing::AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ
// se rinvio da sotto che richiede speciale rotazione
if ( m_AggrBottom.nType == 1) {
Vector3d vtAux = m_vtAggrBottom ;
vtAux.Rotate( Z_AX, 90) ;
vtAux.Rotate( Z_AX, 0, 1) ;
SetAuxDir( vtAux) ;
if ( AddRapidMove( ptP00, MCH_CL_AGB_UP) == GDB_ID_NULL)
return false ;
@@ -3012,7 +3012,7 @@ Pocketing::AddLeadIn( const Point3d& ptP1, const Point3d& ptStart, const Vector3
{
// vettore dal punto al centro elica
Vector3d vtCen = vtStart ;
vtCen.Rotate( vtN, ( bAtLeft ? ANG_RIGHT : - ANG_RIGHT)) ;
vtCen.Rotate( vtN, 0, ( bAtLeft ? 1 : - 1)) ;
// dati dell'elica
double dRad = min( 0.5 * min( m_Params.m_dLiTang, m_TParams.m_dDiam), m_dMaxHelixRad) ;
Point3d ptCen = ptP1 + vtCen * dRad ;
+2 -2
View File
@@ -1945,9 +1945,9 @@ SawFinishing::CalculateToolAndCorrVersors( const Vector3d& vtTang, int nHeadSide
return false ;
// ruoto attorno a Zglob+ a seconda del lato mandrino
if ( nHeadSide == SAW_HS_LEFT)
vtTool.Rotate( Z_AX, 90) ;
vtTool.Rotate( Z_AX, 0, 1) ;
else
vtTool.Rotate( Z_AX, -90) ;
vtTool.Rotate( Z_AX, 0, -1) ;
// Versore correzione
vtCorr = Z_AX ;
+2 -2
View File
@@ -1561,9 +1561,9 @@ SawRoughing::CalculateToolAndCorrVersors( const Vector3d& vtTang, int nHeadSide,
return false ;
// ruoto attorno a Zglob+ a seconda del lato mandrino
if ( nHeadSide == SAW_HS_LEFT)
vtTool.Rotate( Z_AX, 90) ;
vtTool.Rotate( Z_AX, 0, 1) ;
else
vtTool.Rotate( Z_AX, -90) ;
vtTool.Rotate( Z_AX, 0, -1) ;
// Versore correzione
vtCorr = Z_AX ;
+2 -2
View File
@@ -3261,9 +3261,9 @@ Sawing::CalculateToolAndCorrVersors( const Vector3d& vtTang, int nHeadSide, int
return false ;
// ruoto attorno a Zglob+ a seconda del lato mandrino
if ( nHeadSide == SAW_HS_LEFT)
vtTool.Rotate( Z_AX, 90) ;
vtTool.Rotate( Z_AX, 0, 1) ;
else
vtTool.Rotate( Z_AX, -90) ;
vtTool.Rotate( Z_AX, 0, -1) ;
// Versore correzione
vtCorr = Z_AX ;