cae5f8c31b
- migliorata gestione oggetti utente operazioni - aggiunta SimGetOperationInfo.
73 lines
2.6 KiB
C++
73 lines
2.6 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2015-2015
|
|
//----------------------------------------------------------------------------
|
|
// File : MachiningConst.h Data : 18.06.15 Versione : 1.6f3
|
|
// Contenuto : Costanti delle lavorazioni.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 18.06.15 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EMkMachiningConst.h"
|
|
#include "/EgtDev/Include/EMkMachiningGeoConst.h"
|
|
#include "/EgtDev/Include/EMkToolConst.h"
|
|
#include "/EgtDev/Include/EGkGeoConst.h"
|
|
|
|
//----------------------------------------------------------------------------
|
|
// Epsilon per parametri lavorazioni
|
|
const double EPS_MACH_LEN_PAR = 10 * EPS_SMALL ;
|
|
const double EPS_MACH_ANG_PAR = 10 * EPS_ANG_SMALL ;
|
|
// Valore parametro lavorazione non inizializzato
|
|
const double UNKNOWN_PAR = 9999999 ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
// Conversione dei parametri lavorazione negli equivalenti utensile, ove esistano
|
|
inline int
|
|
MPA2TPA( int nType)
|
|
{
|
|
switch ( nType) {
|
|
case MPA_SPEED : return TPA_SPEED ;
|
|
case MPA_FEED : return TPA_FEED ;
|
|
case MPA_STARTFEED : return TPA_STARTFEED ;
|
|
case MPA_ENDFEED : return TPA_ENDFEED ;
|
|
case MPA_TIPFEED : return TPA_TIPFEED ;
|
|
case MPA_OFFSR : return TPA_RADOFFSET ;
|
|
case MPA_OFFSL : return TPA_LONOFFSET ;
|
|
}
|
|
return TPA_NONE ;
|
|
}
|
|
|
|
//----------------------------------------------------------------------------
|
|
// Dal tipo numerico restituisce il nome della lavorazione
|
|
inline const std::string&
|
|
GetMachiningTitle( int nMchType)
|
|
{
|
|
static std::string MchTitle[] = {"Unknown",
|
|
"Drilling",
|
|
"Sawing",
|
|
"Milling",
|
|
"Pocketing",
|
|
"Mortising",
|
|
"SawRoughing",
|
|
"SawFinishing",
|
|
"GenMachining",
|
|
"Chiseling"} ;
|
|
switch ( nMchType) {
|
|
case MT_DRILLING : return MchTitle[1] ;
|
|
case MT_SAWING : return MchTitle[2] ;
|
|
case MT_MILLING : return MchTitle[3] ;
|
|
case MT_POCKETING : return MchTitle[4] ;
|
|
case MT_MORTISING : return MchTitle[5] ;
|
|
case MT_SAWROUGHING : return MchTitle[6] ;
|
|
case MT_SAWFINISHING : return MchTitle[7] ;
|
|
case MT_GENMACHINING : return MchTitle[8] ;
|
|
case MT_CHISELING : return MchTitle[9] ;
|
|
}
|
|
return MchTitle[0] ;
|
|
}
|