//---------------------------------------------------------------------------- // EgalTech 2015-2021 //---------------------------------------------------------------------------- // File : EmkToolConst.h Data : 16.09.21 Versione : 2.3i6 // Contenuto : Costanti degli utensili. // // // // Modifiche : 16.09.15 DS Creazione modulo. // 03.02.17 DS Agg. chisel. // 20.09.18 DS Agg. costanti per ToolHolder // 05.04.21 DS Agg. TPA_DIST e TPA_STEMDIAM. // 16.09.21 DS Agg. TPA_CORE. // //---------------------------------------------------------------------------- #pragma once #include //---------------------------------------------------------------------------- // Costanti per famiglie di utensili const int TF_DRILLBIT = 0x0100 ; // 256 const int TF_SAWBLADE = 0x0200 ; // 512 const int TF_MILL = 0x0400 ; // 1024 const int TF_MORTISE = 0x0800 ; // 2048 const int TF_CHISEL = 0x1000 ; // 4096 const int TF_WATERJET = 0x2000 ; // 8192 const int TF_COMPO = 0x4000 ; // 16384 // Costante per tutte le famiglie const int TF_ALL = 0xFF00 ; // Tipologie di utensili enum ToolType { TT_NONE = 0, TT_DRILL_STD = TF_DRILLBIT + 0, // 256 TT_DRILL_LONG = TF_DRILLBIT + 1, // 257 TT_SAW_STD = TF_SAWBLADE + 0, // 512 TT_SAW_FLAT = TF_SAWBLADE + 1, // 513 TT_MILL_STD = TF_MILL + 0, // 1024 TT_MILL_NOTIP = TF_MILL + 1, // 1025 TT_MILL_POLISHING = TF_MILL + 2, // 1026 TT_MORTISE_STD = TF_MORTISE + 0, // 2048 TT_CHISEL_STD = TF_CHISEL + 0, // 4096 TT_WATERJET = TF_WATERJET + 0, // 8192 TT_COMPO = TF_COMPO + 0 // 16384 } ; // Controllo tipo valido bool inline IsValidToolType( int nType) { return ( nType == TT_DRILL_STD || nType == TT_DRILL_LONG || nType == TT_SAW_STD || nType == TT_SAW_FLAT || nType == TT_MILL_STD || nType == TT_MILL_NOTIP || nType == TT_MILL_POLISHING || nType == TT_MORTISE_STD || nType == TT_CHISEL_STD || nType == TT_WATERJET || nType == TT_COMPO) ; } //---------------------------------------------------------------------------- // Costanti famiglie di parametri ( i primi 12 bit (0-4095) restano liberi) const int TPA_BOOL = 0x1000 ; const int TPA_INT = 0x2000 ; const int TPA_DOU = 0x4000 ; const int TPA_STR = 0x8000 ; // Costanti tipo parametri modificabili direttamente negli utensili enum TpaType { TPA_NONE = 0, TPA_ACTIVE = ( TPA_BOOL + 0), TPA_CORR = ( TPA_INT + 0), TPA_EXIT = ( TPA_INT + 1), TPA_TYPE = ( TPA_INT + 2), TPA_COOLANT = ( TPA_INT + 3), TPA_CORNRAD = ( TPA_DOU + 0), TPA_DIAM = ( TPA_DOU + 1), TPA_TOTDIAM = ( TPA_DOU + 2), TPA_FEED = ( TPA_DOU + 3), TPA_ENDFEED = ( TPA_DOU + 4), TPA_STARTFEED = ( TPA_DOU + 5), TPA_TIPFEED = ( TPA_DOU + 6), TPA_LEN = ( TPA_DOU + 7), TPA_TOTLEN = ( TPA_DOU + 8), TPA_MAXMAT = ( TPA_DOU + 9), TPA_LONOFFSET = ( TPA_DOU + 10), TPA_RADOFFSET = ( TPA_DOU + 11), TPA_SPEED = ( TPA_DOU + 12), TPA_SIDEANG = ( TPA_DOU + 13), TPA_MAXSPEED = ( TPA_DOU + 14), TPA_THICK = ( TPA_DOU + 15), TPA_MAXABSORPTION = ( TPA_DOU + 16), TPA_MINFEED = ( TPA_DOU + 17), TPA_DIST = ( TPA_DOU + 18), TPA_STEMDIAM = ( TPA_DOU + 19), TPA_CORE = ( TPA_DOU + 20), TPA_DRAW = ( TPA_STR + 0), TPA_HEAD = ( TPA_STR + 1), TPA_NAME = ( TPA_STR + 2), TPA_SYSNOTES = ( TPA_STR + 3), TPA_USERNOTES = ( TPA_STR + 4), TPA_TCPOS = ( TPA_STR + 5), TPA_UUID = ( TPA_STR + 6)} ; //---------------------------------------------------------------------------- // Costante per errore interno nel disegno degli utensili const int TD_INT_ERR = 999 ; // Costante per errore toolmaker mancante const int TD_TOOLMAKER_ERR = 998 ; // Costante per errore disegno utensile custom mancante o di tipo errato const int TD_CUSTOMDRAW_ERR = 997 ; //---------------------------------------------------------------------------- // Costanti per info in note di sistema const std::string TSI_THBASE = "THB" ; // posizione base portautensile da naso mandrino const std::string TSI_THLEN = "THH" ; // lunghezza portautensile da naso mandrino const std::string TSI_THDIAM = "THD" ; // diametro massimo portautensile const std::string TSI_ACTIVE = "ACTIVE" ; // flag di utensile attivo const std::string TSI_DIST = "DIST" ; // distanza per sega a catena const std::string TSI_STEM_DIAM = "D_STEM" ; // diametro effettivo del gambo utensile const std::string TSI_CORE = "CORE" ; // anima per lama //---------------------------------------------------------------------------- // Costanti per info in portautensili const std::string TTH_BASE = "B" ; // posizione base portautensile da naso mandrino const std::string TTH_LEN = "H" ; // lunghezza portautensile da naso mandrino const std::string TTH_DIAM = "D" ; // diametro massimo portautensile const std::string TTH_STEM_DIAM = "D_STEM" ; // diametro massimo gambo utensile