EgtMachKernel 1.6v8 :
- gestita posizione Tavola Home diversa da posizione 0 Macchina in disposizione - in generazione si assegna il nome macchina - nel confronto attrezzaggio utensili si tiene conto della posizione in ToolChanger - se angoli indeterminati ma si determinano con asse ausiliario, li rendo tali direttamente - aggiunto comando per ricaricare DB utensili e lavorazioni - aggiunta funzione GetPhaseLastOperation - ora inserimento lavorazione avviene alla fine della fase corrente - migliorato split di grezzo con lavorazioni - in taglio di lama e fresatura irrobustito allungamenti/accorciamenti percorso.
This commit is contained in:
+27
-11
@@ -17,6 +17,8 @@
|
||||
#include "MachMgr.h"
|
||||
#include "MachConst.h"
|
||||
#include "Disposition.h"
|
||||
#include "/EgtDev/Include/EMkMachiningGeoConst.h"
|
||||
#include "/EgtDev/Include/EXeCmdLogOff.h"
|
||||
#include "/EgtDev/Include/EGkCurveComposite.h"
|
||||
#include "/EgtDev/Include/EGkGdbIterator.h"
|
||||
#include "/EgtDev/Include/EGkGeoPoint3d.h"
|
||||
@@ -26,7 +28,6 @@
|
||||
#include "/EgtDev/Include/EGkSfrCreate.h"
|
||||
#include "/EgtDev/Include/EGkStmStandard.h"
|
||||
#include "/EgtDev/Include/EGkStmFromCurves.h"
|
||||
#include "/EgtDev/Include/EmkMachiningGeoConst.h"
|
||||
#include "/EgtDev/Include/EgtPointerOwner.h"
|
||||
|
||||
using namespace std ;
|
||||
@@ -825,6 +826,9 @@ MachMgr::SplitFlatRawPartWithMachinings( int nRawId, const INTVECTOR& vMchId)
|
||||
if ( ! VerifyRawPart( nRawId) || VerifyRawPartPhase( nRawId, m_nCurrPhase))
|
||||
return GDB_ID_NULL ;
|
||||
|
||||
// disabilito eventuale registrazione comandi EXE (riabilitazione automatica)
|
||||
CmdLogOff cmdLogOff ;
|
||||
|
||||
// recupero alcuni dati del grezzo
|
||||
// il solido del grezzo
|
||||
int nRawSolId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ;
|
||||
@@ -902,9 +906,15 @@ MachMgr::SplitFlatRawPartWithMachinings( int nRawId, const INTVECTOR& vMchId)
|
||||
// creo i grezzi risultanti
|
||||
// creo i nuovi grezzi
|
||||
INTVECTOR vNewIds ;
|
||||
int nCount ;
|
||||
int nChunk = 0 ;
|
||||
int nFirstLoopId = ExeExtractSurfFrChunkLoops( nSfrId, nChunk, nRawId, nullptr) ;
|
||||
int nFirstLoopId = ExeExtractSurfFrChunkLoops( nSfrId, nChunk, nRawId, &nCount) ;
|
||||
while ( nFirstLoopId != GDB_ID_NULL) {
|
||||
// !!! in attesa di gestire i grezzi con i buchi !!!
|
||||
// cancello le eventuali curve successive (sono i loop interni ovvero i buchi)
|
||||
for ( int i = 1 ; i < nCount ; ++ i) {
|
||||
m_pGeomDB->Erase( nFirstLoopId + i) ;
|
||||
}
|
||||
// dichiaro temporanea la curva
|
||||
m_pGeomDB->SetLevel( nFirstLoopId, GDB_LV_TEMP) ;
|
||||
// creo il grezzo
|
||||
@@ -953,7 +963,7 @@ MachMgr::SplitFlatRawPartWithMachinings( int nRawId, const INTVECTOR& vMchId)
|
||||
m_pGeomDB->Erase( nFirstLoopId) ;
|
||||
// passo alla prossima curva
|
||||
++ nChunk ;
|
||||
nFirstLoopId = ExeExtractSurfFrChunkLoops( nSfrId, nChunk, nRawId, nullptr) ;
|
||||
nFirstLoopId = ExeExtractSurfFrChunkLoops( nSfrId, nChunk, nRawId, &nCount) ;
|
||||
}
|
||||
// cancello la regione
|
||||
m_pGeomDB->Erase( nSfrId) ;
|
||||
@@ -977,14 +987,20 @@ MachMgr::SplitFlatRawPartWithMachinings( int nRawId, const INTVECTOR& vMchId)
|
||||
if ( ( ( nEntGeoType & GEO_CURVE) != 0 && ExeMidPoint( nEntId, nNewId, ptTest)) ||
|
||||
( ( nEntGeoType & GEO_CURVE) == 0 && ExeCenterPoint( nEntId, nNewId, ptTest))) {
|
||||
int nOutCrvId = m_pGeomDB->GetFirstNameInGroup( nNewId, MACH_RAW_OUTLINE) ;
|
||||
ICurve* pCurve = GetCurve( m_pGeomDB->GetGeoObj( nOutCrvId)) ;
|
||||
if ( pCurve != nullptr) {
|
||||
int nSide ;
|
||||
double dDist ;
|
||||
DistPointCurve distPC( ptTest, *pCurve) ;
|
||||
if ( distPC.GetDist( dDist) && dDist < 100 * EPS_SMALL ||
|
||||
(distPC.GetSideAtMinDistPoint( 0, Z_AX, nSide) && nSide != MDS_RIGHT))
|
||||
break ;
|
||||
BBox3d b3Raw ; m_pGeomDB->GetGlobalBBox( nOutCrvId, b3Raw) ;
|
||||
double dRawDiam = 0 ; b3Raw.GetDiameter( dRawDiam) ;
|
||||
BBox3d b3Part ; m_pGeomDB->GetGlobalBBox( nEntId, b3Part) ;
|
||||
double dPartDiam = 0 ; b3Part.GetDiameter( dPartDiam) ;
|
||||
if ( dRawDiam > 0.9 * dPartDiam) {
|
||||
ICurve* pCurve = GetCurve( m_pGeomDB->GetGeoObj( nOutCrvId)) ;
|
||||
if ( pCurve != nullptr) {
|
||||
int nSide ;
|
||||
double dDist ;
|
||||
DistPointCurve distPC( ptTest, *pCurve) ;
|
||||
if ( distPC.GetDist( dDist) && dDist < 100 * EPS_SMALL ||
|
||||
(distPC.GetSideAtMinDistPoint( 0, Z_AX, nSide) && nSide != MDS_RIGHT))
|
||||
break ;
|
||||
}
|
||||
}
|
||||
}
|
||||
// altrimenti scambio pezzo ed elimino gruppo
|
||||
|
||||
Reference in New Issue
Block a user