EgtInterface 1.6a3 :
- modifiche varie per gestire GLOB, LOC e GRID sui dati geometrici - aggiornamenti e miglirie varie - eliminate alcune funzioni lua ormai obsolete (ArcXY e CircleXY).
This commit is contained in:
+15
-8
@@ -16,6 +16,7 @@
|
||||
#include "LUA.h"
|
||||
#include "API.h"
|
||||
#include "/EgtDev/Include/EInAPI.h"
|
||||
#include "/EgtDev/Include/EInConst.h"
|
||||
#include "/EgtDev/Include/EgkPolyLine.h"
|
||||
#include "/EgtDev/Include/EgnStringUtils.h"
|
||||
#include "/EgtDev/Extern/Lua/Include/lua.hpp"
|
||||
@@ -49,7 +50,7 @@ LuaCreateSurfTriMeshByContour( lua_State* L)
|
||||
static int
|
||||
LuaCreateSurfTriMeshByExtrusion( lua_State* L)
|
||||
{
|
||||
// 3 o 4 parametri : ParentId, CrvId, vtExtr [, dTol]
|
||||
// 3 o 4 o 5 parametri : ParentId, CrvId, vtExtr [, dTol] [, sRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
int nCrvId ;
|
||||
@@ -57,11 +58,14 @@ LuaCreateSurfTriMeshByExtrusion( lua_State* L)
|
||||
Vector3d vtExtr ;
|
||||
LuaCheckParam( L, 3, vtExtr)
|
||||
double dLinTol = 0.1 ;
|
||||
if ( lua_gettop( L) >= 4)
|
||||
LuaCheckParam( L, 4, dLinTol) ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
if ( LuaGetParam( L, 4, dLinTol))
|
||||
LuaGetRefType( L, 5, nRefType) ;
|
||||
else
|
||||
LuaGetRefType( L, 4, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo STM riempiendo un contorno piano
|
||||
int nId = EgtCreateSurfTriMeshByExtrusion( nParentId, nCrvId, vtExtr.v, dLinTol) ;
|
||||
int nId = EgtCreateSurfTriMeshByExtrusion( nParentId, nCrvId, vtExtr.v, dLinTol, nRefType) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
LuaSetReturn( L, nId) ;
|
||||
@@ -74,7 +78,7 @@ LuaCreateSurfTriMeshByExtrusion( lua_State* L)
|
||||
static int
|
||||
LuaCreateSurfTriMeshByScrewing( lua_State* L)
|
||||
{
|
||||
// 6 o 7 parametri : ParentId, CrvId, ptAx, vtAx, dAngRotDeg, dMove [, dTol]
|
||||
// 6 o 7 o 8 parametri : ParentId, CrvId, ptAx, vtAx, dAngRotDeg, dMove [, dTol] [, sRefType]
|
||||
int nParentId ;
|
||||
LuaCheckParam( L, 1, nParentId)
|
||||
int nCrvId ;
|
||||
@@ -88,11 +92,14 @@ LuaCreateSurfTriMeshByScrewing( lua_State* L)
|
||||
double dMove ;
|
||||
LuaCheckParam( L, 6, dMove)
|
||||
double dLinTol = 0.1 ;
|
||||
if ( lua_gettop( L) >= 7)
|
||||
LuaCheckParam( L, 7, dLinTol) ;
|
||||
int nRefType = RTY_DEFAULT ;
|
||||
if ( LuaGetParam( L, 7, dLinTol))
|
||||
LuaGetRefType( L, 8, nRefType) ;
|
||||
else
|
||||
LuaGetRefType( L, 7, nRefType) ;
|
||||
LuaClearStack( L) ;
|
||||
// creo STM riempiendo un contorno piano
|
||||
int nId = EgtCreateSurfTriMeshByScrewing( nParentId, nCrvId, ptAx.v, vtAx.v, dAngRotDeg, dMove, dLinTol) ;
|
||||
int nId = EgtCreateSurfTriMeshByScrewing( nParentId, nCrvId, ptAx.v, vtAx.v, dAngRotDeg, dMove, dLinTol, nRefType) ;
|
||||
// restituisco il risultato
|
||||
if ( nId != GDB_ID_NULL)
|
||||
LuaSetReturn( L, nId) ;
|
||||
|
||||
Reference in New Issue
Block a user