EgtMachKernel 2.1d2 :
- aggiunta gestione direzione movimento nella parte mobile delle attrezzature (morse, ventose...) tramite info MDIR.
This commit is contained in:
+9
-3
@@ -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) ;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user