EgtExecutor 1.8i1 :
- aggiunte funzioni ExeSetTempDir e ExeGetTempDir - aggiunte funzioni Exe e Lua VolZmapSetMortiserTool e VolZmapSetChiselTool - estesa funzione Lua VolZmapMillingStep.
This commit is contained in:
@@ -76,6 +76,59 @@ ExeVolZmapSetAdvTool( int nId, const string& sToolName,
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapSetMortiserTool( int nId, const string& sToolName,
|
||||
double dLen, double dWidth, double dThick, double dCornR)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero lo Zmap e assegno i dati dell'utensile
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
|
||||
bool bOk = ( pVZM != nullptr &&
|
||||
pVZM->SetMortiserTool( sToolName, dLen, dWidth, dThick, dCornR)) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtVolZmapSetMortiserTool(" + IdToString( nId) + "," +
|
||||
sToolName + "," +
|
||||
ToString( dLen) + "," +
|
||||
ToString( dWidth) + "," +
|
||||
ToString( dThick) + "," +
|
||||
ToString( dCornR) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapSetChiselTool( int nId, const string& sToolName,
|
||||
double dLen, double dWidth, double dThick)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero lo Zmap e assegno i dati dell'utensile
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
|
||||
bool bOk = ( pVZM != nullptr &&
|
||||
pVZM->SetChiselTool( sToolName, dLen, dWidth, dThick)) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtVolZmapSetChiselTool(" + IdToString( nId) + "," +
|
||||
sToolName + "," +
|
||||
ToString( dLen) + "," +
|
||||
ToString( dWidth) + "," +
|
||||
ToString( dThick) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vector3d& vtDs,
|
||||
@@ -110,6 +163,44 @@ ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vector3d& vtDs,
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapMillingStep( int nId, const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs,
|
||||
const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe, int nRefType)
|
||||
{
|
||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||
VERIFY_GEOMDB( pGeomDB, false)
|
||||
// recupero il riferimento locale
|
||||
Frame3d frLoc ;
|
||||
bool bOk = pGeomDB->GetGlobFrame( nId, frLoc) ;
|
||||
// porto in locale i punti e i vettori
|
||||
Point3d ptPsL = GetPointLocal( pGeomDB, ptPs, nRefType, frLoc) ;
|
||||
Vector3d vtDsL = GetVectorLocal( pGeomDB, vtDs, nRefType, frLoc) ;
|
||||
Vector3d vtAsL = GetVectorLocal( pGeomDB, vtAs, nRefType, frLoc) ;
|
||||
Point3d ptPeL = GetPointLocal( pGeomDB, ptPe, nRefType, frLoc) ;
|
||||
Vector3d vtDeL = GetVectorLocal( pGeomDB, vtDe, nRefType, frLoc) ;
|
||||
Vector3d vtAeL = GetVectorLocal( pGeomDB, vtAe, nRefType, frLoc) ;
|
||||
// recupero lo Zmap e eseguo movimento di fresatura con l'utensile già associato
|
||||
IVolZmap* pVZM = GetVolZmap( pGeomDB->GetGeoObj( nId)) ;
|
||||
bOk = bOk && ( pVZM != nullptr && pVZM->MillingStep( ptPsL, vtDsL, vtAsL, ptPeL, vtDeL, vtAeL)) ;
|
||||
ExeSetModified() ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtVolZmapMillingStep(" + IdToString( nId) + ",{" +
|
||||
ToString( ptPs) + "},{" +
|
||||
ToString( vtDs) + "},{" +
|
||||
ToString( vtAs) + "},{" +
|
||||
ToString( ptPe) + "},{" +
|
||||
ToString( vtDe) + "},{" +
|
||||
ToString( vtAe) + "}," +
|
||||
RefTypeToString( nRefType) + ")" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeVolZmapGetDepth( int nId, const Point3d& ptP, const Vector3d& vtDir, int nRefType,
|
||||
|
||||
Reference in New Issue
Block a user