EgtExecutor 2.7i3 :
- aggiunte funzioni Exe e Lua per calcolo shear sequence nei nesting a ghigliottina.
This commit is contained in:
@@ -257,6 +257,15 @@ ExeAutoNestSetInterpartGap( double dGap)
|
||||
return s_pAutoNester->SetInterpartGap( dGap) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeAutoNestSetShearGap( double dShearGap)
|
||||
{
|
||||
if ( IsNull( s_pAutoNester))
|
||||
return false ;
|
||||
return s_pAutoNester->SetShearGap( dShearGap) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeAutoNestSetReportFile( const string& sReportFile)
|
||||
@@ -338,3 +347,12 @@ ExeAutoNestGetOneResult( int nInd, int& nType, int& nId, int& nFlag, double& dX,
|
||||
dAngRot = s_vANestInfo[nInd].dAngRot ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeAutoNestCalcShearSequence( int nNesting, PNTVECTOR& vPtStart, PNTVECTOR& vPtEnd)
|
||||
{
|
||||
if ( IsNull( s_pAutoNester))
|
||||
return false ;
|
||||
return s_pAutoNester->CalcShearSequence( nNesting, vPtStart, vPtEnd) ;
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -340,6 +340,21 @@ LuaAutoNestSetInterpartGap( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaAutoNestSetShearGap( lua_State* L)
|
||||
{
|
||||
// 1 parametro : dShearGap
|
||||
double dShearGap ;
|
||||
LuaCheckParam( L, 1, dShearGap)
|
||||
LuaClearStack( L) ;
|
||||
// imposto shear gap
|
||||
bool bOk = ExeAutoNestSetShearGap( dShearGap) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaAutoNestSetReportFile( lua_State* L)
|
||||
@@ -466,6 +481,28 @@ LuaAutoNestGetOneResult( lua_State* L)
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaAutoNestCalcShearSequence( lua_State* L)
|
||||
{
|
||||
// 1 parametro : nNesting
|
||||
int nNesting ;
|
||||
LuaCheckParam( L, 1, nNesting)
|
||||
LuaClearStack( L) ;
|
||||
// calcolo shear sequence
|
||||
PNTVECTOR vPtStart, vPtEnd ;
|
||||
bool bOk = ExeAutoNestCalcShearSequence( nNesting, vPtStart, vPtEnd) ;
|
||||
// restituisco il risultato
|
||||
LuaSetParam( L, bOk) ;
|
||||
if ( bOk) {
|
||||
LuaSetParam( L, vPtStart) ;
|
||||
LuaSetParam( L, vPtEnd) ;
|
||||
return 3 ;
|
||||
}
|
||||
else
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
bool
|
||||
LuaInstallNesting( LuaMgr& luaMgr)
|
||||
@@ -488,6 +525,7 @@ LuaInstallNesting( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetStripYconstraintToPart", LuaAutoNestSetStripYconstraintToPart) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetStripXconstraintToPart", LuaAutoNestSetStripXconstraintToPart) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetInterpartGap", LuaAutoNestSetInterpartGap) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetShearGap", LuaAutoNestSetShearGap) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestSetReportFile", LuaAutoNestSetReportFile) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestCompute", LuaAutoNestCompute) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestCancelComputation", LuaAutoNestCancelComputation) ;
|
||||
@@ -495,6 +533,7 @@ LuaInstallNesting( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestPrintResults", LuaAutoNestPrintResults) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestGetResults", LuaAutoNestGetResults) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestGetOneResult", LuaAutoNestGetOneResult) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAutoNestCalcShearSequence", LuaAutoNestCalcShearSequence) ;
|
||||
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user