EgtMachKernel :
- in Finiture aggiunta costante di approssimazione LIN_TOL_FINE.
This commit is contained in:
@@ -21,6 +21,7 @@ const double MIN_SAFEDIST = 5.0 ;
|
||||
|
||||
//----------- Costanti per approssimazioni con polilinee o poliarchi --------
|
||||
const double LIN_TOL_STD = 0.1 ;
|
||||
const double LIN_TOL_FINE = 0.01 ;
|
||||
const double LIN_TOL_MID = 0.05 ;
|
||||
const double LIN_TOL_RAW = 0.5 ;
|
||||
const double ANG_TOL_STD_DEG = 15 ;
|
||||
|
||||
+22
-3
@@ -2605,7 +2605,7 @@ SurfFinishing::CorrectPathByCollision( ICAvToolSurfTm* pCAvTlStm, const Frame3d&
|
||||
continue ;
|
||||
// approssimo la curva con una polilinea
|
||||
PolyLine PL ;
|
||||
if ( ! vpCrvs[i]->ApproxWithLines( LIN_TOL_STD, ANG_TOL_STD_DEG, ICurve::APL_SPECIAL, PL))
|
||||
if ( ! vpCrvs[i]->ApproxWithLines( min( LIN_TOL_FINE, m_Params.m_dApprox), ANG_TOL_STD_DEG, ICurve::APL_SPECIAL, PL))
|
||||
return false ;
|
||||
// eventuale aggiunta di punti per garantire max distanza
|
||||
if ( ! PL.AdjustForMaxSegmentLen( dDist))
|
||||
@@ -5789,6 +5789,12 @@ SurfFinishing::CalcOptimalZigZagCurves( ISURFFRPOVECTOR& vSfrZigZagProj, const F
|
||||
#if ENABLE_OPTIMAL_DEBUG
|
||||
int nGrp = m_pGeomDB->AddGroup( GDB_ID_NULL, GDB_ID_ROOT, GLOB_FRM) ;
|
||||
m_pGeomDB->SetName( nGrp, "ZigZag") ;
|
||||
int nLayPock = m_pGeomDB->AddGroup( GDB_ID_NULL, nGrp, GLOB_FRM) ;
|
||||
m_pGeomDB->SetName( nLayPock, "Pocket") ;
|
||||
m_pGeomDB->SetStatus( nLayPock, GDB_ST_OFF) ;
|
||||
int nLayPockApprox = m_pGeomDB->AddGroup( GDB_ID_NULL, nGrp, GLOB_FRM) ;
|
||||
m_pGeomDB->SetName( nLayPockApprox, "PocketApprox") ;
|
||||
m_pGeomDB->SetStatus( nLayPockApprox, GDB_ST_OFF) ;
|
||||
int nLayCrv = m_pGeomDB->AddGroup( GDB_ID_NULL, nGrp, GLOB_FRM) ;
|
||||
m_pGeomDB->SetName( nLayCrv, "Curves") ;
|
||||
m_pGeomDB->SetStatus( nLayCrv, GDB_ST_OFF) ;
|
||||
@@ -5833,8 +5839,15 @@ SurfFinishing::CalcOptimalZigZagCurves( ISURFFRPOVECTOR& vSfrZigZagProj, const F
|
||||
return false ;
|
||||
}
|
||||
// memorizzo le curve ricavate
|
||||
for ( int i = 0 ; i < ssize( vpCrvs) ; ++ i)
|
||||
for ( int i = 0 ; i < ssize( vpCrvs) ; ++ i) {
|
||||
#if ENABLE_OPTIMAL_DEBUG
|
||||
PtrOwner<ICurveComposite> pCompoCL( CloneCurveComposite( vpCrvs[i])) ;
|
||||
pCompoCL->ToLoc( frSurf) ;
|
||||
int nCrvId = m_pGeomDB->AddGeoObj( GDB_ID_NULL, nLayPock, ::Release( pCompoCL)) ;
|
||||
m_pGeomDB->SetMaterial( nCrvId, YELLOW) ;
|
||||
#endif
|
||||
vCrvCompoZigZag.emplace_back( Release( vpCrvs[i])) ;
|
||||
}
|
||||
}
|
||||
|
||||
// porto i dati geometrici in locale alle superfici ( proeittando)
|
||||
@@ -5853,11 +5866,17 @@ SurfFinishing::CalcOptimalZigZagCurves( ISURFFRPOVECTOR& vSfrZigZagProj, const F
|
||||
if ( pCAvTlStm != nullptr) {
|
||||
// approssimo la curva con una polilinea
|
||||
PolyLine PL ;
|
||||
if ( ! vCrvCompoZigZag[i]->ApproxWithLines( LIN_TOL_STD, ANG_TOL_STD_DEG, ICurve::APL_SPECIAL, PL) ||
|
||||
if ( ! vCrvCompoZigZag[i]->ApproxWithLines( min( LIN_TOL_FINE, m_Params.m_dApprox), ANG_TOL_STD_DEG, ICurve::APL_SPECIAL, PL) ||
|
||||
! PL.AdjustForMaxSegmentLen( dDist))
|
||||
return false ;
|
||||
// porto nel riferimento delle superfici
|
||||
PL.ToLoc( frSurf) ;
|
||||
#if ENABLE_OPTIMAL_DEBUG
|
||||
PtrOwner<ICurveComposite> pCompoPL( CreateCurveComposite()) ;
|
||||
pCompoPL->FromPolyLine( PL) ;
|
||||
int nPLId = m_pGeomDB->AddGeoObj( GDB_ID_NULL, nLayPockApprox, ::Release( pCompoPL)) ;
|
||||
m_pGeomDB->SetMaterial( nPLId, ORANGE) ;
|
||||
#endif
|
||||
// traslo della lunghezza utensile diminuita dell'affondamento
|
||||
PL.Translate( vtToolL * ( m_TParams.m_dLen - dDepth)) ;
|
||||
// eseguo CAv
|
||||
|
||||
Reference in New Issue
Block a user