EgtMachKernel 2.5j3 :
- migliorata simulazione con assi principali che non fanno movimento mentre lo fanno gli ausiliari (per controllo collisioni) - la funzione EmtMoveAxes base per SimulMoveAxes ora gestisce fino a 10 assi in contemporanea.
This commit is contained in:
Binary file not shown.
+2
-2
@@ -1395,7 +1395,7 @@ Machine::LuaEmtAddToolForVmill( lua_State* L)
|
||||
int
|
||||
Machine::LuaEmtMoveAxes( lua_State* L)
|
||||
{
|
||||
// 4, ..., 16 parametri : nMoveType, sAx1, dPos1, dStep1 [, sAx2, dPos2, dStep2] [, sAx3, dPos3, dStep3] [, sAx4, dPos4, dStep4] [, sAx5, dPos5, dStep5]
|
||||
// 4, ..., 31 parametri : nMoveType, sAx1, dPos1, dStep1 [, sAx2, dPos2, dStep2] ... [, sAx10, dPos10, dStep10]
|
||||
int nMoveType ;
|
||||
LuaCheckParam( L, 1, nMoveType)
|
||||
string sAx1 ;
|
||||
@@ -1406,7 +1406,7 @@ Machine::LuaEmtMoveAxes( lua_State* L)
|
||||
LuaCheckParam( L, 4, dStep1) ;
|
||||
SAMVECTOR vAxNaEpSt ;
|
||||
vAxNaEpSt.emplace_back( sAx1, dEnd1, dStep1) ;
|
||||
for ( int i = 0 ; i < 4 ; ++ i) {
|
||||
for ( int i = 0 ; i < 9 ; ++ i) {
|
||||
int nInd = 5 + 3 * i ;
|
||||
string sAxN ;
|
||||
double dEndN ;
|
||||
|
||||
+11
-1
@@ -1000,8 +1000,18 @@ Simulator::ManageSingleMove( int& nStatus, double& dMove)
|
||||
double dSqCoeff = (( i < 3) ? 1 : 100) ;
|
||||
dSqDist += dSqCoeff * ( AxesEnd[i] - m_AxesVal[i]) * ( AxesEnd[i] - m_AxesVal[i]) ;
|
||||
}
|
||||
// Calcolo distanza di movimento eventuali assi ausiliari
|
||||
double dSqDistAux = 0 ;
|
||||
for ( int i = 0 ; i < int( m_AuxAxesName.size()) ; ++ i) {
|
||||
if ( m_AuxAxesLink[i] != 0)
|
||||
continue ;
|
||||
// coefficiente moltiplicativo per differenziare assi lineari e rotanti
|
||||
double dSqCoeff = ( m_AuxAxesLinear[i] ? 1 : 100) ;
|
||||
dSqDistAux += dSqCoeff * ( m_AuxAxesEnd[i] - m_AuxAxesVal[i]) * ( m_AuxAxesEnd[i] - m_AuxAxesVal[i]) ;
|
||||
}
|
||||
// Considero il massimo delle due distanze
|
||||
double dPrevCoeff = m_dCoeff ;
|
||||
double dDist = sqrt( dSqDist) ;
|
||||
double dDist = sqrt( max( dSqDist, dSqDistAux)) ;
|
||||
if ( dDist > EPS_SMALL) {
|
||||
double dStep = min( ( nMoveType == 0 ? 2 : 1) * m_dStep, MAX_STEP) ;
|
||||
int nStep = max( int( dDist / dStep), 1) ;
|
||||
|
||||
Reference in New Issue
Block a user