EgtMachKernel (MillingToolComp) :
- aggiunta gestione per OneWay a più step e semplificazione del codice.
This commit is contained in:
@@ -348,6 +348,25 @@ Operation::AddLinearMove( const Point3d& ptP, bool bSplit, const string& sName)
|
||||
return nFirstId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Operation::AddLinearMove( const Point3d& ptP, bool bSplit, int nCorrType, const string* psName, const Color* pColor)
|
||||
{
|
||||
int nFirstId = AddLinearMove( ptP, bSplit) ;
|
||||
int nId = nFirstId ;
|
||||
while ( nId != GDB_ID_NULL) {
|
||||
if ( psName != nullptr)
|
||||
m_pGeomDB->SetName( nId, *psName) ;
|
||||
CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( nId)) ;
|
||||
if ( pCamData == nullptr || ! pCamData->SetCorrType( nCorrType))
|
||||
return GDB_ID_NULL ;
|
||||
if ( pColor != nullptr)
|
||||
m_pGeomDB->SetMaterial( nId, *pColor) ;
|
||||
nId = m_pGeomDB->GetNext( nId) ;
|
||||
}
|
||||
return nFirstId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Operation::AddArcMove( const Point3d& ptP, const Point3d& ptCen, double dAngCen, const Vector3d& vtN)
|
||||
@@ -422,6 +441,24 @@ Operation::AddArcMove( const Point3d& ptP, const Point3d& ptCen, double dAngCen,
|
||||
return nId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Operation::AddArcMove( const Point3d& ptP, const Point3d& ptCen, double dAngCen, const Vector3d& vtN, int nCorrType,
|
||||
const string* psName, const Color* pColor)
|
||||
{
|
||||
int nId = AddArcMove( ptP, ptCen, dAngCen, vtN) ;
|
||||
if ( nId != GDB_ID_NULL) {
|
||||
if ( psName != nullptr)
|
||||
m_pGeomDB->SetName( nId, *psName) ;
|
||||
CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( nId)) ;
|
||||
if ( pCamData == nullptr || ! pCamData->SetCorrType( nCorrType))
|
||||
return GDB_ID_NULL ;
|
||||
if ( pColor != nullptr)
|
||||
m_pGeomDB->SetMaterial( nId, *pColor) ;
|
||||
}
|
||||
return nId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Operation::AddCurveMove( const ICurve* pCrv)
|
||||
@@ -530,6 +567,25 @@ Operation::AddCurveMove( const ICurve* pCrv, bool bSplit, const string& sName)
|
||||
return nFirstId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Operation::AddCurveMove( const ICurve* pCrv, bool bSplit, int nCorrType, const string* psName, const Color* pColor)
|
||||
{
|
||||
int nFirstId = AddCurveMove( pCrv, bSplit) ;
|
||||
int nId = nFirstId ;
|
||||
while ( nId != GDB_ID_NULL) {
|
||||
if ( psName != nullptr)
|
||||
m_pGeomDB->SetName( nId, *psName) ;
|
||||
CamData* pCamData = GetCamData( m_pGeomDB->GetUserObj( nId)) ;
|
||||
if ( pCamData == nullptr || ! pCamData->SetCorrType( nCorrType))
|
||||
return GDB_ID_NULL ;
|
||||
if ( pColor != nullptr)
|
||||
m_pGeomDB->SetMaterial( nId, *pColor) ;
|
||||
nId = m_pGeomDB->GetNext( nId) ;
|
||||
}
|
||||
return nFirstId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Operation::ResetMoveData( void)
|
||||
|
||||
Reference in New Issue
Block a user