From 85e9265eddf9e513492bf94aa13fcb35c4774331 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 11 Aug 2016 17:58:51 +0000 Subject: [PATCH] EgtMachKernel 1.6t2 : - migliorata gestione preview di fresature per percorsi chiusi. --- EgtMachKernel.rc | Bin 11782 -> 11782 bytes Milling.cpp | 29 ++++++++++++++++++++++------- 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 9df6f3be47b1af05f895b152664ec5ae82f0cc6b..75878b0bc1177de2630c061e0b66b5b1eb153e4d 100644 GIT binary patch delta 97 zcmZpRX^YwLhmFx_^ItYwW=5mQj>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHP01iS delta 97 zcmZpRX^YwLhmFy2^ItYwW=6xwj>5W|vxM9jH?QON0rG*u7nvrX5iEd9O=7{OSQ@Kh Hr8(RHOf?`f diff --git a/Milling.cpp b/Milling.cpp index f7ef0ed..716e23e 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -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)