diff --git a/Milling.cpp b/Milling.cpp index 744366c..78c94aa 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -2037,6 +2037,15 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId) return false ; m_pGeomDB->SetName( nPxId, sPathName) ; m_pGeomDB->SetMaterial( nPxId, GREEN) ; + + // assegno il vettore estrazione al gruppo del percorso + m_pGeomDB->SetInfo( nPxId, KEY_EXTR, vtTool) ; + // assegno i punti di inizio e fine al gruppo del percorso + m_pGeomDB->SetInfo( nPxId, KEY_START, ptStart) ; + m_pGeomDB->SetInfo( nPxId, KEY_END, ptEnd) ; + // assegno l'elevazione massima + m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ; + // creo l'anteprima del percorso if ( ! GenerateMillingPv( nPxId, pCompo, dRbDist, dDepth)) return false ; diff --git a/Sawing.cpp b/Sawing.cpp index 8ba3d86..183c96b 100644 --- a/Sawing.cpp +++ b/Sawing.cpp @@ -1953,6 +1953,14 @@ Sawing::GenerateLinePv( const ICurveLine* pLine, const Vector3d& vtTool, const V return false ; m_pGeomDB->SetName( nPxId, sName) ; m_pGeomDB->SetMaterial( nPxId, BLUE) ; + // assegno il vettore estrazione al gruppo del percorso + m_pGeomDB->SetInfo( nPxId, KEY_EXTR, Z_AX) ; + // assegno i punti di inizio e fine al gruppo del percorso (tenendo conto degli allungamenti in vera lavorazione) + Vector3d vtMidDir ; pLine->GetMidDir( vtMidDir) ; + m_pGeomDB->SetInfo( nPxId, KEY_START, pLine->GetStart() - dStartWhiskExt * vtMidDir) ; + m_pGeomDB->SetInfo( nPxId, KEY_END, pLine->GetEnd() + dEndWhiskExt * vtMidDir) ; + // assegno l'elevazione massima + m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ; // punti notevoli Point3d ptIni = pLine->GetStart() + dElev * vtCorr ; @@ -2576,6 +2584,15 @@ Sawing::GenerateExtCurvePv( const ICurveComposite* pCrv, double dOffs, return false ; m_pGeomDB->SetName( nPxId, sName) ; m_pGeomDB->SetMaterial( nPxId, BLUE) ; + // assegno il vettore estrusione al gruppo del percorso + m_pGeomDB->SetInfo( nPxId, KEY_EXTR, Z_AX) ; + // assegno i punti di inizio e fine al gruppo del percorso + Point3d ptStart ; pCrv->GetStartPoint( ptStart) ; + m_pGeomDB->SetInfo( nPxId, KEY_START, ptStart) ; + Point3d ptEnd ; pCrv->GetEndPoint( ptEnd) ; + m_pGeomDB->SetInfo( nPxId, KEY_END, ptEnd) ; + // assegno l'elevazione massima + m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ; // disabilito eventuale registrazione comandi EXE (riabilitazione automatica) CmdLogOff cmdLogOff ; @@ -3358,6 +3375,15 @@ Sawing::GenerateIntArcPv( const ICurveArc* pArc, return false ; m_pGeomDB->SetName( nPxId, sName) ; m_pGeomDB->SetMaterial( nPxId, BLUE) ; + // assegno il vettore estrazione al gruppo del percorso + m_pGeomDB->SetInfo( nPxId, KEY_EXTR, Z_AX) ; + // assegno i punti di inizio e fine al gruppo del percorso + Point3d ptStart ; pArc->GetStartPoint( ptStart) ; + m_pGeomDB->SetInfo( nPxId, KEY_START, ptStart) ; + Point3d ptEnd ; pArc->GetEndPoint( ptEnd) ; + m_pGeomDB->SetInfo( nPxId, KEY_END, ptEnd) ; + // assegno l'elevazione massima + m_pGeomDB->SetInfo( nPxId, KEY_ELEV, dElev) ; // disabilito eventuale registrazione comandi EXE (riabilitazione automatica) CmdLogOff cmdLogOff ; diff --git a/SimulatorSP.cpp b/SimulatorSP.cpp index d86904d..f97a7f6 100644 --- a/SimulatorSP.cpp +++ b/SimulatorSP.cpp @@ -97,6 +97,7 @@ SimulatorSP::SimulatorSP( void) m_bEnableVm = false ; m_dSafeDist = SAFEDIST_STD ; m_bEnableTrace = false ; + m_nTraceGroup = GDB_ID_NULL ; m_nCurrTrace = GDB_ID_NULL ; m_nAxesMask = 0 ; m_bEnabAxes = true ; @@ -1685,10 +1686,10 @@ SimulatorSP::EnableToolTipTrace( bool bEnable) ; } else { - int nTraceCrvId = m_nCurrTrace ; + int nTraceCrvId = m_pGeomDB->GetFirstInGroup( m_nTraceGroup) ; while ( nTraceCrvId != GDB_ID_NULL) { m_pGeomDB->SetStatus( nTraceCrvId, GDB_ST_OFF) ; - nTraceCrvId = m_pGeomDB->GetPrev( nTraceCrvId) ; + nTraceCrvId = m_pGeomDB->GetNext( nTraceCrvId) ; } m_nCurrTrace = GDB_ID_NULL ; } @@ -1708,6 +1709,7 @@ SimulatorSP::TraceToolTipMove( int nMoveType) int nTraceGrpId ; if ( ! m_pMachine->LuaGetGlobVar( GLOB_VAR + GVAR_TOOLTRACE, nTraceGrpId)) return false ; + m_nTraceGroup = nTraceGrpId ; // recupero posizione utensile corrente int nExitId = m_pMachine->GetExitId( m_sHead, m_nExit) ; Frame3d frExit ; diff --git a/SimulatorSP.h b/SimulatorSP.h index ae54298..d8ea59c 100644 --- a/SimulatorSP.h +++ b/SimulatorSP.h @@ -177,6 +177,7 @@ class SimulatorSP : public ISimulator double m_dSafeDist ; // distanza di sicurezza per verifica collisioni INTVECTOR m_nCollMarkId ; // elenco oggetti marcati per visualizzare meglio la collisione rilevata bool m_bEnableTrace ; // flag abilitazione tool tip trace + int m_nTraceGroup ; // Id del gruppo in cui si inceriscono le curve di tracciatura int m_nCurrTrace ; // Id della curva composita corrente di trace int m_nAxesMask ; // maschera a bit di abilitazione movimento assi (solo se rapido) bool m_bEnabAxes ; // flag abilitazione movimento assi attivi