EgtMachKernel :

- modifiche per visualizzazione utensili con lavorazioni.
This commit is contained in:
Dario Sassi
2017-07-01 19:21:38 +00:00
parent 0be287551f
commit d598c1a66b
14 changed files with 177 additions and 38 deletions
+23 -1
View File
@@ -45,7 +45,9 @@ static std::string CAM_NDIR = "NDir" ;
static std::string CAM_AXND = "AxND" ;
static int CAM_PARAM_V4 = 19 ;
static std::string CAM_NDLT = "NDlt" ;
static int CAM_TOTPARAM =CAM_PARAM_V4 ;
static int CAM_PARAM_V5 = 20 ;
static std::string CAM_BDIR = "BDir" ;
static int CAM_TOTPARAM =CAM_PARAM_V5 ;
//----------------------------------------------------------------------------
USEROBJ_REGISTER( "EMkCamData", CamData) ;
@@ -87,6 +89,7 @@ CamData::Clone( void) const
pCam->m_dMachRad = m_dMachRad ;
pCam->m_dMachAngCen = m_dMachAngCen ;
pCam->m_vtMachN = m_vtMachN ;
pCam->m_vtBackAux = m_vtBackAux ;
}
catch( ...) {
delete pCam ;
@@ -121,6 +124,7 @@ CamData::Dump( string& sOut, bool bMM, const char* szNewLine) const
sOut += CAM_AXAC + "=" + ToString( m_dMachAngCen) + szNewLine ;
sOut += CAM_AXND + "=" + ToString( m_vtMachN) + szNewLine ;
sOut += CAM_NDLT + "=" + ToString( m_dDeltaN) + szNewLine ;
sOut += CAM_BDIR + "=" + ToString( m_vtBackAux) + szNewLine ;
return true ;
}
@@ -177,6 +181,8 @@ CamData::Save( STRVECTOR& vString) const
vString[++k] = CAM_AXND + "=" + ToString( m_vtMachN) ;
// parametri aggiunti V4
vString[++k] = CAM_NDLT + "=" + ToString( m_dDeltaN) ;
// parametri aggiunti V5
vString[++k] = CAM_BDIR + "=" + ToString( m_vtBackAux) ;
}
catch( ...) {
return false ;
@@ -237,6 +243,14 @@ CamData::Load( const STRVECTOR& vString, int nBaseGdbId)
else {
m_dDeltaN = 0 ;
}
// parametri aggiunti V5
if ( int( vString.size()) >= CAM_PARAM_V5) {
if ( ! GetVal( vString[++k], CAM_BDIR, m_vtBackAux))
return false ;
}
else {
m_vtBackAux = V_NULL ;
}
return true ;
}
@@ -656,6 +670,14 @@ CamData::SetAxesNormDir( const Vector3d& vtDir)
return true ;
}
//----------------------------------------------------------------------------
bool
CamData::SetBackAuxDir( const Vector3d& vtDir)
{
m_vtBackAux = vtDir ;
return true ;
}
//----------------------------------------------------------------------------
void
CamData::ResetObjGraphics( void)