From 7930a229f9e3dd227e002fe066ab7222dc565e3e Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sun, 10 Mar 2024 10:22:18 +0100 Subject: [PATCH] =?UTF-8?q?EgtGraphics=202.6c2=20:=20-=20aggiunta=20possib?= =?UTF-8?q?ilit=C3=A0=20di=20visualizzare=20curve=20di=20entit=C3=A0=20sol?= =?UTF-8?q?o=20in=20shading=20-=20utilizzata=20questa=20possibilit=C3=A0?= =?UTF-8?q?=20per=20spigoli=20vivi=20di=20TriMesh=20e=20Zmap.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EgtGraphics.rc | Bin 11606 -> 11606 bytes ObjEGrGraphics.h | 8 ++--- ObjMultiGraphics.cpp | 10 +++--- ObjMultiGraphics.h | 4 +-- ObjNewGraphics.cpp | 15 +++++--- ObjNewGraphics.h | 12 +++---- ObjOldGraphics.cpp | 37 +++++++++++++------- ObjOldGraphics.h | 12 +++---- SceneGeom.cpp | 79 +++++++++++++++++++++++++++++++++++-------- 9 files changed, 122 insertions(+), 55 deletions(-) diff --git a/EgtGraphics.rc b/EgtGraphics.rc index c49bb2be37082f80b82619260f2b2421ac9baa85..b748bd63803db2b87448549bd2a6aaa47c0749e6 100644 GIT binary patch delta 116 zcmcZ>buDVcH#Syd1|0^Y%?J7RGfm>rnOvZ#!ki4`UzDt5+}y@(#tfI&W`;^sGj7fj SHo+pXo&~NLi(vxFZd?Ei)ggcY delta 116 zcmcZ>buDVcH#Sxy1|0^I%?J7RGfm>rnOvZ#!kh%;UzDt5+}y@(#tfI&W`;^sGj7fj SHo+pXo&~NLi(vxFZd?Eke<6qf diff --git a/ObjEGrGraphics.h b/ObjEGrGraphics.h index dd4195d..894b290 100644 --- a/ObjEGrGraphics.h +++ b/ObjEGrGraphics.h @@ -1,7 +1,7 @@ //---------------------------------------------------------------------------- -// EgalTech 2014-2023 +// EgalTech 2014-2024 //---------------------------------------------------------------------------- -// File : ObjEGrGraphics.h Data : 08.07.23 Versione : 2.5g1 +// File : ObjEGrGraphics.h Data : 09.03.24 Versione : 2.6c2 // Contenuto : Dichiarazione della classe grafica di un oggetto geometrico. // // @@ -40,8 +40,8 @@ class ObjEGrGraphics : public IObjGraphics virtual bool AddLineStipple( int nFactor, int nPattern) = 0 ; virtual bool AddPoint( const Point3d& ptP, bool bAux = false) = 0 ; virtual bool AddPoints( const PNTVECTOR& vPnt, bool bAux = false) = 0 ; - virtual bool AddLines( const PNTVECTOR& vPnt, bool bAux = false) = 0 ; - virtual bool AddPolyLine( const PolyLine& PL, bool bAux = false) = 0 ; + virtual bool AddLines( const PNTVECTOR& vPnt, bool bAux = false, bool bSurfSha = false) = 0 ; + virtual bool AddPolyLine( const PolyLine& PL, bool bAux = false, bool bSurfSha = false) = 0 ; virtual bool StartTriangles( int nNum, bool bAux = false) = 0 ; virtual bool AddTriangle( const Triangle3d& Tria, const TriFlags3d& TFlags, const TriNormals3d& TNrms) = 0 ; virtual bool EndTriangles( void) = 0 ; diff --git a/ObjMultiGraphics.cpp b/ObjMultiGraphics.cpp index 76923e7..60e1059 100644 --- a/ObjMultiGraphics.cpp +++ b/ObjMultiGraphics.cpp @@ -33,7 +33,7 @@ void ObjMultiGraphics::Reset( void) { m_bValid = false ; - m_nCurr = - 1 ; + m_nCurr = -1 ; } //---------------------------------------------------------------------------- @@ -136,22 +136,22 @@ ObjMultiGraphics::AddPoints( const PNTVECTOR& vPnt, bool bAux) //---------------------------------------------------------------------------- bool -ObjMultiGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux) +ObjMultiGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux, bool bSurfSha) { if ( m_nCurr < 0 || m_nCurr >= int( m_vOEGR.size())) return false ; m_bValid = true ; - return m_vOEGR[m_nCurr]->AddLines( vPnt, bAux) ; + return m_vOEGR[m_nCurr]->AddLines( vPnt, bAux, bSurfSha) ; } //---------------------------------------------------------------------------- bool -ObjMultiGraphics::AddPolyLine( const PolyLine& PL, bool bAux) +ObjMultiGraphics::AddPolyLine( const PolyLine& PL, bool bAux, bool bSurfSha) { if ( m_nCurr < 0 || m_nCurr >= int( m_vOEGR.size())) return false ; m_bValid = true ; - return m_vOEGR[m_nCurr]->AddPolyLine( PL, bAux) ; + return m_vOEGR[m_nCurr]->AddPolyLine( PL, bAux, bSurfSha) ; } //---------------------------------------------------------------------------- diff --git a/ObjMultiGraphics.h b/ObjMultiGraphics.h index e6b1de6..a5e68b1 100644 --- a/ObjMultiGraphics.h +++ b/ObjMultiGraphics.h @@ -39,8 +39,8 @@ class ObjMultiGraphics : public ObjEGrGraphics bool AddLineStipple( int nFactor, int nPattern) override ; bool AddPoint( const Point3d& ptP, bool bAux = false) override ; bool AddPoints( const PNTVECTOR& vPnt, bool bAux = false) override ; - bool AddLines( const PNTVECTOR& vPnt, bool bAux = false) override ; - bool AddPolyLine( const PolyLine& PL, bool bAux = false) override ; + bool AddLines( const PNTVECTOR& vPnt, bool bAux = false, bool bSurfSha = false) override ; + bool AddPolyLine( const PolyLine& PL, bool bAux = false, bool bSurfSha = false) override ; bool StartTriangles( int nNum, bool bAux = false) override ; bool AddTriangle( const Triangle3d& Tria, const TriFlags3d& TFlags, const TriNormals3d& TNrms) override ; bool EndTriangles( void) override ; diff --git a/ObjNewGraphics.cpp b/ObjNewGraphics.cpp index 13eb042..2ccf589 100644 --- a/ObjNewGraphics.cpp +++ b/ObjNewGraphics.cpp @@ -165,7 +165,7 @@ ObjNewGraphics::AddPoints( const PNTVECTOR& vPnt, bool bAux) //---------------------------------------------------------------------------- bool -ObjNewGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux) +ObjNewGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux, bool bSurfSha) { if ( m_pScene == nullptr || ! m_pScene->MakeCurrent()) return false ; @@ -195,7 +195,7 @@ ObjNewGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux) glEnableClientState( GL_VERTEX_ARRAY) ; glBindVertexArray( 0) ; // aggiungo i dati in lista - AddNgaVerts( GL_LINES, nCount, nVaoId, nVboId, bAux) ; + AddNgaVerts( GL_LINES, nCount, nVaoId, nVboId, bAux, bSurfSha) ; // dichiaro valida la grafica m_bValid = true ; @@ -204,7 +204,7 @@ ObjNewGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux) //---------------------------------------------------------------------------- bool -ObjNewGraphics::AddPolyLine( const PolyLine& PL, bool bAux) +ObjNewGraphics::AddPolyLine( const PolyLine& PL, bool bAux, bool bSurfSha) { if ( m_pScene == nullptr || ! m_pScene->MakeCurrent()) return false ; @@ -236,7 +236,7 @@ ObjNewGraphics::AddPolyLine( const PolyLine& PL, bool bAux) glEnableClientState( GL_VERTEX_ARRAY) ; glBindVertexArray( 0) ; // aggiungo i dati in lista - AddNgaVerts( GL_LINE_STRIP, nCount, nVaoId, nVboId, bAux) ; + AddNgaVerts( GL_LINE_STRIP, nCount, nVaoId, nVboId, bAux, bSurfSha) ; // dichiaro valida la grafica m_bValid = true ; @@ -424,6 +424,13 @@ ObjNewGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bSurf, int nAlph glBindVertexArray( 0) ; } break ; + case NgAtom::VERTS_S : + if ( bSurfSha && Nga.m_nCount > 0 && Nga.m_nVaoId != 0) { + glBindVertexArray( Nga.m_nVaoId) ; + glDrawArrays( Nga.m_nMode, 0, Nga.m_nCount) ; + glBindVertexArray( 0) ; + } + break ; case NgAtom::COLOR : glColor4fv( ( bStdCol ? AdjustColor( Nga.m_fCol, bDark) : fSelMarkCol)) ; break ; diff --git a/ObjNewGraphics.h b/ObjNewGraphics.h index ea0e1ae..d18036d 100644 --- a/ObjNewGraphics.h +++ b/ObjNewGraphics.h @@ -23,8 +23,8 @@ class NgAtom { NgAtom( void) : m_nType( NONE), m_nMode( 0), m_nCount( 0), m_nVaoId( 0), m_nVboId( 0) {} public : - enum GrType { NONE = 0, VERTS = 1, VERTS_A = 2, COLOR = 3, - MAT_A = 4, MAT_D = 5, MAT_S = 6, MAT_SH = 7, MAT_B = 8, LINE_STIPPLE = 9} ; + enum GrType { NONE = 0, VERTS = 1, VERTS_A = 2, VERTS_S = 3, COLOR = 4, + MAT_A = 5, MAT_D = 6, MAT_S = 7, MAT_SH = 8, MAT_B = 9, LINE_STIPPLE = 10} ; public : GrType m_nType ; @@ -77,8 +77,8 @@ class ObjNewGraphics : public ObjEGrGraphics bool AddLineStipple( int nFactor, int nPattern) override ; bool AddPoint( const Point3d& ptP, bool bAux = false) override ; bool AddPoints( const PNTVECTOR& vPnt, bool bAux = false) override ; - bool AddLines( const PNTVECTOR& vPnt, bool bAux = false) override ; - bool AddPolyLine( const PolyLine& PL, bool bAux = false) override ; + bool AddLines( const PNTVECTOR& vPnt, bool bAux = false, bool bSurfSha = false) override ; + bool AddPolyLine( const PolyLine& PL, bool bAux = false, bool bSurfSha = false) override ; bool StartTriangles( int nNum, bool bAux = false) override ; bool AddTriangle( const Triangle3d& Tria, const TriFlags3d& TFlags, const TriNormals3d& TNrms) override ; bool EndTriangles( void) override ; @@ -95,9 +95,9 @@ class ObjNewGraphics : public ObjEGrGraphics { try { m_ngaVect.push_back( nga) ; } catch(...) { return false ; } return true ; } - bool AddNgaVerts( int nMode, int nCount, unsigned int nVaoId, unsigned int nVboId, bool bAux = false) + bool AddNgaVerts( int nMode, int nCount, unsigned int nVaoId, unsigned int nVboId, bool bAux = false, bool bSurfSha = false) { NgAtom nga ; - nga.m_nType = ( bAux ? NgAtom::VERTS_A : NgAtom::VERTS) ; + nga.m_nType = ( bSurfSha ? NgAtom::VERTS_S : ( bAux ? NgAtom::VERTS_A : NgAtom::VERTS)) ; nga.m_nMode = nMode ; nga.m_nCount = nCount ; nga.m_nVaoId = nVaoId ; nga.m_nVboId = nVboId ; return AddNgAtom( nga) ; } diff --git a/ObjOldGraphics.cpp b/ObjOldGraphics.cpp index d703811..6969dde 100644 --- a/ObjOldGraphics.cpp +++ b/ObjOldGraphics.cpp @@ -129,7 +129,7 @@ ObjOldGraphics::AddPoints( const PNTVECTOR& vPnt, bool bAux) //---------------------------------------------------------------------------- bool -ObjOldGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux) +ObjOldGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux, bool bSurfSha) { // modo corrente deve essere nullo if ( m_nCurrMode != GL_NONE) @@ -137,7 +137,7 @@ ObjOldGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux) // riservo memoria per vettore m_ogaVect.reserve( VECT_HEAP + vPnt.size()) ; // start - AddOgaStart( GL_LINES, bAux) ; + AddOgaStart( GL_LINES, bAux, bSurfSha) ; // inserisco i vertici + aggiorno bbox for ( int i = 0 ; i < int( vPnt.size()) ; ++ i) { AddOgaVert3f( vPnt[i]) ; @@ -153,7 +153,7 @@ ObjOldGraphics::AddLines( const PNTVECTOR& vPnt, bool bAux) //---------------------------------------------------------------------------- bool -ObjOldGraphics::AddPolyLine( const PolyLine& PL, bool bAux) +ObjOldGraphics::AddPolyLine( const PolyLine& PL, bool bAux, bool bSurfSha) { // modo corrente deve essere nullo if ( m_nCurrMode != GL_NONE) @@ -161,7 +161,7 @@ ObjOldGraphics::AddPolyLine( const PolyLine& PL, bool bAux) // riservo memoria per vettore m_ogaVect.reserve( VECT_HEAP + PL.GetPointNbr()) ; // start - AddOgaStart( GL_LINE_STRIP, bAux) ; + AddOgaStart( GL_LINE_STRIP, bAux, bSurfSha) ; // inserisco i nuovi vertici + aggiorno bbox Point3d ptP ; for ( bool bFound = PL.GetFirstPoint( ptP) ; bFound ; bFound = PL.GetNextPoint( ptP)) { @@ -292,34 +292,45 @@ ObjOldGraphics::Draw( int nStat, int nMark, bool bSurfSha, bool bSurf, int nAlph } // ciclo di disegno - bool bStartA = false ; + bool bSkip = false ; bool bLineStipple = false ; for ( const auto& Oga : m_ogaVect) { switch ( Oga.m_nType) { case OgAtom::START : glBegin( Oga.m_nMode) ; - bStartA = false ; + bSkip = false ; break ; case OgAtom::START_A : - if ( bShowAux) + if ( bShowAux) { glBegin( Oga.m_nMode) ; - bStartA = true ; + bSkip = false ; + } + else + bSkip = true ; + break ; + case OgAtom::START_S : + if ( bSurfSha) { + glBegin( Oga.m_nMode) ; + bSkip = false ; + } + else + bSkip = true ; break ; case OgAtom::END : - if ( ! bStartA || bShowAux) + if ( ! bSkip) glEnd() ; - bStartA = false ; + bSkip = false ; break ; case OgAtom::VERT : - if ( ! bStartA || bShowAux) + if ( ! bSkip) glVertex3fv( Oga.m_fVal) ; break ; case OgAtom::BND_FLAG : - if ( ! bStartA || bShowAux) + if ( ! bSkip ) glEdgeFlag( Oga.m_nFlag) ; break ; case OgAtom::NORMAL : - if ( ! bStartA || bShowAux) + if ( ! bSkip) glNormal3fv( Oga.m_fVal) ; break ; case OgAtom::COLOR : diff --git a/ObjOldGraphics.h b/ObjOldGraphics.h index 050fa19..c799ba4 100644 --- a/ObjOldGraphics.h +++ b/ObjOldGraphics.h @@ -26,8 +26,8 @@ class OgAtom { OgAtom( void) : m_nType( NONE), m_fX( 0), m_fY( 0), m_fZ( 0), m_fW( 1) {} public : - enum GrType { NONE = 0, START = 1, START_A = 2, END = 3, VERT = 4, BND_FLAG = 5, NORMAL = 6, - COLOR = 7, MAT_A = 8, MAT_D = 9, MAT_S = 10, MAT_SH = 11, MAT_B = 12, LINE_STIPPLE = 13} ; + enum GrType { NONE = 0, START = 1, START_A = 2, START_S = 3, END = 4, VERT = 5, BND_FLAG = 6, NORMAL = 7, + COLOR = 8, MAT_A = 9, MAT_D = 10, MAT_S = 11, MAT_SH = 12, MAT_B = 13, LINE_STIPPLE = 14} ; public : GrType m_nType ; @@ -82,8 +82,8 @@ class ObjOldGraphics : public ObjEGrGraphics bool AddLineStipple( int nFactor, int nPattern) override ; bool AddPoint( const Point3d& ptP, bool bAux = false) override ; bool AddPoints( const PNTVECTOR& vPnt, bool bAux = false) override ; - bool AddLines( const PNTVECTOR& vPnt, bool bAux = false) override ; - bool AddPolyLine( const PolyLine& PL, bool bAux = false) override ; + bool AddLines( const PNTVECTOR& vPnt, bool bAux = false, bool bSurfSha = false) override ; + bool AddPolyLine( const PolyLine& PL, bool bAux = false, bool bSurfSha = false) override ; bool StartTriangles( int nNum, bool bAux = false) override ; bool AddTriangle( const Triangle3d& Tria, const TriFlags3d& TFlags, const TriNormals3d& TNrms) override ; bool EndTriangles( void) override ; @@ -99,9 +99,9 @@ class ObjOldGraphics : public ObjEGrGraphics { try { m_ogaVect.push_back( oga) ; } catch(...) { return false ; } return true ; } - bool AddOgaStart( int nMode, bool bAux = false) + bool AddOgaStart( int nMode, bool bAux = false, bool bSurfSha = false) { OgAtom oga ; - oga.m_nType = ( bAux ? OgAtom::START_A : OgAtom::START) ; + oga.m_nType = ( bSurfSha ? OgAtom::START_S : ( bAux ? OgAtom::START_A : OgAtom::START)) ; oga.m_nMode = nMode ; return AddOgAtom( oga) ; } bool AddOgaEnd( void) diff --git a/SceneGeom.cpp b/SceneGeom.cpp index 634e03c..7a4cace 100644 --- a/SceneGeom.cpp +++ b/SceneGeom.cpp @@ -231,12 +231,20 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, const MdStMkCol& siObj) nCount += 2 * pZmap->GetBlockCount() ; if ( ( m_nShowZmap & ZSM_LINES) != 0 || ( m_nShowZmap & ZSM_NORMALS) != 0) nCount += 1 ; + if ( pZmap->GetShowEdges()) + nCount += 1 ; } } else if (( nGeoType & GEO_SURF) != 0) { const ISurfTriMesh* pSTM = GetSurfTriMeshAux( pGeoObj) ; - if ( pSTM != nullptr && pSTM->GetMaxTFlag() > 0) - nCount = 2 ; + if ( pSTM != nullptr) { + if ( pSTM->GetMaxTFlag() > 0) + nCount = 2 ; + else + nCount = 1 ; + if ( pSTM->GetShowEdges()) + nCount += 1 ; + } } // nuova modalità grafica solo per superfici e testi con molti triangoli o solidi Zmap const int N_MIN_TRIA_NEWWAY = 100 ; @@ -366,7 +374,11 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, const MdStMkCol& siObj) if ( pSTM == nullptr) return false ; // superficie con visualizzazione standard - if ( pSTM->GetMaxTFlag() == 0) { + bool bTwoColors = ( pSTM->GetMaxTFlag() > 0) ; + if ( ! bTwoColors) { + // Imposto indice blocco corrente + if ( pGraphics->SetCurrent( 0)) + pGraphics->Clear() ; // recupero il materiale Material mMat ; if ( ! iIter.GetCalcMaterial( mMat)) @@ -425,9 +437,8 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, const MdStMkCol& siObj) // Ciclo sui colori for ( int j = 0 ; j < STM_COL ; ++ j) { // Imposto indice blocco corrente - pGraphics->SetCurrent( j) ; - // lo pulisco - pGraphics->Clear() ; + if ( pGraphics->SetCurrent( j)) + pGraphics->Clear() ; // se non ci sono triangoli, passo oltre if ( nTri[j] == 0) continue ; @@ -454,6 +465,28 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, const MdStMkCol& siObj) pGraphics->EndTriangles() ; } } + // eventuali spigoli vivi + if ( pSTM->GetShowEdges()) { + if ( pGraphics->SetCurrent( bTwoColors ? 2 : 1)) + pGraphics->Clear() ; + int nEdgCnt = pSTM->GetEdgeCount() ; + if ( nEdgCnt > 0) { + pGraphics->AddColor( DGRAY) ; + pGraphics->AddMaterial( DGRAY, DGRAY, DGRAY, 10) ; + pGraphics->AddBackMaterial( DGRAY) ; + PNTVECTOR vPnt ; vPnt.reserve( 2 * nEdgCnt) ; + for ( int i = 0 ; i < nEdgCnt ; ++i) { + Point3d ptP1, ptP2 ; + double dAng ; + if ( pSTM->GetEdge( i, ptP1, ptP2, dAng) && + abs( dAng) > pSTM->GetSmoothAngle()) { + vPnt.emplace_back( ptP1) ; + vPnt.emplace_back( ptP2) ; + } + } + pGraphics->AddLines( vPnt, false, true) ; + } + } } // se Zmap else if ( nGeoType == VOL_ZMAP) { @@ -509,10 +542,9 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, const MdStMkCol& siObj) } // Ciclo sui colori for ( int j = 0 ; j < ZMAP_COL ; ++ j) { - // Imposto indice blocco corrente - pGraphics->SetCurrent( ZMAP_COL * i + j) ; - // lo pulisco - pGraphics->Clear() ; + // Imposto indice blocco corrente e lo pulisco + if ( pGraphics->SetCurrent( ZMAP_COL * i + j)) + pGraphics->Clear() ; // se non ci sono triangoli, passo oltre if ( nTri[j] == 0) continue ; @@ -538,11 +570,11 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, const MdStMkCol& siObj) } } // visualizzazione spilloni e normali (sempre nell'ultimo blocco) - if ( ( m_nShowZmap & ZSM_LINES) != 0 || ( m_nShowZmap & ZSM_NORMALS) != 0) { - // imposto indice blocco corrente - pGraphics->SetCurrent( ZMAP_COL * nCount) ; - // lo pulisco - pGraphics->Clear() ; + bool bLinNrmShow = ( ( m_nShowZmap & ZSM_LINES) != 0 || ( m_nShowZmap & ZSM_NORMALS) != 0) ; + if ( bLinNrmShow) { + // imposto indice blocco corrente e lo pulisco + if ( pGraphics->SetCurrent( ZMAP_COL * nCount)) + pGraphics->Clear() ; // ciclo sui tre gruppi di spilloni int nKmin = ( m_nShowZmap & ZSM_LINES) != 0 ? 0 : 3 ; int nKmax = ( m_nShowZmap & ZSM_NORMALS) != 0 ? 6 : 3 ; @@ -580,6 +612,23 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nPass, const MdStMkCol& siObj) pGraphics->AddLines( vPnt) ; } } + // eventuali spigoli vivi + if ( pZmap->GetShowEdges()) { + if ( pGraphics->SetCurrent( ZMAP_COL * nCount + ( bLinNrmShow ? 1 : 0))) + pGraphics->Clear() ; + ICURVEPOVECTOR vpCurve ; + if ( pZmap->GetEdges( vpCurve) && ! vpCurve.empty()) { + int nEdgCnt = int( vpCurve.size()) ; + pGraphics->AddColor( DGRAY) ; + pGraphics->AddMaterial( DGRAY, DGRAY, DGRAY, 10) ; + pGraphics->AddBackMaterial( DGRAY) ; + for ( const auto& pCrv : vpCurve) { + PolyLine PL ; + if ( pCrv->ApproxWithLines(10 * EPS_SMALL, ANG_TOL_GRAPH_DEG, ICurve::APL_SPECIAL, PL)) + pGraphics->AddPolyLine( PL, false, true) ; + } + } + } } // se testo else if ( nGeoType == EXT_TEXT) {