diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc
index a5125bd..59ba50d 100644
Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ
diff --git a/EgtMachKernel.vcxproj b/EgtMachKernel.vcxproj
index e65fe67..884ac02 100644
--- a/EgtMachKernel.vcxproj
+++ b/EgtMachKernel.vcxproj
@@ -307,7 +307,15 @@ copy $(TargetPath) \EgtProg\Dll64
-
+
+
+
+
+
+
+
+
+
@@ -315,8 +323,11 @@ copy $(TargetPath) \EgtProg\Dll64
+
+
+
@@ -329,10 +340,13 @@ copy $(TargetPath) \EgtProg\Dll64
+
+
+
@@ -343,7 +357,10 @@ copy $(TargetPath) \EgtProg\Dll64
+
+
+
@@ -351,6 +368,7 @@ copy $(TargetPath) \EgtProg\Dll64
+
@@ -360,6 +378,7 @@ copy $(TargetPath) \EgtProg\Dll64
+
@@ -374,6 +393,7 @@ copy $(TargetPath) \EgtProg\Dll64
+
diff --git a/EgtMachKernel.vcxproj.filters b/EgtMachKernel.vcxproj.filters
index 06cce19..87a3c0a 100644
--- a/EgtMachKernel.vcxproj.filters
+++ b/EgtMachKernel.vcxproj.filters
@@ -422,9 +422,6 @@
Header Files\Include
-
- Header Files\Include
-
Header Files\Include
@@ -692,6 +689,69 @@
Header Files
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
+
+ Header Files\Include
+
diff --git a/MachMgrGeneration.cpp b/MachMgrGeneration.cpp
index 03cd33b..e6ce8cd 100644
--- a/MachMgrGeneration.cpp
+++ b/MachMgrGeneration.cpp
@@ -18,6 +18,7 @@
#include "MachConst.h"
#include "Generator.h"
#include "Estimator.h"
+#include "/EgtDev/Include/EGnFileUtils.h"
using namespace std ;
@@ -25,6 +26,22 @@ using namespace std ;
bool
MachMgr::Generate( const string& sCncFile, const string& sInfo)
{
+ // se necessaria stima speciale
+ if ( GetCurrMachine() != nullptr && GetCurrMachine()->GetSpecialEstimate()) {
+ // inizializzazione stimatore
+ Estimator estPP ;
+ if ( ! estPP.Init( this)) {
+ LOG_ERROR( GetEMkLogger(), "Error on Estimate Init")
+ return false ;
+ }
+ // esecuzione della stima
+ string sEstFile = ChangeFileExtension( sCncFile, "sest") ;
+ if ( ! estPP.Run( sEstFile, sInfo)) {
+ LOG_ERROR( GetEMkLogger(), "Error on Estimate Run")
+ return false ;
+ }
+ }
+
// inizializzazione generatore
Generator genPP ;
if ( ! genPP.Init( this)) {
@@ -44,13 +61,13 @@ MachMgr::Generate( const string& sCncFile, const string& sInfo)
bool
MachMgr::Estimate( const string& sEstFile, const string& sInfo)
{
- // inizializzazione generatore
+ // inizializzazione stimatore
Estimator estPP ;
if ( ! estPP.Init( this)) {
LOG_ERROR( GetEMkLogger(), "Error on Estimate Init")
return false ;
}
- // esecuzione della generazione
+ // esecuzione della stima
if ( ! estPP.Run( sEstFile, sInfo)) {
LOG_ERROR( GetEMkLogger(), "Error on Estimate Run")
return false ;
diff --git a/Machine.cpp b/Machine.cpp
index 63230e6..5e23e82 100644
--- a/Machine.cpp
+++ b/Machine.cpp
@@ -41,6 +41,7 @@ Machine::Machine( void)
m_dExitMaxAdjust = EPS_SMALL ;
m_dExitMaxRotAdj = 10 * EPS_ANG_SMALL ;
m_dAngDeltaMinForHome = INFINITO ;
+ m_bSpecialEstimate = false ;
m_nCalcTabId = GDB_ID_NULL ;
m_nCalcHeadId = GDB_ID_NULL ;
m_nCalcExitId = GDB_ID_NULL ;
diff --git a/Machine.h b/Machine.h
index 8497230..361888b 100644
--- a/Machine.h
+++ b/Machine.h
@@ -71,6 +71,8 @@ class Machine
int GetHeadSelectType(const std::string& sHead) const ;
double GetAngDeltaMinForHome( void) const
{ return m_dAngDeltaMinForHome ; }
+ bool GetSpecialEstimate( void) const
+ { return m_bSpecialEstimate ; }
bool LoadTool( const std::string& sHead, int nExit, const std::string& sTool) ;
bool GetLoadedTool( const std::string& sHead, int nExit, std::string& sTool) const ;
bool UnloadTool( const std::string& sHead, int nExit) ;
@@ -291,6 +293,7 @@ class Machine
double m_dExitMaxAdjust ; // massimo aggiustamento uscita da geometria a descrizione cinematica
double m_dExitMaxRotAdj ; // massima rotazione di aggiustamento uscita da geometria a descrizione cinematica
double m_dAngDeltaMinForHome ; // minima differenza angolare da valore precedente per scegliere di stare vicino a home
+ bool m_bSpecialEstimate ; // flag di esecuzione stima speciale prima della generazione
INTVECTOR m_vLinkedRawParts ; // elenco dei grezzi agganciati a gruppi della macchina
INTVECTOR m_vLinkedFixtures ; // elenco dei bloccaggi agganciati a gruppi della macchina
INTVECTOR m_vLinkedParts ; // elenco dei pezzi agganciati a gruppi della macchina
diff --git a/MachineLua.cpp b/MachineLua.cpp
index 5da0bd9..0974e03 100644
--- a/MachineLua.cpp
+++ b/MachineLua.cpp
@@ -1,13 +1,14 @@
//----------------------------------------------------------------------------
-// EgalTech 2015-2021
+// EgalTech 2015-2024
//----------------------------------------------------------------------------
-// File : MachineLua.cpp Data : 14.10.21 Versione : 2.3j5
+// File : MachineLua.cpp Data : 05.08.24 Versione : 2.6h1
// Contenuto : Implementazione gestione macchina : funzioni Lua.
//
//
//
// Modifiche : 06.05.15 DS Creazione modulo.
// 26.04.20 DS Aggiunta gestione TcPos.
+// 05.08.24 DS Aggiunta gestione SpecialEstimate.
//
//----------------------------------------------------------------------------
@@ -34,6 +35,7 @@ static const string FLD_AXISMAXROTADJ = "AxisMaxRotAdj" ;
static const string FLD_EXITMAXADJUST = "ExitMaxAdjust" ;
static const string FLD_EXITMAXROTADJ = "ExitMaxRotAdj" ;
static const string FLD_ANGDELTAMINFORHOME = "AngDeltaMinForHome" ;
+static const string FLD_SPECIALESTIMATE = "SpecialEstimate" ;
static const string FLD_NAME = "Name" ;
static const string FLD_PARENT = "Parent" ;
static const string FLD_GEO = "Geo" ;
@@ -342,6 +344,9 @@ Machine::LuaEmtGeneral( lua_State* L)
// lettura eventuale campo 'AngDeltaForHome' dalla tabella (default INFINITO)
double dAngDeltaMinForHome = INFINITO ;
LuaGetTabFieldParam( L, 1, FLD_ANGDELTAMINFORHOME, dAngDeltaMinForHome) ;
+ // lettura eventuale campo 'SpecialEstimate' dalla tabella (default false)
+ bool bSpecialEstimate = false ;
+ LuaGetTabFieldParam( L, 1, FLD_SPECIALESTIMATE, bSpecialEstimate) ;
LuaClearStack( L) ;
// info
@@ -391,6 +396,9 @@ Machine::LuaEmtGeneral( lua_State* L)
// imposto minima differenza angolare da posizione precedente per stare vivino a posizione home
m_pMchLua->m_dAngDeltaMinForHome = dAngDeltaMinForHome ;
+ // imposto flag per stima speciale
+ m_pMchLua->m_bSpecialEstimate = bSpecialEstimate ;
+
return 0 ;
}