From a3511ba89dd5bb4336ffec8bd1dd03e5c169bded Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 24 May 2024 12:47:03 +0200 Subject: [PATCH] =?UTF-8?q?EgtMachKernel=20:=20-=20correzioni=20per=20calc?= =?UTF-8?q?olo=20posizione=20utensile=20fuori=20pezzo=20in=20fresatura=20-?= =?UTF-8?q?=20ora=20GetElevation=20pu=C3=B2=20gestire=20un=20offset=20dell?= =?UTF-8?q?a=20superficie=20utensile=20tramite=20il=20parametro=20dSafeDis?= =?UTF-8?q?t.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- FiveAxisMilling.cpp | 62 ++++++++++++++++++++++----------------------- Milling.cpp | 32 ++++++++++------------- Milling.h | 4 +-- Operation.cpp | 29 ++++++++++++++++----- Operation.h | 2 ++ WaterJetting.cpp | 45 -------------------------------- WaterJetting.h | 2 -- 7 files changed, 70 insertions(+), 106 deletions(-) diff --git a/FiveAxisMilling.cpp b/FiveAxisMilling.cpp index 5c70a0d..ef6f2f1 100644 --- a/FiveAxisMilling.cpp +++ b/FiveAxisMilling.cpp @@ -31,19 +31,19 @@ using namespace std ; //------------------------------ Errors -------------------------------------- -// 2801 = "Error in FiveAxisMilling : UpdateToolData failed" -// 2802 = "Error in FiveAxisMilling : missing Script (xxx)" -// 2803 = "Error in FiveAxisMilling : Error in xxx (nnn)" -// 2804 = "Error in FiveAxisMilling : axes values not calculable" -// 2805 = "Error in FiveAxisMilling : outstroke xx" -// 2806 = "Error in FiveAxisMilling : link movements not calculable" -// 2807 = "Error in FiveAxisMilling : link outstroke xx" -// 2808 = "Error in FiveAxisMilling : post apply not calculable" -// 2809 = "Error in FiveAxisMilling : Tool loading failed" -// 2851 = "Warning in FiveAxisMilling : Skipped entity (xx)" -// 2852 = "Warning in FiveAxisMilling : No machinable path" -// 2853 = "Warning in FiveAxisMilling : Tool name changed (xx)" -// 2854 = "Warning in FiveAxisMilling : Tool data changed (xx)" +// 3301 = "Error in FiveAxisMilling : UpdateToolData failed" +// 3302 = "Error in FiveAxisMilling : missing Script (xxx)" +// 3303 = "Error in FiveAxisMilling : Error in xxx (nnn)" +// 3304 = "Error in FiveAxisMilling : axes values not calculable" +// 3305 = "Error in FiveAxisMilling : outstroke xx" +// 3306 = "Error in FiveAxisMilling : link movements not calculable" +// 3307 = "Error in FiveAxisMilling : link outstroke xx" +// 3308 = "Error in FiveAxisMilling : post apply not calculable" +// 3309 = "Error in FiveAxisMilling : Tool loading failed" +// 3351 = "Warning in FiveAxisMilling : Skipped entity (xx)" +// 3352 = "Warning in FiveAxisMilling : No machinable path" +// 3353 = "Warning in FiveAxisMilling : Tool name changed (xx)" +// 3354 = "Warning in FiveAxisMilling : Tool data changed (xx)" //------------------------------ Constants ----------------------------------- static const string EMC_VAR = "EMC" ; // tabella variabili locali per calcolo @@ -420,7 +420,7 @@ FiveAxisMilling::SetGeometry( const SELVECTOR& vIds) int nSubs ; if ( ! VerifyGeometry( Id, nSubs, nType)) { string sInfo = "Warning in FiveAxisMilling : Skipped entity " + ToString( Id) ; - m_pMchMgr->SetWarning( 2851, sInfo) ; + m_pMchMgr->SetWarning( 3351, sInfo) ; continue ; } // posso aggiungere alla lista @@ -445,13 +445,13 @@ FiveAxisMilling::Preview( bool bRecalc) // aggiorno dati geometrici dell'utensile if ( ! UpdateToolData()) { - m_pMchMgr->SetLastError( 2801, "Error in FiveAxisMilling : UpdateToolData failed") ; + m_pMchMgr->SetLastError( 3301, "Error in FiveAxisMilling : UpdateToolData failed") ; return false ; } // rendo corrente l'utensile usato nella lavorazione if ( ! m_pMchMgr->SetCalcTool( m_TParams.m_sName, m_TParams.m_sHead, m_TParams.m_nExit)) { - m_pMchMgr->SetLastError( 2809, "Error in FiveAxisMilling : Tool loading failed") ; + m_pMchMgr->SetLastError( 3309, "Error in FiveAxisMilling : Tool loading failed") ; return false ; } @@ -482,7 +482,7 @@ FiveAxisMilling::Preview( bool bRecalc) // verifico esistenza funzione if ( ! pMch->LuaExistsFunction( sPreview)) { string sErr = "Error in FiveAxisMilling : missing Script " + sPreview ; - m_pMchMgr->SetLastError( 2802, sErr) ; + m_pMchMgr->SetLastError( 3302, sErr) ; return false ; } @@ -529,7 +529,7 @@ FiveAxisMilling::Preview( bool bRecalc) if ( ! bOk || nErr != 0) { m_nMills = 0 ; string sErr = "Error in FiveAxisMilling : Error in " + sPreview + " (" + ToString( nErr) + ")" ; - m_pMchMgr->SetLastError( 2803, sErr) ; + m_pMchMgr->SetLastError( 3303, sErr) ; return false ; } @@ -551,7 +551,7 @@ FiveAxisMilling::Apply( bool bRecalc, bool bPostApply) // aggiorno dati geometrici dell'utensile bool bToolChanged = true ; if ( ! UpdateToolData( &bToolChanged)) { - m_pMchMgr->SetLastError( 2801, "Error in FiveAxisMilling : UpdateToolData failed") ; + m_pMchMgr->SetLastError( 3301, "Error in FiveAxisMilling : UpdateToolData failed") ; return false ; } @@ -572,7 +572,7 @@ FiveAxisMilling::Apply( bool bRecalc, bool bPostApply) // rendo corrente l'utensile usato nella lavorazione if ( ! m_pMchMgr->SetCalcTool( m_TParams.m_sName, m_TParams.m_sHead, m_TParams.m_nExit)) { - m_pMchMgr->SetLastError( 2809, "Error in FiveAxisMilling : Tool loading failed") ; + m_pMchMgr->SetLastError( 3309, "Error in FiveAxisMilling : Tool loading failed") ; return false ; } @@ -603,7 +603,7 @@ FiveAxisMilling::Apply( bool bRecalc, bool bPostApply) // verifico esistenza funzione if ( ! pMch->LuaExistsFunction( sApply)) { string sErr = "Error in FiveAxisMilling : missing Script " + sApply ; - m_pMchMgr->SetLastError( 2802, sErr) ; + m_pMchMgr->SetLastError( 3302, sErr) ; return false ; } @@ -650,7 +650,7 @@ FiveAxisMilling::Apply( bool bRecalc, bool bPostApply) if ( ! bOk || nErr != 0) { m_nMills = 0 ; string sErr = "Error in FiveAxisMilling : Error in " + sApply + " (" + ToString( nErr) + ")" ; - m_pMchMgr->SetLastError( 2803, sErr) ; + m_pMchMgr->SetLastError( 3303, sErr) ; return false ; } @@ -681,7 +681,7 @@ FiveAxisMilling::Update( bool bPostApply) // se lavorazione vuota, esco if ( m_nMills == 0) { - m_pMchMgr->SetWarning( 2852, "Warning in FiveAxisMilling : No machinable path") ; + m_pMchMgr->SetWarning( 3352, "Warning in FiveAxisMilling : No machinable path") ; return true ; } @@ -698,9 +698,9 @@ FiveAxisMilling::Update( bool bPostApply) if ( ! CalculateAxesValues( sHint)) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; if ( sInfo.empty()) - m_pMchMgr->SetLastError( 2804, "Error in FiveAxisMilling : axes values not calculable") ; + m_pMchMgr->SetLastError( 3304, "Error in FiveAxisMilling : axes values not calculable") ; else - m_pMchMgr->SetLastError( 2805, "Error in FiveAxisMilling : outstroke ") ; + m_pMchMgr->SetLastError( 3305, "Error in FiveAxisMilling : outstroke ") ; return false ; } @@ -711,9 +711,9 @@ FiveAxisMilling::Update( bool bPostApply) if ( ! AdjustStartEndMovements( bVpl)) { string sInfo = m_pMchMgr->GetOutstrokeInfo() ; if ( sInfo.empty()) - m_pMchMgr->SetLastError( 2806, "Error in FiveAxisMilling : link movements not calculable") ; + m_pMchMgr->SetLastError( 3306, "Error in FiveAxisMilling : link movements not calculable") ; else - m_pMchMgr->SetLastError( 2807, "Error in FiveAxisMilling : link outstroke ") ; + m_pMchMgr->SetLastError( 3307, "Error in FiveAxisMilling : link outstroke ") ; return false ; } @@ -724,9 +724,9 @@ FiveAxisMilling::Update( bool bPostApply) string sErr ; if ( bPostApply && ! PostApply( sErr)) { if ( ! IsEmptyOrSpaces( sErr)) - m_pMchMgr->SetLastError( 2808, sErr) ; + m_pMchMgr->SetLastError( 3308, sErr) ; else - m_pMchMgr->SetLastError( 2808, "Error in FiveAxisMilling : post apply not calculable") ; + m_pMchMgr->SetLastError( 3308, "Error in FiveAxisMilling : post apply not calculable") ; return false ; } @@ -887,13 +887,13 @@ FiveAxisMilling::UpdateToolData( bool* pbChanged) if ( ! EqualNoCase( m_Params.m_sToolName, m_TParams.m_sName)) { string sInfo = "Warning in FiveAxisMilling : tool name changed (" + m_Params.m_sToolName + "->" + m_TParams.m_sName + ")" ; - m_pMchMgr->SetWarning( 2853, sInfo) ; + m_pMchMgr->SetWarning( 3353, sInfo) ; m_Params.m_sToolName = m_TParams.m_sName ; } if ( bChanged) { string sInfo = "Warning in FiveAxisMilling : tool data changed (" + m_Params.m_sToolName + ")" ; - m_pMchMgr->SetWarning( 2854, sInfo) ; + m_pMchMgr->SetWarning( 3354, sInfo) ; } // se definito parametro di ritorno, lo assegno if ( pbChanged != nullptr) diff --git a/Milling.cpp b/Milling.cpp index 3c6509c..cbf2a30 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -6193,15 +6193,16 @@ Milling::GetRadiusForStartEndElevation( bool bExtra) const //---------------------------------------------------------------------------- bool -Milling::GetSimplePointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtCorr) const +Milling::GetSimplePointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtRetr) const { // per frese che lavorano di testa if ( m_TParams.m_nType == TT_MILL_STD) { // eseguo verifica in direzione utensile double dToolRad = m_TParams.m_dTDiam / 2 ; + double dToolLen = m_TParams.m_dMaxMat ; double dToolDeltaLen = m_TParams.m_dTLen - m_TParams.m_dLen ; double dTemp ; - if ( ! GetElevation( m_nPhase, ptP - ( dToolDeltaLen + MIN_SAFEDIST) * vtTool, vtTool, dToolRad + MIN_SAFEDIST, vtTool, dTemp)) + if ( ! GetElevation( m_nPhase, ptP - dToolDeltaLen * vtTool, vtTool, dToolRad, dToolLen, MIN_SAFEDIST, vtTool, dTemp)) return false ; return ( dTemp < 10 * EPS_SMALL) ; } @@ -6212,7 +6213,7 @@ Milling::GetSimplePointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, con double dToolThick = ( m_TParams.m_nType == TT_MILL_NOTIP ? m_TParams.m_dMaxMat : m_TParams.m_dThick) ; double dToolDeltaLen = m_TParams.m_dTLen - m_TParams.m_dLen ; double dTemp ; - if ( ! GetElevation( m_nPhase, ptP - ( dToolDeltaLen + MIN_SAFEDIST) * vtTool, vtTool, dToolRad + MIN_SAFEDIST, dToolThick, vtCorr, dTemp)) + if ( ! GetElevation( m_nPhase, ptP - dToolDeltaLen * vtTool, vtTool, dToolRad, dToolThick, MIN_SAFEDIST, vtRetr, dTemp)) return false ; return ( dTemp < 10 * EPS_SMALL) ; } @@ -6220,33 +6221,28 @@ Milling::GetSimplePointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, con //---------------------------------------------------------------------------- bool -Milling::GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, double dSafeZ) const +Milling::GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtRetr, double dElev, double dSafeZ) const { // per frese normali if ( m_TParams.m_nType == TT_MILL_STD) { // determino se la posizione è fuori dal grezzo (considero movimento fresa lungo il suo asse) double dTemp ; - if ( ! GetElevation( m_nPhase, ptP, vtTool, m_TParams.m_dTDiam / 2, vtTool, dTemp)) + double dToolRad = m_TParams.m_dTDiam / 2 ; + double dToolLen = m_TParams.m_dMaxMat ; + if ( ! GetElevation( m_nPhase, ptP, vtTool, dToolRad, dToolLen, MIN_SAFEDIST, vtTool, dTemp)) return false ; - return ( dTemp < 10 * EPS_SMALL || dTemp > dElev + 10 * EPS_SMALL) ; + return ( dTemp < 10 * EPS_SMALL) ; } // per lame e frese che non lavorano di testa else { // determino se la posizione è fuori dal grezzo (considero movimento utensile in +/- Z) double dTemp ; Vector3d vtMove = ( m_bAboveHead ? Z_AX : -Z_AX) ; - Vector3d vtSafe = vtCorr ; vtSafe.z = 0 ; vtSafe.Normalize() ; - Point3d ptQ = ptP - ( vtSafe + vtMove) * max( 0.2 * dSafeZ, MIN_SAFEDIST) ; - double dToolRad = m_TParams.m_dDiam / 2 ; + Vector3d vtSafe = vtRetr ; vtSafe.z = 0 ; vtSafe.Normalize() ; + double dToolRad = m_TParams.m_dTDiam / 2 ; double dToolLen = ( ( m_TParams.m_nType & TF_SAWBLADE) != 0 ? m_TParams.m_dThick : m_TParams.m_dMaxMat) ; bool bOut = true ; - if ( ! GetElevation( m_nPhase, ptQ, vtTool, dToolRad, dToolLen, vtMove, dTemp) || dTemp > 10 * EPS_SMALL) { - bOut = false ; - if ( ! m_bTiltingTab) - return false ; - } - Point3d ptR = ptP + vtTool * dToolLen ; - if ( ! GetElevation( m_nPhase, ptR, vtTool, dToolRad, dToolLen, vtMove, dTemp) || dTemp > 10 * EPS_SMALL) { + if ( ! GetElevation( m_nPhase, ptP, vtTool, dToolRad, dToolLen, MIN_SAFEDIST, vtMove, dTemp) || dTemp > 10 * EPS_SMALL) { bOut = false ; if ( ! m_bTiltingTab) return false ; @@ -6254,9 +6250,7 @@ Milling::GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, const Vec // se tavola basculante (o asse ralla) e non esterno, provo in direzione utensile if ( m_bTiltingTab && ! bOut) { vtMove = vtTool ; - if ( ! GetElevation( m_nPhase, ptQ, vtTool, dToolRad, dToolLen, vtMove, dTemp) || dTemp > 10 * EPS_SMALL) - return false ; - if ( ! GetElevation( m_nPhase, ptR, vtTool, dToolRad, dToolLen, vtMove, dTemp) || dTemp > 10 * EPS_SMALL) + if ( ! GetElevation( m_nPhase, ptP, vtTool, dToolRad, dToolLen, MIN_SAFEDIST, vtMove, dTemp) || dTemp > 10 * EPS_SMALL) return false ; } return true ; diff --git a/Milling.h b/Milling.h index 1a5320c..4383b48 100644 --- a/Milling.h +++ b/Milling.h @@ -124,8 +124,8 @@ class Milling : public Machining bool AddTabsLine( const ICurveLine* pLine, const Vector3d& vtTool, const DBLVECTOR& vdTabs, const TabData& tdTabs) ; bool AddTabsArc( const ICurveArc* pArc, const Vector3d& vtTool, const DBLVECTOR& vdTabs, const TabData& tdTabs) ; double GetRadiusForStartEndElevation( bool bExtra = true) const ; - bool GetSimplePointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtCorr) const ; - bool GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtCorr, double dElev, double dSafeZ) const ; + bool GetSimplePointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtRetr) const ; + bool GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtRetr, double dElev, double dSafeZ) const ; bool GetPointAboveRaw( const Point3d& ptP, const Vector3d& vtTool) const ; bool GetPointBelowRaw( const Point3d& ptP, const Vector3d& vtTool) const ; bool CalcAndSetCorrAuxDir( const ICurveComposite* pCompo, double dU, bool bInvertSide = false, bool bSawSpecial = false) ; diff --git a/Operation.cpp b/Operation.cpp index f9cbbf9..32dbdb7 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -386,19 +386,34 @@ Operation::GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtTool, const Vector3d& vtDir, double& dElev) const { const double STD_TOOL_LEN = 100 ; - return GetElevation( nPhase, ptP, vtTool, dRad, STD_TOOL_LEN, vtDir, dElev) ; + return GetElevation( nPhase, ptP, vtTool, dRad, STD_TOOL_LEN, 0, vtDir, dElev) ; } //---------------------------------------------------------------------------- bool Operation::GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtTool, double dRad, double dLen, const Vector3d& vtDir, double& dElev) const +{ + return GetElevation( nPhase, ptP, vtTool, dRad, dLen, 0, vtDir, dElev) ; +} + +//---------------------------------------------------------------------------- +bool +Operation::GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtTool, double dRad, double dLen, double dSafeDist, + const Vector3d& vtDir, double& dElev) const { // risultato di default dElev = 0 ; // verifico oggetti base if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) return false ; + // aggiustamenti per distanza di sicurezza + Point3d ptQ = ptP ; + if ( dSafeDist > EPS_SMALL) { + ptQ += -vtTool * dSafeDist ; + dRad += dSafeDist ; + dLen += 2 * dSafeDist ; + } // inizializzo elevazioni per ogni grezzo INTDBLVECTOR vRawElev ; // ciclo sui grezzi della fase @@ -414,25 +429,25 @@ Operation::GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtTool, Frame3d frStm ; m_pGeomDB->GetGlobFrame( nStmId, frStm) ; // porto posizione e direzioni in questo riferimento - Point3d ptPL = GetToLoc( ptP, frStm) ; + Point3d ptQL = GetToLoc( ptQ, frStm) ; Vector3d vtToolL = GetToLoc( vtTool, frStm) ; Vector3d vtDirL = GetToLoc( vtDir, frStm) ; // determino quanto allontanarsi PtrOwner pCAvTlStm( CreateCAvToolSurfTm()) ; if ( IsNull( pCAvTlStm)) return false ; - pCAvTlStm->SetStdTool( dLen, dRad, 0) ; + pCAvTlStm->SetStdTool( dLen, dRad, dSafeDist) ; pCAvTlStm->SetSurfTm( *pStm) ; double dDist = 0 ; // non è ammesso un angolo oltre 90deg tra direzione utensile e vettore movimento if ( vtToolL * vtDirL < 0) { // il tip utensile è qui il naso mandrino per Collision Avoid - if ( ! pCAvTlStm->TestPosition( ptPL, -vtToolL, vtDirL, dDist)) + if ( ! pCAvTlStm->TestPosition( ptQL, -vtToolL, vtDirL, dDist)) return false ; } else { // per Collision Avoid il punto di riferimento non è il tip dell'utensile ma il naso mandrino - if ( ! pCAvTlStm->TestPosition( ptPL + dLen * vtToolL, vtToolL, vtDirL, dDist)) + if ( ! pCAvTlStm->TestPosition( ptQL + dLen * vtToolL, vtToolL, vtDirL, dDist)) return false ; } if ( dDist > EPS_SMALL) @@ -449,8 +464,8 @@ Operation::GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtTool, { return a.second < b.second ; }) ; // box dell'utensile nella posizione iniziale BBox3d b3Tool ; - b3Tool.Add( ptP) ; - b3Tool.Add( ptP + dLen * vtTool) ; + b3Tool.Add( ptQ) ; + b3Tool.Add( ptQ + dLen * vtTool) ; if ( vtTool.IsX()) b3Tool.Expand( 0, dRad, dRad) ; else if ( vtTool.IsY()) diff --git a/Operation.h b/Operation.h index fbcd8a6..aab980a 100644 --- a/Operation.h +++ b/Operation.h @@ -98,6 +98,8 @@ class Operation : public IUserObj const Vector3d& vtDir, double& dElev) const ; bool GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtTool, double dRad, double dLen, const Vector3d& vtDir, double& dElev) const ; + bool GetElevation( int nPhase, const Point3d& ptP, const Vector3d& vtTool, double dRad, double dLen, double dSafeDist, + const Vector3d& vtDir, double& dElev) const ; bool GetElevation( int nPhase, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtTool, double dRad, double dLen, const Vector3d& vtDir, double& dElev) const ; bool GetAhPointUnderRaw( const Point3d& ptP, const Vector3d& vtTool, double dToolRad, double dToolRadForElev, diff --git a/WaterJetting.cpp b/WaterJetting.cpp index cfe87f6..5897d74 100644 --- a/WaterJetting.cpp +++ b/WaterJetting.cpp @@ -2718,51 +2718,6 @@ WaterJetting::GetRadiusForStartEndElevation( void) const return ( 0.5 * m_TParams.m_dTDiam + dDeltaRad) ; } -//---------------------------------------------------------------------------- -bool -WaterJetting::GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, double dElev) const -{ - // per frese normali - if ( ( m_TParams.m_nType & TF_SAWBLADE) == 0) { - // determino se l'inizio dell'attacco è fuori dal grezzo (considero movimento fresa lungo il suo asse) - double dTemp ; - if ( ! GetElevation( m_nPhase, ptP, vtTool, 0.5 * m_TParams.m_dDiam, vtTool, dTemp)) - return false ; - return ( dTemp < 10 * EPS_SMALL || dTemp > dElev + 10 * EPS_SMALL) ; - } - // per lame - else { - // determino se l'inizio dell'attacco è fuori dal grezzo (considero movimento lama in Z) - double dTemp ; - if ( ! GetElevation( m_nPhase, ptP, vtTool, 0.5 * m_TParams.m_dDiam, Z_AX, dTemp) || dTemp > 10 * EPS_SMALL) - return false ; - if ( ! GetElevation( m_nPhase, ptP + vtTool * m_TParams.m_dThick, vtTool, 0.5 * m_TParams.m_dDiam, Z_AX, dTemp) || dTemp > 10 * EPS_SMALL) - return false ; - return true ; - } -} - -//---------------------------------------------------------------------------- -bool -WaterJetting::GetPointAboveRaw( const Point3d& ptP) const -{ - // determino la posizione del punto rispetto al grezzo - // ciclo sui grezzi - int nRawId = m_pMchMgr->GetFirstRawPart() ; - while ( nRawId != GDB_ID_NULL) { - // se il grezzo compare nella fase - if ( m_pMchMgr->VerifyRawPartPhase( nRawId, m_nPhase)) { - int nStmId = m_pGeomDB->GetFirstNameInGroup( nRawId, MACH_RAW_SOLID) ; - BBox3d b3Raw ; - m_pGeomDB->GetGlobalBBox( nStmId, b3Raw) ; - if ( ! b3Raw.IsEmpty() && ptP.z < b3Raw.GetMax().z + 10 * EPS_SMALL) - return false ; - } - nRawId = m_pMchMgr->GetNextRawPart( nRawId) ; - } - return true ; -} - //---------------------------------------------------------------------------- bool WaterJetting::SetToolCorrAuxDir( const Vector3d& vtTool, const Vector3d& vtCorr) diff --git a/WaterJetting.h b/WaterJetting.h index 3c8dbeb..f1b610b 100644 --- a/WaterJetting.h +++ b/WaterJetting.h @@ -90,8 +90,6 @@ class WaterJetting : public Machining bool AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d& vtN, bool bSplitArcs, Point3d& ptP1) ; double GetRadiusForStartEndElevation( void) const ; - bool GetPointOutOfRaw( const Point3d& ptP, const Vector3d& vtTool, double dElev) const ; - bool GetPointAboveRaw( const Point3d& ptP) const ; bool SetToolCorrAuxDir( const Vector3d& vtTool, const Vector3d& vtCorr) ; bool CalcAndSetToolCorrAuxDir( const ICurveComposite* pCompo, double dU) ; Vector3d CalcToolDir( const ICurveComposite* pCompo, double dU) ;