EgtExecutor 2.6a4 :
- aggiunte funzioni Exe e Lua SurfFrOffsetAdv per calcolare offset di una flat region creando una nuova superficie senza modificare quella di partenza.
This commit is contained in:
@@ -368,6 +368,32 @@ ExeSurfFrOffset( int nId, double dDist, int nType)
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSurfFrOffsetAdv( int nId, double dDist, int nType, int& nNewId)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
|
||||
// recupero la superficie FlatRegion
|
||||
ISurfFlatRegion* pSfr = GetSurfFlatRegion( pGeomDB->GetGeoObj( nId)) ;
|
||||
if ( pSfr == nullptr)
|
||||
return false ;
|
||||
// eseguo l'offset
|
||||
PtrOwner<ISurfFlatRegion> pSfrOffs( pSfr->CreateOffsetSurf( dDist, nType)) ;
|
||||
if ( IsNull( pSfrOffs))
|
||||
return false ;
|
||||
// salvo la superficie di offset
|
||||
nNewId = GDB_ID_NULL ;
|
||||
if ( pSfr->GetChunkCount() > 0) {
|
||||
// inserisco nel DB geometrico
|
||||
nNewId = pGeomDB->InsertGeoObj( GDB_ID_NULL, nId, GDB_AFTER, Release( pSfrOffs)) ;
|
||||
// copio gli attributi
|
||||
pGeomDB->CopyAttributes( nId, nNewId) ;
|
||||
ExeSetModified() ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSurfFrMoveSimpleNoCollision( int nId1, int nId2, const Vector3d& vtDir, double& dLen, int nRefType)
|
||||
|
||||
Reference in New Issue
Block a user