Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 16b7208962 | |||
| 7c6c48b8b8 | |||
| 2f3d1a84ef | |||
| 2221934f3c | |||
| 0424900a2b |
@@ -1,7 +1,7 @@
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// EgalTech 2014-2023
|
// EgalTech 2014-2024
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// File : EXE.h Data : 05.02.23 Versione : 2.5a6
|
// File : EXE.h Data : 15.05.24 Versione : 2.6e4
|
||||||
// Contenuto : Dichiarazioni locali per moduli EXE.
|
// Contenuto : Dichiarazioni locali per moduli EXE.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
@@ -26,6 +26,7 @@ const std::string& ExeGetIniFile( void) ;
|
|||||||
const std::string& ExeGetKey( void) ;
|
const std::string& ExeGetKey( void) ;
|
||||||
const std::string& ExeGetNestKey( void) ;
|
const std::string& ExeGetNestKey( void) ;
|
||||||
const std::string& ExeGetLockId( void) ;
|
const std::string& ExeGetLockId( void) ;
|
||||||
|
bool ExeVerifyKeyOption( int nOptInd) ;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
ILogger* GetLogger( void) ;
|
ILogger* GetLogger( void) ;
|
||||||
|
|||||||
+1
-34
@@ -677,37 +677,4 @@ ExeCurveCompoNormVersor( int nId, int nSimpCrv, int nRefId, Vector3d& vtNorm)
|
|||||||
}
|
}
|
||||||
// gestione trasformazione ( eventuale)
|
// gestione trasformazione ( eventuale)
|
||||||
return TransformVector( pGeomDB, nId, nRefId, vtNorm) ;
|
return TransformVector( pGeomDB, nId, nRefId, vtNorm) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
bool
|
|
||||||
ExeShowBezierCurveControlPoints( int nCrvId, int* pnCount)
|
|
||||||
{
|
|
||||||
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
|
||||||
VERIFY_GEOMDB( pGeomDB, false)
|
|
||||||
// recupero la curva di bezier
|
|
||||||
const ICurveBezier* pCrvBezier = GetCurveBezier( pGeomDB->GetGeoObj( nCrvId)) ;
|
|
||||||
if ( pCrvBezier == nullptr || pCrvBezier->GetType() != CRV_BEZIER)
|
|
||||||
return false ;
|
|
||||||
int nParent = pGeomDB->GetParentId( nCrvId) ;
|
|
||||||
int nDeg = pCrvBezier->GetDegree() ;
|
|
||||||
bool bRat = pCrvBezier->IsRational() ;
|
|
||||||
int nFirstId = -1 ;
|
|
||||||
int nCount = 0 ;
|
|
||||||
for ( int i = 0 ; i < nDeg + 1 ; ++i) {
|
|
||||||
IGeoPoint3d* pGeoPt( CreateGeoPoint3d()) ;
|
|
||||||
if ( ! bRat)
|
|
||||||
pGeoPt->Set( pCrvBezier->GetControlPoint( i)) ;
|
|
||||||
else
|
|
||||||
pGeoPt->Set( pCrvBezier->GetControlPoint( i) * pCrvBezier->GetControlWeight( i)) ;
|
|
||||||
int nId = pGeomDB->AddGeoObj( GDB_ID_NULL, nParent, pGeoPt) ;
|
|
||||||
if ( nFirstId == GDB_ID_NULL)
|
|
||||||
nFirstId = nId ;
|
|
||||||
if ( nId != GDB_ID_NULL)
|
|
||||||
++nCount ;
|
|
||||||
}
|
|
||||||
// restituisco i risultati
|
|
||||||
if ( pnCount != nullptr)
|
|
||||||
*pnCount = nCount ;
|
|
||||||
return nFirstId ;
|
|
||||||
}
|
|
||||||
@@ -1214,3 +1214,24 @@ ExeSurfBzTrim( int nId, int nCutterId)
|
|||||||
}
|
}
|
||||||
return bOk ;
|
return bOk ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
bool
|
||||||
|
ExeSurfTmSetSmoothAng( int nId, double dAngDeg)
|
||||||
|
{
|
||||||
|
IGeomDB* pGeomDB = GetCurrGeomDB() ;
|
||||||
|
VERIFY_GEOMDB( pGeomDB, false)
|
||||||
|
// recupero la superficie trimseh da trimmare
|
||||||
|
ISurfTriMesh* pSrfTm = GetSurfTriMesh( pGeomDB->GetGeoObj( nId)) ;
|
||||||
|
if ( pSrfTm == nullptr)
|
||||||
|
return false ;
|
||||||
|
pSrfTm->SetSmoothAngle( dAngDeg) ;
|
||||||
|
ExeSetModified() ;
|
||||||
|
// se richiesto, salvo il comando Lua equivalente
|
||||||
|
if ( IsCmdLog()) {
|
||||||
|
string sLua = "EgtSurfTmSetSmoothAng(" + ToString( nId) + "," +
|
||||||
|
ToString( dAngDeg) ;
|
||||||
|
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||||
|
}
|
||||||
|
return true ;
|
||||||
|
}
|
||||||
|
|||||||
@@ -35,6 +35,7 @@
|
|||||||
#include "/EgtDev/Include/EgtIniFile.h"
|
#include "/EgtDev/Include/EgtIniFile.h"
|
||||||
#include "/EgtDev/Include/EgtLogger.h"
|
#include "/EgtDev/Include/EgtLogger.h"
|
||||||
#include "/EgtDev/Include/EgtStringConverter.h"
|
#include "/EgtDev/Include/EgtStringConverter.h"
|
||||||
|
#include "/EgtDev/Include/EgtKeyCodes.h"
|
||||||
#include "/EgtDev/Include/SELkLockId.h"
|
#include "/EgtDev/Include/SELkLockId.h"
|
||||||
#include "/EgtDev/Include/SELkKeyProc.h"
|
#include "/EgtDev/Include/SELkKeyProc.h"
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
@@ -352,6 +353,34 @@ ExeGetNetHwKey( void)
|
|||||||
return s_bNetHwKey ;
|
return s_bNetHwKey ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-----------------------------------------------------------------------------
|
||||||
|
bool
|
||||||
|
ExeVerifyKeyOption( int nOptInd)
|
||||||
|
{
|
||||||
|
// recupero le opzioni abilitate
|
||||||
|
unsigned int nOpt1, nOpt2 ;
|
||||||
|
int nOptExpDays ;
|
||||||
|
int nRet = GetEGnKeyOptions( KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV,
|
||||||
|
nOpt1, nOpt2, nOptExpDays) ;
|
||||||
|
if ( ! ExeGetNetHwKey())
|
||||||
|
nRet = GetKeyOptions( ExeGetKey(), KEY_BASELIB_PROD, KEY_BASELIB_VER, KEY_BASELIB_LEV,
|
||||||
|
nOpt1, nOpt2, nOptExpDays) ;
|
||||||
|
// verifico validità chiave con licenza
|
||||||
|
if ( nRet != KEY_OK || nOptExpDays < GetCurrDay())
|
||||||
|
return false ;
|
||||||
|
// verifico le opzioni (nOptInd = 100 -> bit 0 di Opt1 ... = 200 -> bit 0 di Opt2 ... = 231 -> bit 31 di Opt2)
|
||||||
|
if ( nOptInd >= 100 && nOptInd <= 131) {
|
||||||
|
unsigned int nOptVal = ( 1 << ( nOptInd - 100)) ;
|
||||||
|
return ( ( nOpt1 & nOptVal) != 0) ;
|
||||||
|
}
|
||||||
|
else if ( nOptInd >= 200 && nOptInd <= 231) {
|
||||||
|
unsigned int nOptVal = ( 1 << ( nOptInd - 200)) ;
|
||||||
|
return ( ( nOpt2 & nOptVal) != 0) ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return false ;
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
bool
|
bool
|
||||||
ExeSetFont( const string& sNfeFontDir, const string& sDefaultFont)
|
ExeSetFont( const string& sNfeFontDir, const string& sDefaultFont)
|
||||||
|
|||||||
Binary file not shown.
@@ -531,28 +531,6 @@ LuaCurveCompoNormVersor( lua_State* L)
|
|||||||
return 1 ;
|
return 1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
static int
|
|
||||||
LuaShowBezierCurveControlPoint( lua_State* L)
|
|
||||||
{
|
|
||||||
// 1 parametro : nCrvId
|
|
||||||
int nCrvId ;
|
|
||||||
LuaCheckParam( L, 1, nCrvId)
|
|
||||||
LuaClearStack( L) ;
|
|
||||||
int nCount = 0 ;
|
|
||||||
int nId = ExeShowBezierCurveControlPoints( nCrvId, &nCount) ;
|
|
||||||
// restituisco il risultato
|
|
||||||
if ( nId != GDB_ID_NULL) {
|
|
||||||
LuaSetParam( L, nId) ;
|
|
||||||
LuaSetParam( L, nCount) ;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
LuaSetParam( L) ;
|
|
||||||
LuaSetParam( L) ;
|
|
||||||
}
|
|
||||||
return 2 ;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
||||||
bool
|
bool
|
||||||
LuaInstallGdbGetCurve( LuaMgr& luaMgr)
|
LuaInstallGdbGetCurve( LuaMgr& luaMgr)
|
||||||
@@ -584,6 +562,5 @@ LuaInstallGdbGetCurve( LuaMgr& luaMgr)
|
|||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtCurveCompoRadius", LuaCurveCompoRadius) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtCurveCompoRadius", LuaCurveCompoRadius) ;
|
||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtCurveCompoAngCenter", LuaCurveCompoAngCenter) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtCurveCompoAngCenter", LuaCurveCompoAngCenter) ;
|
||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtCurveCompoNormVersor", LuaCurveCompoNormVersor) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtCurveCompoNormVersor", LuaCurveCompoNormVersor) ;
|
||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtShowBezierCurveControlPoints", LuaShowBezierCurveControlPoint) ;
|
|
||||||
return bOk ;
|
return bOk ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -582,6 +582,22 @@ LuaSurfBzTrim( lua_State* L)
|
|||||||
return 1 ;
|
return 1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------
|
||||||
|
static int
|
||||||
|
LuaSurfTmSetSmoothAng( lua_State* L)
|
||||||
|
{
|
||||||
|
// 2 parametri : nId, nCutterId
|
||||||
|
int nId ;
|
||||||
|
LuaCheckParam( L, 1, nId)
|
||||||
|
double dAngDeg ;
|
||||||
|
LuaCheckParam( L, 2, dAngDeg)
|
||||||
|
LuaClearStack( L) ;
|
||||||
|
// aggiorno lo smooth angle della superficie
|
||||||
|
bool bOk = ExeSurfTmSetSmoothAng( nId, dAngDeg) ;
|
||||||
|
LuaSetParam( L, bOk) ;
|
||||||
|
return 1 ;
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
||||||
bool
|
bool
|
||||||
LuaInstallGdbModifySurf( LuaMgr& luaMgr)
|
LuaInstallGdbModifySurf( LuaMgr& luaMgr)
|
||||||
@@ -616,5 +632,6 @@ LuaInstallGdbModifySurf( LuaMgr& luaMgr)
|
|||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSetShowEdges", LuaSurfTmSetShowEdges) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSetShowEdges", LuaSurfTmSetShowEdges) ;
|
||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmGetShowEdges", LuaSurfTmGetShowEdges) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmGetShowEdges", LuaSurfTmGetShowEdges) ;
|
||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfBzTrim", LuaSurfBzTrim) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfBzTrim", LuaSurfBzTrim) ;
|
||||||
|
bOk = bOk && luaMgr.RegisterFunction( "EgtSurfTmSetSmoothAng", LuaSurfTmSetSmoothAng) ;
|
||||||
return bOk ;
|
return bOk ;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1083,6 +1083,20 @@ LuaGetMsg( lua_State* L)
|
|||||||
return 1 ;
|
return 1 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------
|
||||||
|
static int
|
||||||
|
LuaVerifyKeyOption( lua_State* L)
|
||||||
|
{
|
||||||
|
// 1 parametro : nOptInd
|
||||||
|
int nOptInd ;
|
||||||
|
LuaCheckParam( L, 1, nOptInd)
|
||||||
|
LuaClearStack( L) ;
|
||||||
|
// verifico l'abilitazione dell'opzione (da chiave + licenza)
|
||||||
|
bool bOk = ExeVerifyKeyOption( nOptInd) ;
|
||||||
|
LuaSetParam( L, bOk) ;
|
||||||
|
return 1 ;
|
||||||
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------
|
||||||
static int
|
static int
|
||||||
LuaWinExec( lua_State* L)
|
LuaWinExec( lua_State* L)
|
||||||
@@ -1384,6 +1398,7 @@ LuaInstallGeneral( LuaMgr& luaMgr)
|
|||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtIs64bit", LuaIs64bit) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtIs64bit", LuaIs64bit) ;
|
||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtGetLanguage", LuaGetLanguage) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtGetLanguage", LuaGetLanguage) ;
|
||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtMsg", LuaGetMsg) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtMsg", LuaGetMsg) ;
|
||||||
|
bOk = bOk && luaMgr.RegisterFunction( "EgtVerifyKeyOption", LuaVerifyKeyOption) ;
|
||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtDialogBox", LuaDialogBox) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtDialogBox", LuaDialogBox) ;
|
||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtWinExec", LuaWinExec) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtWinExec", LuaWinExec) ;
|
||||||
bOk = bOk && luaMgr.RegisterFunction( "EgtCloseExe", LuaCloseExe) ;
|
bOk = bOk && luaMgr.RegisterFunction( "EgtCloseExe", LuaCloseExe) ;
|
||||||
|
|||||||
Reference in New Issue
Block a user