diff --git a/CamData.cpp b/CamData.cpp index 72a59c1..725d871 100644 --- a/CamData.cpp +++ b/CamData.cpp @@ -23,34 +23,34 @@ using namespace std ; //---------------------------------------------------------------------------- static int CAM_PARAM_V1 = 10 ; -static std::string CAM_CORR = "Corr" ; -static std::string CAM_TDIR = "TDir" ; -static std::string CAM_CDIR = "CDir" ; -static std::string CAM_ADIR = "ADir" ; -static std::string CAM_PBAS = "PBas" ; -static std::string CAM_FEED = "Feed" ; -static std::string CAM_FLAG = "Flg" ; -static std::string CAM_AXSTS = "AxS" ; -static std::string CAM_AXMSK = "AxM" ; -static std::string CAM_AXVAL = "AxV" ; +static string CAM_CORR = "Corr" ; +static string CAM_TDIR = "TDir" ; +static string CAM_CDIR = "CDir" ; +static string CAM_ADIR = "ADir" ; +static string CAM_PBAS = "PBas" ; +static string CAM_FEED = "Feed" ; +static string CAM_FLAG = "Flg" ; +static string CAM_AXSTS = "AxS" ; +static string CAM_AXMSK = "AxM" ; +static string CAM_AXVAL = "AxV" ; static int CAM_PARAM_V2 = 16 ; -static std::string CAM_MOVE = "Move" ; -static std::string CAM_PCEN = "PCen" ; -static std::string CAM_ACEN = "ACen" ; -static std::string CAM_AXMC = "AxMC" ; -static std::string CAM_AXMR = "AxMR" ; -static std::string CAM_AXAC = "AxAC" ; +static string CAM_MOVE = "Move" ; +static string CAM_PCEN = "PCen" ; +static string CAM_ACEN = "ACen" ; +static string CAM_AXMC = "AxMC" ; +static string CAM_AXMR = "AxMR" ; +static string CAM_AXAC = "AxAC" ; static int CAM_PARAM_V3 = 18 ; -static std::string CAM_NDIR = "NDir" ; -static std::string CAM_AXND = "AxND" ; +static string CAM_NDIR = "NDir" ; +static string CAM_AXND = "AxND" ; static int CAM_PARAM_V4 = 19 ; -static std::string CAM_NDLT = "NDlt" ; +static string CAM_NDLT = "NDlt" ; static int CAM_PARAM_V5 = 20 ; -static std::string CAM_BDIR = "BDir" ; +static string CAM_BDIR = "BDir" ; static int CAM_PARAM_V6 = 21 ; -static std::string CAM_INDEX = "Idx" ; +static string CAM_INDEX = "Idx" ; static int CAM_PARAM_V7 = 22 ; -static std::string CAM_ORIGFEED = "OrFeed" ; +static string CAM_ORIGFEED = "OrFeed" ; static int CAM_TOTPARAM =CAM_PARAM_V7 ; diff --git a/ChiselingData.cpp b/ChiselingData.cpp index 3398abf..4921b3f 100644 --- a/ChiselingData.cpp +++ b/ChiselingData.cpp @@ -50,7 +50,7 @@ enum nChiselingKey { KEY_WS, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sChiselingKey = { +static const array sChiselingKey = { "AB", "AI", "DH", @@ -332,7 +332,7 @@ ChiselingData::VerifyWorkSide( int nVal) const //---------------------------------------------------------------------------- bool -ChiselingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +ChiselingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ; diff --git a/Disposition.cpp b/Disposition.cpp index 1b0d0bc..5cb4e3b 100644 --- a/Disposition.cpp +++ b/Disposition.cpp @@ -41,27 +41,27 @@ using namespace std ; // 2052 = "Warning in Disposition : No shifts" //---------------------------------------------------------------------------- -static std::string DIS_TABLE = "Tab" ; -static std::string DIS_PHASE = "Ph" ; -static std::string DIS_REF1 = "Ref1" ; -static std::string DIS_AREA1 = "Area1" ; -static std::string DIS_FXD_TOT = "FxT" ; -static std::string DIS_FXD_NAME = "FxN" ; -static std::string DIS_FXD_POS = "FxP" ; -static std::string DIS_FXD_ANG = "FxA" ; -static std::string DIS_FXD_MOV = "FxM" ; -static std::string DIS_MVD_TOT = "MvT" ; -static std::string DIS_MVD_ID = "MvI" ; -static std::string DIS_MVD_TYPE = "MvT" ; -static std::string DIS_MVD_PNT = "MvP" ; -static std::string DIS_MVD_ANG = "MvA" ; -static std::string DIS_MVD_FLAG = "MvF" ; -static std::string DIS_NUM = "NUM" ; -static std::string DIS_HEAD = "Head" ; -static std::string DIS_EXIT = "Exit" ; -static std::string DIS_SOMEBYHAND = "Sbh" ; -static std::string DIS_TCPOS = "TcPos" ; -static std::string DIS_AREA1_OFFS = "Area1Offs" ; +static string DIS_TABLE = "Tab" ; +static string DIS_PHASE = "Ph" ; +static string DIS_REF1 = "Ref1" ; +static string DIS_AREA1 = "Area1" ; +static string DIS_FXD_TOT = "FxT" ; +static string DIS_FXD_NAME = "FxN" ; +static string DIS_FXD_POS = "FxP" ; +static string DIS_FXD_ANG = "FxA" ; +static string DIS_FXD_MOV = "FxM" ; +static string DIS_MVD_TOT = "MvT" ; +static string DIS_MVD_ID = "MvI" ; +static string DIS_MVD_TYPE = "MvT" ; +static string DIS_MVD_PNT = "MvP" ; +static string DIS_MVD_ANG = "MvA" ; +static string DIS_MVD_FLAG = "MvF" ; +static string DIS_NUM = "NUM" ; +static string DIS_HEAD = "Head" ; +static string DIS_EXIT = "Exit" ; +static string DIS_SOMEBYHAND = "Sbh" ; +static string DIS_TCPOS = "TcPos" ; +static string DIS_AREA1_OFFS = "Area1Offs" ; //---------------------------------------------------------------------------- static double DISP_BOX_TOL = - 0.5 ; diff --git a/DrillingData.cpp b/DrillingData.cpp index 042c8a0..57711e0 100644 --- a/DrillingData.cpp +++ b/DrillingData.cpp @@ -55,7 +55,7 @@ enum nDrillingKey { KEY_UUID, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sDrillingKey = { +static const array sDrillingKey = { "AB", "AI", "DH", @@ -372,7 +372,7 @@ DrillingData::VerifySolCh( int nVal) const //---------------------------------------------------------------------------- bool -DrillingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +DrillingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ; diff --git a/Estimator.cpp b/Estimator.cpp index 10dcd76..4e37319 100644 --- a/Estimator.cpp +++ b/Estimator.cpp @@ -43,7 +43,7 @@ Estimator::Init( MachMgr* pMchMgr) //---------------------------------------------------------------------------- bool -Estimator::Run( const string& sCncFile, const std::string& sInfo) +Estimator::Run( const string& sCncFile, const string& sInfo) { // emetto info di log { string sOut = "Estimator Run : " + sCncFile ; diff --git a/GenMachiningData.cpp b/GenMachiningData.cpp index 1eb4850..2b41635 100644 --- a/GenMachiningData.cpp +++ b/GenMachiningData.cpp @@ -49,7 +49,7 @@ enum nGenMachiningKey { KEY_UUID, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sGenMachiningKey = { +static const array sGenMachiningKey = { "AB", "AI", "DH", @@ -317,7 +317,7 @@ GenMachiningData::VerifySolCh( int nVal) const //---------------------------------------------------------------------------- bool -GenMachiningData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +GenMachiningData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ; diff --git a/Generator.cpp b/Generator.cpp index e8125dd..70e7467 100644 --- a/Generator.cpp +++ b/Generator.cpp @@ -43,7 +43,7 @@ Generator::Init( MachMgr* pMchMgr) //---------------------------------------------------------------------------- bool -Generator::Run( const string& sCncFile, const std::string& sInfo) +Generator::Run( const string& sCncFile, const string& sInfo) { // emetto info di log { string sOut = "Generator Run : " + sCncFile ; diff --git a/MachMgrBasic.cpp b/MachMgrBasic.cpp index 16a9fca..8bb4ed6 100644 --- a/MachMgrBasic.cpp +++ b/MachMgrBasic.cpp @@ -183,7 +183,7 @@ bool MachMgr::IsMachBase( int nId) const { int nLevel ; - std::string sName ; + string sName ; return ( m_pGeomDB != nullptr && m_pGeomDB->GetLevel( nId, nLevel) && nLevel == GDB_LV_SYSTEM && m_pGeomDB->GetName( nId, sName) && sName == MACH_BASE) ; @@ -249,7 +249,7 @@ bool MachMgr::IsMachAux( int nId) const { int nLevel ; - std::string sName ; + string sName ; return ( m_pGeomDB != nullptr && m_pGeomDB->GetLevel( nId, nLevel) && nLevel == GDB_LV_TEMP && m_pGeomDB->GetName( nId, sName) && sName == MACH_AUX) ; diff --git a/MachMgrMachines.cpp b/MachMgrMachines.cpp index b4921a1..f6c5d7c 100644 --- a/MachMgrMachines.cpp +++ b/MachMgrMachines.cpp @@ -662,7 +662,7 @@ MachMgr::ExistProtectedAreas( void) const } //---------------------------------------------------------------------------- -std::string +string MachMgr::GetOutstrokeInfo( bool bMM) const { Machine* pMch = GetCurrMachine() ; diff --git a/MachMgrSimulation.cpp b/MachMgrSimulation.cpp index 471f986..72f7439 100644 --- a/MachMgrSimulation.cpp +++ b/MachMgrSimulation.cpp @@ -27,7 +27,7 @@ MachMgr::SimInit( void) // alloco o rialloco il simulatore if ( m_pSimul != nullptr) delete m_pSimul ; - m_pSimul = new( std::nothrow) Simulator ; + m_pSimul = new( nothrow) Simulator ; if ( m_pSimul == nullptr) return false ; // lo inizializzo diff --git a/Machine.cpp b/Machine.cpp index ffc285f..64979dc 100644 --- a/Machine.cpp +++ b/Machine.cpp @@ -977,7 +977,7 @@ Machine::SetLook( int nFlag) //---------------------------------------------------------------------------- bool -Machine::LinkRawPartToGroup( int nRawPartId, const std::string& sGroupName) +Machine::LinkRawPartToGroup( int nRawPartId, const string& sGroupName) { // verifico DB geometrico e gestore lavorazioni if ( m_pGeomDB == nullptr || m_pMchMgr == nullptr) @@ -1054,7 +1054,7 @@ Machine::UnlinkAllRawPartsFromGroups( void) //---------------------------------------------------------------------------- bool -Machine::LinkFixtureToGroup( int nFxtId, const std::string& sGroupName) +Machine::LinkFixtureToGroup( int nFxtId, const string& sGroupName) { // verifico DB geometrico e gestore lavorazioni if ( m_pGeomDB == nullptr || m_pMchMgr == nullptr) @@ -1126,7 +1126,7 @@ const string KEY_ORIG_REF = "OrigRef" ; //---------------------------------------------------------------------------- bool -Machine::LinkPartToGroup( int nPartId, const std::string& sGroupName) +Machine::LinkPartToGroup( int nPartId, const string& sGroupName) { // verifico DB geometrico e gestore lavorazioni if ( m_pGeomDB == nullptr || m_pMchMgr == nullptr) diff --git a/MachineHeads.cpp b/MachineHeads.cpp index 624929e..5e6392b 100644 --- a/MachineHeads.cpp +++ b/MachineHeads.cpp @@ -35,7 +35,7 @@ Machine::GetAllHeadsNames( STRVECTOR& vNames) const vNames.push_back( snGro.first) ; } // ordino alfabeticamente - std::sort( vNames.begin(), vNames.end()) ; + sort( vNames.begin(), vNames.end()) ; return true ; } diff --git a/MachineTables.cpp b/MachineTables.cpp index 14fe87c..454f5ba 100644 --- a/MachineTables.cpp +++ b/MachineTables.cpp @@ -35,7 +35,7 @@ Machine::GetAllTablesNames( STRVECTOR& vNames) const vNames.push_back( snGro.first) ; } // ordino alfabeticamente - std::sort( vNames.begin(), vNames.end()) ; + sort( vNames.begin(), vNames.end()) ; return true ; } diff --git a/MachiningsMgr.cpp b/MachiningsMgr.cpp index bbc9717..0d60492 100644 --- a/MachiningsMgr.cpp +++ b/MachiningsMgr.cpp @@ -889,7 +889,7 @@ MachiningsMgr::EncodeSpecialParams( MachiningData* pMach) const //---------------------------------------------------------------------------- bool -MachiningsMgr::SetCurrMachiningParam( int nType, const std::string& sVal) +MachiningsMgr::SetCurrMachiningParam( int nType, const string& sVal) { // deve esistere lavorazione corrente if ( m_pCurrMach == nullptr) @@ -995,7 +995,7 @@ MachiningsMgr::GetCurrMachiningParam( int nType, double& dVal) const //---------------------------------------------------------------------------- bool -MachiningsMgr::GetCurrMachiningParam( int nType, std::string& sVal) const +MachiningsMgr::GetCurrMachiningParam( int nType, string& sVal) const { return ( ( m_pCurrMach != nullptr) ? m_pCurrMach->GetParam( nType, sVal) : false) ; } diff --git a/MillingData.cpp b/MillingData.cpp index 3b811d0..2078a0d 100644 --- a/MillingData.cpp +++ b/MillingData.cpp @@ -75,7 +75,7 @@ enum nMillingKey { KEY_WS, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sMillingKey = { +static const array sMillingKey = { "AB", "AI", "DH", @@ -578,7 +578,7 @@ MillingData::VerifySideAngle( double dVal) const //---------------------------------------------------------------------------- bool -MillingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +MillingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ; diff --git a/MortisingData.cpp b/MortisingData.cpp index 1f6fba6..f9658ec 100644 --- a/MortisingData.cpp +++ b/MortisingData.cpp @@ -54,7 +54,7 @@ enum nMortisingKey { KEY_WS, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sMortisingKey = { +static const array sMortisingKey = { "AB", "AI", "DH", @@ -379,7 +379,7 @@ MortisingData::VerifyStepType( int nVal) const //---------------------------------------------------------------------------- bool -MortisingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +MortisingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ; diff --git a/Pocketing.cpp b/Pocketing.cpp index 7c1f42c..3de78c8 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -80,7 +80,7 @@ using namespace std ; // 2458 = "Warning in Pocketing : machining depth (xxx) bigger than MaxMaterial (yyy)" //---------------------------------------------------------------------------- -static std::string KEY_OPEN = "OPEN" ; +static string KEY_OPEN = "OPEN" ; //---------------------------------------------------------------------------- USEROBJ_REGISTER( GetOperationClass( OPER_POCKETING), Pocketing) ; @@ -2169,7 +2169,7 @@ Pocketing::CalcZigZag( const ICurveComposite* pOffs, double dOe ; } ; // raccolta di tratti - typedef std::vector> VECVECSECT ; + typedef vector> VECVECSECT ; VECVECSECT vvSec ; vvSec.resize( nYStep + 1) ; diff --git a/PocketingData.cpp b/PocketingData.cpp index 6518cfe..e81a97d 100644 --- a/PocketingData.cpp +++ b/PocketingData.cpp @@ -57,7 +57,7 @@ enum nPocketingKey { KEY_UUID, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sPocketingKey = { +static const array sPocketingKey = { "AB", "AI", "DH", @@ -404,7 +404,7 @@ PocketingData::VerifyLeadOutType( int nVal) const //---------------------------------------------------------------------------- bool -PocketingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +PocketingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ; diff --git a/Processor.cpp b/Processor.cpp index 4040eb6..c99c5aa 100644 --- a/Processor.cpp +++ b/Processor.cpp @@ -70,7 +70,7 @@ Processor::Init( MachMgr* pMchMgr) //---------------------------------------------------------------------------- bool -Processor::Run( const string& sOutFile, const std::string& sInfo) +Processor::Run( const string& sOutFile, const string& sInfo) { // verifico ci sia una macchinata corrente if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr || m_pMachine == nullptr || @@ -684,11 +684,11 @@ Processor::ProcessToolData( void) // altrimenti emetto direttamente gli utensili else { // ordino l'elenco degli utensili - std::sort( vTdata.begin(), vTdata.end(), []( const MyToolData& a, const MyToolData& b) - { if ( a.sHead == b.sHead) - return a.nExit < b.nExit ; - else - return a.sHead < b.sHead ; }) ; + sort( vTdata.begin(), vTdata.end(), []( const MyToolData& a, const MyToolData& b) + { if ( a.sHead == b.sHead) + return a.nExit < b.nExit ; + else + return a.sHead < b.sHead ; }) ; // emetto l'elenco degli utensili string sPrevHead ; int nPrevExit = 0 ; string sPrevTcPos ; string sPrevTool ; for ( size_t i = 0 ; i < vTdata.size() ; ++ i) { @@ -826,7 +826,7 @@ Processor::OnToolSelect( const string& sTool, const string& sHead, int nExit, co //---------------------------------------------------------------------------- bool -Processor::OnToolDeselect( const std::string& sNextTool, const string& sNextHead, int nNextExit, const string& sNextTcPos) +Processor::OnToolDeselect( const string& sNextTool, const string& sNextHead, int nNextExit, const string& sNextTcPos) { // assegno il prossimo utensile bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_NEXTTOOL, sNextTool) ; diff --git a/SawFinishing.cpp b/SawFinishing.cpp index 24232e4..48cfb9e 100644 --- a/SawFinishing.cpp +++ b/SawFinishing.cpp @@ -57,8 +57,8 @@ using namespace std ; // 2754 = "Warning in SawFinishing : Tool data changed (xx)" //---------------------------------------------------------------------------- -const std::string MCH_SECTION = "Sect" ; -const std::string MCH_GUIDE = "Guide" ; +const string MCH_SECTION = "Sect" ; +const string MCH_GUIDE = "Guide" ; enum nCrvClass { CCL_SMALL = 0, CCL_VERT = 1, @@ -1699,8 +1699,8 @@ SawFinishing::CalculateSection( int nSectGrpId, ICurve*& pSect) return false ; vIAsc.emplace_back( i, ptStart.x) ; } - std::sort( vIAsc.begin(), vIAsc.end(), []( const INDASC& a, const INDASC& b) - { return a.second > b.second ; }) ; + sort( vIAsc.begin(), vIAsc.end(), []( const INDASC& a, const INDASC& b) + { return a.second > b.second ; }) ; // unisco le diverse curve (ora aperte) in un unico profilo PtrOwner pCurve( CreateCurveComposite()) ; diff --git a/SawFinishingData.cpp b/SawFinishingData.cpp index 898433b..7ac6cbb 100644 --- a/SawFinishingData.cpp +++ b/SawFinishingData.cpp @@ -56,7 +56,7 @@ enum nSawFinishingKey { KEY_UUID, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sSawFinishingKey = { +static const array sSawFinishingKey = { "AB", "AI", "APPR", @@ -403,7 +403,7 @@ SawFinishingData::VerifyLeadLinkType( int nVal) const //---------------------------------------------------------------------------- bool -SawFinishingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +SawFinishingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ; diff --git a/SawRoughing.cpp b/SawRoughing.cpp index b86f185..24615b4 100644 --- a/SawRoughing.cpp +++ b/SawRoughing.cpp @@ -57,8 +57,8 @@ using namespace std ; // 2654 = "Warning in SawRoughing : Tool data changed (xx)" //---------------------------------------------------------------------------- -const std::string MCH_SECTION = "Sect" ; -const std::string MCH_GUIDE = "Guide" ; +const string MCH_SECTION = "Sect" ; +const string MCH_GUIDE = "Guide" ; //---------------------------------------------------------------------------- USEROBJ_REGISTER( GetOperationClass( OPER_SAWROUGHING), SawRoughing) ; @@ -1371,8 +1371,8 @@ SawRoughing::CalculateSection( int nSectGrpId, ICurve*& pSect) return false ; vIAsc.emplace_back( i, ptStart.x) ; } - std::sort( vIAsc.begin(), vIAsc.end(), []( const INDASC& a, const INDASC& b) - { return a.second > b.second ; }) ; + sort( vIAsc.begin(), vIAsc.end(), []( const INDASC& a, const INDASC& b) + { return a.second > b.second ; }) ; // unisco le diverse curve (ora aperte) in un unico profilo PtrOwner pCurve( CreateCurveComposite()) ; diff --git a/SawRoughingData.cpp b/SawRoughingData.cpp index 4816b6f..aa9f400 100644 --- a/SawRoughingData.cpp +++ b/SawRoughingData.cpp @@ -54,7 +54,7 @@ enum nSawRoughingKey { KEY_UUID, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sSawRoughingKey = { +static const array sSawRoughingKey = { "AB", "AI", "APPR", @@ -379,7 +379,7 @@ SawRoughingData::VerifyLeadLinkType( int nVal) const //---------------------------------------------------------------------------- bool -SawRoughingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +SawRoughingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ; diff --git a/Sawing.cpp b/Sawing.cpp index d5e206b..300d4ef 100644 --- a/Sawing.cpp +++ b/Sawing.cpp @@ -1590,10 +1590,10 @@ Sawing::ProcessEntity( const ICurve* pCrvP, const ICurve* pCrvC, const ICurve* p else { if ( m_Params.m_nCurveUse == SAW_CRV_KEEP) { // verifico che non ci sia angolo di fianco - if ( abs( m_Params.m_dSideAngle) > EPS_ANG_SMALL) { - m_pMchMgr->SetLastError( 2207, "Error in Sawing : SideAngle not allowed on Arc") ; - return false ; - } + //if ( abs( m_Params.m_dSideAngle) > EPS_ANG_SMALL) { + // m_pMchMgr->SetLastError( 2207, "Error in Sawing : SideAngle not allowed on Arc") ; + // return false ; + //} // determino la convessitā int nConv = 0 ; for ( int i = 0 ; i < pCompo->GetCurveCount() ; ++ i) { @@ -2126,7 +2126,17 @@ Sawing::ProcessExtCurve( const ICurve* pCrvP, const ICurveComposite* pCrvC, cons return false ; } // aggiungo affondamento (sempre in Z globale) - pCrv->Translate( - Z_AX * dDepth) ; + double dDepthZ = dDepth ; + if ( abs( m_Params.m_dSideAngle) > EPS_ANG_SMALL) + dDepthZ *= cos( m_Params.m_dSideAngle * DEGTORAD) ; + pCrv->Translate( - Z_AX * dDepthZ) ; + // offset per taglio inclinato + if ( abs( m_Params.m_dSideAngle) > EPS_ANG_SMALL) { + double dOffs = dDepth * sin( abs( m_Params.m_dSideAngle) * DEGTORAD) ; + if ( m_Params.m_nHeadSide == SAW_HS_LEFT) + dOffs = - dOffs ; + pCrv->SimpleOffset( dOffs) ; + } // calcolo elevazione (sui due bordi della striscia) double dElev = 0 ; for ( const ICurve* pSmpCrv = pCrv->GetFirstCurve() ; @@ -2144,8 +2154,8 @@ Sawing::ProcessExtCurve( const ICurve* pCrvP, const ICurveComposite* pCrvC, cons if ( ! CalculateToolAndCorrVersors( vtStaDir, m_Params.m_nHeadSide, m_Params.m_nWorkSide, m_Params.m_dSideAngle, vtStaTool, vtStaCorr) || ! CalculateToolAndCorrVersors( vtMidDir, m_Params.m_nHeadSide, m_Params.m_nWorkSide, m_Params.m_dSideAngle, vtMidTool, vtMidCorr) || ! CalculateToolAndCorrVersors( vtEndDir, m_Params.m_nHeadSide, m_Params.m_nWorkSide, m_Params.m_dSideAngle, vtEndTool, vtEndCorr) || - ! AreSameVectorApprox( vtStaCorr, vtMidCorr) || - ! AreSameVectorApprox( vtStaCorr, vtEndCorr)) { + abs( vtStaCorr.z - vtMidCorr.z) > EPS_SMALL || + abs( vtStaCorr.z - vtEndCorr.z) > EPS_SMALL) { m_pMchMgr->SetLastError( 2208, "Error in Sawing : Entity CalculateToolAndCorrVersors") ; return false ; } @@ -2580,6 +2590,7 @@ Sawing::GenerateExtCurveCl( const ICurveComposite* pCrv, if ( m_Params.m_dStepExtArc < EPS_SMALL || ( dElev - dExtraCut) <= m_Params.m_dStepExtArc) { // 1 -> approccio SetToolDir( vtStaTool) ; + SetCorrAuxDir( vtStaCorr) ; Point3d ptP1 ; pCrv->GetStartPoint( ptP1) ; if ( ! AddApproach( ptP1, vtStaCorr, dSafeZ, dElev, dAppr)) @@ -2601,6 +2612,7 @@ Sawing::GenerateExtCurveCl( const ICurveComposite* pCrv, Vector3d vtCurrTool, vtCurrCorr ; CalculateToolAndCorrVersors( vtCurrDir, m_Params.m_nHeadSide, m_Params.m_nWorkSide, m_Params.m_dSideAngle, vtCurrTool, vtCurrCorr) ; SetToolDir( vtCurrTool) ; + SetCorrAuxDir( vtCurrCorr) ; if ( AddCurveMove( pSmpCrv, true) == GDB_ID_NULL) return false ; } diff --git a/SawingData.cpp b/SawingData.cpp index 45ad5ca..7dcc532 100644 --- a/SawingData.cpp +++ b/SawingData.cpp @@ -65,7 +65,7 @@ enum nSawingKey { KEY_WS, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sSawingKey = { +static const array sSawingKey = { "AB", "AI", "APPR", @@ -510,7 +510,7 @@ SawingData::VerifySideAngle( double dVal) const //---------------------------------------------------------------------------- bool -SawingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +SawingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ; diff --git a/Simulator.cpp b/Simulator.cpp index 46900a3..6c7cbf4 100644 --- a/Simulator.cpp +++ b/Simulator.cpp @@ -1327,7 +1327,7 @@ Simulator::OnToolSelect( const string& sTool, const string& sHead, int nExit, co //---------------------------------------------------------------------------- bool -Simulator::OnToolDeselect( const std::string& sNextTool, const string& sNextHead, int nNextExit, const string& sNextTcPos) +Simulator::OnToolDeselect( const string& sNextTool, const string& sNextHead, int nNextExit, const string& sNextTcPos) { // assegno il prossimo utensile bool bOk = m_pMachine->LuaSetGlobVar( GLOB_VAR + GVAR_NEXTTOOL, sNextTool) ; diff --git a/SurfFinishing.cpp b/SurfFinishing.cpp index c90366c..129f921 100644 --- a/SurfFinishing.cpp +++ b/SurfFinishing.cpp @@ -1447,7 +1447,7 @@ SurfFinishing::CalcZigZag( const ICurveComposite* pOffs, double dOe ; } ; // raccolta di tratti - typedef std::vector> VECVECSECT ; + typedef vector> VECVECSECT ; VECVECSECT vvSec ; vvSec.resize( nYStep + 1) ; diff --git a/SurfFinishingData.cpp b/SurfFinishingData.cpp index ebc03ad..37afc55 100644 --- a/SurfFinishingData.cpp +++ b/SurfFinishingData.cpp @@ -58,7 +58,7 @@ enum nSurfFinishingKey { KEY_UUID, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sSurfFinishingKey = { +static const array sSurfFinishingKey = { "AB", "AI", "APPR", @@ -420,7 +420,7 @@ SurfFinishingData::VerifyLeadOutType( int nVal) const //---------------------------------------------------------------------------- bool -SurfFinishingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +SurfFinishingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ; diff --git a/ToolData.cpp b/ToolData.cpp index 143d743..1da5f01 100644 --- a/ToolData.cpp +++ b/ToolData.cpp @@ -57,7 +57,7 @@ enum nToolKey { TK_UUID, TK_ZZZ} ; // rappresenta il numero di elementi -static const std::array sToolKey = { +static const array sToolKey = { "ABSMAX", "COOLANT", "COR", diff --git a/ToolsMgr.cpp b/ToolsMgr.cpp index 1a8ea54..4d2430a 100644 --- a/ToolsMgr.cpp +++ b/ToolsMgr.cpp @@ -502,7 +502,7 @@ ToolsMgr::VerifyTool( int nFamily, string& sName, int& nType) const //---------------------------------------------------------------------------- bool -ToolsMgr::SetCurrTool( const std::string& sName) +ToolsMgr::SetCurrTool( const string& sName) { // se nome vuoto, faccio reset if ( sName.empty()) { diff --git a/WaterJettingData.cpp b/WaterJettingData.cpp index 741ddc1..dae5b9c 100644 --- a/WaterJettingData.cpp +++ b/WaterJettingData.cpp @@ -68,7 +68,7 @@ enum nWaterJetting { KEY_WS, KEY_ZZZ} ; // rappresenta il numero di elementi -static const std::array sWaterJettingKey = { +static const array sWaterJettingKey = { "AB", "AI", "CSL", @@ -539,7 +539,7 @@ WaterJettingData::VerifyThickRef( double dVal) const //---------------------------------------------------------------------------- bool -WaterJettingData::VerifyTool( const ToolsMgr* pToolsMgr, const std::string& sVal, const ToolData*& pTdata) const +WaterJettingData::VerifyTool( const ToolsMgr* pToolsMgr, const string& sVal, const ToolData*& pTdata) const { if ( pToolsMgr == nullptr) return false ;