EgtExecutor :
- nella creazione di curve composite da altre curve si cerca di riutilizzare gli Id delle curve cancellate - lo stesso per le superfici - aggiunte funzioni Exe e Lua AddCurveCompoCurve.
This commit is contained in:
+21
-2
@@ -487,7 +487,7 @@ LuaSplitCurveAtSelfInters( lua_State* L)
|
||||
static int
|
||||
LuaGetCurveLinearConvexHullXY( lua_State* L)
|
||||
{
|
||||
// 1 o 2 o 3 parametri : Id, [dLinTol [, nRefType]]
|
||||
// 1 o 2 o 3 parametri : nId [, dLinTol [, nRefType]]
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
double dLinTol = LIN_TOL_STD ;
|
||||
@@ -495,7 +495,7 @@ LuaGetCurveLinearConvexHullXY( lua_State* L)
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetParam( L, 3, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// calcolo il convex hull nel piano XY del riferimento indicato
|
||||
// calcolo il convex hull della curva nel piano XY del riferimento indicato
|
||||
int nNewId = ExeGetCurveLinearConvexHullXY( nId, dLinTol, nRefType) ;
|
||||
if ( nNewId != GDB_ID_NULL)
|
||||
LuaSetParam( L, nNewId) ;
|
||||
@@ -562,6 +562,24 @@ LuaCloseCurveCompo( lua_State* L)
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaAddCurveCompoCurve( lua_State* L)
|
||||
{
|
||||
// 2 o 3 parametri : Id, AddCrvId [, bEraseOrig]
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
int nAddCrvId ;
|
||||
LuaCheckParam( L, 2, nAddCrvId)
|
||||
bool bEraseOrig = true ;
|
||||
LuaGetParam( L, 3, bEraseOrig) ;
|
||||
LuaClearStack( L) ;
|
||||
// aggiungo la curva in coda alla curva composita
|
||||
bool bOk = ExeAddCurveCompoCurve( nId, nAddCrvId, bEraseOrig) ;
|
||||
LuaSetParam( L, bOk) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaAddCurveCompoLine( lua_State* L)
|
||||
@@ -796,6 +814,7 @@ LuaInstallGdbModifyCurve( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyArcToExplementary", LuaModifyArcToExplementary) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyArcByFlip", LuaModifyArcByFlip) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtCloseCurveCompo", LuaCloseCurveCompo) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoCurve", LuaAddCurveCompoCurve) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoLine", LuaAddCurveCompoLine) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoArcTg", LuaAddCurveCompoArcTg) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtAddCurveCompoArc2P", LuaAddCurveCompoArc2P) ;
|
||||
|
||||
Reference in New Issue
Block a user