EgtExecutor 1.6i9 :

- correzione nella creazione di linee tangenti tra curve con riferimenti diversi
- aggiunta gestione info di entità con Frame3d
- i gruppi testimoni di pezzi nei grezzi ora non sono più riconosciuti come pezzi
- restituzione dell'area di tavola come regione o ocntorno
- aggiunte funzioni per gestione texture.
This commit is contained in:
Dario Sassi
2015-10-01 20:47:45 +00:00
parent b39c22bcf0
commit f6dff2cefd
6 changed files with 79 additions and 6 deletions
+4 -4
View File
@@ -105,7 +105,7 @@ ExeCreateLine( int nParentId, const Point3d& ptIni, const Point3d& ptFin, int nR
//-------------------------------------------------------------------------------
int
ExeCreateLineEx( int nParentId, const Point3d& ptIni, int nSepI, int nIdI,
const Point3d& ptFin, int nSepF, int nIdF, int nRefType)
const Point3d& ptFin, int nSepF, int nIdF, int nRefType)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
@@ -368,7 +368,7 @@ CreateLineTgTwoCurves( IGeomDB* pGeomDB, int nParentId,
ptN2loc.LocToLoc( frDest, frCrv1) ;
// calcolo la retta tangente alle due curve
PtrOwner<ICurveLine> pCrvLine ;
pCrvLine.Set( GetLineTgTwoCurves( *pCrv1, ptN1loc, *pCrv2, ptN2loc)) ;
pCrvLine.Set( GetLineTgTwoCurves( *pCrv1, ptN1loc, *Get( pCrv2Loc), ptN2loc)) ;
if ( IsNull( pCrvLine))
return nullptr ;
// porto la linea nel riferimento del gruppo destinazione
@@ -418,7 +418,7 @@ CreateLinePerpTwoCurves( IGeomDB* pGeomDB, int nParentId,
ptN2loc.LocToLoc( frDest, frCrv1) ;
// calcolo la retta perpendicolare alle due curve
PtrOwner<ICurveLine> pCrvLine ;
pCrvLine.Set( GetLinePerpTwoCurves( *pCrv1, ptN1loc, *pCrv2, ptN2loc)) ;
pCrvLine.Set( GetLinePerpTwoCurves( *pCrv1, ptN1loc, *Get(pCrv2Loc), ptN2loc)) ;
if ( IsNull( pCrvLine))
return nullptr ;
// porto la linea nel riferimento del gruppo destinazione
@@ -468,7 +468,7 @@ CreateLineTgCurvePerpCurve( IGeomDB* pGeomDB, int nParentId,
ptN2loc.LocToLoc( frDest, frCrv1) ;
// calcolo la retta perpendicolare alle due curve
PtrOwner<ICurveLine> pCrvLine ;
pCrvLine.Set( GetLineTgCurvePerpCurve( *pCrv1, ptN1loc, *pCrv2, ptN2loc)) ;
pCrvLine.Set( GetLineTgCurvePerpCurve( *pCrv1, ptN1loc, *Get( pCrv2Loc), ptN2loc)) ;
if ( IsNull( pCrvLine))
return nullptr ;
// porto la linea nel riferimento del gruppo destinazione
+22
View File
@@ -495,6 +495,18 @@ ExeSetInfo( int nId, const string& sKey, const string& sInfo)
return bOk ;
}
//-----------------------------------------------------------------------------
bool
ExeSetInfo( int nId, const std::string& sKey, const Frame3d& frFrame)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, false)
// assegno la info
bool bOk = pGeomDB->SetInfo( nId, sKey, frFrame) ;
ExeSetModified() ;
return bOk ;
}
//-----------------------------------------------------------------------------
bool
ExeGetInfo( int nId, const string& sKey, int& nInfo)
@@ -525,6 +537,16 @@ ExeGetInfo( int nId, const string& sKey, string& sInfo)
return pGeomDB->GetInfo( nId, sKey, sInfo) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetInfo( int nId, const std::string& sKey, Frame3d& frFrame)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, false)
// recupero la info
return pGeomDB->GetInfo( nId, sKey, frFrame) ;
}
//-----------------------------------------------------------------------------
bool
ExeExistsInfo( int nId, const string& sKey)
+1
View File
@@ -44,6 +44,7 @@ ExeVerifyOrNext( IGeomDB* pGeomDB, int nId, bool bOnlyVisible)
{
while ( nId != GDB_ID_NULL) {
if ( ExeIsUserObj( pGeomDB, nId) &&
! pGeomDB->ExistsInfo( nId, GDB_SI_SOURCE) &&
( ! bOnlyVisible || ExeIsVisibleObj( pGeomDB, nId)))
return nId ;
nId = pGeomDB->GetNextGroup( nId) ;
+10
View File
@@ -554,6 +554,16 @@ ExeGetTableRef1( Point3d& ptPos)
return pGseCtx->m_pMachMgr->GetTableRef1( ptPos) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetTableArea1( int& nAreaId)
{
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_MACHMGR( pGseCtx, false)
// recupero l'oggetto che definisce l'area utile della tavola corrente della macchinata corrente
return pGseCtx->m_pMachMgr->GetTableArea1( nAreaId) ;
}
//-----------------------------------------------------------------------------
bool
ExeShowOnlyTable( bool bVal)
+42 -2
View File
@@ -678,10 +678,50 @@ ExeUnProjectPoint( int nWinX, int nWinY, Point3d& ptP)
//-----------------------------------------------------------------------------
bool
ExeLoadTexture( const std::string& sName, const std::string& sFile,
double dDimX, double dDimY, bool bRepeat)
double dMMxPix, double dDimX, double dDimY, bool bRepeat)
{
IEGrScene* pScene = GetCurrScene() ;
VERIFY_SCENE( pScene, false)
// lancio il caricamento della texture
return pScene->LoadTexture( sName, sFile, dDimX, dDimY, bRepeat) ;
return pScene->LoadTexture( sName, sFile, dMMxPix, dDimX, dDimY, bRepeat) ;
}
//-----------------------------------------------------------------------------
bool
ExeUnloadTexture( const std::string& sName)
{
IEGrScene* pScene = GetCurrScene() ;
VERIFY_SCENE( pScene, false)
// lancio lo scaricamento della texture
return pScene->UnloadTexture( sName) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetTexturePixels( const std::string& sName, int& nWidth, int& nHeight)
{
IEGrScene* pScene = GetCurrScene() ;
VERIFY_SCENE( pScene, false)
// lancio lo scaricamento della texture
return pScene->GetTexturePixels( sName, nWidth, nHeight) ;
}
//-----------------------------------------------------------------------------
bool
ExeGetTextureDimensions( const std::string& sName, double& dDimX, double& dDimY)
{
IEGrScene* pScene = GetCurrScene() ;
VERIFY_SCENE( pScene, false)
// lancio lo scaricamento della texture
return pScene->GetTextureDimensions( sName, dDimX, dDimY) ;
}
//-----------------------------------------------------------------------------
bool
ExeChangeTextureDimensions( const std::string& sName, double dDimX, double dDimY)
{
IEGrScene* pScene = GetCurrScene() ;
VERIFY_SCENE( pScene, false)
// lancio lo scaricamento della texture
return pScene->ChangeTextureDimensions( sName, dDimX, dDimY) ;
}
BIN
View File
Binary file not shown.