EgtMachKernel 2.1d2 :

- aggiunta gestione direzione movimento nella parte mobile delle attrezzature (morse, ventose...) tramite info MDIR.
This commit is contained in:
Dario Sassi
2019-04-11 11:12:38 +00:00
parent e21347d407
commit f51096ea8f
2 changed files with 9 additions and 3 deletions
+9 -3
View File
@@ -597,7 +597,9 @@ Disposition::AddFixture( const string& sName, const Point3d& ptPos, double dAngD
double dCurrVal = 0 ;
m_pGeomDB->GetInfo( nMobId, FXT_MOB_CPOS, dCurrVal) ;
if ( abs( dMov - dCurrVal) > EPS_SMALL) {
m_pGeomDB->TranslateGroup( nMobId, Vector3d( 0, 0, dMov - dCurrVal)) ;
Vector3d vtDir = Z_AX ;
m_pGeomDB->GetInfo( nMobId, FXT_MOB_MOVEDIR, vtDir) ;
m_pGeomDB->TranslateGroup( nMobId, (dMov - dCurrVal) * vtDir) ;
m_pGeomDB->SetInfo( nMobId, FXT_MOB_CPOS, dMov) ;
}
}
@@ -723,7 +725,9 @@ Disposition::MoveFixtureMobile( int nId, double dDeltaMov)
double dCurrVal = 0 ;
m_pGeomDB->GetInfo( nMobId, FXT_MOB_CPOS, dCurrVal) ;
if ( abs( dDeltaMov) > EPS_SMALL) {
m_pGeomDB->TranslateGroup( nMobId, Vector3d( 0, 0, dDeltaMov)) ;
Vector3d vtDir = Z_AX ;
m_pGeomDB->GetInfo( nMobId, FXT_MOB_MOVEDIR, vtDir) ;
m_pGeomDB->TranslateGroup( nMobId, dDeltaMov * vtDir) ;
m_pGeomDB->SetInfo( nMobId, FXT_MOB_CPOS, ( dCurrVal + dDeltaMov)) ;
}
}
@@ -783,7 +787,9 @@ Disposition::PlaceFixture( int nId, const Point3d& ptPos, double dAngDeg, double
double dCurrVal = 0 ;
m_pGeomDB->GetInfo( nMobId, FXT_MOB_CPOS, dCurrVal) ;
if ( abs( dMov - dCurrVal) > EPS_SMALL) {
m_pGeomDB->TranslateGroup( nMobId, Vector3d( 0, 0, dMov - dCurrVal)) ;
Vector3d vtDir = Z_AX ;
m_pGeomDB->GetInfo( nMobId, FXT_MOB_MOVEDIR, vtDir) ;
m_pGeomDB->TranslateGroup( nMobId, ( dMov - dCurrVal) * vtDir) ;
m_pGeomDB->SetInfo( nMobId, FXT_MOB_CPOS, dMov) ;
}
}