EgtExecutor 2.2d1 :
- aggiunte funzioni Exe e Lua SurfTmRemoveFacet e SurfTmRemovePart.
This commit is contained in:
@@ -367,6 +367,29 @@ ExeSurfFrRotateSimpleNoCollision( int nId1, int nId2, const Point3d& ptCen, doub
|
||||
return ( bOk && CAvSimpleSurfFrMove( *pSfr1, *pSfr2L).Rotate(ptCenL, dAngDeg)) ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSurfTmRemoveFacet( int nId, int nFacet)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero la superficie TriMesh
|
||||
ISurfTriMesh* pStm = GetSurfTriMesh( pGeomDB->GetGeoObj( nId)) ;
|
||||
bool bOk = ( pStm != nullptr) ;
|
||||
// eseguo la rimozione
|
||||
bOk = bOk && pStm->RemoveFacet( nFacet) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtSurfTmRemoveFacet(" + ToString( nId) + "," +
|
||||
ToString( nFacet) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSurfTmSwapFacets( int nId, int nFacet1, int nFacet2)
|
||||
@@ -391,6 +414,29 @@ ExeSurfTmSwapFacets( int nId, int nFacet1, int nFacet2)
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSurfTmRemovePart( int nId, int nPart)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero la superficie TriMesh
|
||||
ISurfTriMesh* pStm = GetSurfTriMesh( pGeomDB->GetGeoObj( nId)) ;
|
||||
bool bOk = ( pStm != nullptr) ;
|
||||
// eseguo la rimozione
|
||||
bOk = bOk && pStm->RemovePart( nPart) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtSurfTmRemovePart(" + ToString( nId) + "," +
|
||||
ToString( nPart) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
ExeCutSurfTmPlane( int nId, const Point3d& ptOn, const Vector3d& vtN, bool bSaveOnEq, int nRefType)
|
||||
|
||||
Reference in New Issue
Block a user