EgtExchange :

- in BeamMgr aggiunta funzione UpdatePart
- in BeamMgr sviluppata la funzione EnableProcess
- migliorie varie in BtlGeom.
This commit is contained in:
Dario Sassi
2020-12-31 17:36:35 +00:00
parent 50720d68bf
commit 7dca18130b
6 changed files with 112 additions and 23 deletions
+25 -4
View File
@@ -7018,16 +7018,36 @@ BtlGeom::SetUserAttributes( int nId, const STRVECTOR& vsUAtt)
m_pGDB->SetInfo( nId, sKey, sVal) ;
// se disabilitazione, cambio colore
if ( sKey == IKEY_DO && sVal == "0") {
Color cCol ;
m_pGDB->GetCalcMaterial( nId, cCol) ;
cCol.Set( 160, 160, 160, cCol.GetIntAlpha()) ;
m_pGDB->SetMaterial( nId, cCol) ;
SetProcessColor( nId, false) ;
}
}
}
return true ;
}
//---------------------------------------------------------------------------
bool
BtlGeom::SetProcessColor( int nId, bool bEnable)
{
if ( nId == GDB_ID_NULL)
return false ;
// determino il nuovo colore
Color cOrigCol ;
m_pGDB->GetCalcMaterial( nId, cOrigCol) ;
Color cNewCol = ( bEnable ? m_ProcsCol : m_ProcsOffCol) ;
cNewCol.SetAlpha( cOrigCol.GetIntAlpha()) ;
// assegno il nuovo colore al processo
m_pGDB->SetMaterial( nId, cNewCol) ;
// se ci sono geometrie ausiliarie, assegno il nuovo colore anche a queste
INTVECTOR vAux ;
if ( m_pGDB->GetInfo( nId, IKEY_AUXID, vAux) && ! vAux.empty()) {
for ( auto nAux : vAux)
m_pGDB->SetMaterial( nId + nAux, cNewCol) ;
}
return true ;
}
//---------------------------------------------------------------------------
bool
BtlGeom::SetAuxId( int nId, const INTVECTOR& vnAuxId)
@@ -7108,6 +7128,7 @@ BtlGeom::InsertEmptySurface( int nGroup, int nProc, int nSide, const string& sDe
SetNameAndInfo( nId, nGroup, nProc, nSide, sDes, nProcId) ;
// aggiungo parametri
SetParams( nId, vnDPar, vdPar, vsUAtt) ;
m_nProcId = nId ;
return true ;
}