diff --git a/EXE_GdbObjAttribs.cpp b/EXE_GdbObjAttribs.cpp index 1986376..bc2ad39 100644 --- a/EXE_GdbObjAttribs.cpp +++ b/EXE_GdbObjAttribs.cpp @@ -508,6 +508,30 @@ ExeSetInfo( int nId, const string& sKey, const string& sInfo) return bOk ; } +//----------------------------------------------------------------------------- +bool +ExeSetInfo( int nId, const string& sKey, const Vector3d& vtV) +{ + IGeomDB* pGeomDB = GetCurrGeomDB() ; + VERIFY_GEOMDB( pGeomDB, false) + // assegno la info + bool bOk = pGeomDB->SetInfo( nId, sKey, vtV) ; + ExeSetModified() ; + return bOk ; +} + +//----------------------------------------------------------------------------- +bool +ExeSetInfo( int nId, const string& sKey, const Point3d& ptP) +{ + IGeomDB* pGeomDB = GetCurrGeomDB() ; + VERIFY_GEOMDB( pGeomDB, false) + // assegno la info + bool bOk = pGeomDB->SetInfo( nId, sKey, ptP) ; + ExeSetModified() ; + return bOk ; +} + //----------------------------------------------------------------------------- bool ExeSetInfo( int nId, const string& sKey, const Frame3d& frFrame) @@ -560,6 +584,26 @@ ExeGetInfo( int nId, const string& sKey, string& sInfo) return pGeomDB->GetInfo( nId, sKey, sInfo) ; } +//----------------------------------------------------------------------------- +bool +ExeGetInfo( int nId, const string& sKey, Vector3d& vtV) +{ + IGeomDB* pGeomDB = GetCurrGeomDB() ; + VERIFY_GEOMDB( pGeomDB, false) + // recupero la info + return pGeomDB->GetInfo( nId, sKey, vtV) ; +} + +//----------------------------------------------------------------------------- +bool +ExeGetInfo( int nId, const string& sKey, Point3d& ptP) +{ + IGeomDB* pGeomDB = GetCurrGeomDB() ; + VERIFY_GEOMDB( pGeomDB, false) + // recupero la info + return pGeomDB->GetInfo( nId, sKey, ptP) ; +} + //----------------------------------------------------------------------------- bool ExeGetInfo( int nId, const string& sKey, Frame3d& frFrame) diff --git a/EXE_General.cpp b/EXE_General.cpp index 70aed51..eaef3d9 100644 --- a/EXE_General.cpp +++ b/EXE_General.cpp @@ -139,6 +139,10 @@ ExeExit( void) FreeExchangeDll() ; FreeGraphicsDll() ; + // cancello riferimenti a funzioni installate + s_pFunProcEvents = nullptr ; + s_pFunOutText = nullptr ; + // fine programma LOG_DATETIME( s_pGenLog, " Exit") diff --git a/EXE_MachMgr.cpp b/EXE_MachMgr.cpp index 483226c..c08bd5f 100644 --- a/EXE_MachMgr.cpp +++ b/EXE_MachMgr.cpp @@ -255,7 +255,7 @@ int ExeGetCurrPhase( void) { IMachMgr* pMachMgr = GetCurrMachMgr() ; - VERIFY_MACHMGR( pMachMgr, false) + VERIFY_MACHMGR( pMachMgr, 0) // recupero la fase di lavorazione corrente nella macchinata corrente return pMachMgr->GetCurrPhase() ; } @@ -287,7 +287,7 @@ int ExeGetRawPartCount( void) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, false) + VERIFY_CTX_MACHMGR( pGseCtx, 0) // recupero il numero di grezzi nella macchinata corrente return pGseCtx->m_pMachMgr->GetRawPartCount() ; } @@ -297,7 +297,7 @@ int ExeGetFirstRawPart( void) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, false) + VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL) // recupero identificativo primo grezzo nella macchinata corrente return pGseCtx->m_pMachMgr->GetFirstRawPart() ; } @@ -307,7 +307,7 @@ int ExeGetNextRawPart( int nRawId) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, false) + VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL) // recupero identificativo successivo grezzo nella macchinata corrente return pGseCtx->m_pMachMgr->GetNextRawPart( nRawId) ; } @@ -362,7 +362,7 @@ bool ExeModifyRawPart( int nRawId, Point3d ptOrig, double dLength, double dWidth, double dHeight, Color cCol) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL) + VERIFY_CTX_MACHMGR( pGseCtx, false) // modifico grezzo indicato nella macchinata corrente bool bOk = pGseCtx->m_pMachMgr->ModifyRawPart( nRawId, ptOrig, dLength, dWidth, dHeight, cCol) ; ExeSetModified() ; @@ -375,7 +375,7 @@ bool ExeModifyRawPart( int nRawId, int nCrvId, double dOverMat, double dZmin, double dHeight, Color cCol) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL) + VERIFY_CTX_MACHMGR( pGseCtx, false) // modifico grezzo indicato nella macchinata corrente bool bOk = pGseCtx->m_pMachMgr->ModifyRawPart( nRawId, nCrvId, dOverMat, dZmin, dHeight, cCol) ; ExeSetModified() ; @@ -582,7 +582,7 @@ int ExeSplitFlatRawPartWithMachinings( int nRawId, const INTVECTOR& vMchId) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, false) + VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL) // divido il grezzo in nuove parti in base alle lavorazioni int nId = pGseCtx->m_pMachMgr->SplitFlatRawPartWithMachinings( nRawId, vMchId) ; ExeSetModified() ; @@ -602,7 +602,7 @@ int ExeGetPartInRawPartCount( int nRawId) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, false) + VERIFY_CTX_MACHMGR( pGseCtx, 0) // recupero il numero di pezzi nel grezzo return pGseCtx->m_pMachMgr->GetPartInRawPartCount( nRawId) ; } @@ -612,7 +612,7 @@ int ExeGetFirstPartInRawPart( int nRawId) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, false) + VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL) // recupero identificativo primo pezzo nel grezzo return pGseCtx->m_pMachMgr->GetFirstPartInRawPart( nRawId) ; } @@ -622,7 +622,7 @@ int ExeGetNextPartInRawPart( int nPartId) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, false) + VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL) // recupero identificativo successivo pezzo nello stesso grezzo return pGseCtx->m_pMachMgr->GetNextPartInRawPart( nPartId) ; } @@ -765,7 +765,7 @@ int ExeAddFixture( const string& sName, const Point3d& ptPos, double dAngRotDeg) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, false) + VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL) // inserisco il dispositivo di presa nella posizione indicata return pGseCtx->m_pMachMgr->AddFixture( sName, ptPos, dAngRotDeg) ; } @@ -775,7 +775,7 @@ int ExeGetFirstFixture( void) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, false) + VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL) // cerca il primo bloccaggio return pGseCtx->m_pMachMgr->GetFirstFixture() ; } @@ -785,7 +785,7 @@ int ExeGetNextFixture( int nFxtId) { GseContext* pGseCtx = GetCurrGseContext() ; - VERIFY_CTX_MACHMGR( pGseCtx, false) + VERIFY_CTX_MACHMGR( pGseCtx, GDB_ID_NULL) // cerca il successivo bloccaggio return pGseCtx->m_pMachMgr->GetNextFixture( nFxtId) ; }