EgtGeomKernel 2.1i1 :

- migliorie a ChainCurves
- aggiunta GetFeatureChaines a VolZmap.
This commit is contained in:
Dario Sassi
2019-09-12 07:43:35 +00:00
parent e79caee914
commit bd1efafbc0
7 changed files with 398 additions and 44 deletions
+30 -2
View File
@@ -2711,6 +2711,9 @@ GdbExecutor::ExecuteVolZmap( const string& sCmd2, const STRVECTOR& vsParams)
else if ( sCmd2 == "COMP") {
return ExecuteVolZmapCompact( vsParams) ;
}
else if ( sCmd2 == "CHAIN") {
return ExecuteVolZmapChain( vsParams) ;
}
return false ;
}
/*
@@ -3055,10 +3058,10 @@ GdbExecutor::ExecuteVolZmapCut( const STRVECTOR& vsParams)
bool
GdbExecutor::ExecuteVolZmapCompact( const STRVECTOR& vsParams)
{
// Parametri : ZmapId
// Parametri : ZmapId
if ( vsParams.size() != 1)
return false ;
// Recupero Zmap
// Recupero Zmap
int nZmapId = GetIdParam( vsParams[0]) ;
VolZmap* pZmap = GetBasicVolZmap( m_pGDB->GetGeoObj( nZmapId)) ;
if ( pZmap == nullptr)
@@ -3067,6 +3070,31 @@ GdbExecutor::ExecuteVolZmapCompact( const STRVECTOR& vsParams)
return true ;
}
//----------------------------------------------------------------------------
bool
GdbExecutor::ExecuteVolZmapChain(const STRVECTOR& vsParams)
{
// Parametri : ZmapId, ParentId
if ( vsParams.size() != 2)
return false ;
// Recupero Zmap
int nZmapId = GetIdParam( vsParams[0]) ;
VolZmap* pZmap = GetBasicVolZmap( m_pGDB->GetGeoObj( nZmapId)) ;
if ( pZmap == nullptr)
return false;
// recupero il riferimento in cui è immerso lo Zmap
Frame3d frRef ;
if ( ! m_pGDB->GetGroupGlobFrame( GetIdParam( vsParams[1]), frRef))
return false ;
ICURVEPOVECTOR vpLoop ;
pZmap->GetFeatureChaines( vpLoop) ;
bool bOk = true ;
for ( int n = 0 ; n < int( vpLoop.size()) && bOk ; ++ n) {
bOk = bOk && AddGeoObj( "$NN", vsParams[1], Release( vpLoop[n])) ;
}
return bOk ;
}
//----------------------------------------------------------------------------
bool
GdbExecutor::ExecuteIntersection( const std::string& sCmd2, const STRVECTOR& vsParams)