EgtMachKernel 2.5b2 :
- nel calcolo spostamenti in disposizioni (movimenti di pezzi con ventose) è ora possibile fare rotazioni non minime pur di stare nelle corse.
This commit is contained in:
+1
-1
@@ -1398,7 +1398,7 @@ Disposition::SpecialUpdate( void)
|
||||
return true ;
|
||||
}
|
||||
// calcolo assi macchina
|
||||
if ( ! CalculateAxesValues( "")) {
|
||||
if ( ! CalculateAxesValues( "", false)) {
|
||||
string sInfo = m_pMchMgr->GetOutstrokeInfo() ;
|
||||
if ( sInfo.empty())
|
||||
m_pMchMgr->SetLastError( 2007, "Error in Disposition : axes values not calculable") ;
|
||||
|
||||
Binary file not shown.
+1
-1
@@ -641,7 +641,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)) {
|
||||
if ( ! CalculateAxesValues( sHint, true, true)) {
|
||||
string sInfo = m_pMchMgr->GetOutstrokeInfo() ;
|
||||
if ( sInfo.empty())
|
||||
m_pMchMgr->SetLastError( 2507, "Error in Mortising : axes values not calculable") ;
|
||||
|
||||
+22
-12
@@ -1434,7 +1434,7 @@ Operation::SetBlockedRotAxis( const string& sBlockedAxis) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Operation::CalculateAxesValues( const string& sHint, bool bSolChExact)
|
||||
Operation::CalculateAxesValues( const string& sHint, bool bRotContOnNext, bool bSolChExact)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
@@ -1534,12 +1534,12 @@ Operation::CalculateAxesValues( const string& sHint, bool bSolChExact)
|
||||
DBLVECTOR vAxRotPrecOri = vAxRotPrec ;
|
||||
int nOutStrC = 0 ;
|
||||
if ( ! CalculateClPathAxesValues( nClPathId, nLinAxes, nRotAxes, dRot1W, bMaxDeltaR2OnFirst,
|
||||
dAngDeltaMinForHome, vAxRotHome, vAxRotPrec, nOutStrC)) {
|
||||
bRotContOnNext, 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) {
|
||||
m_pMchMgr->GetCurrMachine()->ResetOutstrokeInfo() ;
|
||||
CalculateClPathAxesValues( nClPathId, nLinAxes, nRotAxes, dRot1W, bMaxDeltaR2OnFirst,
|
||||
INFINITO, vAxRotHome, vAxRotPrec, nOutStrC) ;
|
||||
bRotContOnNext, INFINITO, vAxRotHome, vAxRotPrec, nOutStrC) ;
|
||||
}
|
||||
// se extracorsa dell'asse C, provo a precaricarlo al contrario
|
||||
if ( nOutStrC != 0) {
|
||||
@@ -1547,7 +1547,7 @@ Operation::CalculateAxesValues( const string& sHint, bool bSolChExact)
|
||||
vAxRotPrec[0] = vAxRotPrecOri[0] + ( nOutStrC > 0 ? - ANG_FULL : ANG_FULL) ;
|
||||
m_pMchMgr->GetCurrMachine()->ResetOutstrokeInfo() ;
|
||||
if ( ! CalculateClPathAxesValues( nClPathId, nLinAxes, nRotAxes, dRot1W, bMaxDeltaR2OnFirst,
|
||||
INFINITO, vAxRotHome, vAxRotPrec, nOutStrC))
|
||||
bRotContOnNext, INFINITO, vAxRotHome, vAxRotPrec, nOutStrC))
|
||||
bOk = false ;
|
||||
}
|
||||
else
|
||||
@@ -1561,8 +1561,9 @@ Operation::CalculateAxesValues( const string& sHint, bool bSolChExact)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Operation::CalculateClPathAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W, bool bMaxDeltaR2OnFirst,
|
||||
double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec, int& nOutStrC)
|
||||
Operation::CalculateClPathAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W,
|
||||
bool bMaxDeltaR2OnFirst, bool bRotContOnNext, double dAngDeltaMinForHome,
|
||||
const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec, int& nOutStrC)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
@@ -1625,9 +1626,12 @@ Operation::CalculateClPathAxesValues( int nClPathId, int nLinAxes, int nRotAxes,
|
||||
else {
|
||||
// scelgo gli angoli più vicini, per continuità non applico offset per stare nelle corse
|
||||
for ( int i = 0 ; i < int( vAng1.size()) ; ++ i) {
|
||||
vAng1[i] = AngleNearAngle( vAng1[i], vAxRotPrec[i]) ;
|
||||
if ( bRotContOnNext)
|
||||
vAng1[i] = AngleNearAngle( vAng1[i], vAxRotPrec[i]) ;
|
||||
else
|
||||
m_pMchMgr->GetNearestAngleInStroke( i, vAxRotPrec[i], vAng1[i]) ;
|
||||
if ( abs( vAng1[i] - vAxRotPrec[i]) > dAngDeltaMinForHome)
|
||||
vAng1[i] = AngleNearAngle( vAng1[i], vAxRotHome[i]) ;
|
||||
vAng1[i] = m_pMchMgr->GetNearestAngleInStroke( i, vAxRotHome[i], vAng1[i]) ;
|
||||
}
|
||||
// se sol.ne indeterminata (sempre il primo asse libero), assegno il precedente
|
||||
if ( nRStat < 0 && vAng1.size() >= 1) {
|
||||
@@ -1673,12 +1677,18 @@ Operation::CalculateClPathAxesValues( int nClPathId, int nLinAxes, int nRotAxes,
|
||||
else {
|
||||
// scelgo gli angoli più vicini, per continuità non applico offset per stare nelle corse
|
||||
for ( int i = 0 ; i < int( vAng1.size()) ; ++ i) {
|
||||
vAng1[i] = AngleNearAngle( vAng1[i], vAxRotPrec[i]) ;
|
||||
if ( bRotContOnNext)
|
||||
vAng1[i] = AngleNearAngle( vAng1[i], vAxRotPrec[i]) ;
|
||||
else
|
||||
m_pMchMgr->GetNearestAngleInStroke( i, vAxRotPrec[i], vAng1[i]) ;
|
||||
if ( abs( vAng1[i] - vAxRotPrec[i]) > dAngDeltaMinForHome)
|
||||
vAng1[i] = AngleNearAngle( vAng1[i], vAxRotHome[i]) ;
|
||||
vAng2[i] = AngleNearAngle( vAng2[i], vAxRotPrec[i]) ;
|
||||
vAng1[i] = m_pMchMgr->GetNearestAngleInStroke( i, vAxRotHome[i], vAng1[i]) ;
|
||||
if ( bRotContOnNext)
|
||||
vAng2[i] = AngleNearAngle( vAng2[i], vAxRotPrec[i]) ;
|
||||
else
|
||||
m_pMchMgr->GetNearestAngleInStroke( i, vAxRotPrec[i], vAng2[i]) ;
|
||||
if ( abs( vAng2[i] - vAxRotPrec[i]) > dAngDeltaMinForHome)
|
||||
vAng2[i] = AngleNearAngle( vAng2[i], vAxRotHome[i]) ;
|
||||
vAng2[i] = m_pMchMgr->GetNearestAngleInStroke( i, vAxRotHome[i], vAng2[i]) ;
|
||||
}
|
||||
// se sol.ne indeterminata (sempre il primo asse libero), assegno il precedente
|
||||
if ( nRStat < 0 && vAng1.size() >= 1) {
|
||||
|
||||
+4
-3
@@ -115,9 +115,10 @@ 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 bSolChExact = false) ;
|
||||
bool CalculateClPathAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W, bool bMaxDeltaR2OnFirst,
|
||||
double dAngDeltaMinForHome, const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec, int& nOutStrC) ;
|
||||
bool CalculateAxesValues( const std::string& sHint, bool bRotContOnNext = true, bool bSolChExact = false) ;
|
||||
bool CalculateClPathAxesValues( int nClPathId, int nLinAxes, int nRotAxes, double dRot1W,
|
||||
bool bMaxDeltaR2OnFirst, bool bRotContOnNext, double dAngDeltaMinForHome,
|
||||
const DBLVECTOR& vAxRotHome, DBLVECTOR& vAxRotPrec, int& nOutStrC) ;
|
||||
bool AdjustStartEndMovements( bool bVerifyPreviousLink = true) ;
|
||||
bool AdjustOneStartMovement( int nClPathId, int nPrevClPathId, Operation* pPrevOp, const DBLVECTOR& vAxPrev, bool bMaxZ) ;
|
||||
bool ToolChangeNeeded( const Operation& Op1, const Operation& Op2) const ;
|
||||
|
||||
Reference in New Issue
Block a user