EgtMachKernel :

- in sgrossatura superfici aggiunto controllo massimo arco al centro archi (come nelle altre lavorazioni)
- in sgrossatura superfici semplificata impostazione lati aperti di regioni grazie a nuove funzioni.
This commit is contained in:
Dario Sassi
2024-06-13 08:02:38 +02:00
parent 9e5dbcf5fb
commit 3d46b4b41b
+6 -21
View File
@@ -1531,6 +1531,9 @@ SurfRoughing::AddPocket( const INTVECTOR& vPocket, const Vector3d& vtTool, const
if ( ! CalcPocketing( pSfr, m_TParams.m_dDiam / 2, GetOffsR(), m_Params.m_dSideStep, m_Params.m_dSideAngle,
m_Params.m_nSubType, true, vpCrvs))
return false ;
// sistemo gli archi per massimo angolo al centro
for ( int i = 0 ; i < int( vpCrvs.size()) ; ++ i)
VerifyArcs( vpCrvs[i]) ;
// salvo i loop esterni della superficie corrente come Polylinee ( per LeadIn/LeadOut)
ICURVEPOVECTOR vLoops ; vLoops.resize( pSfr->GetChunkCount()) ;
@@ -2046,10 +2049,6 @@ SurfRoughing::ChooseCloseOrOpenEdge( ISurfFlatRegion* pSfr, const ISurfTriMesh*
// " IL LATO E' APERTO <=> TUTTI I PUNTI DI CONTROLLO DISTANO MENO DI 50 * EPS_SMALL DALLE FACCE ( bOnIsClosed = F)
const int NUM_POINTS = 4 ;
PtrOwner<ISurfFlatRegion> pSfrWithTmpProps( CreateSurfFlatRegion()) ;
if ( IsNull( pSfrWithTmpProps))
return false ;
// scorro tutti i loop
for ( int c = 0 ; c < pSfr->GetChunkCount() ; ++ c) {
for ( int l = 0 ; l < pSfr->GetLoopCount( c) ; ++ l) {
@@ -2080,27 +2079,13 @@ SurfRoughing::ChooseCloseOrOpenEdge( ISurfFlatRegion* pSfr, const ISurfTriMesh*
double dDist = 0. ;
bIsOn = distPtStm.GetDist( dDist) && dDist < 50 * EPS_SMALL ;
}
if (( bIsOn && ! bOnIsClosed) || ( ! bIsOn && bOnIsClosed))
pCrvCompoLoop->SetCurveTempProp( u, 1, 0) ;
if ( ( bIsOn && ! bOnIsClosed) || ( ! bIsOn && bOnIsClosed))
pSfr->SetCurveTempProp( c, l, u, 1, 0) ;
}
// aggiungo il Loop con Flag di lato Aperto/Chiuso alla superficie
if ( l == 0) {
if ( ! pSfrWithTmpProps->AddExtLoop( *pCrvCompoLoop))
return false ;
}
else
if ( ! pSfrWithTmpProps->AddIntLoop( *pCrvCompoLoop))
return false ;
}
}
// sostituisco la superficie da restituire
if ( ! pSfrWithTmpProps->IsValid() ||
! pSfr->Clear() ||
! pSfr->CopyFrom( pSfrWithTmpProps))
return false ;
return ( pSfr->IsValid() && pSfr->GetChunkCount() != 0) ;
return true ;
}