EgtMachKernel 1.6t2 :

- migliorata gestione preview di fresature per percorsi chiusi.
This commit is contained in:
Dario Sassi
2016-08-11 17:58:51 +00:00
parent aaa94a79a0
commit 85e9265edd
2 changed files with 22 additions and 7 deletions
BIN
View File
Binary file not shown.
+22 -7
View File
@@ -1,13 +1,13 @@
//----------------------------------------------------------------------------
// EgalTech 2015-2015
// EgalTech 2015-2016
//----------------------------------------------------------------------------
// File : Milling.cpp Data : 07.06.15 Versione : 1.6f2
// File : Milling.cpp Data : 11.08.16 Versione : 1.6t2
// Contenuto : Implementazione gestione fresature.
//
//
//
// Modifiche : 07.06.15 DS Creazione modulo.
//
// 11.08.16 DS Miglioria gestione PV per più loop.
//
//----------------------------------------------------------------------------
@@ -1163,12 +1163,27 @@ Milling::GenerateMillingPv( int nPathId, const ICurveComposite* pCompo)
if ( IsNull( pCrv2))
return false ;
// inserisco la curva nel DB
int nCId = m_pGeomDB->AddGeoObj( GDB_ID_NULL, nPathId, Release( pCrv2)) ;
if ( nCId == GDB_ID_NULL)
int nC2Id = m_pGeomDB->AddGeoObj( GDB_ID_NULL, nPathId, Release( pCrv2)) ;
if ( nC2Id == GDB_ID_NULL)
return false ;
// assegno nome e colore
m_pGeomDB->SetName( nCId, MCH_PV_CUT) ;
m_pGeomDB->SetMaterial( nCId, LIME) ;
m_pGeomDB->SetName( nC2Id, MCH_PV_CUT) ;
m_pGeomDB->SetMaterial( nC2Id, LIME) ;
// eventuali altri contorni ( interni di contornatura chiusa)
const int MAX_INT_LOOP = 1000 ;
for ( int i = 1 ; i <= MAX_INT_LOOP ; ++i) {
PtrOwner< ICurve> pCrv3 ;
pCrv3.Set( pSfr->GetLoop( 0, i)) ;
if ( IsNull( pCrv3))
break ;
// inserisco la curva nel DB
int nC3Id = m_pGeomDB->AddGeoObj( GDB_ID_NULL, nPathId, Release( pCrv3)) ;
if ( nC3Id == GDB_ID_NULL)
return false ;
// assegno nome e colore
m_pGeomDB->SetName( nC3Id, MCH_PV_CUT) ;
m_pGeomDB->SetMaterial( nC3Id, LIME) ;
}
// inserisco la regione nel DB
int nRId = m_pGeomDB->AddGeoObj( GDB_ID_NULL, nPathId, Release( pSfr)) ;
if ( nRId == GDB_ID_NULL)