From 2e4b67f9e9badd570678e9c2eea4145a60f1a7b4 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 14 Jan 2015 21:54:34 +0000 Subject: [PATCH] =?UTF-8?q?EgtGeomKernel=201.6a2=20:=20-=20aggiunte=20GetN?= =?UTF-8?q?feFontDir=20e=20GetDefaultFont=20-=20modifiche=20a=20Set=20di?= =?UTF-8?q?=20ExtText=20-=20migliorata=20gestione=20materiali=20-=20GeomDB?= =?UTF-8?q?::Load=20ora=20pu=C3=B2=20funzionare=20aggiungendo=20a=20DB=20g?= =?UTF-8?q?i=C3=A0=20carico=20per=20Insert.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DistPointArc.cpp | 2 +- DistPointCrvBezier.cpp | 2 +- DistPointCrvComposite.cpp | 2 +- DistPointCurve.cpp | 2 +- DistPointLine.cpp | 2 +- EGkDllMain.cpp | 20 ++++++++++++++ EgtGeomKernel.rc | Bin 11718 -> 11710 bytes EgtGeomKernel.vcxproj | 6 +++++ ExtText.cpp | 25 +++++++++--------- ExtText.h | 13 +++++---- FontManager.h | 4 +++ GdbExecutor.cpp | 6 ++--- GdbMaterialMgr.cpp | 32 +++++++++++++++------- GdbMaterialMgr.h | 8 +++--- GeomDB.cpp | 54 ++++++++++++++++++++++++++------------ GeomDB.h | 6 ++--- 16 files changed, 124 insertions(+), 60 deletions(-) diff --git a/DistPointArc.cpp b/DistPointArc.cpp index f4f9443..9b98d60 100644 --- a/DistPointArc.cpp +++ b/DistPointArc.cpp @@ -24,7 +24,7 @@ DistPointArc::DistPointArc( const Point3d& ptP, const ICurveArc& arArc) // distanza non calcolata m_dDist = - 1 ; - if ( ! arArc.IsValid()) + if ( &arArc == nullptr || ! arArc.IsValid()) return ; // se circonferenza diff --git a/DistPointCrvBezier.cpp b/DistPointCrvBezier.cpp index 4c47052..c1abbb5 100644 --- a/DistPointCrvBezier.cpp +++ b/DistPointCrvBezier.cpp @@ -26,7 +26,7 @@ DistPointCrvBezier::DistPointCrvBezier( const Point3d& ptP, const ICurveBezier& // distanza non calcolata m_dDist = - 1 ; - if ( ! CrvBez.IsValid()) + if ( &CrvBez == nullptr || ! CrvBez.IsValid()) return ; // determino tolleranza di approssimazione in base a ingombro curva diff --git a/DistPointCrvComposite.cpp b/DistPointCrvComposite.cpp index c380f03..1ef8248 100644 --- a/DistPointCrvComposite.cpp +++ b/DistPointCrvComposite.cpp @@ -23,7 +23,7 @@ DistPointCrvComposite::DistPointCrvComposite( const Point3d& ptP, const ICurveCo // distanza non calcolata m_dDist = - 1 ; - if ( ! CrvCompo.IsValid()) + if ( &CrvCompo == nullptr || ! CrvCompo.IsValid()) return ; // ciclo su ogni curva diff --git a/DistPointCurve.cpp b/DistPointCurve.cpp index 618df4a..1a78825 100644 --- a/DistPointCurve.cpp +++ b/DistPointCurve.cpp @@ -30,7 +30,7 @@ DistPointCurve::DistPointCurve( const Point3d& ptP, const ICurve& Curve, bool bI m_pCurve = nullptr ; // curva non valida - if ( ! Curve.IsValid()) + if ( &Curve == nullptr || ! Curve.IsValid()) return ; // chiamo calcolatore opportuno diff --git a/DistPointLine.cpp b/DistPointLine.cpp index 3d8ca8d..f4eec46 100644 --- a/DistPointLine.cpp +++ b/DistPointLine.cpp @@ -23,7 +23,7 @@ DistPointLine::DistPointLine( const Point3d& ptP, // distanza non calcolata m_dSqDist = - 1 ; - if ( ! crvLine.IsValid()) + if ( &crvLine == nullptr || ! crvLine.IsValid()) return ; double dLen ; diff --git a/EGkDllMain.cpp b/EGkDllMain.cpp index f940c76..6a08b9d 100644 --- a/EGkDllMain.cpp +++ b/EGkDllMain.cpp @@ -119,3 +119,23 @@ InitFontManager( const std::string& sNfeFontDir, const std::string& sDefaultFont // lo inizializzo fntMgr.Init( sNfeFontDir, sDefaultFont) ; } + +//----------------------------------------------------------------------------- +const std::string& +GetNfeFontDir( void) +{ + // recupero il font manager + FontManager& fntMgr = FontManager::GetFontManager() ; + // restituisco il dato + return fntMgr.GetNfeFontDir() ; +} + +//----------------------------------------------------------------------------- +const std::string& +GetDefaultFont( void) +{ + // recupero il font manager + FontManager& fntMgr = FontManager::GetFontManager() ; + // restituisco il dato + return fntMgr.GetDefaultFont() ; +} diff --git a/EgtGeomKernel.rc b/EgtGeomKernel.rc index 3b7967ce439cf11d417ff0407182434f5c8ae46f..0b16fa0f7bee2b8b553fc9f91bbc2f5eb9edb3a4 100644 GIT binary patch delta 274 zcmX>Wy)SyhCpK0y1|0^&$+!7*8O=6x@-JnYTqmS6`3I*GP$H4RXtJWP?qnaXW!xqV zx(r4P1`LJ_rknqA6*B@=7xE-Cp=sx5#;tAgU#_W>CkWpI>x^XFd_t6qkyPz{(h%)| ojFTU*a!fuUnl;%#ZULGp#P|W|nCX*?l<$BY!^pTfK(&km0Cg8gIRF3v delta 298 zcmdlNeJpyzCpLCd1|0@N2BXR6<#ZWMH#3SaWtv>ar87A}l4J5ePAOJXh8&=zBDd~j zFRo?W#tga)Mhpf(4JMm^a}_f(nohpRA-=gz#)@(C0bU_S4Ac0TahovtH`mn3J;L{p q44Hg@mt*r0Q7$qJ>X1el$(ProjectName)D$(PlatformArchitecture) $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ $(Configuration)$(PlatformArchitecture)\ + C:\;$(IncludePath) true $(ProjectName)D$(PlatformArchitecture) $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ $(Configuration)$(PlatformArchitecture)\ + C:\;$(IncludePath) false $(ProjectName)R$(PlatformArchitecture) $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ $(Configuration)$(PlatformArchitecture)\ + C:\;$(IncludePath) false $(ProjectName)R$(PlatformArchitecture) $(SolutionDir)$(Configuration)$(PlatformArchitecture)\ $(Configuration)$(PlatformArchitecture)\ + C:\;$(IncludePath) @@ -176,6 +180,7 @@ copy $(TargetPath) \EgtProg\DllD64 true StreamingSIMDExtensions2 false + Precise Windows @@ -216,6 +221,7 @@ copy $(TargetPath) \EgtProg\Dll32 true NotSet false + Precise Windows diff --git a/ExtText.cpp b/ExtText.cpp index c4eff93..f65a07a 100644 --- a/ExtText.cpp +++ b/ExtText.cpp @@ -40,7 +40,7 @@ ExtText::~ExtText( void) //---------------------------------------------------------------------------- bool -ExtText::Set( const string& sText, const Point3d& ptP, double dAngDeg, double dH) +ExtText::Set( const Point3d& ptP, double dAngDeg, const string& sText, double dH) { // controllo testo non vuoto if ( sText.empty()) @@ -66,9 +66,8 @@ ExtText::Set( const string& sText, const Point3d& ptP, double dAngDeg, double dH //---------------------------------------------------------------------------- bool -ExtText::Set( const string& sText, const Point3d& ptP, double dAngDeg, - const string& sFont, int nW, bool bItl, double dH, double dRat, double dAddAdv, - int nInsPos) +ExtText::Set( const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtD, + const string& sText, const string& sFont, bool bItl, double dH) { // controllo testo non vuoto if ( sText.empty()) @@ -78,16 +77,16 @@ ExtText::Set( const string& sText, const Point3d& ptP, double dAngDeg, return false ; // assegno i dati m_ptP = ptP ; - m_vtN = Z_AX ; - m_vtD = FromPolar( 1, dAngDeg) ; + m_vtN = vtN ; + m_vtD = vtD ; m_sText = sText ; m_sFont = sFont ; - m_nWeight = nW ; + m_nWeight = 400 ; m_bItalic = bItl ; m_dHeight = dH ; - m_dRatio = dRat ; - m_dAddAdvance = dAddAdv ; - m_nInsPos = (( nInsPos >= ETXT_IPTL && nInsPos <= ETXT_IPBR) ? nInsPos : ETXT_IPBL) ; + m_dRatio = 1 ; + m_dAddAdvance = 0 ; + m_nInsPos = ETXT_IPBL ; // imposto ricalcolo della grafica m_OGrMgr.Reset() ; @@ -97,9 +96,9 @@ ExtText::Set( const string& sText, const Point3d& ptP, double dAngDeg, //---------------------------------------------------------------------------- bool -ExtText::Set( const string& sText, const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtD, - const string& sFont, int nW, bool bItl, double dH, double dRat, double dAddAdv, - int nInsPos) +ExtText::Set( const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtD, + const string& sText, const string& sFont, int nW, bool bItl, double dH, + double dRat, double dAddAdv, int nInsPos) { // controllo testo non vuoto if ( sText.empty()) diff --git a/ExtText.h b/ExtText.h index f719d23..0da5267 100644 --- a/ExtText.h +++ b/ExtText.h @@ -56,13 +56,12 @@ class ExtText : public IExtText, public IGeoObjRW public : // IExtText virtual bool CopyFrom( const IGeoObj* pGObjSrc) ; - virtual bool Set( const std::string& sText, const Point3d& ptP, double dAngDeg, double dH) ; - virtual bool Set( const std::string& sText, const Point3d& ptP, double dAngDeg, - const std::string& sFont, int nW, bool bItl, double dH, double dRat, double dAddAdv, - int nInsPos = 7) ; - virtual bool Set( const std::string& sText, const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtD, - const std::string& sFont, int nW, bool bItl, double dH, double dRat, double dAddAdv, - int nInsPos = 7) ; + virtual bool Set( const Point3d& ptP, double dAngDeg, const std::string& sText, double dH) ; + virtual bool Set( const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtD, + const std::string& sText, const std::string& sFont, bool bItl, double dH) ; + virtual bool Set( const Point3d& ptP, const Vector3d& vtN, const Vector3d& vtD, + const std::string& sText, const std::string& sFont, int nW, bool bItl, double dH, + double dRat, double dAddAdv, int nInsPos = 7) ; virtual const Point3d& GetPoint( void) const { return m_ptP ; } virtual const Vector3d& GetNormVersor( void) const diff --git a/FontManager.h b/FontManager.h index e765dc1..2965e2b 100644 --- a/FontManager.h +++ b/FontManager.h @@ -26,6 +26,10 @@ class FontManager bool Init( const std::string& sNfeFontDir, const std::string& sDefaultFont) ; bool SetCurrFont( const std::string& sFont, int nWeight, bool bItalic, double dHeight, double dRatio, double dAddAdvance) ; + const std::string& GetNfeFontDir( void) + { return m_sNfeFontDir ; } + const std::string& GetDefaultFont( void) + { return m_sDefaultFont ; } bool GetCapHeight( double& dCapH) ; bool GetAscent( double& dAsc) ; bool GetDescent( double& dDesc) ; diff --git a/GdbExecutor.cpp b/GdbExecutor.cpp index 23fd51c..2d4f886 100644 --- a/GdbExecutor.cpp +++ b/GdbExecutor.cpp @@ -2721,7 +2721,7 @@ GdbExecutor::TextSimple( const STRVECTOR& vsParams) if ( IsNull( pTXT)) return false ; // lo riempio - if ( ! pTXT->Set( sText, ptP, dAngRotDeg, dH)) + if ( ! pTXT->Set( ptP, dAngRotDeg, sText, dH)) return false ; // inserisco il testo nel DB return AddGeoObj( vsParams[0], vsParams[1], Release( pTXT)) ; @@ -2796,7 +2796,7 @@ GdbExecutor::TextComplete( const STRVECTOR& vsParams) if ( IsNull( pTXT)) return false ; // lo riempio - if ( ! pTXT->Set( sText, ptP, dAngRotDeg, vsParams[5], nW, bItl, dH, dRat, dAddAdv, nInsPos)) + if ( ! pTXT->Set( ptP, Z_AX, FromPolar( 1, dAngRotDeg), sText, vsParams[5], nW, bItl, dH, dRat, dAddAdv, nInsPos)) return false ; // inserisco il testo nel DB return AddGeoObj( vsParams[0], vsParams[1], Release( pTXT)) ; @@ -5424,7 +5424,7 @@ GdbExecutor::ExecuteOutTextIcci( const string& sCmd2, const STRVECTOR& vsParams) if ( IsNull( pTXT)) return false ; // lo riempio - if ( ! pTXT->Set( sText, ptText, 0, dH)) + if ( ! pTXT->Set( ptText, 0, sText, dH)) return false ; // inserisco il testo nel DB return AddGeoObj( vsParams[0], vsParams[1], Release( pTXT)) ; diff --git a/GdbMaterialMgr.cpp b/GdbMaterialMgr.cpp index bbd5679..0a5c224 100644 --- a/GdbMaterialMgr.cpp +++ b/GdbMaterialMgr.cpp @@ -20,6 +20,10 @@ using namespace std ; +//---------------------------------------------------------------------------- +static const string RESERVED_NAME = "$$" ; + + //---------------------------------------------------------------------------- GdbMaterialMgr::GdbMaterialMgr( void) { @@ -58,7 +62,7 @@ GdbMaterialMgr::Save( NgeWriter& ngeOut) const // scrittura dei materiali custom for ( int i = m_nStdNum ; i < int( m_GdbMats.size()) ; ++ i) { // Nome, Id, Tipo (1=materiale senza texture) - string sMatName = ( m_GdbMats[i].sName.empty() ? "$$" : m_GdbMats[i].sName) ; + string sMatName = ( m_GdbMats[i].sName.empty() ? RESERVED_NAME : m_GdbMats[i].sName) ; if ( ! ngeOut.WriteString( sMatName, ",")) return false ; if ( ! ngeOut.WriteInt( i + 1, ",")) @@ -81,7 +85,7 @@ GdbMaterialMgr::Save( NgeWriter& ngeOut) const //---------------------------------------------------------------------------- bool -GdbMaterialMgr::Load( NgeReader& ngeIn) +GdbMaterialMgr::Load( NgeReader& ngeIn, INTVECTOR& vBaseMatId) { // lettura eventuale intestazione libreria int nKey ; @@ -91,6 +95,10 @@ GdbMaterialMgr::Load( NgeReader& ngeIn) ngeIn.UngetKey() ; return true ; } + // aggiorno indice rilocazione per materiali standard (1 based) + vBaseMatId.resize( m_nStdNum + 1, 0) ; + for ( int i = 0 ; i <= m_nStdNum ; ++ i) + vBaseMatId[i] = i ; // lettura numero di materiali custom int nCustNum ; if ( ! ngeIn.ReadInt( nCustNum, ";", true)) @@ -107,6 +115,9 @@ GdbMaterialMgr::Load( NgeReader& ngeIn) int nType ; if ( ! ngeIn.ReadInt( nType, ";", true)) return false ; + // verifico correttezza indice + if ( nInd != m_nStdNum + i + 1) + return false ; // dati del materiale Color colAmb ; if ( ! ngeIn.ReadCol( colAmb, ";")) @@ -120,14 +131,17 @@ GdbMaterialMgr::Load( NgeReader& ngeIn) double dShin ; if ( ! ngeIn.ReadDouble( dShin, ";", true)) return false ; - // inserisco il materiale - int nNew = AddMaterial( sMatName, Material( colAmb, colDiff, colSpec, dShin)) ; - if ( nNew == GDB_MT_NULL || nNew != nInd) + // inserisco il materiale, verificando non sia già presente (escludo nome riservato) + int nNew = (( sMatName != RESERVED_NAME) ? FindMaterial( sMatName) : GDB_MT_NULL) ; + if ( nNew == GDB_MT_NULL) + nNew = AddMaterial( sMatName, Material( colAmb, colDiff, colSpec, dShin), true) ; + if ( nNew == GDB_MT_NULL) return false ; + vBaseMatId.push_back( nNew) ; } // sistemazione dei materiali cancellati for ( int i = m_nStdNum ; i < int( m_GdbMats.size()) ; ++ i) { - if ( m_GdbMats[i].sName == "$$") + if ( m_GdbMats[i].sName == RESERVED_NAME) EraseMaterial( i + 1) ; } @@ -136,13 +150,13 @@ GdbMaterialMgr::Load( NgeReader& ngeIn) //---------------------------------------------------------------------------- int -GdbMaterialMgr::AddMaterial( const string& sName, const Material& matM) +GdbMaterialMgr::AddMaterial( const string& sName, const Material& matM, bool bLoad) { // verifico validità nome - if ( ! IsValidName( sName)) + if ( ! IsValidName( sName) || ( ! bLoad && sName == RESERVED_NAME)) return GDB_MT_NULL ; // se il materiale già esiste ritorno errore - if ( FindMaterial( sName) > 0) + if ( sName != RESERVED_NAME && FindMaterial( sName) > 0) return GDB_MT_NULL ; // provo ad inserire al posto del primo cancellato int nId = FindFirstErased() ; diff --git a/GdbMaterialMgr.h b/GdbMaterialMgr.h index dde8c3a..21d0fe7 100644 --- a/GdbMaterialMgr.h +++ b/GdbMaterialMgr.h @@ -15,7 +15,7 @@ #include "Material.h" #include "/EgtDev/Include/EGkGdbConst.h" -#include +#include "/EgtDev/Include/EgtNumCollection.h" class NgeWriter ; class NgeReader ; @@ -27,10 +27,12 @@ class GdbMaterialMgr GdbMaterialMgr( void) ; bool Clear( void) ; bool Save( NgeWriter& ngeOut) const ; - bool Load( NgeReader& ngeIn) ; - int AddMaterial( const std::string& sName, const Material& matM) ; + bool Load( NgeReader& ngeIn, INTVECTOR& vBaseMatId) ; + int AddMaterial( const std::string& sName, const Material& matM, bool bLoad = false) ; bool EraseMaterial( int nId) ; int FindMaterial( const std::string& sName) const ; + int GetMaxStdMaterialId( void) const + { return m_nStdNum ; } int GetMaxMaterialId( void) const { return int( m_GdbMats.size()) ; } bool ExistsMaterial( int nId) const diff --git a/GeomDB.cpp b/GeomDB.cpp index 72176be..1f392dc 100644 --- a/GeomDB.cpp +++ b/GeomDB.cpp @@ -19,10 +19,10 @@ #include "Attribs.h" #include "NgeReader.h" #include "NgeWriter.h" -#include "/EgtDev/Include/EgnStringUtils.h" #include "/EgtDev/Include/EGkStringUtils3d.h" #include "/EgtDev/Include/EgnStringConverter.h" #include "/EgtDev/Include/EgtPointerOwner.h" +#include "/EgtDev/Include/EgtNumCollection.h" #include "/EgtDev/Include/SELkMachineId.h" #include "/EgtDev/Include/SELkKeyProc.h" #include @@ -95,8 +95,11 @@ GeomDB::Clear( void) //---------------------------------------------------------------------------- bool -GeomDB::Load( const std::string& sFileIn) +GeomDB::Load( const string& sFileIn, int nGroupId) { + // recupero massimo Id (diventa Id base per entità da caricare) + int nBaseGdbId = m_IdManager.GetMaxId() ; + // apertura file NgeReader ngeIn ; if ( ! ngeIn.Init( sFileIn)) { @@ -105,14 +108,16 @@ GeomDB::Load( const std::string& sFileIn) } // leggo l'intestazione - if ( ! LoadHeader( ngeIn)) { + if ( ! LoadHeader( ngeIn, ( nBaseGdbId == 0))) { string sOut = "GeomDbLoad : Error on pos " + ToString( ngeIn.GetCurrPos()) ; LOG_ERROR( GetEGkLogger(), sOut.c_str()) return false ; } // leggo i materiali custom - if ( ! m_MatManager.Load( ngeIn)) { + INTVECTOR vBaseMatId ; + vBaseMatId.reserve( 48) ; + if ( ! m_MatManager.Load( ngeIn, vBaseMatId)) { string sOut = "GeomDbLoad : Error on pos " + ToString( ngeIn.GetCurrPos()) ; LOG_ERROR( GetEGkLogger(), sOut.c_str()) return false ; @@ -122,7 +127,7 @@ GeomDB::Load( const std::string& sFileIn) bool bEnd ; bool bOk = true ; do { - if ( ! LoadOneObj( ngeIn, bEnd)) { + if ( ! LoadOneObj( ngeIn, nGroupId, nBaseGdbId, vBaseMatId, bEnd)) { bOk = false ; string sOut = "GeomDbLoad : Error on pos " + ToString( ngeIn.GetCurrPos()) ; LOG_ERROR( GetEGkLogger(), sOut.c_str()) @@ -134,7 +139,7 @@ GeomDB::Load( const std::string& sFileIn) //---------------------------------------------------------------------------- bool -GeomDB::LoadHeader( NgeReader& ngeIn) +GeomDB::LoadHeader( NgeReader& ngeIn, bool bSave) { // intestazione int nKey ; @@ -156,12 +161,15 @@ GeomDB::LoadHeader( NgeReader& ngeIn) Color colDef( 0, 0, 0, 0) ; if ( ! ngeIn.ReadCol( colDef, ";", true)) return false ; - return SetDefaultMaterial( colDef) ; + if ( bSave) + return SetDefaultMaterial(colDef) ; + else + return true ; } //---------------------------------------------------------------------------- bool -GeomDB::LoadOneObj( NgeReader& ngeIn, bool& bEnd) +GeomDB::LoadOneObj( NgeReader& ngeIn, int nGroupId, int nBaseGdbId, const INTVECTOR& vBaseMatId, bool& bEnd) { // in generale non è fine file bEnd = false ; @@ -193,21 +201,33 @@ GeomDB::LoadOneObj( NgeReader& ngeIn, bool& bEnd) if ( pGdbObj == nullptr) return false ; - // se lettura dati e inserimento nel DB vanno bene + // se lettura dati va bene int nParentId ; - if ( pGdbObj->Load( nKey, ngeIn, nParentId) && - InsertInGeomDB( pGdbObj, nParentId, GDB_SON)) - return true ; - // altrimenti errore - else { - delete pGdbObj ; - return false ; + if ( pGdbObj->Load( nKey, ngeIn, nParentId)) { + // aggiusto Id + pGdbObj->m_nId += nBaseGdbId ; + // aggiusto Id del gruppo di appartenenza + if ( nParentId == GDB_ID_ROOT) + nParentId += nGroupId ; + else + nParentId += nBaseGdbId ; + // aggiusto eventuale indice del materiale + int nMat ; + if ( pGdbObj->GetMaterial( nMat) && + nMat > 0 && nMat < int( vBaseMatId.size())) + pGdbObj->SetMaterial( vBaseMatId[nMat]) ; + // se inserimento nel DB va bene, ritorno con successo + if ( InsertInGeomDB( pGdbObj, nParentId, GDB_SON)) + return true ; } + // altrimenti errore + delete pGdbObj ; + return false ; } //---------------------------------------------------------------------------- bool -GeomDB::Save( const std::string& sFileOut, int nFlag) const +GeomDB::Save( const string& sFileOut, int nFlag) const { // apertura file NgeWriter ngeOut ; diff --git a/GeomDB.h b/GeomDB.h index de5473a..7bbf1d9 100644 --- a/GeomDB.h +++ b/GeomDB.h @@ -34,7 +34,7 @@ class GeomDB : public IGeomDB virtual ~GeomDB( void) ; virtual bool Init( void) ; virtual bool Clear( void) ; - virtual bool Load( const std::string& sFileIn) ; + virtual bool Load( const std::string& sFileIn, int nGroupId = GDB_ID_ROOT) ; virtual bool Save( const std::string& sFileOut, int nFlag = GDB_SV_BIN) const ; virtual bool ExistsObj( int nId) const ; virtual int AddGroup( int nId, int nParentId, const Frame3d& frFrame) ; @@ -196,8 +196,8 @@ class GeomDB : public IGeomDB int Copy( int nIdSou, int nIdDest, int nRefId, int nSonBeforeAfter, bool bGlob) ; bool Relocate( int nId, int nRefId, int nSonBeforeAfter, bool bGlob) ; bool Erase( GdbObj* pGObj) ; - bool LoadHeader( NgeReader& ngeIn) ; - bool LoadOneObj( NgeReader& ngeIn, bool& bEnd) ; + bool LoadHeader( NgeReader& ngeIn, bool bSave) ; + bool LoadOneObj( NgeReader& ngeIn, int nGroupId, int nBaseGdbId, const INTVECTOR& vBaseMatId, bool& bEnd) ; bool SaveHeader( NgeWriter& ngeOut) const ; bool SaveFooter( NgeWriter& ngeOut) const ; bool SetStatus( GdbObj* pGdbObj, int nStat) ;