EgtExecutor 1.6t3 :
- CompoChain prende estrusione di prima curva - aggiunte Exe e Lua GetCurveLinearConvexHullXY e CurveMinAreaRectangleXY.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
//--------------------------- Include ----------------------------------------
|
||||
#include "stdafx.h"
|
||||
#include "EXE_Const.h"
|
||||
#include "LUA.h"
|
||||
#include "/EgtDev/Include/EXeExecutor.h"
|
||||
#include "/EgtDev/Include/EXeConst.h"
|
||||
@@ -434,6 +435,27 @@ LuaSplitCurveAtSelfInters( lua_State* L)
|
||||
return 2 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
static int
|
||||
LuaGetCurveLinearConvexHullXY( lua_State* L)
|
||||
{
|
||||
// 1 o 2 o 3 parametri : Id, [dLinTol [, nRefType]]
|
||||
int nId ;
|
||||
LuaCheckParam( L, 1, nId)
|
||||
double dLinTol = LIN_TOL_STD ;
|
||||
LuaGetParam( L, 2, dLinTol) ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
LuaGetParam( L, 3, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// calcolo il convex hull nel piano XY del riferimento indicato
|
||||
int nNewId = ExeGetCurveLinearConvexHullXY( nId, dLinTol, nRefType) ;
|
||||
if ( nNewId != GDB_ID_NULL)
|
||||
LuaSetParam( L, nNewId) ;
|
||||
else
|
||||
LuaSetParam( L) ;
|
||||
return 1 ;
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
static int
|
||||
LuaModifyArcRadius( lua_State* L)
|
||||
@@ -718,6 +740,7 @@ LuaInstallGdbModifyCurve( LuaMgr& luaMgr)
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSplitCurveAtParam", LuaSplitCurveAtParam) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSplitCurveAtCorners", LuaSplitCurveAtCorners) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSplitCurveAtSelfInters", LuaSplitCurveAtSelfInters) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetCurveLinearConvexHullXY", LuaGetCurveLinearConvexHullXY) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyArcRadius", LuaModifyArcRadius) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyArcToExplementary", LuaModifyArcToExplementary) ;
|
||||
bOk = bOk && luaMgr.RegisterFunction( "EgtModifyArcByFlip", LuaModifyArcByFlip) ;
|
||||
|
||||
Reference in New Issue
Block a user