EgtGeomKernel 2.2d1 :

- alla classe Polygon3d aggiunto metodo Add
- nella classe SurfFlatRegion corretto possesso curva in AddExtLoop e AddIntLoop
- gli attributi delle entità vengono assegnati se non vuoti, altrimenti vengono rimossi.
This commit is contained in:
Dario Sassi
2020-04-04 09:43:06 +00:00
parent 2c6ebdadca
commit eba240cb2a
5 changed files with 92 additions and 30 deletions
+13 -5
View File
@@ -822,11 +822,19 @@ GdbObj::RemoveName( void)
bool
GdbObj::SetInfo( const string& sKey, const string& sInfo)
{
// verifico esistenza (con eventuale creazione) degli attributi
if ( GetSafeAttribs() == nullptr)
return false ;
// assegno l'Info
return m_pAttribs->SetInfo( sKey, sInfo) ;
// se Info non vuota
if ( ! IsEmptyOrSpaces( sInfo)) {
// verifico esistenza (con eventuale creazione) degli attributi
if ( GetSafeAttribs() == nullptr)
return false ;
// eseguo assegnazione
return m_pAttribs->SetInfo( sKey, sInfo) ;
}
// altrimenti
else {
// se esiste, la rimuovo
return ( m_pAttribs == nullptr || m_pAttribs->RemoveInfo( sKey)) ;
}
}
//----------------------------------------------------------------------------