84d21c48af
- di default le svuotature sono fatte con PocketingNT (si può forzare da INI la vecchia modalità [Mach] Pocketing=1).
44 lines
1.6 KiB
C++
44 lines
1.6 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2025-2025
|
|
//----------------------------------------------------------------------------
|
|
// File : MachiningRegister.h Data : 02.05.25 Versione : 2.7e1
|
|
// Contenuto : Funzioni per registrazione dinamica oggetti delle lavorazioni
|
|
// (per decidere tra versioni diverse di una lavorazione).
|
|
//
|
|
//
|
|
// Modifiche : 02.05.25 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "OperationConst.h"
|
|
#include "Pocketing.h"
|
|
#include "PocketingNT.h"
|
|
#include "/EgtDev/Include/EGkUserObjFactory.h"
|
|
#include "/EgtDev/Include/EgtIniFile.h"
|
|
|
|
//----------------------------------------------------------------------------
|
|
// Registrazione dinamica delle svuotature da parametro nel file Ini dell'eseguibile
|
|
inline bool
|
|
RegisterPocketing( void)
|
|
{
|
|
const char* SEC_MACH = "Mach" ;
|
|
const char* KEY_POCKETING = "Pocketing" ;
|
|
static bool bFirst = true ;
|
|
if ( bFirst) {
|
|
std::string sIniPath ;
|
|
ExeGetIniFile( sIniPath) ;
|
|
int nPockType = GetPrivateProfileInt( SEC_MACH, KEY_POCKETING, 2, sIniPath.c_str()) ;
|
|
if ( nPockType == 2)
|
|
UserObjRegister<PocketingNT>::DoRegister( GetOperationClass( OPER_POCKETING)) ;
|
|
else
|
|
UserObjRegister<Pocketing>::DoRegister( GetOperationClass( OPER_POCKETING)) ;
|
|
std::string sInfo = "Mach-Pocketing=" + ToString( nPockType) ;
|
|
LOG_INFO( GetEMkLogger(), sInfo.c_str())
|
|
bFirst = false ;
|
|
}
|
|
return true ;
|
|
}
|