EgtExecutor :
- in ExeAddCurveCompoLineTg ora si usa ilnuovo metodo di CurveComposite AddLineTg.
This commit is contained in:
+31
-31
@@ -590,24 +590,6 @@ LuaAddCurveCompoCurve( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaAddCurveCompoLineTg( lua_State* L)
|
||||
{
|
||||
// 2 o 3 parametri : Id, dLen [, bEndVsStart]
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
double dLen ;
|
||||
LuaCheckParam( L, 2, dLen)
|
||||
bool bEndVsStart = true ;
|
||||
LuaGetParam( L, 3, bEndVsStart) ;
|
||||
LuaClearStack( L) ;
|
||||
// aggiungo una linea in coda alla curva composita
|
||||
bool bOk = ExeAddCurveCompoLineTg( nId, dLen, bEndVsStart) ;
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaAddCurveCompoLine( lua_State* L)
|
||||
@@ -632,22 +614,18 @@ LuaAddCurveCompoLine( lua_State* L)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaAddCurveCompoArcTg( lua_State* L)
|
||||
LuaAddCurveCompoLineTg( lua_State* L)
|
||||
{
|
||||
// 2, 3 o 4 parametri : Id, ptNew [, bEndVsStart] [, nRefType]
|
||||
// 2 o 3 parametri : Id, dLen [, bEndVsStart]
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
Point3d ptNew ;
|
||||
LuaCheckParam( L, 2, ptNew)
|
||||
double dLen ;
|
||||
LuaCheckParam( L, 2, dLen)
|
||||
bool bEndVsStart = true ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
if ( LuaGetParam( L, 3, bEndVsStart))
|
||||
LuaGetParam( L, 4, nRefType) ;
|
||||
else
|
||||
LuaGetParam( L, 3, nRefType) ;
|
||||
LuaGetParam( L, 3, bEndVsStart) ;
|
||||
LuaClearStack( L) ;
|
||||
// aggiungo un arco tangente in coda alla curva composita
|
||||
bool bOk = ExeAddCurveCompoArcTg( nId, ptNew, bEndVsStart, nRefType) ;
|
||||
// aggiungo una linea in coda alla curva composita
|
||||
bool bOk = ExeAddCurveCompoLineTg( nId, dLen, bEndVsStart) ;
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
@@ -676,6 +654,28 @@ LuaAddCurveCompoArc2P( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaAddCurveCompoArcTg( lua_State* L)
|
||||
{
|
||||
// 2, 3 o 4 parametri : Id, ptNew [, bEndVsStart] [, nRefType]
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
Point3d ptNew ;
|
||||
LuaCheckParam( L, 2, ptNew)
|
||||
bool bEndVsStart = true ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
if ( LuaGetParam( L, 3, bEndVsStart))
|
||||
LuaGetParam( L, 4, nRefType) ;
|
||||
else
|
||||
LuaGetParam( L, 3, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// aggiungo un arco tangente in coda alla curva composita
|
||||
bool bOk = ExeAddCurveCompoArcTg( nId, ptNew, bEndVsStart, nRefType) ;
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaRemoveCurveCompoCurve( lua_State* L)
|
||||
@@ -927,10 +927,10 @@ LuaInstallGdbModifyCurve( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyArcByFlip", LuaModifyArcByFlip) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtCloseCurveCompo", LuaCloseCurveCompo) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoCurve", LuaAddCurveCompoCurve) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoLineTg", LuaAddCurveCompoLineTg) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoLine", LuaAddCurveCompoLine) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoArcTg", LuaAddCurveCompoArcTg) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoLineTg", LuaAddCurveCompoLineTg) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoArc2P", LuaAddCurveCompoArc2P) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoArcTg", LuaAddCurveCompoArcTg) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtRemoveCurveCompoCurve", LuaRemoveCurveCompoCurve) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoJoint", LuaAddCurveCompoJoint) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyCurveCompoJoint", LuaModifyCurveCompoJoint) ;
|
||||
|
||||
Reference in New Issue
Block a user