diff --git a/EGkLuaAux.h b/EGkLuaAux.h index 9cd5510..cf2e004 100644 --- a/EGkLuaAux.h +++ b/EGkLuaAux.h @@ -1,13 +1,14 @@ //---------------------------------------------------------------------------- // EgalTech 2015-2024 //---------------------------------------------------------------------------- -// File : EGkLuaAux.h Data : 14.04.24 Versione : 2.6d4 +// File : EGkLuaAux.h Data : 08.05.24 Versione : 2.6e2 // Contenuto : Funzioni per gestione parametri geometrici con LUA. // // // // Modifiche : 21.03.15 DS Creazione modulo. // 14.04.24 DS Aggiunta gestione Quaternion. +// 08.05.24 DS Aggiunta LuaSetParam per VCT3DVECTOR. // //---------------------------------------------------------------------------- @@ -276,6 +277,33 @@ LuaSetParam( lua_State* L, const Vector3d& vtPar) return true ; } +//------------------------------------------------------------------------------- +inline bool +LuaSetParam( lua_State* L, const VCT3DVECTOR& vPar) +{ + try { + // recupero dimensione vettore + int nDim = int( vPar.size()) ; + // creo tavola principale + lua_createtable( L, nDim, 0) ; + // creo e inserisco tavola per ogni componente + for ( int i = 1 ; i <= nDim ; ++ i) { + // creo tavola componente + lua_createtable( L, 3, 0) ; + for ( int j = 1 ; j <= 3 ; ++ j) { + lua_pushnumber( L, vPar[i-1].v[j-1]) ; + lua_rawseti( L, -2, j) ; + } + // la metto nel vettore + lua_rawseti( L, -2, i) ; + } + } + catch( ...) { + return false ; + } + return true ; +} + //---------------------------------------------------------------------------- inline bool LuaSetParam( lua_State* L, const Point3d& ptPar) diff --git a/EXeExecutor.h b/EXeExecutor.h index 9c5e048..fb3524f 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -756,6 +756,8 @@ EXE_EXPORT bool ExeSurfTmGetAllVertInFacet( int nId, int nFacet, INTVECTOR& vVer EXE_EXPORT bool ExeSurfTmGetFacetBBox( int nId, int nFacet, int nFlag, BBox3d& b3Box) ; EXE_EXPORT bool ExeSurfTmGetFacetBBoxGlob( int nId, int nFacet, int nFlag, BBox3d& b3Box) ; EXE_EXPORT bool ExeSurfTmGetFacetBBoxRef( int nId, int nFacet, int nFlag, const Frame3d& frRef, BBox3d& b3Box) ; +EXE_EXPORT bool ExeSurfTmGetFacetOutlineInfo( int nId, int nFacet, int nRefId, + int& nStatus, INTVECTOR& vnAdj, DBLVECTOR& vdLen, VCT3DVECTOR& vvtNorm, DBLVECTOR& vdElev) ; EXE_EXPORT int ExeSurfTmGetEdges( int nId, int nDestGrpId, bool bSmoothAng, int* pnCount) ; EXE_EXPORT bool ExeSurfBezierGetPoint( int nSurfId, double dU, double dV, int nRefId, Point3d& ptP) ; EXE_EXPORT bool ExeSurfBezierGetPointD1( int nSurfId, double dU, double dV, int nUsd, int nVsd, int nRefId,