EgtExecutor :

- eliminate funzioni Exe e Lua CreateSurfTmBySurfBezier perchè doppioni di ApproxSurface a cui è stato aggiunto il parametro dTriaMinSide.
This commit is contained in:
Dario Sassi
2024-04-13 17:20:57 +02:00
parent 2d2954f983
commit e66cfb74c0
4 changed files with 9 additions and 69 deletions
-36
View File
@@ -1581,42 +1581,6 @@ ExeCreateSurfTmBySewing( int nParentId, const INTVECTOR& vIds, bool bErase)
return nNewId ;
}
//----------------------------------------------------------------------------
int
ExeCreateSurfTmBySurfBezier( int nParentId, int nSbezId, double dTol, double dSideMin)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
nParentId = AdjustId( nParentId) ;
// recupero la superficie di Bezier
const ISurfBezier* pSbez = GetSurfBezier( pGeomDB->GetGeoObj( nSbezId)) ;
bool bOk = ( pSbez != nullptr) ;
// recupero il riferimento della superficie sorgente
Frame3d frSou ;
bOk = bOk && pGeomDB->GetGlobFrame( nSbezId, frSou) ;
// recupero il riferimento locale
Frame3d frLoc ;
bOk = bOk && pGeomDB->GetGroupGlobFrame( nParentId, frLoc) ;
// copio la superficie ausiliaria della Bezier
const ISurfTriMesh* pAuxSurf = ( bOk ? pSbez->GetAuxSurf( dTol, dSideMin) : nullptr) ;
PtrOwner<ISurfTriMesh> pStm( pAuxSurf != nullptr ? pAuxSurf->Clone() : nullptr) ;
bOk = bOk && ! IsNull( pStm) ;
// la porto nel riferimento destinazione
bOk = bOk && pStm->LocToLoc( frSou, frLoc) ;
// inserisco la superficie trimesh nel DB
int nNewId = ( bOk ? pGeomDB->AddGeoObj( GDB_ID_NULL, nParentId, Release( pStm)) : GDB_ID_NULL) ;
ExeSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtSurfTmBySurfBezier(" + IdToString( nParentId) + "," +
IdToString( nSbezId) + ")" +
" -- Id=" + ToString( nNewId) ;
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
}
// restituisco il risultato
return nNewId ;
}
//----------------------------------------------------------------------------
int
ExeCreateSurfTmByVolZmap( int nParentId, int nZmapId, int nPart)