EgtMachKernel 2.1f4 :

- correzione a milling e pocketing per aggiustamento affondamento quando elevazione supera massimo affondamento
- pezza in milling per determinare se punto fuori dal grezzo con lavorazione avente elevazione limitata dall'utente.
This commit is contained in:
Dario Sassi
2019-07-03 08:03:12 +00:00
parent 632c59422c
commit 8fb09ffb5f
4 changed files with 13 additions and 13 deletions
BIN
View File
Binary file not shown.
+10 -10
View File
@@ -1635,11 +1635,11 @@ Milling::ProcessPath( int nPathId, int nPvId, int nClId)
double dMaxDepth = m_TParams.m_dLen - ( m_TParams.m_dDiam > m_dTHoldDiam ? 0 : m_dTHoldLen) - MAX_DEPTH_SAFE ;
if ( dElev > dMaxDepth + EPS_SMALL) {
// se affondamento riducibile : segnalo, riduco e continuo
if ( dDepth + max( dThick, 0.0) > dMaxDepth) {
if ( dDepth + max( dThick, 0.0) > dElev - dMaxDepth) {
string sInfo = "Warning in Milling : machining depth (" + ToString( dElev, 1) +
") bigger than MaxDepth (" + ToString( dMaxDepth, 1) + ")" ;
m_pMchMgr->SetWarning( 2358, sInfo) ;
dDepth = dMaxDepth - max( dThick, 0.0) ;
dDepth -= ( dElev - dMaxDepth) ;
dElev = dMaxDepth ;
}
// altrimenti errore
@@ -2019,7 +2019,7 @@ Milling::AddStandardMilling( const ICurveComposite* pCompo, const Vector3d& vtTo
if ( ! CalcLeadInStart( ptStart, vtStart, vtTool, dStElev, false, pCompo, ptP1))
return false ;
// determino se l'inizio dell'attacco è fuori dal grezzo
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool) ;
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool, dElev) ;
// determino se l'inizio dell'attacco è sopra il grezzo
bool bAboveStart = m_bAboveHead && GetPointAboveRaw( ptP1) ;
// imposto versore correzione e ausiliario sul punto di partenza
@@ -2174,7 +2174,7 @@ Milling::AddZigZagMilling( const ICurveComposite* pCompo, const Vector3d& vtTool
if ( ! CalcLeadInStart( ptStart, vtStart, vtTool, dStElev, bInvert, pCompo, ptP1))
return false ;
// determino se l'inizio dell'attacco è fuori dal grezzo
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool) ;
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool, dElev) ;
// determino se l'inizio dell'attacco è sopra il grezzo
bool bAboveStart = m_bAboveHead && GetPointAboveRaw( ptP1) ;
// imposto versore correzione e ausiliario sul punto di partenza
@@ -2375,7 +2375,7 @@ Milling::AddOneWayMilling( const ICurveComposite* pCompo, const Vector3d& vtTool
if ( ! CalcLeadInStart( ptStart, vtStart, vtTool, dStElev, false, pCompo, ptP1))
return false ;
// determino se l'inizio dell'attacco è fuori dal grezzo
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool) ;
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool, dElev) ;
// aggiungo approccio per frese normali
if ( ( m_TParams.m_nType & TF_SAWBLADE) == 0) {
// correggo elevazione iniziale per punto inizio attacco (se testa da sopra senza aggregato approccio mai Z-)
@@ -2542,7 +2542,7 @@ Milling::AddSpiralMilling( const ICurveComposite* pCompo, const Vector3d& vtTool
if ( ! CalcLeadInStart( ptStart, vtStart, vtTool, dStElev, false, pCompo, ptP1))
return false ;
// determino se l'inizio dell'attacco è fuori dal grezzo
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool) ;
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool, dElev) ;
// determino se l'inizio dell'attacco è sopra il grezzo
bool bAboveStart = m_bAboveHead && GetPointAboveRaw( ptP1) ;
// imposto versore correzione e ausiliario sul punto di partenza
@@ -2692,7 +2692,7 @@ Milling::AddSpiralMilling( const ICurveComposite* pCompo, const Vector3d& vtTool
else
dStElev -= ( ptP1 - ptStart) * vtTool ;
// determino se l'inizio dell'attacco è fuori dal grezzo
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool) ;
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool, dElev) ;
// determino se l'inizio dell'attacco è sopra il grezzo
bool bAboveStart = m_bAboveHead && GetPointAboveRaw( ptP1) ;
// approccio al punto iniziale
@@ -2874,7 +2874,7 @@ Milling::AddSawZigZagMilling( const ICurveComposite* pCompo, const Vector3d& vtT
if ( ! CalcLeadInStart( ptStart, vtStart, vtTool, dStElev, bInvert, pCompo, ptP1))
return false ;
// determino se l'inizio dell'attacco è fuori dal grezzo
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool) ;
bool bOutStart = GetPointOutOfRaw( ptP1, vtTool, dElev) ;
// determino se l'inizio dell'attacco è sopra il grezzo
bool bAboveStart = m_bAboveHead && GetPointAboveRaw( ptP1) ;
// imposto versore correzione e ausiliario sul punto di partenza
@@ -3527,7 +3527,7 @@ Milling::GetRadiusForStartEndElevation( void) const
//----------------------------------------------------------------------------
bool
Milling::GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool) const
Milling::GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, double dElev) const
{
// per frese normali
if ( ( m_TParams.m_nType & TF_SAWBLADE) == 0) {
@@ -3535,7 +3535,7 @@ Milling::GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool) const
double dTemp ;
if ( ! GetElevation( m_nPhase, ptP, vtTool, 0.5 * m_TParams.m_dDiam, vtTool, dTemp))
return false ;
return ( dTemp < 10 * EPS_SMALL) ;
return ( dTemp < 10 * EPS_SMALL || dTemp > dElev + 10 * EPS_SMALL) ;
}
// per lame
else {
+1 -1
View File
@@ -98,7 +98,7 @@ class Milling : public Machining
bool AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d& vtN, double dEndElev,
bool bInvert, const ICurveComposite* pCompo, bool bSplitArcs, Point3d& ptP1) ;
double GetRadiusForStartEndElevation( void) const ;
bool GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool) const ;
bool GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, double dElev) const ;
bool GetPointAboveRaw( const Point3d& ptP) const ;
bool CalcAndSetCorrAuxDir( const ICurveComposite* pCompo, double dU) ;
Vector3d CalcCorrDir( const ICurveComposite* pCompo, double dU) ;
+2 -2
View File
@@ -1506,11 +1506,11 @@ Pocketing::ProcessPath( int nPathId, int nPvId, int nClId)
double dMaxDepth = m_TParams.m_dLen - ( m_TParams.m_dDiam > m_dTHoldDiam ? 0 : m_dTHoldLen) - MAX_DEPTH_SAFE ;
if ( dElev > dMaxDepth + EPS_SMALL) {
// se affondamento riducibile : segnalo, riduco e continuo
if ( dDepth + max( dThick, 0.0) > dMaxDepth) {
if ( dDepth + max( dThick, 0.0) > dElev - dMaxDepth) {
string sInfo = "Warning in Pocketing : machining depth (" + ToString( dElev, 1) +
") bigger than MaxDepth (" + ToString( dMaxDepth, 1) + ")" ;
m_pMchMgr->SetWarning( 2458, sInfo) ;
dDepth = dMaxDepth - max( dThick, 0.0) ;
dDepth -= ( dElev - dMaxDepth) ;
dElev = dMaxDepth ;
}
// altrimenti errore