Merge commit '662241c8e1560612c1a74185bbf415707a9bdb71' into feature/Svuotature
This commit is contained in:
+8
-2
@@ -37,8 +37,14 @@ class Chiseling : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_CHISELING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nChisels == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nChisels == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
+1
-1
@@ -73,7 +73,7 @@ class Disposition : public Operation
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_DISP ; }
|
||||
bool IsEmpty( void) const override
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ return ( m_nShifts == 0) ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
+8
-2
@@ -51,8 +51,14 @@ class Drilling : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_DRILLING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nDrillings == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nDrillings == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
Binary file not shown.
+8
-2
@@ -35,8 +35,14 @@ class FiveAxisMilling : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_FIVEAXISMILLING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nMills == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nMills == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
+8
-2
@@ -35,8 +35,14 @@ class GenMachining : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_GENMACHINING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nMills == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nMills == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
@@ -258,16 +258,16 @@ class MachMgr : public IMachMgr
|
||||
int GetNextOperation( int nId) const override ;
|
||||
int GetLastOperation( void) const override ;
|
||||
int GetPrevOperation( int nId) const override ;
|
||||
int GetFirstActiveOperation( void) const override ;
|
||||
int GetNextActiveOperation( int nId) const override ;
|
||||
int GetLastActiveOperation( void) const override ;
|
||||
int GetPrevActiveOperation( int nId) const override ;
|
||||
int GetFirstActiveOperation( bool bNeedMachNotEmpty = false) const override ;
|
||||
int GetNextActiveOperation( int nId, bool bNeedMachNotEmpty = false) const override ;
|
||||
int GetLastActiveOperation( bool bNeedMachNotEmpty = false) const override ;
|
||||
int GetPrevActiveOperation( int nId, bool bNeedMachNotEmpty = false) const override ;
|
||||
int GetOperationType( int nId) const override ;
|
||||
int GetOperationPhase( int nId) const override ;
|
||||
bool SetOperationName( int nId, const std::string& sName) override ;
|
||||
std::string GetOperationName( int nId) const override ;
|
||||
int GetOperationId( const std::string& sName) const override ;
|
||||
bool IsOperationEmpty( int nId) const override ;
|
||||
bool IsOperationEmpty( int nId, int nEmptyType = 0) const override ;
|
||||
bool RemoveOperation( int nId) override ;
|
||||
bool RemoveAllPhaseOperations( int nPhase) override ;
|
||||
bool RemoveAllOperations( void) override ;
|
||||
@@ -313,7 +313,7 @@ class MachMgr : public IMachMgr
|
||||
bool GetMachiningParam( int nType, std::string& sVal) const override ;
|
||||
bool GetMachiningGeometry( SELVECTOR& vIds) const override ;
|
||||
bool GetMachiningSkippedGeometry( SELVECTOR& vIds) const override ;
|
||||
bool IsMachiningEmpty( void) const override ;
|
||||
bool IsMachiningEmpty( int nEmptyType = 0) const override ;
|
||||
bool GetMachiningStartPoint( Point3d& ptStart) const override ;
|
||||
bool GetMachiningEndPoint( Point3d& ptEnd) const override ;
|
||||
// CL Entities Interrogations
|
||||
|
||||
+16
-12
@@ -100,48 +100,52 @@ MachMgr::GetPrevOperation( int nId) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
MachMgr::GetFirstActiveOperation( void) const
|
||||
MachMgr::GetFirstActiveOperation( bool bNeedMachNotEmpty) const
|
||||
{
|
||||
int nId = GetFirstOperation() ;
|
||||
int nMode ;
|
||||
while ( nId != GDB_ID_NULL &&
|
||||
m_pGeomDB->GetCalcMode( nId, nMode) && nMode == GDB_MD_HIDDEN)
|
||||
(( m_pGeomDB->GetCalcMode( nId, nMode) && nMode == GDB_MD_HIDDEN) ||
|
||||
( bNeedMachNotEmpty && IsValidMachiningType( GetOperationType( nId)) && IsOperationEmpty( nId, NEED_ONE_TP_OK))))
|
||||
nId = GetNextOperation( nId) ;
|
||||
return nId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
MachMgr::GetNextActiveOperation( int nId) const
|
||||
MachMgr::GetNextActiveOperation( int nId, bool bNeedMachNotEmpty) const
|
||||
{
|
||||
int nNextId = GetNextOperation( nId) ;
|
||||
int nMode ;
|
||||
while ( nNextId != GDB_ID_NULL &&
|
||||
m_pGeomDB->GetCalcMode( nNextId, nMode) && nMode == GDB_MD_HIDDEN)
|
||||
(( m_pGeomDB->GetCalcMode( nNextId, nMode) && nMode == GDB_MD_HIDDEN) ||
|
||||
( bNeedMachNotEmpty && IsValidMachiningType( GetOperationType( nNextId)) && IsOperationEmpty( nNextId, NEED_ONE_TP_OK))))
|
||||
nNextId = GetNextOperation( nNextId) ;
|
||||
return nNextId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
MachMgr::GetLastActiveOperation( void) const
|
||||
MachMgr::GetLastActiveOperation( bool bNeedMachNotEmpty) const
|
||||
{
|
||||
int nId = GetLastOperation() ;
|
||||
int nMode ;
|
||||
while ( nId != GDB_ID_NULL &&
|
||||
m_pGeomDB->GetCalcMode( nId, nMode) && nMode == GDB_MD_HIDDEN)
|
||||
(( m_pGeomDB->GetCalcMode( nId, nMode) && nMode == GDB_MD_HIDDEN) ||
|
||||
( bNeedMachNotEmpty && IsValidMachiningType( GetOperationType( nId)) && IsOperationEmpty( nId, NEED_ONE_TP_OK))))
|
||||
nId = GetPrevOperation( nId) ;
|
||||
return nId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
MachMgr::GetPrevActiveOperation( int nId) const
|
||||
MachMgr::GetPrevActiveOperation( int nId, bool bNeedMachNotEmpty) const
|
||||
{
|
||||
int nPrevId = GetPrevOperation( nId) ;
|
||||
int nMode ;
|
||||
while ( nPrevId != GDB_ID_NULL &&
|
||||
m_pGeomDB->GetCalcMode( nPrevId, nMode) && nMode == GDB_MD_HIDDEN)
|
||||
(( m_pGeomDB->GetCalcMode( nPrevId, nMode) && nMode == GDB_MD_HIDDEN) ||
|
||||
( bNeedMachNotEmpty && IsValidMachiningType( GetOperationType( nPrevId)) && IsOperationEmpty( nPrevId, NEED_ONE_TP_OK))))
|
||||
nPrevId = GetPrevOperation( nPrevId) ;
|
||||
return nPrevId ;
|
||||
}
|
||||
@@ -263,7 +267,7 @@ MachMgr::GetOperationId( const string& sName) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::IsOperationEmpty( int nId) const
|
||||
MachMgr::IsOperationEmpty( int nId, int nEmptyType) const
|
||||
{
|
||||
// verifiche
|
||||
if ( m_pGeomDB == nullptr || m_pGeomDB->GetParentId( nId) != GetCurrOperId())
|
||||
@@ -273,7 +277,7 @@ MachMgr::IsOperationEmpty( int nId) const
|
||||
if ( pOpe == nullptr)
|
||||
return true ;
|
||||
// restituisco se vuota
|
||||
return pOpe->IsEmpty() ;
|
||||
return pOpe->IsEmpty( nEmptyType) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -1279,7 +1283,7 @@ MachMgr::GetMachiningSkippedGeometry( SELVECTOR& vIds) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
MachMgr::IsMachiningEmpty( void) const
|
||||
MachMgr::IsMachiningEmpty( int nEmptyType) const
|
||||
{
|
||||
// recupero la lavorazione corrente
|
||||
int nCurrMchId = GetCurrMachining() ;
|
||||
@@ -1290,7 +1294,7 @@ MachMgr::IsMachiningEmpty( void) const
|
||||
if ( pMch == nullptr)
|
||||
return true ;
|
||||
// restituisco lo stato
|
||||
return pMch->IsEmpty() ;
|
||||
return pMch->IsEmpty( nEmptyType) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -37,8 +37,14 @@ class Milling : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_MILLING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nMills == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nMills == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
+8
-2
@@ -36,8 +36,14 @@ class Mortising : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_MORTISING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nMortises == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nMortises == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
+127
-73
@@ -140,6 +140,87 @@ Operation::Operation( void)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Operation::IsAtLeastOnePathOk( void) const
|
||||
{
|
||||
int nCnt ; int nEmpty ;
|
||||
if ( ! GetToolpathsStatus( nCnt, nEmpty))
|
||||
return false ;
|
||||
return ( nCnt > 0 && nEmpty < nCnt) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Operation::AreAllPathsOk( void) const
|
||||
{
|
||||
int nCnt ; int nEmpty ;
|
||||
if ( ! GetToolpathsStatus( nCnt, nEmpty))
|
||||
return false ;
|
||||
return ( nCnt > 0 && nEmpty == 0) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Operation::GetToolpathsStatus( int& nCnt, int& nEmpty) const
|
||||
{
|
||||
nCnt = 0 ;
|
||||
nEmpty = 0 ;
|
||||
if ( m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
int nClPath = m_pGeomDB->GetFirstGroupInGroup( m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_CL)) ;
|
||||
while ( nClPath != GDB_ID_NULL) {
|
||||
++ nCnt ;
|
||||
if ( m_pGeomDB->GetFirstInGroup( nClPath) == GDB_ID_NULL)
|
||||
++ nEmpty ;
|
||||
nClPath = m_pGeomDB->GetNextGroup( nClPath) ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Operation::GetFirstFullToolpath( void) const
|
||||
{
|
||||
if ( m_pGeomDB == nullptr)
|
||||
return GDB_ID_NULL ;
|
||||
int nClPath = m_pGeomDB->GetFirstGroupInGroup( m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_CL)) ;
|
||||
while ( nClPath != GDB_ID_NULL && m_pGeomDB->GetFirstInGroup( nClPath) == GDB_ID_NULL)
|
||||
nClPath = m_pGeomDB->GetNextGroup( nClPath) ;
|
||||
return nClPath ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Operation::GetNextFullToolpath( int nClPathId) const
|
||||
{
|
||||
do {
|
||||
nClPathId = m_pGeomDB->GetNextGroup( nClPathId) ;
|
||||
} while ( nClPathId != GDB_ID_NULL && m_pGeomDB->GetFirstInGroup( nClPathId) == GDB_ID_NULL) ;
|
||||
return nClPathId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Operation::GetLastFullToolpath( void) const
|
||||
{
|
||||
if ( m_pGeomDB == nullptr)
|
||||
return GDB_ID_NULL ;
|
||||
int nClPath = m_pGeomDB->GetLastGroupInGroup( m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_CL)) ;
|
||||
while ( nClPath != GDB_ID_NULL && m_pGeomDB->GetFirstInGroup( nClPath) == GDB_ID_NULL)
|
||||
nClPath = m_pGeomDB->GetPrevGroup( nClPath) ;
|
||||
return nClPath ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
Operation::GetPrevFullToolpath( int nClPathId) const
|
||||
{
|
||||
do {
|
||||
nClPathId = m_pGeomDB->GetPrevGroup( nClPathId) ;
|
||||
} while ( nClPathId != GDB_ID_NULL && m_pGeomDB->GetFirstInGroup( nClPathId) == GDB_ID_NULL) ;
|
||||
return nClPathId ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Operation::UpdateFollowingOperationsStatus(int nModif)
|
||||
@@ -1601,14 +1682,10 @@ Operation::GetClPathFinalToolDir( int nClPathId, bool bSkipRise, Vector3d& vtToo
|
||||
const CamData*
|
||||
Operation::GetInitialCamData( bool bSkipClimb) const
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
// recupero il primo percorso CL non vuoto
|
||||
int nClPathId = GetFirstFullToolpath() ;
|
||||
if ( nClPathId == GDB_ID_NULL)
|
||||
return nullptr ;
|
||||
// recupero gruppo per geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
return nullptr ;
|
||||
// recupero il primo percorso CL
|
||||
int nClPathId = m_pGeomDB->GetFirstGroupInGroup( nClId) ;
|
||||
// recupero i dati Cam della prima entità del percorso
|
||||
return GetClPathInitialCamData( nClPathId, bSkipClimb) ;
|
||||
}
|
||||
@@ -1638,14 +1715,10 @@ Operation::GetClPathInitialCamData( int nClPathId, bool bSkipClimb) const
|
||||
const CamData*
|
||||
Operation::GetFinalCamData( bool bSkipRise) const
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
// recupero l'ultimo percorso CL non vuoto
|
||||
int nClPathId = GetLastFullToolpath() ;
|
||||
if ( nClPathId == GDB_ID_NULL)
|
||||
return nullptr ;
|
||||
// recupero gruppo per geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
return nullptr ;
|
||||
// recupero l'ultimo percorso CL
|
||||
int nClPathId = m_pGeomDB->GetLastGroupInGroup( nClId) ;
|
||||
// recupero i dati Cam dell'ultima entità del percorso
|
||||
return GetClPathFinalCamData( nClPathId, bSkipRise) ;
|
||||
}
|
||||
@@ -2645,16 +2718,15 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink)
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr || m_pMchMgr->GetCurrMachine() == nullptr)
|
||||
return false ;
|
||||
|
||||
// recupero gruppo della geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( m_nOwnerId, MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// se lavorazione completamente vuota, non devo fare alcunché
|
||||
if ( ! IsAtLeastOnePathOk())
|
||||
return true ;
|
||||
|
||||
// recupero ultima operazione precedente non vuota o che richiede home precedente
|
||||
int nPrevOpId = m_pMchMgr->GetPrevActiveOperation( m_nOwnerId) ;
|
||||
Operation* pPrevOp = GetOperation( m_pGeomDB->GetUserObj( nPrevOpId)) ;
|
||||
while ( pPrevOp != nullptr) {
|
||||
if ( ! pPrevOp->IsEmpty() || pPrevOp->NeedPrevHome())
|
||||
if ( pPrevOp->IsAtLeastOnePathOk() || pPrevOp->NeedPrevHome())
|
||||
break ;
|
||||
else {
|
||||
nPrevOpId = m_pMchMgr->GetPrevActiveOperation( nPrevOpId) ;
|
||||
@@ -2663,7 +2735,7 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink)
|
||||
}
|
||||
// recupero l'utensile precedente e i dati della sua testa
|
||||
string sPrevTool ;
|
||||
if ( pPrevOp != nullptr && ! pPrevOp->IsEmpty())
|
||||
if ( pPrevOp != nullptr && pPrevOp->IsAtLeastOnePathOk())
|
||||
sPrevTool = pPrevOp->GetToolName() ;
|
||||
|
||||
// flag nuova gestione collegamenti tra lavorazioni
|
||||
@@ -2964,7 +3036,7 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink)
|
||||
// aggiusto l'inizio di ogni percorso di lavoro
|
||||
bool bOk = true ;
|
||||
int nPrevClPathId = GDB_ID_NULL ;
|
||||
int nClPathId = m_pGeomDB->GetFirstGroupInGroup( nClId) ;
|
||||
int nClPathId = GetFirstFullToolpath() ;
|
||||
while ( bOk && nClPathId != GDB_ID_NULL) {
|
||||
// se richiesta verifica collegamento con lavorazione precedente, sistemo inizio
|
||||
if ( bVerifyPreviousLink && ( ! bClimbDone || nPrevClPathId != GDB_ID_NULL)) {
|
||||
@@ -2978,7 +3050,7 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink)
|
||||
bOk = false ;
|
||||
// passo al successivo
|
||||
nPrevClPathId = nClPathId ;
|
||||
nClPathId = m_pGeomDB->GetNextGroup( nClPathId) ;
|
||||
nClPathId = GetNextFullToolpath( nClPathId) ;
|
||||
pPrevOp = nullptr ;
|
||||
}
|
||||
|
||||
@@ -3000,7 +3072,8 @@ Operation::AdjustStartEndMovements( bool bVerifyPreviousLink)
|
||||
// se ultima operazione o la successiva lo richiede, vado in home
|
||||
int nNextOpId = m_pMchMgr->GetNextActiveOperation( m_nOwnerId) ;
|
||||
Operation* pNextOp = GetOperation( m_pGeomDB->GetUserObj( nNextOpId)) ;
|
||||
if ( pNextOp == nullptr || pNextOp->NeedPrevHome())
|
||||
if ( pNextOp == nullptr || pNextOp->NeedPrevHome() ||
|
||||
( IsValidMachiningType( pNextOp->GetType()) && ! pNextOp->IsAtLeastOnePathOk()))
|
||||
bOk = bOk && AddHome() ;
|
||||
|
||||
return bOk ;
|
||||
@@ -3503,18 +3576,15 @@ Operation::AddSpecialClimb( const DBLVECTOR& vAxVal, bool bOk, int nClPathId,
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// recupero gruppo per geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// se percorso CL specificato, verifico appartenga al gruppo sopra ricavato
|
||||
// se percorso CL specificato, verifico appartenga al gruppo della geometria di lavorazione (Cutter Location)
|
||||
if ( nClPathId != GDB_ID_NULL) {
|
||||
if ( m_pGeomDB->GetParentId( nClPathId) != nClId)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL || m_pGeomDB->GetParentId( nClPathId) != nClId)
|
||||
return false ;
|
||||
}
|
||||
// altrimenti, recupero il primo percorso CL della operazione
|
||||
// altrimenti, recupero il primo percorso CL non vuoto della operazione
|
||||
else {
|
||||
nClPathId = m_pGeomDB->GetFirstGroupInGroup( nClId) ;
|
||||
nClPathId = GetFirstFullToolpath() ;
|
||||
if ( nClPathId == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
@@ -3574,18 +3644,15 @@ Operation::RemoveClimb( int nClPathId)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// recupero gruppo per geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// se percorso CL specificato, verifico appartenga al gruppo sopra ricavato
|
||||
// se percorso CL specificato, verifico appartenga al gruppo della geometria di lavorazione (Cutter Location)
|
||||
if ( nClPathId != GDB_ID_NULL) {
|
||||
if ( m_pGeomDB->GetParentId( nClPathId) != nClId)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL || m_pGeomDB->GetParentId( nClPathId) != nClId)
|
||||
return false ;
|
||||
}
|
||||
// altrimenti, recupero il primo percorso CL della operazione
|
||||
// altrimenti, recupero il primo percorso CL non vuoto della operazione
|
||||
else {
|
||||
nClPathId = m_pGeomDB->GetFirstGroupInGroup( nClId) ;
|
||||
nClPathId = GetFirstFullToolpath() ;
|
||||
if ( nClPathId == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
@@ -3605,18 +3672,15 @@ Operation::AddRise( DBLVECTOR& vAxVal, double dDelta, int nClPathId, int nToMinM
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// recupero gruppo per geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// se percorso CL specificato, verifico appartenga al gruppo sopra ricavato
|
||||
// se percorso CL specificato, verifico appartenga al gruppo della geometria di lavorazione (Cutter Location)
|
||||
if ( nClPathId != GDB_ID_NULL) {
|
||||
if ( m_pGeomDB->GetParentId( nClPathId) != nClId)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL || m_pGeomDB->GetParentId( nClPathId) != nClId)
|
||||
return false ;
|
||||
}
|
||||
// altrimenti, recupero l'ultimo percorso CL della operazione
|
||||
// altrimenti, recupero l'ultimo percorso CL non vuoto della operazione
|
||||
else {
|
||||
nClPathId = m_pGeomDB->GetLastGroupInGroup( nClId) ;
|
||||
nClPathId = GetLastFullToolpath() ;
|
||||
if ( nClPathId == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
@@ -3770,18 +3834,15 @@ Operation::AddSpecialRise( const DBLVECTOR& vAxVal, bool bOk, int nClPathId,
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// recupero gruppo per geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// se percorso CL specificato, verifico appartenga al gruppo sopra ricavato
|
||||
// se percorso CL specificato, verifico appartenga al gruppo della geometria di lavorazione (Cutter Location)
|
||||
if ( nClPathId != GDB_ID_NULL) {
|
||||
if ( m_pGeomDB->GetParentId( nClPathId) != nClId)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL || m_pGeomDB->GetParentId( nClPathId) != nClId)
|
||||
return false ;
|
||||
}
|
||||
// altrimenti, recupero l'ultimo percorso CL della operazione
|
||||
// altrimenti, recupero l'ultimo percorso CL non vuoto della operazione
|
||||
else {
|
||||
nClPathId = m_pGeomDB->GetLastGroupInGroup( nClId) ;
|
||||
nClPathId = GetLastFullToolpath() ;
|
||||
if ( nClPathId == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
@@ -3842,18 +3903,15 @@ Operation::RemoveRise( int nClPathId)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// recupero gruppo per geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// se percorso CL specificato, verifico appartenga al gruppo sopra ricavato
|
||||
// se percorso CL specificato, verifico appartenga al gruppo della geometria di lavorazione (Cutter Location)
|
||||
if ( nClPathId != GDB_ID_NULL) {
|
||||
if ( m_pGeomDB->GetParentId( nClPathId) != nClId)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL || m_pGeomDB->GetParentId( nClPathId) != nClId)
|
||||
return false ;
|
||||
}
|
||||
// altrimenti, recupero l'ultimo percorso CL della operazione
|
||||
// altrimenti, recupero l'ultimo percorso CL non vuoto della operazione
|
||||
else {
|
||||
nClPathId = m_pGeomDB->GetLastGroupInGroup( nClId) ;
|
||||
nClPathId = GetLastFullToolpath() ;
|
||||
if ( nClPathId == GDB_ID_NULL)
|
||||
return false ;
|
||||
}
|
||||
@@ -3879,12 +3937,10 @@ Operation::AddHome( void)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// recupero gruppo per geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
// recupero l'ultimo percorso CL non vuoto
|
||||
int nLastPxClId = GetLastFullToolpath() ;
|
||||
if ( nLastPxClId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// recupero l'ultimo percorso
|
||||
int nLastPxClId = m_pGeomDB->GetLastGroupInGroup( nClId) ;
|
||||
// recupero l'ultima entità del percorso di nome RISE
|
||||
int nEntId = m_pGeomDB->GetLastNameInGroup( nLastPxClId, MCH_CL_RISE) ;
|
||||
if ( nEntId == GDB_ID_NULL)
|
||||
@@ -3930,12 +3986,10 @@ Operation::RemoveHome( void)
|
||||
{
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return false ;
|
||||
// recupero gruppo per geometria di lavorazione (Cutter Location)
|
||||
int nClId = m_pGeomDB->GetFirstNameInGroup( GetOwner(), MCH_CL) ;
|
||||
if ( nClId == GDB_ID_NULL)
|
||||
// recupero l'ultimo percorso CL non vuoto
|
||||
int nClPathId = GetLastFullToolpath() ;
|
||||
if ( nClPathId == GDB_ID_NULL)
|
||||
return false ;
|
||||
// recupero l'ultimo percorso CL
|
||||
int nClPathId = m_pGeomDB->GetLastGroupInGroup( nClId) ;
|
||||
// elimino tutte le entità HOME alla fine del percorso
|
||||
int nId = m_pGeomDB->GetFirstNameInGroup( nClPathId, MCH_CL_HOME) ;
|
||||
while ( nId != GDB_ID_NULL) {
|
||||
|
||||
+25
-16
@@ -1,14 +1,14 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2016-2019
|
||||
// EgalTech 2016-2025
|
||||
//----------------------------------------------------------------------------
|
||||
// File : Operation.h Data : 17.06.19 Versione : 2.1f2
|
||||
// File : Operation.h Data : 09.05.25 Versione : 2.7e2
|
||||
// Contenuto : Dichiarazione della classe Operation da cui derivano
|
||||
// Disposition e Machining.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 29.04.16 DS Creazione modulo.
|
||||
//
|
||||
// 09.05.25 DS Generalizzazionee funzione IsEmpty con tipo (EMPTY_*).
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
@@ -48,7 +48,7 @@ class Operation : public IUserObj
|
||||
|
||||
public :
|
||||
virtual int GetType( void) const = 0 ;
|
||||
virtual bool IsEmpty( void) const = 0 ;
|
||||
virtual bool IsEmpty( int nEmptyType = 0) const = 0 ;
|
||||
virtual bool UpdateStatus( int nModif) = 0 ;
|
||||
|
||||
protected :
|
||||
@@ -115,18 +115,13 @@ class Operation : public IUserObj
|
||||
Operation( void) ;
|
||||
|
||||
protected :
|
||||
struct Position {
|
||||
int nSide ;
|
||||
DBLVECTOR vAxis ;
|
||||
int nFlag ;
|
||||
int nFlag2 ;
|
||||
int nMask ;
|
||||
std::string sInfo ;
|
||||
Position() : nSide( 0), nFlag( 0), nFlag2( 0), nMask( -1) {}
|
||||
} ;
|
||||
typedef std::vector<Position> POSVECTOR ;
|
||||
|
||||
protected :
|
||||
bool IsAtLeastOnePathOk( void) const ;
|
||||
bool AreAllPathsOk( void) const ;
|
||||
bool GetToolpathsStatus( int& nCnt, int& nEmpty) const ;
|
||||
int GetFirstFullToolpath( void) const ;
|
||||
int GetNextFullToolpath( int nClPathId) const ;
|
||||
int GetLastFullToolpath( void) const ;
|
||||
int GetPrevFullToolpath( int nClPathId) const ;
|
||||
bool UpdateFollowingOperationsStatus( int nModif) ;
|
||||
bool GetElevation( int nPhase, const Point3d& ptP,
|
||||
const Vector3d& vtDir, double& dElev) const ;
|
||||
@@ -189,6 +184,18 @@ class Operation : public IUserObj
|
||||
bool GetAggrBottomData( const std::string& sHead, AggrBottom& agbData) const ;
|
||||
bool IsAggrBottom( const std::string& sHead) const ;
|
||||
|
||||
private :
|
||||
struct Position {
|
||||
int nSide ;
|
||||
DBLVECTOR vAxis ;
|
||||
int nFlag ;
|
||||
int nFlag2 ;
|
||||
int nMask ;
|
||||
std::string sInfo ;
|
||||
Position() : nSide( 0), nFlag( 0), nFlag2( 0), nMask( -1) {}
|
||||
} ;
|
||||
typedef std::vector<Position> POSVECTOR ;
|
||||
|
||||
private :
|
||||
bool GetInitialAxesValues( bool bSkipClimb, DBLVECTOR& vAxVal) const ;
|
||||
bool GetClPathInitialAxesValues( int nClPathId, bool bSkipClimb, DBLVECTOR& vAxVal) const ;
|
||||
@@ -323,6 +330,8 @@ inline Operation* GetOperation( IUserObj* pUserObj)
|
||||
{ return dynamic_cast< Operation*>( pUserObj) ; }
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Tipo di controllo per lavorazione vuota
|
||||
enum { NEED_GEOM = 0, NEED_ONE_TP_OK = 1, NEED_ALL_TP_OK = 2} ;
|
||||
// tipo posizione utensile
|
||||
enum { TOOL_PARAL = 1, TOOL_ORTHO = 2, TOOL_ORTUP = 3, TOOL_PAR_SLANT= 4} ;
|
||||
// tipo di utilizzo contorno faccia
|
||||
|
||||
@@ -89,7 +89,6 @@ const string UN_MAXOPTSIZE = "MaxOptSize" ;
|
||||
// 2452 = "Warning in Pocketing : No machinable pocket"
|
||||
// 2453 = "Warning in Pocketing : Tool name changed (xx)"
|
||||
// 2454 = "Warning in Pocketing : Tool data changed (xx)"
|
||||
// 2455 = "Warning in Pocketing : skipped Path too short"
|
||||
// 2456 = "Warning in Pocketing : machining step too small (xx)"
|
||||
// 2457 = "Warning in Pocketing : machining step (xxx) bigger than MaxMaterial (yyy)"
|
||||
// 2458 = "Warning in Pocketing : machining depth (xxx) bigger than MaxMaterial (yyy)"
|
||||
|
||||
+8
-2
@@ -35,8 +35,14 @@ class Pocketing : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_POCKETING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nPockets == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nPockets == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
+12
-47
@@ -96,10 +96,10 @@ const string UN_OPENMINSAFE = "OpenMinSafe" ;
|
||||
// 2434 = "Error in PocketingNT : Managing Open Edges inside Raw failed"
|
||||
// 2435 = "Error in PocketingNT : Managing Open Edges on Raw failed"
|
||||
// 2451 = "Warning in PocketingNT : Skipped entity (xx)"
|
||||
// 2452 = "Warning in PocketingNT : No machinable pocket"
|
||||
// 2452 = "Warning in PocketingNT : No pocket"
|
||||
// 2453 = "Warning in PocketingNT : Tool name changed (xx)"
|
||||
// 2454 = "Warning in PocketingNT : Tool data changed (xx)"
|
||||
// 2455 = "Warning in PocketingNT : skipped Path too short"
|
||||
// 2455 = "Warning in PocketingNT : No machinable pocket"
|
||||
// 2456 = "Warning in PocketingNT : machining step too small (xx)"
|
||||
// 2457 = "Warning in PocketingNT : machining step (xxx) bigger than MaxMaterial (yyy)"
|
||||
// 2458 = "Warning in PocketingNT : machining depth (xxx) bigger than MaxMaterial (yyy)"
|
||||
@@ -747,8 +747,10 @@ PocketingNT::MyApply( bool bRecalc, bool bPostApply)
|
||||
}
|
||||
|
||||
// se necessario, eseguo concatenamento ed inserisco i percorsi sotto la geometria ausiliaria
|
||||
if ( bChain && ! Chain( nAuxId))
|
||||
if ( bChain && ! Chain( nAuxId)) {
|
||||
m_pMchMgr->SetLastError( 2421, "Error in PocketingNT : Chaining failed") ;
|
||||
return false ;
|
||||
}
|
||||
|
||||
// lavoro ogni singola catena
|
||||
bool bOk = true ;
|
||||
@@ -792,9 +794,14 @@ PocketingNT::Update( bool bPostApply)
|
||||
if ( m_pGeomDB == nullptr || ! m_pGeomDB->ExistsObj( m_nOwnerId))
|
||||
return false ;
|
||||
|
||||
// se geometria di lavorazione vuota, esco
|
||||
if ( m_nPockets == 0 ) {
|
||||
m_pMchMgr->SetWarning( 2452, "Warning in PocketingNT : No pocket") ;
|
||||
return true ;
|
||||
}
|
||||
// se lavorazione vuota, esco
|
||||
if ( m_nPockets == 0) {
|
||||
m_pMchMgr->SetWarning( 2452, "Warning in PocketingNT : No machinable pocket") ;
|
||||
if ( ! IsAtLeastOnePathOk()) {
|
||||
m_pMchMgr->SetWarning( 2455, "Warning in PocketingNT : No machinable pocket") ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
@@ -1672,48 +1679,6 @@ PocketingNT::GetRaw( void)
|
||||
return ( ( pStmRaw->IsValid() && pStmRaw->GetTriangleCount() > 0) ? Release( pStmRaw) : nullptr) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ISurfTriMesh*
|
||||
PocketingNT::GetRawPart( void)
|
||||
{
|
||||
// controllo MachManager e database geometrico
|
||||
if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr)
|
||||
return nullptr ;
|
||||
|
||||
// creo Stm del grezzo
|
||||
PtrOwner<ISurfTriMesh> pStmRaw( CreateSurfTriMesh()) ;
|
||||
if ( IsNull( pStmRaw))
|
||||
return nullptr ;
|
||||
pStmRaw->AdjustTopology() ;
|
||||
|
||||
// Id prima RawPart
|
||||
int nRawId = m_pMchMgr->GetFirstRawPart() ;
|
||||
|
||||
while ( nRawId != GDB_ID_NULL) {
|
||||
// verifico che il grezzo compaia nella fase
|
||||
if ( m_pMchMgr->VerifyRawPartPhase( nRawId, m_nPhase)) {
|
||||
// recupero l'oggetto dal database con tale Id
|
||||
int nRawSolidId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ;
|
||||
const IGeoObj* pGObj = m_pGeomDB->GetGeoObj( nRawSolidId) ;
|
||||
if ( pGObj == nullptr)
|
||||
return nullptr ;
|
||||
// recupero il frame in cui si trova
|
||||
Frame3d frRaw ;
|
||||
m_pGeomDB->GetGlobFrame( nRawSolidId, frRaw) ;
|
||||
// controllo che sia una Trimesh
|
||||
if ( pGObj->GetType() == SRF_TRIMESH) {
|
||||
SurfLocal StmRawPart( GetSurfTriMesh( pGObj), frRaw, GLOB_FRM) ;
|
||||
// lo aggiungo alla Trimesh complessiva
|
||||
pStmRaw->Add( *GetSurfTriMesh( StmRawPart)) ;
|
||||
}
|
||||
}
|
||||
// passo al grezzo successivo
|
||||
nRawId = m_pMchMgr->GetNextRawPart( nRawId) ;
|
||||
}
|
||||
|
||||
return ( ( pStmRaw->IsValid() && pStmRaw->GetTriangleCount() > 0) ? Release( pStmRaw) : nullptr) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ISurfTriMesh*
|
||||
PocketingNT::GetExtrusionStm( const ISurfFlatRegion* pSfr, const Vector3d& vtExtr)
|
||||
|
||||
+8
-3
@@ -62,8 +62,14 @@ class PocketingNT : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_POCKETING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nPockets == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nPockets == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
@@ -101,7 +107,6 @@ class PocketingNT : public Machining
|
||||
bool ResetCurveAllTempProp( ICurve* pCurve) ;
|
||||
bool Chain( int nGrpDestId) ;
|
||||
ISurfTriMesh* GetRaw( void) ;
|
||||
ISurfTriMesh* GetRawPart( void) ;
|
||||
ISurfTriMesh* GetExtrusionStm( const ISurfFlatRegion* pSfr, const Vector3d& vtExtr) ;
|
||||
ISurfFlatRegion* GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, double dDist, double dSmallOffs = 0) ;
|
||||
bool ManageOpenEdges( ISurfFlatRegion* pSfr, const ISurfTriMesh* pStmPart) ;
|
||||
|
||||
+1
-1
@@ -318,7 +318,7 @@ Processor::ProcessMachining( int nOpId, int nOpInd)
|
||||
return false ;
|
||||
|
||||
// Verifico non sia vuota
|
||||
if ( m_pMchMgr->IsMachiningEmpty())
|
||||
if ( m_pMchMgr->IsMachiningEmpty( NEED_ONE_TP_OK))
|
||||
return true ;
|
||||
|
||||
// Recupero l'utensile della lavorazione corrente
|
||||
|
||||
+8
-2
@@ -38,8 +38,14 @@ class SawFinishing : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_SAWFINISHING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nCuts == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nCuts == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
+8
-2
@@ -38,8 +38,14 @@ class SawRoughing : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_SAWROUGHING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nCuts == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nCuts == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
@@ -39,8 +39,14 @@ class Sawing : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_SAWING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nCuts == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nCuts == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
@@ -792,12 +792,10 @@ SimulatorMP::FindAndManageOperationStart( bool bStart, bool bFirst, int& nChange
|
||||
// recupero la nuova operazione
|
||||
if ( nChangeTool == 0) {
|
||||
if ( bStart) {
|
||||
//m_nOpId = m_pMchMgr->GetFirstActiveOperation() ;
|
||||
m_nOpInd = 0 ;
|
||||
m_nOpId = ( m_nOpInd < int( m_vOperId.size()) ? m_vOperId[m_nOpInd] : GDB_ID_NULL) ;
|
||||
}
|
||||
else {
|
||||
// m_nOpId = m_pMchMgr->GetNextActiveOperation( m_nOpId) ;
|
||||
++ m_nOpInd ;
|
||||
m_nOpId = ( m_nOpInd < int( m_vOperId.size()) ? m_vOperId[m_nOpInd] : GDB_ID_NULL) ;
|
||||
}
|
||||
|
||||
+2
-2
@@ -725,11 +725,11 @@ SimulatorSP::FindAndManageOperationStart( bool bStart, bool bFirst, int& nStatus
|
||||
bFirst = false ;
|
||||
// recupero la nuova operazione
|
||||
if ( bStart) {
|
||||
m_nOpId = m_pMchMgr->GetFirstActiveOperation() ;
|
||||
m_nOpId = m_pMchMgr->GetFirstActiveOperation( true) ;
|
||||
m_nOpInd = 0 ;
|
||||
}
|
||||
else
|
||||
m_nOpId = m_pMchMgr->GetNextActiveOperation( m_nOpId) ;
|
||||
m_nOpId = m_pMchMgr->GetNextActiveOperation( m_nOpId, true) ;
|
||||
// ciclo sulle successive operazioni
|
||||
while ( m_nOpId != GDB_ID_NULL) {
|
||||
// se lavorazione valida
|
||||
|
||||
+8
-2
@@ -62,8 +62,14 @@ class SurfFinishing : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_SAWFINISHING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nPaths == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nPaths == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
+8
-2
@@ -71,8 +71,14 @@ class SurfRoughing : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_SURFROUGHING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nPaths == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nPaths == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
+8
-2
@@ -36,8 +36,14 @@ class WaterJetting : public Machining
|
||||
public : // Operation
|
||||
int GetType( void) const override
|
||||
{ return OPER_WATERJETTING ; }
|
||||
bool IsEmpty( void) const override
|
||||
{ return ( m_nMills == 0) ; }
|
||||
bool IsEmpty( int nEmptyType = NEED_GEOM) const override
|
||||
{ if ( m_nMills == 0)
|
||||
return true ;
|
||||
if ( nEmptyType == NEED_ONE_TP_OK)
|
||||
return ( ! IsAtLeastOnePathOk()) ;
|
||||
if ( nEmptyType == NEED_ALL_TP_OK)
|
||||
return ( ! AreAllPathsOk()) ;
|
||||
return false ; }
|
||||
bool UpdateStatus( int nModif) override
|
||||
{ m_nStatus |= nModif ; return true ; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user