EgtExecutor :

- aggiunta gestione giunzioni di curve composite
- riorganizzato ed esteso nesting di pezzi piani.
This commit is contained in:
Dario Sassi
2016-02-22 07:34:47 +00:00
parent 403d3a658d
commit 28f6f1240f
5 changed files with 563 additions and 265 deletions
+55
View File
@@ -438,6 +438,58 @@ LuaModifyArcByFlip( lua_State* L)
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaAddCurveCompoJoint( lua_State* L)
{
// 2 parametri : Id, dU
int nId ;
LuaCheckParam( L, 1, nId)
double dU ;
LuaCheckParam( L, 2, dU)
LuaClearStack( L) ;
// aggiungo la giunzione
bool bOk = ExeAddCurveCompoJoint( nId, dU) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaModifyCurveCompoJoint( lua_State* L)
{
// 3 o 4 parametri : Id, nU, ptJoint [, nRefType]
int nId ;
LuaCheckParam( L, 1, nId)
int nU ;
LuaCheckParam( L, 2, nU)
Point3d ptJoint ;
LuaCheckParam( L, 3, ptJoint)
int nRefType = RTY_DEFAULT ;
LuaGetParam( L, 4, nRefType) ;
LuaClearStack( L) ;
// modifico il punto di giunzione nU-esimo
bool bOk = ExeModifyCurveCompoJoint( nId, nU, ptJoint, nRefType) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaRemoveCurveCompoJoint( lua_State* L)
{
// 2 parametri : Id, nU
int nId ;
LuaCheckParam( L, 1, nId)
int nU ;
LuaCheckParam( L, 2, nU)
LuaClearStack( L) ;
// rimuovo la giunzione
bool bOk = ExeRemoveCurveCompoJoint( nId, nU) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaExplodeCurveCompo( lua_State* L)
@@ -501,6 +553,9 @@ LuaInstallGdbModifyCurve( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyArcRadius", LuaModifyArcRadius) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyArcToExplementary", LuaModifyArcToExplementary) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyArcByFlip", LuaModifyArcByFlip) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoJoint", LuaAddCurveCompoJoint) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyCurveCompoJoint", LuaModifyCurveCompoJoint) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveCurveCompoJoint", LuaRemoveCurveCompoJoint) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtExplodeCurveCompo", LuaExplodeCurveCompo) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtMergeCurvesInCurveCompo", LuaMergeCurvesInCurveCompo) ;
return bOk ;