From 07f75b39948bff55f1f132651d9cd09f1e84922b Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 27 Jun 2024 12:52:35 +0200 Subject: [PATCH 1/2] EgtMachKernel : - correzione in fresatura e svuotatura di approccio/retrazione rinvio da sotto per ingombro di lato. --- Milling.cpp | 4 ++-- Operation.cpp | 26 +++++++++++++++++++++----- Operation.h | 1 + Pocketing.cpp | 4 ++-- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/Milling.cpp b/Milling.cpp index e553e8f..8166e4d 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -4261,7 +4261,7 @@ Milling::AddApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, if ( m_bAggrBottom) { // distanza dal bordo del pezzo (se negativa il punto è fuori dal grezzo) double dDistBottom ; - if ( ! GetDistanceFromRawSide( m_nPhase, ptP, m_vtAggrBottom, dDistBottom)) + if ( ! GetAggrBottDistanceFromRawSide( m_nPhase, ptP, m_vtAggrBottom, ( m_AggrBottom.dEncH + dSafeZ), dDistBottom)) dDistBottom = 0 ; bBottomStart = ( dDistBottom < - 10 * EPS_SMALL) ; // aggiuntivo in Z @@ -4477,7 +4477,7 @@ Milling::AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ, double dDistBottom ; if ( m_bAggrBottom) { // distanza dal bordo del pezzo (se negativa il punto è fuori dal grezzo) - if ( ! GetDistanceFromRawSide( m_nPhase, ptP, m_vtAggrBottom, dDistBottom)) + if ( ! GetAggrBottDistanceFromRawSide( m_nPhase, ptP, m_vtAggrBottom, ( m_AggrBottom.dEncH + dSafeZ), dDistBottom)) dDistBottom = 0 ; bBottomOutStart = ( dDistBottom < - 10 * EPS_SMALL) ; } diff --git a/Operation.cpp b/Operation.cpp index 6f27d50..ecfce05 100644 --- a/Operation.cpp +++ b/Operation.cpp @@ -671,16 +671,16 @@ Operation::GetDistanceFromRawSide( int nPhase, const Point3d& ptP, const Vector3 const ICurve* pCurve = GetCurve( m_pGeomDB->GetGeoObj( nOutCrvId)) ; if ( pCurve != nullptr) { int nSide ; - double dDist ; + double dCurrDist ; DistPointCurve distPC( ptPL, *pCurve) ; - if ( distPC.GetDist( dDist)) { - if ( dDist < 100 * EPS_SMALL || + if ( distPC.GetDist( dCurrDist)) { + if ( dCurrDist < 100 * EPS_SMALL || (distPC.GetSideAtMinDistPoint( 0, Z_AX, nSide) && nSide != MDS_RIGHT)) { nRawId = nCurrRawId ; break ; } - else if ( dDist < dMinDist) { - dMinDist = dDist ; + else if ( dCurrDist < dMinDist) { + dMinDist = dCurrDist ; nRawId = nCurrRawId ; } } @@ -726,6 +726,22 @@ Operation::GetDistanceFromRawSide( int nPhase, const Point3d& ptP, const Vector3 return true ; } +//---------------------------------------------------------------------------- +bool +Operation::GetAggrBottDistanceFromRawSide( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double dEncSafeH, double& dDist) const +{ + double dDistB1, dDistB2, dDistB3 ; + Vector3d vtOffs = dEncSafeH * GetRotate( vtDir, Z_AX, 90) ; + if ( ! GetDistanceFromRawSide( m_nPhase, ptP, vtDir, dDistB1)) + dDistB1 = 0 ; + if ( ! GetDistanceFromRawSide( m_nPhase, ptP + vtOffs, vtDir, dDistB2)) + dDistB2 = 0 ; + if ( ! GetDistanceFromRawSide( m_nPhase, ptP - vtOffs, vtDir, dDistB3)) + dDistB3 = 0 ; + dDist = max( { dDistB1, dDistB2, dDistB3}) ; + return true ; +} + //---------------------------------------------------------------------------- bool Operation::GetMinDistanceFromRawSide( int nPhase, const Point3d& ptP, double dExpand, diff --git a/Operation.h b/Operation.h index 399e509..f477f21 100644 --- a/Operation.h +++ b/Operation.h @@ -140,6 +140,7 @@ class Operation : public IUserObj bool GetUhPointAboveRaw( const Point3d& ptP, const Vector3d& vtTool, double dToolRad, double dToolRadForElev, double dToolLen, bool bIsSaw, double dSafeZ, const Vector3d& vtDir, double& dElev) const ; bool GetDistanceFromRawSide( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double& dDist) const ; + bool GetAggrBottDistanceFromRawSide( int nPhase, const Point3d& ptP, const Vector3d& vtDir, double dEncSafeH, double& dDist) const ; bool GetMinDistanceFromRawSide( int nPhase, const Point3d& ptP, double dExpand, double& dDist, Vector3d& vtDir) const ; bool GetMinDistanceFromRawSide( int nPhase, const Point3d& ptP, double dExpand, diff --git a/Pocketing.cpp b/Pocketing.cpp index 41246a2..3fe20d5 100644 --- a/Pocketing.cpp +++ b/Pocketing.cpp @@ -5054,7 +5054,7 @@ Pocketing::AddApproach( const Point3d& ptP, const Vector3d& vtTool, double dSafe if ( m_bAggrBottom) { // distanza dal bordo del pezzo (se negativa il punto è fuori dal grezzo) double dDistBottom ; - if ( ! GetDistanceFromRawSide( m_nPhase, ptP, m_vtAggrBottom, dDistBottom)) + if ( ! GetAggrBottDistanceFromRawSide( m_nPhase, ptP, m_vtAggrBottom, ( m_AggrBottom.dEncH + dSafeZ), dDistBottom)) dDistBottom = 0 ; bBottomOutStart = ( dDistBottom < - 10 * EPS_SMALL) ; // aggiuntivo in Z @@ -5177,7 +5177,7 @@ Pocketing::AddRetract( const Point3d& ptP, const Vector3d& vtTool, double dSafeZ double dDistBottom ; if ( m_bAggrBottom) { // distanza dal bordo del pezzo - if ( ! GetDistanceFromRawSide( m_nPhase, ptP, m_vtAggrBottom, dDistBottom)) + if ( ! GetAggrBottDistanceFromRawSide( m_nPhase, ptP, m_vtAggrBottom, ( m_AggrBottom.dEncH + dSafeZ), dDistBottom)) dDistBottom = 0 ; bBottomOutStart = ( dDistBottom < - 10 * EPS_SMALL) ; } From 1badb47d71f9451753f128e12492750ceed3203a Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 29 Jun 2024 18:47:27 +0200 Subject: [PATCH 2/2] EgtMachKernel : - in sgrossatura superfici migliorie e semplificazioni. --- SurfRoughing.cpp | 134 +++++++++++++++++++++-------------------------- SurfRoughing.h | 5 +- 2 files changed, 61 insertions(+), 78 deletions(-) diff --git a/SurfRoughing.cpp b/SurfRoughing.cpp index d7e6278..cef3aa2 100644 --- a/SurfRoughing.cpp +++ b/SurfRoughing.cpp @@ -1221,9 +1221,8 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) } // recupero il grezzo - PtrOwner pStmRaw( CreateSurfTriMesh()) ; - if ( IsNull( pStmRaw) || - ! GetRaw( pStmRaw)) { + PtrOwner pStmRaw( GetRaw()) ; + if ( IsNull( pStmRaw)) { m_pMchMgr->SetLastError( 3025, "Error in SurfRoughing : RawPart not computable") ; return false ; } @@ -1266,42 +1265,43 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) // definisco una struttura per i parametri utili sugli step struct myStepInfo { + myStepInfo( void) + : nInd( -1), nIndRef( -1), dDepth( 0), bSubStep( false), pSfrRemoved( nullptr) {} + myStepInfo( int nI, int nIR, double dD, bool bSS, ISurfFlatRegion* pSR) + : nInd( nI), nIndRef( nIR), dDepth( dD), bSubStep( bSS), pSfrRemoved( pSR) {} ~myStepInfo() { - if ( pSfrRemoved != nullptr) - delete( pSfrRemoved) ; + delete( pSfrRemoved) ; } - double dDepth = 0. ; // profondità posizione piano di svuotatura ( in negativo) - bool bSubStep = false ; // flag per indicare se lo Step è base o intermedio - ISurfFlatRegion* pSfrRemoved = nullptr ; // regione PROGRESSIVA rimossa attuale - int nIdRef = -1 ; // ( usato solo per step intermedi ) indice step precedente + int nInd ; // indice step (0-based) + int nIndRef ; // ( usato solo per step intermedi ) indice step precedente + double dDepth ; // profondità posizione piano di svuotatura ( in negativo) + bool bSubStep ; // flag per indicare se lo Step è base o intermedio + ISurfFlatRegion* pSfrRemoved ; // regione PROGRESSIVA rimossa attuale } ; - vector> vStepInfo ; // ( indice step, myStepInfo ) + vector< myStepInfo> vStepInfo ; // inserisco prima gli step... for ( int i = 0 ; i < nStep ; ++ i) { - myStepInfo currInfo ; - currInfo.dDepth = - ( i + 1) * dStep ; - currInfo.bSubStep = false ; - vStepInfo.emplace_back( make_pair( i, currInfo)) ; + vStepInfo.emplace_back( i, -1, - ( i + 1) * dStep, false, nullptr) ; } // ... e poi gli step intermedi ( se presenti e non coincidenti con gli Step base) int nIndRef = 0 ; // ( step base sottostante allo step intermedio corrente ) // creo un vettore di step intermedi presenti tra lo step base ( nIndRef-1)-esimo e nIndRef-esimo // ( NB. Il primo intervallo sta tra -1 e 0, in quanto lo Step base a filo del grezzo non è presente) - vector> vStepInfo_tmp ; // temporaneo ( vanno ordinati ) + vector< myStepInfo> vStepInfo_tmp ; // temporaneo ( vanno ordinati ) for ( int i = 0 ; i <= nSubStep ; ++ i) { // se SubStep coincidente con lo step, passo al successivo - if ( abs( ( - ( i + 1) * dSubStep) - vStepInfo[nIndRef].second.dDepth) < 10 * EPS_SMALL) + if ( abs( ( - ( i + 1) * dSubStep) - vStepInfo[nIndRef].dDepth) < 10 * EPS_SMALL) continue ; // se SubStep più profondo dello Step base di riferimento... - if ( ( - ( i + 1) * dSubStep) - vStepInfo[nIndRef].second.dDepth < EPS_SMALL) { + if ( ( - ( i + 1) * dSubStep) - vStepInfo[nIndRef].dDepth < EPS_SMALL) { ++ nIndRef ; // il riferimento è lo step base successivo // scorro gli step intermedi temporanei trovati al contrario for ( auto it = vStepInfo_tmp.rbegin() ; it != vStepInfo_tmp.rend() ; ++ it) { // se lo step intermedio non è il precedente allo step base di riferimento if ( it != vStepInfo_tmp.rbegin()) { auto it_prec = it ; - ( it->second).nIdRef = ( -- it_prec)->first ; // il riferimento è lo step intermedio precedente + it->nIndRef = ( -- it_prec)->nInd ; // il riferimento è lo step intermedio precedente // ( NB. tutti gli step intermedi hanno in origine associato lo step base sottostante come step di // riferimento... ad eccezione del primo, i successivi in salita avranno lo step intermedio // precedente come riferimento @@ -1311,11 +1311,7 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) vStepInfo_tmp.clear() ; // pulisco } // aggiunta dello step intermedio al vettore temporaneo - myStepInfo currInfo ; - currInfo.dDepth = - ( i + 1) * dSubStep ; - currInfo.bSubStep = true ; - currInfo.nIdRef = nIndRef ; - vStepInfo_tmp.emplace_back( make_pair( nStep + i, currInfo)) ; + vStepInfo_tmp.emplace_back( nStep + i, nIndRef, - ( i + 1) * dSubStep, true, nullptr) ; } // creo la regione piana di confronto @@ -1331,14 +1327,13 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) m_pMchMgr->SetLastError( 3024, "Error in SurfRoughing : region not computable") ; return false ; } - pSfr->Translate( ( it->second).dDepth * vtTool) ; + pSfr->Translate( it->dDepth * vtTool) ; /* ******************** Regione adattata al grezzo ******************** */ // questa regione bisogna ridurla basandosi sulla geometria del grezzo, in modo da non lavorare // parti in eccesso ; taglio il grezzo sul piano corrente e interseco con questa regione - PtrOwner pSfrRaw( CreateSurfFlatRegion()) ; - if ( IsNull( pSfrRaw) || - ! GetSfrByStmIntersection( IPPStm, ( it->second).dDepth, pSfrRaw)) { + PtrOwner pSfrRaw( GetSfrByStmIntersection( IPPStm, it->dDepth, 0)) ; + if ( IsNull( pSfrRaw)) { m_pMchMgr->SetLastError( 3027, "Error in SurfRoughing : Slicing Raw failed") ; return false ; } @@ -1351,7 +1346,7 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) /* *************************** Silhouette **************************** */ // determino la regione da non lavorare e la sottraggo POLYLINEVECTOR vPL ; - if ( ! pCavParSilh->GetSilhouette( ( it->second).dDepth - GetOffsL(), vPL)) { + if ( ! pCavParSilh->GetSilhouette( it->dDepth - GetOffsL(), vPL)) { m_pMchMgr->SetLastError( 3024, "Error in SurfRoughing : region not computable") ; return false ; } @@ -1360,12 +1355,11 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) SurfFlatRegionByContours SfrMaker ; for ( auto& PL : vPL) { // recupero la curva dalla silhouette - PolyArc PA ; PtrOwner pSilCrv( CreateCurveComposite()) ; if ( IsNull( pSilCrv)) return false ; pSilCrv->FromPolyLine( PL) ; - if ( ! SfrMaker.AddCurve( pSilCrv->Clone())) { + if ( ! SfrMaker.AddCurve( Release( pSilCrv))) { m_pMchMgr->SetLastError( 3024, "Error in SurfRoughing : region not computable") ; return false ; } @@ -1379,7 +1373,8 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) continue ; // passo allo step successivo ( la silhouette coincide con il grezzo ) // salvo la superficie rimossa - ( it->second).pSfrRemoved = pSfr->Clone() ; + delete ( it->pSfrRemoved) ; + it->pSfrRemoved = pSfr->Clone() ; // inizializzo Regione piana per gestione lati aperti PtrOwner pSfrOpenClose( CloneSurfFlatRegion( pSfrRaw)) ; @@ -1387,18 +1382,18 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) return false ; /* *************************** Gestione SubSteps **************************** */ - if ( ( it->second).bSubStep) { + if ( it->bSubStep) { // recupero l'indice nel vettore dello step di riferimento int nIndRef = 0 ; for ( auto j = vStepInfo.begin() ; j != vStepInfo.end() ; ++ j) { - if ( j->first == ( it->second).nIdRef) + if ( j->nInd == it->nIndRef) break ; ++ nIndRef ; } // piccolo Offset di correzione per booleane SurfFlatRegion double dOffsCor = 25. * EPS_SMALL ; // recupero la superficie progressiva dello step di riferimento - auto& pSfrRef = vStepInfo[nIndRef].second.pSfrRemoved ; + const auto& pSfrRef = vStepInfo[nIndRef].pSfrRemoved ; if ( pSfrRef != nullptr && pSfrRef->IsValid()) { // se valida pSfrRef->Offset( dOffsCor, ICurve::OFF_FILLET) ; // correzione pSfr->Subtract( *pSfrRef) ; // sottraggo la regione svuotata in precedenza @@ -1411,7 +1406,7 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) if ( pSfr->IsValid() && pSfr->GetChunkCount() > 0) { // se si tratta di un SottoStep, rimuovo tutti i chunk troppo snelli - if ( ( it->second).bSubStep) { + if ( it->bSubStep) { if ( ! RemoveChunksUnderTolerance( pSfr)) { m_pMchMgr->SetLastError( 3029, "Error in SurfRoughing : Simplify Chunks for SubSteps failed") ; return false ; @@ -1428,7 +1423,7 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) } // se si tratta di un SottoStep, chiudo tutti i lati aperti troppo corti - if ( ( it->second).bSubStep) { + if ( it->bSubStep) { if ( ! CloseOpenEdgesUnderTolerance( pSfr, m_TParams.m_dDiam - 200 * EPS_SMALL)) { m_pMchMgr->SetLastError( 3029, "Error in SurfRoughing : Simplify Chunks for SubSteps failed") ; return false ; @@ -1437,10 +1432,10 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) // salvo nella temp Prop della FlatRegion se si tratta di uno step base o intermedio // Step Base -> 0 | Step intermedio -> 1 - pSfr->SetTempProp( ( it->second).bSubStep ? 1 : 0, 0) ; + pSfr->SetTempProp( it->bSubStep ? 1 : 0, 0) ; // salvo nel temp Param della FlatRegion la sua Depth di traslazione - pSfr->SetTempParam( ( it->second).dDepth, 0) ; + pSfr->SetTempParam( it->dDepth, 0) ; // la salvo nel gruppo temporaneo int nNew_SfrPock_Id = m_pGeomDB->AddGeoObj( GDB_ID_NULL, nTempId, Release( pSfr)) ; @@ -1489,13 +1484,17 @@ SurfRoughing::ProcessPath( int nPathId, int nTempId, int nPvId, int nClId) } //---------------------------------------------------------------------------- -bool -SurfRoughing::GetRaw( ISurfTriMesh* pStmRaw) const +ISurfTriMesh* +SurfRoughing::GetRaw( void) const { + // controllo MachManager e database geometrico + if ( m_pMchMgr == nullptr || m_pGeomDB == nullptr) + return nullptr ; - // controllo parametri, MachManager e database geometrico - if ( pStmRaw == nullptr || m_pMchMgr == nullptr || m_pGeomDB == nullptr) - return false ; + // creo Stm del grezzo + PtrOwner pStmRaw( CreateSurfTriMesh()) ; + if ( IsNull( pStmRaw)) + return nullptr ; pStmRaw->AdjustTopology() ; // Id prima RawPart @@ -1507,50 +1506,39 @@ SurfRoughing::GetRaw( ISurfTriMesh* pStmRaw) const // 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) ; - if ( pGObj == nullptr) - return false ; // controllo che sia una Trimesh if ( pGObj->GetType() == SRF_TRIMESH) { - // Trimesh della parte p-esima - PtrOwner pStmRawPart( CloneSurfTriMesh( pGObj)) ; - if ( IsNull( pStmRawPart)) - return false ; - // porto la trimesh in globale - pStmRawPart->LocToLoc( frRaw, GLOB_FRM) ; + SurfLocal StmRawPart( GetSurfTriMesh( pGObj), frRaw, GLOB_FRM) ; // lo aggiungo alla Trimesh complessiva - pStmRaw->Add( *pStmRawPart) ; + pStmRaw->Add( *GetSurfTriMesh( StmRawPart)) ; } } // passo al grezzo successivo nRawId = m_pMchMgr->GetNextRawPart( nRawId) ; } - return ( pStmRaw->IsValid() && pStmRaw->GetTriangleCount() > 0) ; + return ( ( pStmRaw->IsValid() && pStmRaw->GetTriangleCount() > 0) ? Release( pStmRaw) : nullptr) ; } //---------------------------------------------------------------------------- -bool -SurfRoughing::GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, double dDist, ISurfFlatRegion* pSfrInt, - double dSmallOffs) const +ISurfFlatRegion* +SurfRoughing::GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, double dDist, double dSmallOffs) const { - // controllo dei parametri - if ( pSfrInt == nullptr) - return false ; - pSfrInt->Clear() ; - // interseco la superficie alla quota corrente PNTVECTOR vPnt ; BIPNTVECTOR vBpt ; TRIA3DVECTOR vTria ; if ( ! IPPStm.GetInters( dDist, vPnt, vBpt, vTria)) - return false ; + return nullptr ; // se non c'è intersezione if ( vBpt.empty()) - return true ; + return CreateSurfFlatRegion() ; // definisco la tolleranza per i concatenamenti double dToler = EPS_SMALL ; @@ -1565,7 +1553,7 @@ SurfRoughing::GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, doub Vector3d vtDir = vBpt[i].second - vBpt[i].first ; vtDir.Normalize() ; if ( ! chainC.AddCurve( i + 1, vBpt[i].first, vtDir, vBpt[i].second, vtDir)) - return false ; + return nullptr ; } // recupero i percorsi concatenati Point3d ptNear = ( vBpt.empty() ? ORIG : vBpt[0].first) ; @@ -1574,14 +1562,14 @@ SurfRoughing::GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, doub // creo una curva composita PtrOwner pCrvCompo( CreateCurveComposite()) ; if ( IsNull( pCrvCompo)) - return false ; + return nullptr ; // recupero gli estremi dei segmenti, creo le linee e le inserisco nella composita bool bAdded = true ; for ( int i = 0 ; i < int( vId.size()) ; ++ i) { // creo un segmento di retta PtrOwner pLine( CreateCurveLine()) ; if ( IsNull( pLine)) - return false ; + return nullptr ; // recupero gli estremi ( non vanno mai invertiti per opzione di concatenamento) int nInd = abs( vId[i]) - 1 ; Point3d ptStart = ( bAdded ? vBpt[nInd].first : ptNear) ; @@ -1614,10 +1602,7 @@ SurfRoughing::GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, doub // recupero la regione da restituire PtrOwner pSfrFromCrvs( SfrByC.GetSurf()) ; - if ( IsNull( pSfrFromCrvs) || ! pSfrFromCrvs->IsValid()) - return false ; - - return ( pSfrInt->CopyFrom( pSfrFromCrvs)) ; + return ( ( ! IsNull( pSfrFromCrvs) && pSfrFromCrvs->IsValid()) ? Release( pSfrFromCrvs) : nullptr) ; } //---------------------------------------------------------------------------- @@ -2240,15 +2225,15 @@ SurfRoughing::SimplifyCurve( ICurveComposite* pCompo) const PolyArc PA ; Point3d ptNewStart, ptNewEnd ; - // merge per uniformità + // merge per uniformità if ( pCompoCL->MergeCurves( 200 * EPS_SMALL, 200 * EPS_ANG_SMALL) && - // rimozione Spikes o Curve Z + // rimozione Spikes o Curve Z pCompoCL->RemoveSmallDefects( 150 * EPS_SMALL, 2 * ANG_TOL_STD_DEG, true) && - // interpolazione mediante linee ed archi + // interpolazione mediante linee ed archi pCompoCL->ApproxWithArcsEx( 150 * EPS_SMALL, ANG_TOL_STD_DEG, LIN_FEA_STD, PA) && pCompoCL->Clear() && pCompoCL->FromPolyArc( PA) && - // controllo aggiuntivo sui punti iniziali e finali che siano gli stessi + // controllo aggiuntivo sui punti iniziali e finali che siano gli stessi pCompoCL->GetStartPoint( ptNewStart) && pCompoCL->GetEndPoint( ptNewEnd) && AreSamePointApprox( ptNewStart, ptStart) && @@ -2258,7 +2243,6 @@ SurfRoughing::SimplifyCurve( ICurveComposite* pCompo) const } return true ; - } //---------------------------------------------------------------------------- diff --git a/SurfRoughing.h b/SurfRoughing.h index 9617ab3..f77f61d 100644 --- a/SurfRoughing.h +++ b/SurfRoughing.h @@ -89,9 +89,8 @@ class SurfRoughing : public Machining bool AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d& vtN, const ICurveComposite* pRCrv, bool bSplitArcs, bool bNoneForced, Point3d& ptP1, double& dElev) ; - bool GetRaw( ISurfTriMesh* pStmRaw) const ; - bool GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, double dDist, ISurfFlatRegion* pSfrInt, - double dSmallOffs = 0.) const ; + ISurfTriMesh* GetRaw( void) const ; + ISurfFlatRegion* GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, double dDist, double dSmallOffs = 0) const ; bool GetActiveSurfaces( INTVECTOR& vSurfId) const ; double GetRightFeed( const Vector3d& vtMove, const Vector3d& vtTool) const ; double GetRadiusForStartEndElevation( void) const ;