From a1da4ef2d961638dea6179e3da892df0ec8e8d22 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 17 Mar 2017 08:26:47 +0000 Subject: [PATCH] EgtGeomKernel : - correzione a CurveComposite::AddArcTg per gestire piano archi. --- CurveComposite.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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() ;