EgtExecutor :

- aggiunte funzioni Exe e Lua ModifyCurveCompoCurveToArc e ModifyCurveCompoCurveToLine.
This commit is contained in:
Dario Sassi
2021-04-03 17:59:22 +00:00
parent db6134d221
commit 8d218b85b7
2 changed files with 93 additions and 0 deletions
+38
View File
@@ -712,6 +712,42 @@ LuaRemoveCurveCompoJoint( lua_State* L)
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaModifyCurveCompoCurveToArc( lua_State* L)
{
// 3 o 4 parametri : Id, nCrv, ptMid [, nRefType]
int nId ;
LuaCheckParam( L, 1, nId)
int nCrv ;
LuaCheckParam( L, 2, nCrv)
Point3d ptMid ;
LuaCheckParam( L, 3, ptMid)
int nRefType = RTY_DEFAULT ;
LuaGetParam( L, 4, nRefType) ;
LuaClearStack( L) ;
// modifico la curva in arco
bool bOk = ExeModifyCurveCompoCurveToArc( nId, nCrv, ptMid, nRefType) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
//----------------------------------------------------------------------------
static int
LuaModifyCurveCompoCurveToLine( lua_State* L)
{
// 2 parametri : Id, nCrv
int nId ;
LuaCheckParam( L, 1, nId)
int nCrv ;
LuaCheckParam( L, 2, nCrv)
LuaClearStack( L) ;
// modifico la curva in segmento di retta
bool bOk = ExeModifyCurveCompoCurveToLine( nId, nCrv) ;
LuaSetParam( L, bOk) ;
return 1 ;
}
//-------------------------------------------------------------------------------
static int
LuaExplodeCurveCompo( lua_State* L)
@@ -846,6 +882,8 @@ LuaInstallGdbModifyCurve( LuaMgr& luaMgr)
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoJoint", LuaAddCurveCompoJoint) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyCurveCompoJoint", LuaModifyCurveCompoJoint) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveCurveCompoJoint", LuaRemoveCurveCompoJoint) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyCurveCompoCurveToArc", LuaModifyCurveCompoCurveToArc) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyCurveCompoCurveToLine", LuaModifyCurveCompoCurveToLine) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtExplodeCurveCompo", LuaExplodeCurveCompo) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtMergeCurvesInCurveCompo", LuaMergeCurvesInCurveCompo) ;
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveCurveCompoUndercutOnY", LuaRemoveCurveCompoUndercutOnY) ;