diff --git a/Disposition.cpp b/Disposition.cpp index 1a14fa9..5782a8a 100644 --- a/Disposition.cpp +++ b/Disposition.cpp @@ -1639,7 +1639,7 @@ Disposition::SpecialUpdate( void) return true ; } // calcolo assi macchina - if ( ! CalculateAxesValues( "", false)) { + if ( ! CalculateAxesValues( "")) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; if ( sInfo.empty()) m_pMchMgr->SetLastError( 2008, "Error in Disposition : axes values not calculable") ; diff --git a/FiveAxisMilling.cpp b/FiveAxisMilling.cpp index d2b8054..631356d 100644 --- a/FiveAxisMilling.cpp +++ b/FiveAxisMilling.cpp @@ -50,7 +50,7 @@ using namespace std ; //------------------------------ Constants ----------------------------------- static const string EMC_VAR = "EMC" ; // tabella variabili locali per calcolo static const string EVAR_MACHID = ".MACHID" ; // IN (int) identificativo della lavorazione -static const string EVAR_GEOM = ".GEOM" ; // IN (table) tabella delle entità da lavorare +static const string EVAR_GEOM = ".GEOM" ; // IN (table) tabella delle entità da lavorare static const string EVAR_DEPTH = ".DEPTH" ; // IN (string) affondamento (espressione numerica) static const string EVAR_TINVERT = ".TOOLINVERT" ; // IN (bool) flag di inversione direzione utensile static const string EVAR_INVERT = ".INVERT" ; // IN (bool) flag di inversione direzione lavorazione @@ -75,7 +75,7 @@ static const string EVAR_FEED = ".FEED" ; // IN (num) feed dell'utensil static const string EVAR_STARTFEED = ".STARTFEED" ;// IN (num) feed di inizio dell'utensile static const string EVAR_ENDFEED = ".ENDFEED" ; // IN (num) feed di fine dell'utensile static const string EVAR_TIPFEED = ".TIPFEED" ; // IN (num) feed di punta dell'utensile -static const string EVAR_ISROBOT = ".ISROBOT" ; // IN (bool) flag per indicare che la cinematica è di tipo robot +static const string EVAR_ISROBOT = ".ISROBOT" ; // IN (bool) flag per indicare che la cinematica è di tipo robot static const string EVAR_ERROR = ".ERR" ; // OUT (int) codice di errore ( 0 = ok) static const string EVAR_MILLS = ".MILLS" ; // OUT (int) numero di percorsi di lavoro static const string ON_PREVIEW = "OnPreview_" ; @@ -411,15 +411,15 @@ FiveAxisMilling::SetParam( int nType, const string& sVal) bool FiveAxisMilling::SetGeometry( const SELVECTOR& vIds) { - // verifico validità gestore DB geometrico + // verifico validità gestore DB geometrico if ( m_pGeomDB == nullptr) return false ; // copia temporanea e reset della geometria corrente SELVECTOR vOldId = m_vId ; m_vId.clear() ; - // verifico che gli identificativi rappresentino delle entità ammissibili (curve o superfici) + // verifico che gli identificativi rappresentino delle entità ammissibili (curve o superfici) for ( const auto& Id : vIds) { - // test sull'entità + // test sull'entità int nSubs ; if ( ! VerifyGeometry( Id, nSubs)) { string sInfo = "Warning in FiveAxisMilling : Skipped entity " + ToString( Id) ; @@ -443,7 +443,7 @@ FiveAxisMilling::Preview( bool bRecalc) // reset numero percorsi di lavoro generati m_nMills = 0 ; - // verifico validità gestore DB geometrico e Id del gruppo + // verifico validità gestore DB geometrico e Id del gruppo if ( m_pGeomDB == nullptr || ! m_pGeomDB->ExistsObj( m_nOwnerId)) return false ; @@ -461,7 +461,7 @@ FiveAxisMilling::Preview( bool bRecalc) // recupero gruppo per geometria di Preview int nPvId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_PV) ; - // se non c'è, lo aggiungo + // se non c'è, lo aggiungo if ( nPvId == GDB_ID_NULL) { nPvId = m_pGeomDB->AddGroup( GDB_ID_NULL, m_nOwnerId, Frame3d()) ; if ( nPvId == GDB_ID_NULL) @@ -544,7 +544,7 @@ FiveAxisMilling::Preview( bool bRecalc) bool FiveAxisMilling::Apply( bool bRecalc, bool bPostApply) { - // se calcoli già in corso, esco + // se calcoli già in corso, esco if ( m_bRunning) { LOG_DBG_INFO( GetEMkLogger(), "FiveAxisMilling::Apply already running") ; return true ; @@ -563,7 +563,7 @@ FiveAxisMilling::MyApply( bool bRecalc, bool bPostApply) int nCurrMills = m_nMills ; m_nMills = 0 ; - // verifico validità gestore DB geometrico e Id del gruppo + // verifico validità gestore DB geometrico e Id del gruppo if ( m_pGeomDB == nullptr || ! m_pGeomDB->ExistsObj( m_nOwnerId)) return false ; @@ -574,7 +574,7 @@ FiveAxisMilling::MyApply( bool bRecalc, bool bPostApply) return false ; } - // non è prevista fresatura 5 assi con aggregato da sotto + // non è prevista fresatura 5 assi con aggregato da sotto if ( IsAggrBottom( m_TParams.m_sHead)) { m_pMchMgr->SetLastError( 3310, "Error in FiveAxisMilling : aggregate from bottom not allowed") ; return false ; @@ -609,7 +609,7 @@ FiveAxisMilling::MyApply( bool bRecalc, bool bPostApply) // recupero gruppo per geometria di lavorazione (Cutter Location) int nClId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_CL) ; - // se non c'è, lo aggiungo + // se non c'è, lo aggiungo if ( nClId == GDB_ID_NULL) { nClId = m_pGeomDB->AddGroup( GDB_ID_NULL, m_nOwnerId, Frame3d()) ; if ( nClId == GDB_ID_NULL) @@ -710,7 +710,7 @@ FiveAxisMilling::MyApply( bool bRecalc, bool bPostApply) bool FiveAxisMilling::Update( bool bPostApply) { - // verifico validità gestore DB geometrico e Id del gruppo + // verifico validità gestore DB geometrico e Id del gruppo if ( m_pGeomDB == nullptr || ! m_pGeomDB->ExistsObj( m_nOwnerId)) return false ; @@ -720,7 +720,7 @@ FiveAxisMilling::Update( bool bPostApply) return true ; } - // elimino le entità CLIMB, RISE e HOME della lavorazione, potrebbero falsare i calcoli degli assi (in ogni casi vengono riaggiunte dopo) + // elimino le entità CLIMB, RISE e HOME della lavorazione, potrebbero falsare i calcoli degli assi (in ogni casi vengono riaggiunte dopo) RemoveClimbRiseHome() ; // imposto eventuale asse bloccato da lavorazione @@ -730,7 +730,7 @@ FiveAxisMilling::Update( bool bPostApply) string sHint = ExtractHint( m_Params.m_sUserNotes) ; if ( ! m_Params.m_sInitAngs.empty()) sHint = m_Params.m_sInitAngs ; - if ( ! CalculateAxesValues( sHint)) { + if ( ! CalculateAxesValues( sHint, false, 0.1)) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; if ( sInfo.empty()) m_pMchMgr->SetLastError( 3304, "Error in FiveAxisMilling : axes values not calculable") ; @@ -941,7 +941,7 @@ FiveAxisMilling::UpdateToolData( bool* pbChanged) bool FiveAxisMilling::GetGeometry( SELVECTOR& vIds) const { - // restituisco l'elenco delle entità + // restituisco l'elenco delle entità vIds = m_vId ; return true ; } @@ -966,7 +966,7 @@ FiveAxisMilling::VerifyGeometry( SelData Id, int& nSubs) const IGeoObj* pGObj = m_pGeomDB->GetGeoObj( Id.nId) ; if ( pGObj == nullptr) return false ; - // se curva ed è tale + // se curva ed è tale if ( ( pGObj->GetType() & GEO_CURVE) != 0) { const ICurve* pCurve = nullptr ; // se direttamente la curva @@ -988,12 +988,12 @@ FiveAxisMilling::VerifyGeometry( SelData Id, int& nSubs) } return ( pCurve != nullptr) ; } - // se altrimenti è superficie trimesh + // se altrimenti è superficie trimesh else if ( pGObj->GetType() == SRF_TRIMESH) { const ISurfTriMesh* pSurf = ::GetSurfTriMesh( pGObj) ; return ( pSurf != nullptr && pSurf->GetFacetCount() >= 1) ; } - // se altrimenti è superficie Bezier + // se altrimenti è superficie Bezier else if ( pGObj->GetType() == SRF_BEZIER) { const ISurfBezier* pSurf = ::GetSurfBezier( pGObj) ; return ( pSurf != nullptr && pSurf->IsValid()) ; diff --git a/MachConst.h b/MachConst.h index 91e0391..46055c8 100644 --- a/MachConst.h +++ b/MachConst.h @@ -15,7 +15,6 @@ #include - //---------------------------------------------------------------------------- // Radice della gestione delle lavorazioni const std::string MACH_BASE = "MachBase" ; @@ -161,5 +160,11 @@ const std::string NST_PARTREG_LAYER = "Region" ; //---------------------------------------------------------------------------- // Minima componente zeta di versore utensile per lavorazione da sopra (-45deg) const double MIN_ZDIR_TOP_TOOL = -0.7072 ; -// Minima componente zeta di versose utensile èer mortasatura quasi verticale (45deg) +// Minima componente zeta di versore utensile per mortasatura quasi verticale (45deg) const double MIN_ZDIR_VERT_CHSAW = 0.7072 ; + +//---------------------------------------------------------------------------- +// Valore di default del peso del primo asse rotante di macchina +static const double ROT1_WEIGHT_DFLT = 1 ; +// Valore di default per angolo di apertura del cono di direzioni coincidenti con singolarità +static const double SING_CONE_ANG_DFLT = 0.01 ; diff --git a/MachMgrMachines.cpp b/MachMgrMachines.cpp index 3e96000..65f1319 100644 --- a/MachMgrMachines.cpp +++ b/MachMgrMachines.cpp @@ -624,7 +624,7 @@ bool MachMgr::GetCalcMaxDeltaR2OnFirst( void) const { Machine* pMch = GetCurrMachine() ; - return ( ( pMch != nullptr) ? pMch->GetCurrMaxDeltaR2OnFirst() : true) ; + return ( ( pMch != nullptr) ? pMch->GetCurrCalcMaxDeltaR2OnFirst() : true) ; } //---------------------------------------------------------------------------- diff --git a/Machine.cpp b/Machine.cpp index fdf6edd..84a8f28 100644 --- a/Machine.cpp +++ b/Machine.cpp @@ -48,7 +48,8 @@ Machine::Machine( void) m_nCalcHeadId = GDB_ID_NULL ; m_nCalcExitId = GDB_ID_NULL ; m_nCalcToolId = GDB_ID_NULL ; - m_dCalcRot1W = 1 ; + m_dCalcRot1W = ROT1_WEIGHT_DFLT ; + m_dSingConeAng = SING_CONE_ANG_DFLT ; m_bCalcMaxDeltaR2On1 = true ; m_nCalcSolCh = MCH_SCC_NONE ; m_bSolChExact = false ; diff --git a/Machine.h b/Machine.h index dc23934..187f431 100644 --- a/Machine.h +++ b/Machine.h @@ -135,7 +135,11 @@ class Machine bool IsCurrToolFloating( void) const ; double GetCurrRot1W( void) const { return m_dCalcRot1W ; } - bool GetCurrMaxDeltaR2OnFirst( void) const + bool SetSingConeAng( double dAng) + { m_dSingConeAng = dAng ; return true ;} + double GetCurrSingConeAng( void) const + { return m_dSingConeAng ; } + bool GetCurrCalcMaxDeltaR2OnFirst( void) const { return m_bCalcMaxDeltaR2On1 ; } std::string GetKinematicAxis( int nInd) const ; bool BlockKinematicRotAxis( const std::string& sName, double dVal) ; @@ -316,6 +320,7 @@ class Machine int m_nCalcExitId ; // uscita corrente per calcoli int m_nCalcToolId ; // utensile corrente per calcoli double m_dCalcRot1W ; // peso del primo asse rotante per i confronti + double m_dSingConeAng ; // angolo di apertura del cono di direzioni considerate coincidenti con asse singolare bool m_bCalcMaxDeltaR2On1 ; // flag utilizzo controllo massimo delta secondo asse rotante su inizio lavorazione int m_nCalcSolCh ; // criterio di scelta della soluzione bool m_bSolChExact ; // flag per scelta soluzione da soddisfare esattamente diff --git a/MachineCalc.cpp b/MachineCalc.cpp index 60212f8..16761f0 100644 --- a/MachineCalc.cpp +++ b/MachineCalc.cpp @@ -371,7 +371,9 @@ Machine::ResetCurrTool( void) m_nCalcHeadId = GDB_ID_NULL ; m_nCalcExitId = GDB_ID_NULL ; m_nCalcToolId = GDB_ID_NULL ; - m_dCalcRot1W = 1 ; + m_dCalcRot1W = ROT1_WEIGHT_DFLT ; + m_dSingConeAng = SING_CONE_ANG_DFLT ; + m_bCalcMaxDeltaR2On1 = true ; m_nCalcSolCh = MCH_SCC_NONE ; m_dCalcTLen = 0 ; m_dCalcTRad = 0 ; @@ -1224,8 +1226,30 @@ Machine::GetMyAngles( const Vector3d& vtDirT, const Vector3d& vtDirA, vtDirI1.Rotate( vtAx1, dAngA1) ; } + // verifica per direzione singolare (direzione fresa molto vicina a direzione primo asse rotante) + if ( nNumRotAx == 2 && nStat == 2 && abs( dAngB2 - dAngB1) < 2 * m_dSingConeAng) { + nStat = 1 ; + bDet1 = false ; + dAngB1 = ( dAngB1 + dAngB2) / 2 ; + // ripristino direzioni fresa e ausiliaria su testa + vtDirH1.Rotate( vtAx1, -dAngA1) ; + vtDirI1.Rotate( vtAx1, -dAngA1) ; + // provo a determinare primo angolo con la direzione ausiliaria + bool bDetX ; + Vector3d vtSccDir ; + bool bSccDir = GetSccDir( m_nCalcSolCh, vtDirAn, vtSccDir) ; + vtDirI1.GetRotation( vtSccDir, vtAx1, dAngA1, bDetX) ; + if ( bDetX) + bDet1 = bSccDir ; + else + dAngA1 = 0 ; + // aggiornamento direzioni fresa e ausiliaria su testa + vtDirH1.Rotate( vtAx1, dAngA1) ; + vtDirI1.Rotate( vtAx1, dAngA1) ; + } + // verifiche per criterio scelta soluzione - if ( nStat >= 2) { + if ( nStat == 2) { if ( ! VerifyScc( vtDirI2, vtDirAn, m_nCalcSolCh, m_bSolChExact)) -- nStat ; } @@ -1241,7 +1265,7 @@ Machine::GetMyAngles( const Vector3d& vtDirT, const Vector3d& vtDirA, } // verifiche dei limiti di corsa - if ( nStat >= 2) { + if ( nStat == 2) { // se non riesco ad aggiustare, elimino if ( ! AdjustAngleInStroke( RotAx1.stroke, dAngA2) || ( nNumRotAx == 2 && ! AdjustAngleInStroke( RotAx2.stroke, dAngB2))) @@ -1261,7 +1285,7 @@ Machine::GetMyAngles( const Vector3d& vtDirT, const Vector3d& vtDirA, } // modifico stato per angolo indeterminato - if ( ( nStat >= 2 && ! bDet2) || ( nStat >= 1 && ! bDet1)) + if ( ( nStat == 2 && ! bDet2) || ( nStat >= 1 && ! bDet1)) nStat = - nStat ; return true ; diff --git a/Mortising.cpp b/Mortising.cpp index 61512dd..aa1e0e2 100644 --- a/Mortising.cpp +++ b/Mortising.cpp @@ -414,16 +414,16 @@ Mortising::SetParam( int nType, const string& sVal) bool Mortising::SetGeometry( const SELVECTOR& vIds) { - // verifico validità gestore DB geometrico + // verifico validità gestore DB geometrico if ( m_pGeomDB == nullptr) return false ; // copia temporanea e reset della geometria corrente SELVECTOR vOldId = m_vId ; m_vId.clear() ; - // verifico che gli identificativi rappresentino delle entità ammissibili (tutte curve o tutte facce) + // verifico che gli identificativi rappresentino delle entità ammissibili (tutte curve o tutte facce) int nType = GEO_NONE ; for ( const auto& Id : vIds) { - // test sull'entità + // test sull'entità int nSubs ; if ( ! VerifyGeometry( Id, nSubs, nType)) { string sInfo = "Warning in Mortising : Skipped entity " + ToString( Id) ; @@ -447,14 +447,14 @@ Mortising::Preview( bool bRecalc) // reset numero percorsi di lavoro generati m_nMortises = 0 ; - // verifico validità gestore DB geometrico e Id del gruppo + // verifico validità gestore DB geometrico e Id del gruppo if ( m_pGeomDB == nullptr || ! m_pGeomDB->ExistsObj( m_nOwnerId)) return false ; // recupero gruppo per geometria ausiliaria int nAuxId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_AUX) ; bool bChain = false ; - // se non c'è, lo aggiungo + // se non c'è, lo aggiungo if ( nAuxId == GDB_ID_NULL) { nAuxId = m_pGeomDB->AddGroup( GDB_ID_NULL, m_nOwnerId, Frame3d()) ; if ( nAuxId == GDB_ID_NULL) @@ -482,7 +482,7 @@ Mortising::Preview( bool bRecalc) } // recupero gruppo per geometria di Preview int nPvId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_PV) ; - // se non c'è, lo aggiungo + // se non c'è, lo aggiungo if ( nPvId == GDB_ID_NULL) { nPvId = m_pGeomDB->AddGroup( GDB_ID_NULL, m_nOwnerId, Frame3d()) ; if ( nPvId == GDB_ID_NULL) @@ -512,7 +512,7 @@ Mortising::Apply( bool bRecalc, bool bPostApply) int nCurrMortises = m_nMortises ; m_nMortises = 0 ; - // verifico validità gestore DB geometrico e Id del gruppo + // verifico validità gestore DB geometrico e Id del gruppo if ( m_pGeomDB == nullptr || ! m_pGeomDB->ExistsObj( m_nOwnerId)) return false ; @@ -547,7 +547,7 @@ Mortising::Apply( bool bRecalc, bool bPostApply) // recupero gruppo per geometria ausiliaria int nAuxId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_AUX) ; bool bChain = false ; - // se non c'è, lo aggiungo + // se non c'è, lo aggiungo if ( nAuxId == GDB_ID_NULL) { nAuxId = m_pGeomDB->AddGroup( GDB_ID_NULL, m_nOwnerId, Frame3d()) ; if ( nAuxId == GDB_ID_NULL) @@ -564,7 +564,7 @@ Mortising::Apply( bool bRecalc, bool bPostApply) // recupero gruppo per vista ausiliaria int nAuxViewId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_AUXVIEW) ; - // se non c'è, lo aggiungo + // se non c'è, lo aggiungo if ( nAuxViewId == GDB_ID_NULL) { nAuxViewId = m_pGeomDB->AddGroup( GDB_ID_NULL, m_nOwnerId, Frame3d()) ; if ( nAuxViewId == GDB_ID_NULL) @@ -580,7 +580,7 @@ Mortising::Apply( bool bRecalc, bool bPostApply) // recupero gruppo per geometria di lavorazione (Cutter Location) int nClId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_CL) ; - // se non c'è, lo aggiungo + // se non c'è, lo aggiungo if ( nClId == GDB_ID_NULL) { nClId = m_pGeomDB->AddGroup( GDB_ID_NULL, m_nOwnerId, Frame3d()) ; if ( nClId == GDB_ID_NULL) @@ -632,7 +632,7 @@ Mortising::Apply( bool bRecalc, bool bPostApply) bool Mortising::Update( bool bPostApply) { - // verifico validità gestore DB geometrico e Id del gruppo + // verifico validità gestore DB geometrico e Id del gruppo if ( m_pGeomDB == nullptr || ! m_pGeomDB->ExistsObj( m_nOwnerId)) return false ; @@ -642,7 +642,7 @@ Mortising::Update( bool bPostApply) return true ; } - // elimino le entità CLIMB, RISE e HOME della lavorazione, potrebbero falsare i calcoli degli assi (in ogni casi vengono riaggiunte dopo) + // elimino le entità CLIMB, RISE e HOME della lavorazione, potrebbero falsare i calcoli degli assi (in ogni casi vengono riaggiunte dopo) RemoveClimbRiseHome() ; // imposto eventuale asse bloccato da lavorazione @@ -652,7 +652,7 @@ Mortising::Update( bool bPostApply) string sHint = ExtractHint( m_Params.m_sUserNotes) ; if ( ! m_Params.m_sInitAngs.empty()) sHint = m_Params.m_sInitAngs ; - if ( ! CalculateAxesValues( sHint, true, true)) { + if ( ! CalculateAxesValues( sHint, true)) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; if ( sInfo.empty()) m_pMchMgr->SetLastError( 2507, "Error in Mortising : axes values not calculable") ; @@ -878,7 +878,7 @@ Mortising::UpdateToolData( bool* pbChanged) bool Mortising::GetGeometry( SELVECTOR& vIds) const { - // restituisco l'elenco delle entità + // restituisco l'elenco delle entità vIds = m_vId ; return true ; } @@ -891,7 +891,7 @@ Mortising::VerifyGeometry( SelData Id, int& nSubs, int& nType) const IGeoObj* pGObj = m_pGeomDB->GetGeoObj( Id.nId) ; if ( pGObj == nullptr) return false ; - // se ammesse curve ed è tale + // se ammesse curve ed è tale if ( nType != GEO_SURF && ( pGObj->GetType() & GEO_CURVE) != 0) { const ICurve* pCurve = nullptr ; // se direttamente la curva @@ -913,7 +913,7 @@ Mortising::VerifyGeometry( SelData Id, int& nSubs, int& nType) } return ( pCurve != nullptr) ; } - // se altrimenti ammesse superfici trimesh ed è tale + // se altrimenti ammesse superfici trimesh ed è tale else if ( nType != GEO_CURVE && ( pGObj->GetType() & GEO_SURF) != 0) { const ISurfTriMesh* pSurf = ::GetSurfTriMesh( pGObj) ; if ( pSurf == nullptr) @@ -1048,7 +1048,7 @@ Mortising::Chain( int nGrpDestId) for ( const auto& Id : m_vId) { // prendo curva vpCrvs.emplace_back( GetCurve( Id)) ; - // ne verifico la validità + // ne verifico la validità if ( IsNull( vpCrvs.back())) { string sInfo = "Warning in Mortising : Skipped entity " + ToString( Id) ; m_pMchMgr->SetWarning( 2551, sInfo) ; @@ -1167,7 +1167,7 @@ Mortising::ProcessPath( int nPathId, int nPvId, int nClId) // recupero gruppo per geometria temporanea const string GRP_TEMP = "Temp" ; int nTempId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, GRP_TEMP) ; - // se non c'è, lo aggiungo + // se non c'è, lo aggiungo if ( nTempId == GDB_ID_NULL) { nTempId = m_pGeomDB->AddGroup( GDB_ID_NULL, m_nOwnerId, Frame3d()) ; if ( nTempId == GDB_ID_NULL) @@ -1231,7 +1231,7 @@ Mortising::ProcessPath( int nPathId, int nPvId, int nClId) m_pMchMgr->SetWarning( 2555, "Warning in Mortising : skipped Path too short") ; return true ; } - // se una sola entità circonferenza completa, la divido in due per poterla allungare + // se una sola entità circonferenza completa, la divido in due per poterla allungare if ( pCompo->GetCurveCount() == 1 && pCompo->IsClosed()) pCompo->AddJoint( 0.5) ; // eventuali allungamenti @@ -1363,7 +1363,7 @@ Mortising::ProcessPath( int nPathId, int nPvId, int nClId) return false ; } - // se lo step supera la capacità dell'utensile + // se lo step supera la capacità dell'utensile if ( dOkStep > m_TParams.m_dMaxMat + EPS_SMALL) { dOkStep = m_TParams.m_dMaxMat ; string sInfo = "Warning in Mortising : machining step (" + ToString( m_Params.m_dStep, 1) + @@ -1511,7 +1511,7 @@ Mortising::GenerateMortisingCl( const ICurveComposite* pCompo, const Vector3d& v Point3d ptStart ; pCompo->GetStartPoint( ptStart) ; Point3d ptEnd ; pCompo->GetEndPoint( ptEnd) ; - // verifico se affondamento ripetuto è veramente tale + // verifico se affondamento ripetuto è veramente tale if ( ( nPlunge == MORTISE_PLUNGE_START_END || nPlunge == MORTISE_PLUNGE_START_TO_END) && Dist( ptStart, ptEnd) < 10 * EPS_SMALL) nPlunge = MORTISE_PLUNGE_START ; @@ -1535,7 +1535,7 @@ Mortising::GenerateMortisingCl( const ICurveComposite* pCompo, const Vector3d& v int kMax = ( int) floor( dLen / m_TParams.m_dDiam) ; for ( int k = 0 ; k <= kMax ; ++ k) { Point3d ptNewStart = ptStart + vtDir * k * m_TParams.m_dDiam ; - // se non è finale + // se non è finale if ( k != kMax || ! AreSamePointEpsilon( ptNewStart, ptEnd, 10 * EPS_SMALL)) { if ( ! GenerateOnePlungeCl( ptNewStart, ptEnd, vtTool, dDepth, dElev, dOkStep, MORTISE_PLUNGE_START, k == 0)) return false ; @@ -1567,7 +1567,7 @@ Mortising::GenerateOnePlungeCl( const Point3d& ptStart, const Point3d& ptEnd, co { // compensazione elevazione/affondamento double dDelta = dElev - dDepth ; - // pre-calcolo step per modalità con step + // pre-calcolo step per modalità con step int nStep = 1 ; double dStep = dElev ; if ( nPlunge == MORTISE_PLUNGE_STEP || nPlunge == MORTISE_PLUNGE_STEP_NO_SAFEZ) { @@ -1577,7 +1577,7 @@ Mortising::GenerateOnePlungeCl( const Point3d& ptStart, const Point3d& ptEnd, co dStep = dElev / nStep ; } - // determino se l'inizio dell'attacco è esattamente sotto il grezzo, nel qual caso ricalcolo l'elevazione + // determino se l'inizio dell'attacco è esattamente sotto il grezzo, nel qual caso ricalcolo l'elevazione double dSafeZ = GetSafeZ() + GetDeltaSafeZ( vtTool) ; double dStartElev = 0 ; Point3d ptLi = ( nPlunge != MORTISE_PLUNGE_END ? ptStart : ptEnd) + vtTool * dDelta ; @@ -1689,7 +1689,7 @@ Mortising::GenerateOnePlungeCl( const Point3d& ptStart, const Point3d& ptEnd, co } } - // determino se la fine dell'uscita è esattamente sotto il grezzo, nel qual caso ricalcolo l'elevazione + // determino se la fine dell'uscita è esattamente sotto il grezzo, nel qual caso ricalcolo l'elevazione double dEndElev = 0 ; Point3d ptLo = ptLast + vtTool * dDelta ; bool bUnderEnd = GetAhPointUnderRaw( ptLo, vtTool, 0, diff --git a/Operation.cpp b/Operation.cpp index db1e00a..27a577d 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -1810,10 +1810,14 @@ Operation::SetBlockedRotAxis( const string& sBlockedAxis) const //---------------------------------------------------------------------------- bool -Operation::CalculateAxesValues( const string& sHint, bool bRotContOnNext, bool bSolChExact) +Operation::CalculateAxesValues( const string& sHint, bool bSolChExact, double dSingConeAng) { if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) return false ; + // recupero macchina corrente + Machine* pMch = m_pMchMgr->GetCurrMachine() ; + if ( pMch == nullptr) + return false ; // recupero l'operazione precedente non vuota o che richiede home precedente int nPrevOpId = m_pMchMgr->GetPrevActiveOperation( m_nOwnerId) ; Operation* pPrevOp = GetOperation( m_pGeomDB->GetUserObj( nPrevOpId)) ; @@ -1831,7 +1835,7 @@ Operation::CalculateAxesValues( const string& sHint, bool bRotContOnNext, bool b sPrevTool = pPrevOp->GetToolName() ; // imposto l'utensile per i calcoli macchina - if ( ! m_pMchMgr->SetCalcTool( GetToolName(), GetHeadName(), GetExitNbr())) + if ( ! pMch->SetCurrTool( GetToolName(), GetHeadName(), GetExitNbr())) return false ; // rimuovo posizionamento home da lavorazione precedente se non richiesto (non può più essere l'ultima) @@ -1839,13 +1843,13 @@ Operation::CalculateAxesValues( const string& sHint, bool bRotContOnNext, bool b pPrevOp->RemoveHome() ; // recupero il numero di assi lineari e rotanti attivi - int nLinAxes = m_pMchMgr->GetCurrLinAxes() ; - int nRotAxes = m_pMchMgr->GetCurrRotAxes() ; + int nLinAxes = pMch->GetCurrLinAxes() ; + int nRotAxes = pMch->GetCurrRotAxes() ; // recupero gli angoli home DBLVECTOR vAxRotHome( nRotAxes, 0.) ; DBLVECTOR vAxHome ; - m_pMchMgr->GetAllCurrAxesHomePos( vAxHome) ; + pMch->GetAllCurrAxesHomePos( vAxHome) ; for ( int i = 0 ; i < nRotAxes ; ++ i) vAxRotHome[i] = vAxHome[nLinAxes + i] ; @@ -1877,16 +1881,16 @@ Operation::CalculateAxesValues( const string& sHint, bool bRotContOnNext, bool b Trim( szKey) ; for ( int i = 0 ; i < nRotAxes ; ++ i) { string sAxToken ; - if ( m_pMchMgr->GetCurrMachine()->GetCurrAxisToken( nLinAxes + i, sAxToken) && + if ( pMch->GetCurrAxisToken( nLinAxes + i, sAxToken) && szKey == Trim( sAxToken, " \t\r\n=")) { double dVal ; if ( FromString( szVal, dVal)) { double dOffset = 0 ; - m_pMchMgr->GetCurrMachine()->GetCurrAxisOffset( nLinAxes + i, dOffset) ; + pMch->GetCurrAxisOffset( nLinAxes + i, dOffset) ; if ( abs( dOffset) > EPS_ANG_SMALL) dVal -= dOffset ; bool bInvert = false ; - m_pMchMgr->GetCurrMachine()->GetCurrAxisInvert( nLinAxes + i, bInvert) ; + pMch->GetCurrAxisInvert( nLinAxes + i, bInvert) ; if ( bInvert) dVal = -dVal ; vAxRotPrec[i] = dVal ; @@ -1897,20 +1901,17 @@ Operation::CalculateAxesValues( const string& sHint, bool bRotContOnNext, bool b } } - // recupero peso primo asse rotante di testa - double dRot1W = m_pMchMgr->GetCalcRot1W() ; - - // recupero flag controllo delta massimo secondo asse rotante anche su primo movimento di lavorazione - bool bMaxDeltaR2OnFirst = m_pMchMgr->GetCalcMaxDeltaR2OnFirst() ; - // recupero la minima differenza angolare da posizione precedente per stare vicino a posizione home - double dAngDeltaMinForHome = m_pMchMgr->GetAngDeltaMinForHome() ; + double dAngDeltaMinForHome = pMch->GetAngDeltaMinForHome() ; // applico eventuali blocchi di assi rotanti m_pMchMgr->ApplyRotAxisBlock() ; // applico il criterio di scelta della soluzione quando molteplici - m_pMchMgr->SetCalcSolCh( GetSolCh(), bSolChExact) ; + pMch->SetSolCh( GetSolCh(), bSolChExact) ; + + // applico angolo di apertura cono da direzione singolare + pMch->SetSingConeAng( dSingConeAng) ; // recupero gruppo della geometria di lavorazione (Cutter Location) int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ; @@ -1919,49 +1920,46 @@ Operation::CalculateAxesValues( const string& sHint, bool bRotContOnNext, bool b // calcolo il valore degli assi macchina di tutti i movimenti bool bOk = true ; - if ( m_pMchMgr->GetCurrIsMcent()) { + if ( pMch->GetCurrKinematicChainType() == KIN_CHAIN_MCENT) { int nClPathId = m_pGeomDB->GetFirstGroupInGroup( nClId) ; while ( nClPathId != GDB_ID_NULL) { - if ( ! CalculateClPathMcentAxesValues( nClPathId, nLinAxes, nRotAxes, dRot1W, bMaxDeltaR2OnFirst, - bRotContOnNext, dAngDeltaMinForHome, vAxRotHome, vAxRotPrec)) + if ( ! CalculateClPathMcentAxesValues( nClPathId, dAngDeltaMinForHome, vAxRotHome, vAxRotPrec)) bOk = false ; nClPathId = m_pGeomDB->GetNextGroup( nClPathId) ; } } - else if ( m_pMchMgr->GetCurrIsRobot()) { + else if ( pMch->GetCurrKinematicChainType() == KIN_CHAIN_ROBOT) { int nClPathId = m_pGeomDB->GetFirstGroupInGroup( nClId) ; while ( nClPathId != GDB_ID_NULL) { - if ( ! CalculateClPathRobotAxesValues( nClPathId, nLinAxes, nRotAxes, dRot1W, bMaxDeltaR2OnFirst, - bRotContOnNext, dAngDeltaMinForHome, vAxRotHome, vAxRotPrec)) + if ( ! CalculateClPathRobotAxesValues( nClPathId, dAngDeltaMinForHome, vAxRotHome, vAxRotPrec)) bOk = false ; nClPathId = m_pGeomDB->GetNextGroup( nClPathId) ; } } + else + bOk = false ; return bOk ; } //---------------------------------------------------------------------------- bool -Operation::CalculateClPathMcentAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W, - bool bMaxDeltaR2OnFirst, bool bRotContOnNext, double dAngDeltaMinForHome, - const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec) +Operation::CalculateClPathMcentAxesValues( int nClPathId, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, + DBLVECTOR& vAxRotPrec) { DBLVECTOR vAxRotPrecOri = vAxRotPrec ; // cancello eventuali punti aggiunti EraseAddedPoints( nClPathId) ; // calcolo int nOutStrC = 0 ; - if ( ! MyCalculateClPathMcentAxesValues( nClPathId, nLinAxes, nRotAxes, dRot1W, bMaxDeltaR2OnFirst, - bRotContOnNext, dAngDeltaMinForHome, vAxRotHome, vAxRotPrec, nOutStrC)) { + if ( ! MyCalculateClPathMcentAxesValues( nClPathId, dAngDeltaMinForHome, vAxRotHome, vAxRotPrec, nOutStrC)) { // se attivata scelta angolo iniziale vicino ad home ed extra corsa C, provo a rifarlo disattivando if ( dAngDeltaMinForHome < ANG_FULL && nOutStrC != 0) { // cancello eventuali punti aggiunti EraseAddedPoints( nClPathId) ; // ricalcolo m_pMchMgr->GetCurrMachine()->ResetOutstrokeInfo() ; - if ( MyCalculateClPathMcentAxesValues( nClPathId, nLinAxes, nRotAxes, dRot1W, bMaxDeltaR2OnFirst, - bRotContOnNext, INFINITO, vAxRotHome, vAxRotPrec, nOutStrC)) + if ( MyCalculateClPathMcentAxesValues( nClPathId, INFINITO, vAxRotHome, vAxRotPrec, nOutStrC)) return true ; } // se extracorsa dell'asse C, provo a precaricarlo al contrario @@ -1972,8 +1970,7 @@ Operation::CalculateClPathMcentAxesValues( int nClPathId, int nLinAxes, int nRot vAxRotPrec = vAxRotPrecOri ; vAxRotPrec[0] = vAxRotPrecOri[0] + ( nOutStrC > 0 ? - ANG_FULL : ANG_FULL) ; m_pMchMgr->GetCurrMachine()->ResetOutstrokeInfo() ; - if ( ! MyCalculateClPathMcentAxesValues( nClPathId, nLinAxes, nRotAxes, dRot1W, bMaxDeltaR2OnFirst, - bRotContOnNext, INFINITO, vAxRotHome, vAxRotPrec, nOutStrC)) + if ( ! MyCalculateClPathMcentAxesValues( nClPathId, INFINITO, vAxRotHome, vAxRotPrec, nOutStrC)) return false ; } else @@ -2002,9 +1999,8 @@ Operation::EraseAddedPoints( int nClPathId) //---------------------------------------------------------------------------- bool -Operation::MyCalculateClPathMcentAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W, - bool bMaxDeltaR2OnFirst, bool bRotContOnNext, double dAngDeltaMinForHome, - const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec, int& nOutStrC) +Operation::MyCalculateClPathMcentAxesValues( int nClPathId, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, + DBLVECTOR& vAxRotPrec, int& nOutStrC) { if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) return false ; @@ -2042,8 +2038,8 @@ Operation::MyCalculateClPathMcentAxesValues( int nClPathId, int nLinAxes, int nR Vector3d vtAux = pCamData->GetAuxDir() ; Vector3d vtCorr = pCamData->GetCorrDir() ; DBLVECTOR vAxRot ; - if ( ! CalculateMcentRotAxesValues( bFirst, vtDir, vtAux, dRot1W, - bMaxDeltaR2OnFirst, bRotContOnNext, dAngDeltaMinForHome, vAxRotHome, vAxRotPrec, vAxRot)) { + if ( ! CalculateMcentRotAxesValues( bFirst, vtDir, vtAux, + dAngDeltaMinForHome, vAxRotHome, vAxRotPrec, vAxRot)) { pCamData->SetAxes( CamData::AS_DIR_ERR, vAxVal) ; LOG_ERROR( GetEMkLogger(), "Error : tool direction unreachable") return false ; @@ -2117,7 +2113,7 @@ Operation::MyCalculateClPathMcentAxesValues( int nClPathId, int nLinAxes, int nR bool bAxesError ; if ( ! VerifyMcentLineMidPoint( ptPrec, vtDirPrec, vtAuxPrec, vtCorrPrec, vAxPrec, ptP, vtDir, vtAux, vtCorr, vAxVal, - 1, nEntId, dRot1W, nMoveType, bToolShowPrec && pCamData->GetToolShow(), + 1, nEntId, nMoveType, bToolShowPrec && pCamData->GetToolShow(), bMidAdded, bAxesError)) { string sOut = "Error : VerifyLineMidPoint of CalculateClPathAxesValues failed (EntId=" + ToString( nEntId) + ")" ; LOG_ERROR( GetEMkLogger(), sOut.c_str()) @@ -2279,9 +2275,11 @@ Operation::MyCalculateClPathMcentAxesValues( int nClPathId, int nLinAxes, int nR //---------------------------------------------------------------------------- bool Operation::CalculateMcentRotAxesValues( bool bFirst, const Vector3d& vtTool, const Vector3d& vtAux, - double dRot1W, bool bMaxDeltaR2OnFirst, bool bRotContOnNext, double dAngDeltaMinForHome, + double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, const DBLVECTOR& vAxRotPrec, DBLVECTOR& vAxRot) { + // continuità su assi rotanti nei movimenti successivi al primo per tutte le lavorazioni, tranne disposizioni + bool bRotContOnNext = ( GetType() != OPER_DISP) ; // massima variazione secondo asse rotante per continuità const double dMaxDeltaR2 = 30 ; // calcolo degli assi rotanti della macchina @@ -2409,13 +2407,13 @@ Operation::CalculateMcentRotAxesValues( bool bFirst, const Vector3d& vtTool, con continue ; // calcolo i delta asse con eventuale peso bool bFirst = ( i == 0) ; - dDelta1 += abs( vAng1[i] - vAxRotPrec[i]) * ( bFirst ? dRot1W : 1) ; - dDelta2 += abs( vAng2[i] - vAxRotPrec[i]) * ( bFirst ? dRot1W : 1) ; + dDelta1 += abs( vAng1[i] - vAxRotPrec[i]) * ( bFirst ? m_pMchMgr->GetCalcRot1W() : 1) ; + dDelta2 += abs( vAng2[i] - vAxRotPrec[i]) * ( bFirst ? m_pMchMgr->GetCalcRot1W() : 1) ; } if ( bAng2 && ( dDelta2 < dDelta1 - EPS_ANG_SMALL || ! bAng1)) swap( vAng1, vAng2) ; // se imposto limite su variazione di secondo asse rotante - if ( ( bMaxDeltaR2OnFirst || ! bFirst) && dMaxDeltaR2 > EPS_ANG_SMALL && vAng1.size() >= 2) { + if ( ( m_pMchMgr->GetCalcMaxDeltaR2OnFirst() || ! bFirst) && dMaxDeltaR2 > EPS_ANG_SMALL && vAng1.size() >= 2) { double dR2Diff1 = vAng1[1] - vAxRotPrec[1] ; double dR2Diff2 = vAng2[1] - vAxRotPrec[1] ; if ( abs( dR2Diff1) > abs( dR2Diff2) && abs( dR2Diff1) > dMaxDeltaR2) @@ -2430,7 +2428,7 @@ Operation::CalculateMcentRotAxesValues( bool bFirst, const Vector3d& vtTool, con bool Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDirPrec, const Vector3d& vtAuxPrec, const Vector3d& vtCorrPrec, const DBLVECTOR& vAxPrec, const Point3d& ptP, const Vector3d& vtDir, const Vector3d& vtAux, const Vector3d& vtCorr, const DBLVECTOR& vAxVal, - int nCnt, int nEntId, double dRot1W, int nMoveType, bool bToolShow, bool& bAdded, bool& bAxError) + int nCnt, int nEntId, int nMoveType, bool bToolShow, bool& bAdded, bool& bAxError) { // impostazioni bAdded = false ; @@ -2548,7 +2546,7 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir DBLVECTOR vAxRotPrec( int( vAxVal.size() - 3)) ; for ( int i = 3 ; i < int( vAxVal.size()) ; ++ i) vAxRotPrec[i-3] = vAxVal[i] ; - if ( ! CalculateMcentRotAxesValues( false, vtDirMid, vtAuxMid, dRot1W, false, true, INFINITO, vAxRotHome, vAxRotPrec, vAxRotMid)) { + if ( ! CalculateMcentRotAxesValues( false, vtDirMid, vtAuxMid, INFINITO, vAxRotHome, vAxRotPrec, vAxRotMid)) { pMidCamData->SetAxes( CamData::AS_DIR_ERR, vAxVal) ; return false ; } @@ -2585,13 +2583,13 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir bool bAdded1, bAxError1, bAdded2, bAxError2 ; if ( ! VerifyMcentLineMidPoint( ptPrec, vtDirPrec, vtAuxPrec, vtCorrPrec, vAxPrec, ptMid, vtDirMid, vtAuxMid, vtCorrMid, vAxMid, - nCnt, nMidEntId, dRot1W, nMoveType, bToolShow, bAdded1, bAxError1)) + nCnt, nMidEntId, nMoveType, bToolShow, bAdded1, bAxError1)) return false ; if ( bAxError1) bAxError = true ; if ( ! VerifyMcentLineMidPoint( ptMid, vtDirMid, vtAuxMid, vtCorrMid, vAxMid, ptP, vtDir, vtAux, vtCorr, vAxVal, - nCnt, nEntId, dRot1W, nMoveType, bToolShow, bAdded2, bAxError2)) + nCnt, nEntId, nMoveType, bToolShow, bAdded2, bAxError2)) return false ; if ( bAxError2) bAxError = true ; @@ -2601,9 +2599,8 @@ Operation::VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir //---------------------------------------------------------------------------- bool -Operation::CalculateClPathRobotAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W, - bool bMaxDeltaR2OnFirst, bool bRotContOnNext, double dAngDeltaMinForHome, - const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec) +Operation::CalculateClPathRobotAxesValues( int nClPathId, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, + DBLVECTOR& vAxRotPrec) { if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) return false ; @@ -2674,7 +2671,7 @@ Operation::CalculateClPathRobotAxesValues( int nClPathId, int nLinAxes, int nRot Vector3d vtCorr = pCamData->GetCorrDir() ; // calcolo gli assi del robot if ( ! CalculateRobotAxesValues( bFirst, ptP, vtDir, vtAux, - bRotContOnNext, dAngDeltaMinForHome, vAxRotHome, vAxRotPrec, vAxVal)) { + dAngDeltaMinForHome, vAxRotHome, vAxRotPrec, vAxVal)) { pCamData->SetAxes( CamData::AS_ERR, vAxVal) ; return false ; } @@ -2726,9 +2723,11 @@ Operation::CalculateClPathRobotAxesValues( int nClPathId, int nLinAxes, int nRot //---------------------------------------------------------------------------- bool Operation::CalculateRobotAxesValues( bool bFirst, const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtAux, - bool bRotContOnNext, double dAngDeltaMinForHome, + double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, const DBLVECTOR& vAxRotPrec, DBLVECTOR& vAxVal) { + // continuità su assi rotanti nei movimenti successivi al primo per tutte le lavorazioni, tranne disposizioni + bool bRotContOnNext = ( GetType() != OPER_DISP) ; // calcolo angoli dei giunti DBLVECTOR vAng1, vAng2 ; bool bRaOk = m_pMchMgr->GetCurrMachine()->GetRobotAngles( ptP, vtTool, vtAux, vAng1, vAng2) ; @@ -2904,7 +2903,7 @@ Operation::VerifyRobotLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDir DBLVECTOR vAxRotHome( vAxMid.size()) ; DBLVECTOR vAxRotPrec( vAxMid) ; if ( ! CalculateRobotAxesValues( false, ptMid, vtDirMid, vtAuxMid, - true, INFINITO, vAxRotHome, vAxRotPrec, vAxMid)) { + INFINITO, vAxRotHome, vAxRotPrec, vAxMid)) { pMidCamData->SetAxes( CamData::AS_ERR, vAxMid) ; return false ; } diff --git a/Operation.h b/Operation.h index e40d931..d3193a3 100644 --- a/Operation.h +++ b/Operation.h @@ -178,7 +178,7 @@ class Operation : public IUserObj std::string ExtractInfo( const std::string& sNotes, const std::string& sKey) const ; std::string ExtractHint( const std::string& sNotes) const ; bool SetBlockedRotAxis( const std::string& sBlockedAxis) const ; - bool CalculateAxesValues( const std::string& sHint, bool bRotContOnNext = true, bool bSolChExact = false) ; + bool CalculateAxesValues( const std::string& sHint, bool bSolChExact = false, double dSingConeAng = 0) ; bool AdjustStartEndMovements( bool bVerifyPreviousLink = true) ; bool RemoveClimbRiseHome( void) ; double GetDeltaSafeZ( const Vector3d& vtTool) const ; @@ -211,25 +211,22 @@ class Operation : public IUserObj const CamData* GetClPathInitialCamData( int nClPathId, bool bSkipClimb) const ; const CamData* GetFinalCamData( bool bSkipRise) const ; const CamData* GetClPathFinalCamData( int nClPathId, bool bSkipRise) const ; - bool CalculateClPathMcentAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W, - bool bMaxDeltaR2OnFirst, bool bRotContOnNext, double dAngDeltaMinForHome, - const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec) ; + bool CalculateClPathMcentAxesValues( int nClPathId, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, + DBLVECTOR& vAxRotPrec) ; bool EraseAddedPoints( int nClPathId) ; - bool MyCalculateClPathMcentAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W, - bool bMaxDeltaR2OnFirst, bool bRotContOnNext, double dAngDeltaMinForHome, - const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec, int& nOutStrC) ; + bool MyCalculateClPathMcentAxesValues( int nClPathId, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, + DBLVECTOR& vAxRotPrec, int& nOutStrC) ; bool CalculateMcentRotAxesValues( bool bFirst, const Vector3d& vtTool, const Vector3d& vtAux, - double dRot1W, bool bMaxDeltaR2OnFirst, bool bRotContOnNext, double dAngDeltaMinForHome, - const DBLVECTOR& vAxRotHome, const DBLVECTOR& vAxRotPrec, DBLVECTOR& vAxRot) ; + double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, const DBLVECTOR& vAxRotPrec, + DBLVECTOR& vAxRot) ; bool VerifyMcentLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDirPrec, const Vector3d& vtAuxPrec, const Vector3d& vtCorrPrec, const DBLVECTOR& vAxPrec, const Point3d& ptP, const Vector3d& vtDir, const Vector3d& vtAux, const Vector3d& vtCorr, const DBLVECTOR& vAxVal, - int nCnt, int nEntId, double dRot1W, int nMoveType, bool bToolShow, bool& bAdded, bool& bAxError) ; - bool CalculateClPathRobotAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W, - bool bMaxDeltaR2OnFirst, bool bRotContOnNext, double dAngDeltaMinForHome, - const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec) ; + int nCnt, int nEntId, int nMoveType, bool bToolShow, bool& bAdded, bool& bAxError) ; + bool CalculateClPathRobotAxesValues( int nClPathId, double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, + DBLVECTOR& vAxRotPrec) ; bool CalculateRobotAxesValues( bool bFirst, const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtAux, - bool bRotContOnNext, double dAngDeltaMinForHome, - const DBLVECTOR& vAxRotHome, const DBLVECTOR& vAxRotPrec, DBLVECTOR& vAxRot) ; + double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, const DBLVECTOR& vAxRotPrec, + DBLVECTOR& vAxRot) ; bool VerifyRobotLineMidPoint( const Point3d& ptPrec, const Vector3d& vtDirPrec, const Vector3d& vtAuxPrec, const Vector3d& vtCorrPrec, const DBLVECTOR& vAxPrec, const Point3d& ptP, const Vector3d& vtDir, const Vector3d& vtAux, const Vector3d& vtCorr, const DBLVECTOR& vAxVal, int nCnt, int nEntId, int nMoveType, bool bToolShow, bool& bAdded, bool& bAxError) ;