EgtMachKernel :

- aggiunta gestione archi su piani diversi da XY
- disposizione rimette sempre anche i sottopezzi al loro posto
- aggiunti attacchi e uscite a fresature
- aggiunta prima versione calcolo collegamenti tra lavorazioni evitando collisioni
- modifiche a simulazione per tavole mobili con sottopezzi e pezzi.
This commit is contained in:
Dario Sassi
2016-05-30 08:55:15 +00:00
parent a53dfcd676
commit 3cd21182d3
16 changed files with 1189 additions and 289 deletions
+24 -18
View File
@@ -1916,12 +1916,13 @@ Sawing::GenerateExtArcCl( const ICurveArc* pArc, const Vector3d& vtStaTool, cons
SetFeed( GetFeed()) ;
Point3d ptCen = pArc->GetCenter() ;
double dAngCen = pArc->GetAngCenter() ;
Vector3d vtN = pArc->GetNormVersor() ;
Point3d ptP3 ;
pArc->GetEndPoint( ptP3) ;
// se angolo al centro minore del limite, un solo arco
if ( abs( dAngCen) < MAX_ANG_CEN) {
SetToolDir( vtEndTool) ;
if ( AddArcMove( ptP3, ptCen, dAngCen) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dAngCen, vtN) == GDB_ID_NULL)
return false ;
}
// altrimenti due archi
@@ -1930,11 +1931,11 @@ Sawing::GenerateExtArcCl( const ICurveArc* pArc, const Vector3d& vtStaTool, cons
pArc->GetMidPoint( ptMid) ;
// prima metà arco
SetToolDir( vtMidTool) ;
if ( AddArcMove( ptMid, ptCen, dAngCen / 2) == GDB_ID_NULL)
if ( AddArcMove( ptMid, ptCen, dAngCen / 2, vtN) == GDB_ID_NULL)
return false ;
// seconda metà arco
SetToolDir( vtEndTool) ;
if ( AddArcMove( ptP3, ptCen, dAngCen / 2) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dAngCen / 2, vtN) == GDB_ID_NULL)
return false ;
}
// 4 -> retrazione
@@ -1985,11 +1986,12 @@ Sawing::GenerateExtArcCl( const ICurveArc* pArc, const Vector3d& vtStaTool, cons
SetFeed( GetFeed()) ;
Point3d ptCen = pArc->GetCenter() ;
double dAngCen = pArc->GetAngCenter() ;
Vector3d vtN = pArc->GetNormVersor() ;
// se angolo al centro minore del limite, un solo arco
if ( abs( dAngCen) < MAX_ANG_CEN) {
double dCurrAngCen = dAngCen * ((( i % 2) == 0) ? -1 : 1) ;
SetToolDir( ( ( i % 2) == 0) ? vtStaTool : vtEndTool) ;
if ( AddArcMove( ptP3, ptCen, dCurrAngCen) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dCurrAngCen, vtN) == GDB_ID_NULL)
return false ;
}
// altrimenti due archi
@@ -2000,11 +2002,11 @@ Sawing::GenerateExtArcCl( const ICurveArc* pArc, const Vector3d& vtStaTool, cons
double dCurrAngCen = dAngCen / 2 * ((( i % 2) == 0) ? -1 : 1) ;
// prima metà arco
SetToolDir( vtMidTool) ;
if ( AddArcMove( ptMid, ptCen, dCurrAngCen) == GDB_ID_NULL)
if ( AddArcMove( ptMid, ptCen, dCurrAngCen, vtN) == GDB_ID_NULL)
return false ;
// seconda metà arco
SetToolDir( ( ( i % 2) == 0) ? vtStaTool : vtEndTool) ;
if ( AddArcMove( ptP3, ptCen, dCurrAngCen) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dCurrAngCen, vtN) == GDB_ID_NULL)
return false ;
}
}
@@ -2046,13 +2048,14 @@ Sawing::GenerateExtArcCl( const ICurveArc* pArc, const Vector3d& vtStaTool, cons
SetFeed( GetFeed()) ;
Point3d ptCen = pArc->GetCenter() ;
double dAngCen = pArc->GetAngCenter() ;
Vector3d vtN = pArc->GetNormVersor() ;
Point3d ptP3 ;
pArc->GetEndPoint( ptP3) ;
ptP3 += vtCorr * dDelta ;
// se angolo al centro minore del limite, un solo arco
if ( abs( dAngCen) < MAX_ANG_CEN) {
SetToolDir( vtEndTool) ;
if ( AddArcMove( ptP3, ptCen, dAngCen) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dAngCen, vtN) == GDB_ID_NULL)
return false ;
}
// altrimenti due archi
@@ -2062,11 +2065,11 @@ Sawing::GenerateExtArcCl( const ICurveArc* pArc, const Vector3d& vtStaTool, cons
ptMid += vtCorr * dDelta ;
// prima metà arco
SetToolDir( vtMidTool) ;
if ( AddArcMove( ptMid, ptCen, dAngCen / 2) == GDB_ID_NULL)
if ( AddArcMove( ptMid, ptCen, dAngCen / 2, vtN) == GDB_ID_NULL)
return false ;
// seconda metà arco
SetToolDir( vtEndTool) ;
if ( AddArcMove( ptP3, ptCen, dAngCen / 2) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dAngCen / 2, vtN) == GDB_ID_NULL)
return false ;
}
// se non è ultimo passo
@@ -2544,13 +2547,14 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc,
SetFeed( GetFeed()) ;
Point3d ptCen = pArc->GetCenter() ;
double dAngCen = pArc->GetAngCenter() ;
Vector3d vtN = pArc->GetNormVersor() ;
Point3d ptP3 ;
pArc->GetEndPoint( ptP3) ;
// se angolo al centro minore del limite, un solo arco
if ( abs( pArc->GetAngCenter()) < MAX_ANG_CEN) {
SetToolDir( vtEndTool) ;
SetCorrAuxDir( vtEndCorr) ;
if ( AddArcMove( ptP3, ptCen, dAngCen) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dAngCen, vtN) == GDB_ID_NULL)
return false ;
}
// altrimenti due archi
@@ -2560,12 +2564,12 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc,
// prima metà arco
SetToolDir( vtMidTool) ;
SetCorrAuxDir( vtMidCorr) ;
if ( AddArcMove( ptMid, ptCen, dAngCen / 2) == GDB_ID_NULL)
if ( AddArcMove( ptMid, ptCen, dAngCen / 2, vtN) == GDB_ID_NULL)
return false ;
// seconda metà arco
SetToolDir( vtEndTool) ;
SetCorrAuxDir( vtEndCorr) ;
if ( AddArcMove( ptP3, ptCen, dAngCen / 2) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dAngCen / 2, vtN) == GDB_ID_NULL)
return false ;
}
// 4 -> retrazione
@@ -2618,12 +2622,13 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc,
SetFeed( GetFeed()) ;
Point3d ptCen = pArc->GetCenter() ;
double dAngCen = pArc->GetAngCenter() ;
Vector3d vtN = pArc->GetNormVersor() ;
// se angolo al centro minore del limite, un solo arco
if ( abs( dAngCen) < MAX_ANG_CEN) {
double dCurrAngCen = dAngCen * ((( i % 2) == 0) ? -1 : 1) ;
SetToolDir( ( ( i % 2) == 0) ? vtStaTool : vtEndTool) ;
SetCorrAuxDir( ( ( i % 2) == 0) ? vtStaCorr : vtEndCorr) ;
if ( AddArcMove( ptP3, ptCen, dCurrAngCen) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dCurrAngCen, vtN) == GDB_ID_NULL)
return false ;
}
// altrimenti due archi
@@ -2635,12 +2640,12 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc,
// prima metà arco
SetToolDir( vtMidTool) ;
SetCorrAuxDir( vtMidCorr) ;
if ( AddArcMove( ptMid, ptCen, dCurrAngCen) == GDB_ID_NULL)
if ( AddArcMove( ptMid, ptCen, dCurrAngCen, vtN) == GDB_ID_NULL)
return false ;
// seconda metà arco
SetToolDir( ( ( i % 2) == 0) ? vtStaTool : vtEndTool) ;
SetCorrAuxDir( ( ( i % 2) == 0) ? vtStaCorr : vtEndCorr) ;
if ( AddArcMove( ptP3, ptCen, dCurrAngCen) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dCurrAngCen, vtN) == GDB_ID_NULL)
return false ;
}
}
@@ -2685,6 +2690,7 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc,
SetFeed( GetFeed()) ;
Point3d ptCen = pArc->GetCenter() ;
double dAngCen = pArc->GetAngCenter() ;
Vector3d vtN = pArc->GetNormVersor() ;
Point3d ptP3 ;
pArc->GetEndPoint( ptP3) ;
ptP3 += Z_AX * dDelta ;
@@ -2692,7 +2698,7 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc,
if ( abs( dAngCen) < MAX_ANG_CEN) {
SetToolDir( vtEndTool) ;
SetCorrAuxDir( vtEndCorr) ;
if ( AddArcMove( ptP3, ptCen, dAngCen) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dAngCen, vtN) == GDB_ID_NULL)
return false ;
}
// altrimenti due archi
@@ -2703,12 +2709,12 @@ Sawing::GenerateIntArcCl( const ICurveArc* pArc,
// prima metà arco
SetToolDir( vtMidTool) ;
SetCorrAuxDir( vtMidCorr) ;
if ( AddArcMove( ptMid, ptCen, dAngCen / 2) == GDB_ID_NULL)
if ( AddArcMove( ptMid, ptCen, dAngCen / 2, vtN) == GDB_ID_NULL)
return false ;
// seconda metà arco
SetToolDir( vtEndTool) ;
SetCorrAuxDir( vtEndCorr) ;
if ( AddArcMove( ptP3, ptCen, dAngCen / 2) == GDB_ID_NULL)
if ( AddArcMove( ptP3, ptCen, dAngCen / 2, vtN) == GDB_ID_NULL)
return false ;
}
// se non è ultimo passo