EgtGeomKernel :

- versione NGE portata a 1018 per aggiunta parametro DexToVoxRatio di Zmap
- in VolZmap funzione SetTolerances rinominata in SetToolTolerances.
This commit is contained in:
Dario Sassi
2020-09-18 16:24:43 +00:00
parent 2fcc500ac4
commit 71ba248c80
3 changed files with 27 additions and 12 deletions
+18 -7
View File
@@ -212,6 +212,8 @@ VolZmap::Dump( string& sOut, bool bMM, const char* szNewLine) const
// numero di blocchi
sOut += "Blocks=" + ToString( m_nNumBlock) + " (" + ToString( m_nFracLin[0]) + "x" +
ToString( m_nFracLin[1]) + "x" + ToString( m_nFracLin[2]) + ")" + szNewLine ;
// dexel per voxel (DexToVoxRatio)
sOut += "DexVoxRat=" + ToString( m_nDexVoxRatio) + szNewLine ;
return true ;
}
@@ -233,7 +235,7 @@ VolZmap::Save( NgeWriter& ngeOut) const
// numero di blocchi
if ( ! ngeOut.WriteInt( m_nNumBlock, ",", false))
return false ;
// numero di dexel per blocco
// numero di voxel per blocco
if ( ! ngeOut.WriteInt( m_nVoxNumPerBlock, ",", false))
return false ;
// numero di blocchi per ogni asse
@@ -241,6 +243,9 @@ VolZmap::Save( NgeWriter& ngeOut) const
if ( ! ngeOut.WriteInt( m_nFracLin[i], ",", false))
return false ;
}
// DexVoxRatio
if ( ! ngeOut.WriteInt( m_nDexVoxRatio, ",", false))
return false ;
// numero di componenti connesse
if ( ! ngeOut.WriteInt( m_nConnectedCompoCount, ",", false))
return false ;
@@ -253,7 +258,7 @@ VolZmap::Save( NgeWriter& ngeOut) const
// sistema di riferimento
if ( ! ngeOut.WriteFrame( m_MapFrame, ";", true))
return false ;
// per ogni mappa : numero di passi in X e Y e quote z estremali
// per ogni mappa : numero di passi in X e Y e quote Z estremali
for ( int i = 0 ; i < m_nMapNum ; ++ i) {
if ( ! ngeOut.WriteInt( m_nNx[i], ",", false))
return false ;
@@ -313,7 +318,7 @@ VolZmap::Load( NgeReader& ngeIn)
// numero di blocchi
if ( ! ngeIn.ReadInt( m_nNumBlock, ",", false))
return false ;
// numero di dexel per blocco
// numero di voxel per blocco
if ( ! ngeIn.ReadInt( m_nVoxNumPerBlock, ",", false))
return false ;
// numero di blocchi per ogni asse
@@ -321,6 +326,11 @@ VolZmap::Load( NgeReader& ngeIn)
if ( ! ngeIn.ReadInt( m_nFracLin[i], ",", false))
return false ;
}
// da versione 1018 : aggiunto DexVoxRatio
if ( ngeIn.GetFileVersion() >= NGE_VER_1018) {
if ( ! ngeIn.ReadInt( m_nDexVoxRatio, ",", false))
return false ;
}
// numero di componenti connesse
if ( ! ngeIn.ReadInt( m_nConnectedCompoCount, ",", false))
return false ;
@@ -335,7 +345,7 @@ VolZmap::Load( NgeReader& ngeIn)
// sistema di riferimento
if ( ! ngeIn.ReadFrame( m_MapFrame, ";", true))
return false ;
// per ogni mappa : numero di passi in X e Y e quote z estremali
// per ogni mappa : numero di passi in X e Y e quote Z estremali
for ( int i = 0 ; i < m_nMapNum ; ++ i) {
if ( ! ngeIn.ReadInt( m_nNx[i], ",", false))
return false ;
@@ -1814,16 +1824,17 @@ VolZmap::Compact( void)
bool
VolZmap::ChangeResolution( int nDexVoxRatio)
{
if ( nDexVoxRatio < 1 || nDexVoxRatio > 2)
if ( nDexVoxRatio < 1 || nDexVoxRatio > 5)
return false ;
if ( nDexVoxRatio != m_nDexVoxRatio) {
int nOldDexVoxRatio = m_nDexVoxRatio ;
m_nDexVoxRatio = nDexVoxRatio ;
if ( CalcBlockNum()) {
ResetGraphics() ;
m_OGrMgr.Clear() ;
return true ;
}
m_nDexVoxRatio = ( m_nDexVoxRatio == 1 ? 2 : 1) ;
m_nDexVoxRatio = nOldDexVoxRatio ;
return false ;
}
return true ;
@@ -1873,7 +1884,7 @@ VolZmap::CalcBlockNum( void)
//----------------------------------------------------------------------------
bool
VolZmap::SetTolerances( double dLinTol, double dAngTolDeg)
VolZmap::SetToolTolerances( double dLinTol, double dAngTolDeg)
{
return m_Tool.SetTolerances( dLinTol, dAngTolDeg) ;
}