EgtExecutor 1.6h1 :

- CurveCompoByChain salva in info elenco id curve originali se non deve cancellarle
- ExeCreateSurfTmByRegion e ExeCreateSurfTmByExtrusion accettano anche curve da selezione
- ExeApproxCurve sostituisce in-place la curva originale
- su Part e Layer ora si può iterare all'indietro dalla fine(GetLast e GetPrev)
- aggiunta prima versione di import pezzi per nesting.
This commit is contained in:
Dario Sassi
2015-08-04 17:47:47 +00:00
parent 7a6b1c0096
commit af849e6202
9 changed files with 642 additions and 38 deletions
+65
View File
@@ -51,6 +51,19 @@ ExeVerifyOrNext( IGeomDB* pGeomDB, int nId, bool bOnlyVisible)
return GDB_ID_NULL ;
}
//-------------------------------------------------------------------------------
static int
ExeVerifyOrPrev( IGeomDB* pGeomDB, int nId, bool bOnlyVisible)
{
while ( nId != GDB_ID_NULL) {
if ( ExeIsUserObj( pGeomDB, nId) &&
( ! bOnlyVisible || ExeIsVisibleObj( pGeomDB, nId)))
return nId ;
nId = pGeomDB->GetPrevGroup( nId) ;
}
return GDB_ID_NULL ;
}
//-------------------------------------------------------------------------------
bool
ExeIsPart( int nPartId)
@@ -224,6 +237,30 @@ ExeGetNextPart( int nId, bool bOnlyVisible)
return ExeVerifyOrNext( pGeomDB, nPartId, bOnlyVisible) ;
}
//-------------------------------------------------------------------------------
int
ExeGetLastPart( bool bOnlyVisible)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
// recupero l'ultimo gruppo sotto la radice
int nPartId = pGeomDB->GetLastGroupInGroup( GDB_ID_ROOT) ;
// verifico oppure passo al primo precedente valido
return ExeVerifyOrPrev( pGeomDB, nPartId, bOnlyVisible) ;
}
//-------------------------------------------------------------------------------
int
ExeGetPrevPart( int nId, bool bOnlyVisible)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
// recupero il precedente gruppo
int nPartId = pGeomDB->GetPrevGroup( nId) ;
// verifico oppure passo al primo precedente valido
return ExeVerifyOrPrev( pGeomDB, nPartId, bOnlyVisible) ;
}
//-------------------------------------------------------------------------------
int
ExeGetFirstLayer( int nPartId, bool bOnlyVisible)
@@ -252,6 +289,34 @@ ExeGetNextLayer( int nId, bool bOnlyVisible)
return ExeVerifyOrNext( pGeomDB, nLayerId, bOnlyVisible) ;
}
//-------------------------------------------------------------------------------
int
ExeGetLastLayer( int nPartId, bool bOnlyVisible)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
// verifico il pezzo (livello utente e se richiesto visibile)
if ( ! ExeIsUserObj( pGeomDB, nPartId) ||
( bOnlyVisible && ! ExeIsVisibleObj( pGeomDB, nPartId)))
return GDB_ID_NULL ;
// recupero l'ultimo layer nel pezzo
int nLayerId = pGeomDB->GetLastGroupInGroup( nPartId) ;
// verifico oppure passo al primo precedente valido
return ExeVerifyOrPrev( pGeomDB, nLayerId, bOnlyVisible) ;
}
//-------------------------------------------------------------------------------
int
ExeGetPrevLayer( int nId, bool bOnlyVisible)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
// recupero il precedente gruppo
int nLayerId = pGeomDB->GetPrevGroup( nId) ;
// verifico sia visibile oppure passo al primo precedente visibile
return ExeVerifyOrPrev( pGeomDB, nLayerId, bOnlyVisible) ;
}
//-------------------------------------------------------------------------------
bool
ExeEraseEmptyParts( void)