EgtExecutor 1.6k9 :
- aggiunta GetCalcTipFromPositions a EXE e LUA - modificata CreatrFlatParts (copia contorni in layer di nome opportuno).
This commit is contained in:
@@ -415,6 +415,36 @@ VerifyAndAdjustFlatParts( void)
|
||||
pGeomDB->SetMaterial( nTextId, BLACK) ;
|
||||
}
|
||||
}
|
||||
// creo un nuovo layer in cui copiare il contorno esterno
|
||||
PtrOwner<ICurve> pOutCrv( bOk ? pSfr->GetLoop( 0, 0) : nullptr) ;
|
||||
if ( ! IsNull( pOutCrv)) {
|
||||
int nOutLoopId = ExeCreateGroup( pPar->GetId(), Frame3d(), RTY_GLOB) ;
|
||||
bOk = bOk && nOutLoopId != GDB_ID_NULL ;
|
||||
bOk = bOk && pGeomDB->SetName( nOutLoopId, "OutLoop") ;
|
||||
pGeomDB->AddGeoObj( GDB_ID_NULL, nOutLoopId, Release( pOutCrv)) ;
|
||||
}
|
||||
// creo nuovi layer in cui copiare gli eventuali contorni interni
|
||||
if ( bOk && pSfr->GetLoopCount( 0) > 1) {
|
||||
int i = 1 ;
|
||||
PtrOwner<ICurve> pInCrv( bOk ? pSfr->GetLoop( 0, i) : nullptr) ;
|
||||
while ( ! IsNull( pInCrv)) {
|
||||
int nInLoopId = ExeCreateGroup( pPar->GetId(), Frame3d(), RTY_GLOB) ;
|
||||
bOk = bOk && nInLoopId != GDB_ID_NULL ;
|
||||
bOk = bOk && pGeomDB->SetName( nInLoopId, "InLoop") ;
|
||||
pGeomDB->AddGeoObj( GDB_ID_NULL, nInLoopId, Release( pInCrv)) ;
|
||||
++ i ;
|
||||
pInCrv.Set( bOk ? pSfr->GetLoop( 0, i) : nullptr) ;
|
||||
}
|
||||
}
|
||||
// creo nuovi layer in cui mettere le curve aperte
|
||||
if ( bOk && vOpenIds.size() > 0) {
|
||||
for ( int i = 0 ; bOk && i < int( vOpenIds.size()) ; ++i) {
|
||||
int nOnPathId = ExeCreateGroup( pPar->GetId(), Frame3d(), RTY_GLOB) ;
|
||||
bOk = bOk && nOnPathId != GDB_ID_NULL ;
|
||||
bOk = bOk && pGeomDB->SetName( nOnPathId, "OnPath") ;
|
||||
pGeomDB->RelocateGlob( vOpenIds[i], nOnPathId) ;
|
||||
}
|
||||
}
|
||||
// taglio le curve aperte con la regione
|
||||
for ( int i = 0 ; bOk && i < int( vOpenIds.size()) ; ++i) {
|
||||
ICurve* pCrv = GetCurve( pGeomDB->GetGeoObj( vOpenIds[i])) ;
|
||||
|
||||
Reference in New Issue
Block a user