diff --git a/Milling.cpp b/Milling.cpp index 612e191..a3798aa 100644 --- a/Milling.cpp +++ b/Milling.cpp @@ -7051,13 +7051,12 @@ Milling::CalcOffset( ICurveComposite* pCompo, double dSignOffs) const // se curva piatta con estrusione non perpendicolare forzo offset avanzato bool bAdvOffs = ( bIsFlat && abs( vtExtr * plPlane.GetVersN()) < cos( 0.1 * DEGTORAD)) ; // eseguo offset semplice - if ( ! bAdvOffs) { - pCompo->SimpleOffset( dSignOffs, nFlag) ; - if ( m_bToolComp) { - int nSign = ( dSignOffs > 0.) - ( dSignOffs < 0.) ; - pCompo->SimpleOffset( - nSign * GetToolCompMinRadOffset()) ; - pCompo->SimpleOffset( nSign * GetToolCompMinRadOffset()) ; - } + if ( ! m_bToolComp && ! bAdvOffs && pCompo->SimpleOffset( dSignOffs, nFlag)) + return true ; + if ( m_bToolComp) { + int nSign = ( dSignOffs > 0.) - ( dSignOffs < 0.) ; + pCompo->SimpleOffset( - nSign * GetToolCompMinRadOffset()) ; + pCompo->SimpleOffset( nSign * GetToolCompMinRadOffset()) ; return true ; } // eseguo offset avanzato