Merge commit '662241c8e1560612c1a74185bbf415707a9bdb71' into feature/Svuotature
This commit is contained in:
+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)
|
||||
|
||||
Reference in New Issue
Block a user