EgtGeomKernel :

- aggiunta SurfFlatRegion::ApproxLoopWithLines.
This commit is contained in:
Dario Sassi
2016-09-03 06:21:20 +00:00
parent e78697e557
commit cffd42a539
2 changed files with 17 additions and 0 deletions
+16
View File
@@ -968,6 +968,22 @@ SurfFlatRegion::GetLoop( int nChunk, int nLoop) const
return pCrv ;
}
//----------------------------------------------------------------------------
bool
SurfFlatRegion::ApproxLoopWithLines( int nChunk, int nLoop, double dLinTol, double dAngTolDeg, int nType, PolyLine& PL) const
{
// recupero il loop nel riferimento intrinseco
const ICurve* pMyCrv = GetMyLoop( nChunk, nLoop) ;
if ( pMyCrv == nullptr)
return false ;
// ne creo una approssimazione
if ( ! pMyCrv->ApproxWithLines( dLinTol, dAngTolDeg, nType, PL))
return false ;
// la porto nel riferimento in cui è inserito l'oggetto
PL.ToGlob( m_frF) ;
return true ;
}
//----------------------------------------------------------------------------
const ISurfTriMesh*
SurfFlatRegion::GetAuxSurf( void) const
+1
View File
@@ -84,6 +84,7 @@ class SurfFlatRegion : public ISurfFlatRegion, public IGeoObjRW
int GetChunkCount( void) const override ;
int GetLoopCount( int nChunk) const override ;
ICurve* GetLoop( int nChunk, int nLoop) const override ; // nChunk 0-based, nLoop 0-based (1°esterno, successivi interni)
bool ApproxLoopWithLines( int nChunk, int nLoop, double dLinTol, double dAngTolDeg, int nType, PolyLine& PL) const override ;
const ISurfTriMesh* GetAuxSurf( void) const override ;
SurfFlatRegion* CloneChunk( int nChunk) const override ;
bool GetChunkCentroid( int nChunk, Point3d& ptCen) const override ;