EgtMachKernel 2.3f2 :

- in svuotatura aggiunta gestione attacchi a spirale con mole a tazza (non lavorano di testa)
- in svuotatura modificato preview.
This commit is contained in:
DarioS
2021-06-22 11:08:00 +02:00
parent 27f3957d4f
commit c4af1502b4
3 changed files with 26 additions and 13 deletions
+22 -13
View File
@@ -1835,8 +1835,9 @@ Pocketing::GeneratePocketingPv( int nPathId, const ICurveComposite* pCompo)
if ( IsNull( pCrv))
return false ;
// calcolo la regione
PtrOwner<ISurfFlatRegion> pSfr ;
pSfr.Set( GetSurfFlatRegionFromFatCurve( Release( pCrv), 0.5 * m_TParams.m_dDiam, false, false)) ;
SurfFlatRegionByContours SfrCntrRr ;
SfrCntrRr.AddCurve( Release( pCrv)) ;
PtrOwner<ISurfFlatRegion> pSfr( SfrCntrRr.GetSurf()) ;
if ( IsNull( pSfr))
return false ;
// ne recupero il contorno
@@ -1850,7 +1851,7 @@ Pocketing::GeneratePocketingPv( int nPathId, const ICurveComposite* pCompo)
return false ;
// assegno nome e colore
m_pGeomDB->SetName( nC2Id, MCH_PV_CUT) ;
m_pGeomDB->SetMaterial( nC2Id, LIME) ;
m_pGeomDB->SetMaterial( nC2Id, RED) ;
// eventuali altri contorni ( interni di contornatura chiusa)
const int MAX_INT_LOOP = 1000 ;
for ( int i = 1 ; i <= MAX_INT_LOOP ; ++i) {
@@ -1864,14 +1865,14 @@ Pocketing::GeneratePocketingPv( int nPathId, const ICurveComposite* pCompo)
return false ;
// assegno nome e colore
m_pGeomDB->SetName( nC3Id, MCH_PV_CUT) ;
m_pGeomDB->SetMaterial( nC3Id, LIME) ;
m_pGeomDB->SetMaterial( nC3Id, RED) ;
}
// inserisco la regione nel DB
int nRId = m_pGeomDB->AddGeoObj( GDB_ID_NULL, nPathId, Release( pSfr)) ;
if ( nRId == GDB_ID_NULL)
return false ;
m_pGeomDB->SetName( nRId, MCH_PV_RCUT) ;
m_pGeomDB->SetMaterial( nRId, INVISIBLE) ;
m_pGeomDB->SetMaterial( nRId, Color( 255, 0, 0, 60)) ;
// la copio anche come regione ridotta
int nRrId = m_pGeomDB->Copy( nRId, GDB_ID_NULL, nPathId) ;
if ( nRrId == GDB_ID_NULL)
@@ -1909,8 +1910,10 @@ Pocketing::AddZigZag( const ICurveComposite* pCompo, const Vector3d& vtTool, con
// se utensile che non lavora di testa poichè ingresso non fuori dal pezzo, errore
if ( m_TParams.m_nType == TT_MILL_NOTIP) {
m_pMchMgr->SetLastError( 2431, "Error in Pocketing : LeadIn with Mill NoTip in material") ;
return false ;
if ( ! LeadInIsOk()) {
m_pMchMgr->SetLastError( 2431, "Error in Pocketing : LeadIn with Mill NoTip in material") ;
return false ;
}
}
// determino numero e affondamento degli step
@@ -2454,8 +2457,10 @@ Pocketing::AddOneWay( const ICurveComposite* pCompo, const Vector3d& vtTool, con
// se utensile che non lavora di testa poichè ingresso non fuori dal pezzo, errore
if ( m_TParams.m_nType == TT_MILL_NOTIP) {
m_pMchMgr->SetLastError( 2431, "Error in Pocketing : LeadIn with Mill NoTip in material") ;
return false ;
if ( ! LeadInIsOk()) {
m_pMchMgr->SetLastError( 2431, "Error in Pocketing : LeadIn with Mill NoTip in material") ;
return false ;
}
}
// determino numero e affondamento degli step
@@ -2780,8 +2785,10 @@ Pocketing::AddSpiralIn( const ICurveComposite* pCompo, const Vector3d& vtTool, c
// se utensile che non lavora di testa e ingresso non fuori dal pezzo, errore
if ( m_TParams.m_nType == TT_MILL_NOTIP && ! bOutStart) {
m_pMchMgr->SetLastError( 2431, "Error in Pocketing : LeadIn with Mill NoTip in material") ;
return false ;
if ( ! LeadInIsOk()) {
m_pMchMgr->SetLastError( 2431, "Error in Pocketing : LeadIn with Mill NoTip in material") ;
return false ;
}
}
// determino numero e affondamento degli step
@@ -2941,8 +2948,10 @@ Pocketing::AddSpiralOut( const ICurveComposite* pCompo, const Vector3d& vtTool,
// se utensile che non lavora di testa poichè ingresso non fuori dal pezzo, errore
if ( m_TParams.m_nType == TT_MILL_NOTIP) {
m_pMchMgr->SetLastError( 2431, "Error in Pocketing : LeadIn with Mill NoTip in material") ;
return false ;
if ( ! LeadInIsOk()) {
m_pMchMgr->SetLastError( 2431, "Error in Pocketing : LeadIn with Mill NoTip in material") ;
return false ;
}
}
// ciclo sulle regioni