diff --git a/CurveComposite.cpp b/CurveComposite.cpp index 8ab5d9d..b3342a5 100644 --- a/CurveComposite.cpp +++ b/CurveComposite.cpp @@ -1596,6 +1596,8 @@ CurveComposite::AddArcTg( const Point3d& ptNew, bool bEndOrStart) // verifico lo stato if ( m_nStatus != OK) return false ; + // recupero il versore normale al piano ( estrusione oppure se nulla asse Z locale) + Vector3d vtN = ( m_VtExtr.IsSmall() ? Z_AX : m_VtExtr) ; // costruisco l'arco (in casi articolari puņ essere una linea) PtrOwner pCrv ; // se da aggiungere alla fine @@ -1604,7 +1606,7 @@ CurveComposite::AddArcTg( const Point3d& ptNew, bool bEndOrStart) GetEndPoint( ptEnd) ; Vector3d vtDir ; GetEndDir( vtDir) ; - pCrv.Set( GetArc2PVN( ptEnd, ptNew, vtDir, Z_AX)) ; + pCrv.Set( GetArc2PVN( ptEnd, ptNew, vtDir, vtN)) ; if ( IsNull( pCrv)) return false ; } @@ -1614,7 +1616,7 @@ CurveComposite::AddArcTg( const Point3d& ptNew, bool bEndOrStart) GetStartPoint( ptStart) ; Vector3d vtDir ; GetStartDir( vtDir) ; - pCrv.Set( GetArc2PVN( ptStart, ptNew, vtDir, Z_AX)) ; + pCrv.Set( GetArc2PVN( ptStart, ptNew, vtDir, vtN)) ; if ( IsNull( pCrv)) return false ; pCrv->Invert() ;