EgtExecutor 1.9f5 :

- aggiunte funzioni Exe e Lua CAvSetGenTool.
This commit is contained in:
Dario Sassi
2018-06-26 07:11:08 +00:00
parent cb6a4a4bd9
commit aaeeab4d83
3 changed files with 33 additions and 0 deletions
+17
View File
@@ -49,6 +49,23 @@ ExeCAvSetAdvTool( double dToolLen, double dToolDiam, double dTipLen, double dTip
return s_pCAvTlStm->SetAdvTool( dToolLen, dToolDiam / 2, dTipLen, dTipDiam / 2, dToolCornR) ;
}
//----------------------------------------------------------------------------
bool
ExeCAvSetGenTool( int nToolSectId)
{
if ( IsNull( s_pCAvTlStm))
return false ;
// verifico DB geometrico
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, false)
// recupero la sezione dell'utensile
const ICurveComposite* pCC = GetCurveComposite( pGeomDB->GetGeoObj( nToolSectId)) ;
if ( pCC == nullptr)
return false ;
// assegno i dati dell'utensile
return s_pCAvTlStm->SetGenTool( pCC) ;
}
//----------------------------------------------------------------------------
double
ExeCAvToolPosStm( const Point3d& ptP, const Vector3d& vtAx, int nSurfTmId, const Vector3d& vtMove, int nRefType)
BIN
View File
Binary file not shown.
+16
View File
@@ -63,6 +63,21 @@ LuaCAvSetAdvTool( lua_State* L)
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaCAvSetGenTool( lua_State* L)
{
// 1 parametro : ToolSectId
int nToolSectId ;
LuaCheckParam( L, 1, nToolSectId)
LuaClearStack( L) ;
// assegno dati utensile generico per Collision Avoidance
bool bOk = ExeCAvSetGenTool( nToolSectId) ;
// restituisco il risultato
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaCAvToolPosStm( lua_State* L)
@@ -118,6 +133,7 @@ LuaInstallCAvTool( LuaMgr& luaMgr)
bool bOk = ( &luaMgr != nullptr) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtCAvSetStdTool", LuaCAvSetStdTool) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtCAvSetAdvTool", LuaCAvSetAdvTool) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtCAvSetGenTool", LuaCAvSetGenTool) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtCAvToolPosStm", LuaCAvToolPosStm) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtCAvToolPathStm", LuaCAvToolPathStm) ;
return bOk ;