EgtExecutor 1.9b1 :

- aggiunta funzione Exe e Lua VolZmapAvoidSphere
- aggiunta funzione Lua EgtSetCurrFilePath
- modifiche per pezzi piani nesting con bordi con due tagli sovrapposti a diversa inclinazione.
This commit is contained in:
Dario Sassi
2018-02-05 07:16:03 +00:00
parent f3f16af29f
commit b64ac4314d
8 changed files with 206 additions and 10 deletions
+28 -2
View File
@@ -476,7 +476,6 @@ ExeVolZmapAvoidBox( int nId, const Frame3d& frBox, const Vector3d& vtDiag, int n
// recupero lo Zmap e calcolo collisione
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
bOk = bOk && ( pVZM != nullptr && pVZM->AvoidBox( frBoxL, vtDiag)) ;
ExeSetModified() ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtVolZmapAvoidBox(" + IdToString( nId) + ",{" +
@@ -491,4 +490,31 @@ ExeVolZmapAvoidBox( int nId, const Frame3d& frBox, const Vector3d& vtDiag, int n
}
// restituisco risultato
return bOk ;
}
}
//----------------------------------------------------------------------------
bool
ExeVolZmapAvoidSphere( int nId, const Point3d& ptCen, double dRad, int nRefType)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, false)
// recupero il riferimento locale
Frame3d frLoc ;
bool bOk = pGeomDB->GetGlobFrame( nId, frLoc) ;
// porto in locale il centro della sfera
Point3d ptCenL = GetPointLocal( pGeomDB, ptCen, nRefType, frLoc) ;
// recupero lo Zmap e calcolo collisione
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
bOk = bOk && ( pVZM != nullptr && pVZM->AvoidSphere( ptCenL, dRad)) ;
// se richiesto, salvo il comando Lua equivalente
if ( IsCmdLog()) {
string sLua = "EgtVolZmapAvoidSphere(" + IdToString( nId) + ",{" +
ToString( ptCen) + "}," +
ToString( dRad) + "," +
RefTypeToString( nRefType) + ")" +
" -- Ok=" + ToString( bOk) ;
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
}
// restituisco risultato
return bOk ;
}