EgtInterface 1.6d3 :
- costanti stringa sostituite con costanti numeriche - modificate funzioni API e LUA per scansione pezzi e layer - aggiunta pulizia memoria al caricamento messaggi (necessario al cambio lingua) - migliorie varie a funzioni Lua.
This commit is contained in:
+81
-21
@@ -227,6 +227,36 @@ __stdcall EgtGetCurrMachGroup( void)
|
||||
return pMachMgr->GetCurrMachGroup() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
EgtGetRawPartNbr( void)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero il numero di grezzi nella macchinata corrente
|
||||
return pGseCtx->m_pMachMgr->GetRawPartNbr() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
EgtGetFirstRawPart( void)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero identificativo primo grezzo nella macchinata corrente
|
||||
return pGseCtx->m_pMachMgr->GetFirstRawPart() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
EgtGetNextRawPart( int nRawId)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero identificativo successivo grezzo nella macchinata corrente
|
||||
return pGseCtx->m_pMachMgr->GetNextRawPart( nRawId) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
EgtAddRawPart( Point3d ptOrig, double dWidth, double dLength, double dHeight, Color cCol)
|
||||
@@ -272,27 +302,6 @@ EgtAddRawPartWithPart( int nPartId, int nCrvId, double dOverMat, Color cCol)
|
||||
return nId ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
EgtAddPartToRawPart( int nPartId, const Point3d& ptPos, int nRawId)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// inserisco pezzo in un grezzo della macchinata corrente
|
||||
bool bOk = pGseCtx->m_pMachMgr->AddPartToRawPart( nPartId, ptPos, nRawId) ;
|
||||
pGseCtx->m_bModified = true ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtAddPartToRawPart(" + ToString( nPartId) + ",{" +
|
||||
ToString( ptPos) + "}," +
|
||||
ToString( nRawId) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco il risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
EgtModifyRawPartHeight( int nRawId, double dHeight)
|
||||
@@ -415,6 +424,57 @@ EgtMoveToCenterRawPart( int nRawId, const Point3d& ptCenter, int nFlag)
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
EgtGetPartInRawPartNbr( int nRawId)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero il numero di pezzi nel grezzo
|
||||
return pGseCtx->m_pMachMgr->GetPartInRawPartNbr( nRawId) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
EgtGetFirstPartInRawPart( int nRawId)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero identificativo primo pezzo nel grezzo
|
||||
return pGseCtx->m_pMachMgr->GetFirstPartInRawPart( nRawId) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
int
|
||||
EgtGetNextPartInRawPart( int nPartId)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// recupero identificativo successivo pezzo nello stesso grezzo
|
||||
return pGseCtx->m_pMachMgr->GetNextPartInRawPart( nPartId) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
EgtAddPartToRawPart( int nPartId, const Point3d& ptPos, int nRawId)
|
||||
{
|
||||
GseContext* pGseCtx = GetCurrGseContext() ;
|
||||
VERIFY_CTX_MACHMGR( pGseCtx, false)
|
||||
// inserisco pezzo in un grezzo della macchinata corrente
|
||||
bool bOk = pGseCtx->m_pMachMgr->AddPartToRawPart( nPartId, ptPos, nRawId) ;
|
||||
pGseCtx->m_bModified = true ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtAddPartToRawPart(" + ToString( nPartId) + ",{" +
|
||||
ToString( ptPos) + "}," +
|
||||
ToString( nRawId) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco il risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
EgtRemovePartFromRawPart( int nPartId)
|
||||
|
||||
Reference in New Issue
Block a user