EgtExecutor :

- modifiche per impostazione dati interprete lua a Exchange
- aggiunta funzione Exe/Lua CreateSurfTmEmpty.
This commit is contained in:
Dario Sassi
2025-01-23 12:08:06 +01:00
parent 6c410ecd95
commit 67fa0dd6f0
5 changed files with 60 additions and 1 deletions
+22
View File
@@ -348,6 +348,28 @@ ExeCreateSurfFlatRegion( int nParentId, const INTVECTOR& vCrvIds, int* pnCount)
return nFirstId ;
}
//-------------------------------------------------------------------------------
int
ExeCreateSurfTmEmpty( int nParentId)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, GDB_ID_NULL)
nParentId = AdjustId( nParentId) ;
// creo la superficie vuota
PtrOwner<ISurfTriMesh> pStm( GetSurfTriMeshEmpty()) ;
// inserisco la superficie nel DB
int nNewId = pGeomDB->AddGeoObj( GDB_ID_NULL, nParentId, Release( pStm)) ;
ExeSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtSurfTmEmpty(" + IdToString( nParentId) + ")" +
" -- Id=" + ToString( nNewId) ;
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
}
// restituisco l'identificativo della nuova entità
return nNewId ;
}
//-------------------------------------------------------------------------------
static int
MyCreateSurfTmPlaneInBBox( int nParentId, const Point3d& ptP, const Vector3d& vtN, const BBox3d& b3Box, int nRefType)