EgtGeomKernel :

- correzione a CurveComposite::AddArcTg per gestire piano archi.
This commit is contained in:
Dario Sassi
2017-03-17 08:26:47 +00:00
parent 3204288e31
commit a1da4ef2d9
+4 -2
View File
@@ -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<ICurve> 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() ;