EgtMachKernel :
- corrette svuotature di cerchi su piani diversi da XY - aggiunti a svuotature attacchi a scivolo (GLIDE) - aggiunti suggerimenti - gestito in simulatore mask assi in movimenti in rapido - corretta in simulatore visualizzazione tipo movimento.
This commit is contained in:
+25
-5
@@ -881,8 +881,25 @@ Milling::GetCurve( SelData Id)
|
||||
bool
|
||||
Milling::AdjustCurveFromSurf( ICurveComposite* pCrvCompo)
|
||||
{
|
||||
// con utensile fresa fa il contorno
|
||||
// tipo di utilizzo contorno superficie
|
||||
enum { SURF_CONT = 0, SURF_TOP = 1, SURF_BOTTOM = 2} ;
|
||||
int nSurf ;
|
||||
// se fresa, lo recupero dalle note utente
|
||||
if ( ( m_TParams.m_nType & TF_SAWBLADE) == 0) {
|
||||
string sSurf = ExtractSurf( m_Params.m_sUserNotes) ;
|
||||
if ( sSurf == "C")
|
||||
nSurf = SURF_CONT ;
|
||||
else if ( sSurf == "T")
|
||||
nSurf = SURF_TOP ;
|
||||
else
|
||||
nSurf = SURF_BOTTOM ;
|
||||
}
|
||||
// altrimenti lama, sempre bottom
|
||||
else
|
||||
nSurf = SURF_BOTTOM ;
|
||||
|
||||
// se richiesto contorno
|
||||
if ( nSurf == SURF_CONT) {
|
||||
// cerco l'estremo più alto e lo imposto come inizio
|
||||
double dU = 0 ;
|
||||
double dUmax = 0 ;
|
||||
@@ -898,19 +915,21 @@ Milling::AdjustCurveFromSurf( ICurveComposite* pCrvCompo)
|
||||
if ( dU != 0)
|
||||
pCrvCompo->ChangeStartPoint( dUmax) ;
|
||||
}
|
||||
// con utensile lama tiene solo la parte sotto
|
||||
// altrimenti
|
||||
else {
|
||||
// ingombro
|
||||
BBox3d b3Box ;
|
||||
pCrvCompo->GetLocalBBox( b3Box) ;
|
||||
double dZmin = b3Box.GetMin().z ;
|
||||
double dZtol = min( ( b3Box.GetMax().z - b3Box.GetMin().z) / 2., 20.) ;
|
||||
double dZmax = b3Box.GetMax().z ;
|
||||
double dZtol = min( ( dZmax - dZmin) / 4., 20.) ;
|
||||
// elimino le linee troppo sopra il minimo dall'inizio e poi dalla fine
|
||||
const ICurve* pCrv = pCrvCompo->GetFirstCurve() ;
|
||||
while ( pCrv != nullptr) {
|
||||
Point3d ptMid ; pCrv->GetMidPoint( ptMid) ;
|
||||
Vector3d vtDir ; pCrv->GetMidDir( vtDir) ;
|
||||
if ( ptMid.z > dZmin + dZtol) {
|
||||
if ( ( nSurf == SURF_BOTTOM && ptMid.z > dZmin + dZtol) ||
|
||||
( nSurf == SURF_TOP && ptMid.z < dZmax - dZtol)) {
|
||||
ICurve* pErase = pCrvCompo->RemoveFirstOrLastCurve( false) ;
|
||||
delete( pErase) ;
|
||||
pCrv = pCrvCompo->GetFirstCurve() ;
|
||||
@@ -922,7 +941,8 @@ Milling::AdjustCurveFromSurf( ICurveComposite* pCrvCompo)
|
||||
while ( pCrv != nullptr) {
|
||||
Point3d ptMid ; pCrv->GetMidPoint( ptMid) ;
|
||||
Vector3d vtDir ; pCrv->GetMidDir( vtDir) ;
|
||||
if ( ptMid.z > dZmin + dZtol) {
|
||||
if ( ( nSurf == SURF_BOTTOM && ptMid.z > dZmin + dZtol) ||
|
||||
( nSurf == SURF_TOP && ptMid.z < dZmax - dZtol)) {
|
||||
ICurve* pErase = pCrvCompo->RemoveFirstOrLastCurve( true) ;
|
||||
delete( pErase) ;
|
||||
pCrv = pCrvCompo->GetLastCurve() ;
|
||||
|
||||
Reference in New Issue
Block a user