EgtGeomKernel 2.1g4 :
- correzione a intersezione retta-arco quasi tg (molto importante).
This commit is contained in:
+8
-7
@@ -33,25 +33,26 @@ IntersArcArc::IntersArcArc( const CurveArc& Arc1, const CurveArc& Arc2)
|
||||
if ( abs( Arc1.GetAngCenter()) > ANG_FULL + EPS_ANG_ZERO ||
|
||||
abs( Arc2.GetAngCenter()) > ANG_FULL + EPS_ANG_ZERO)
|
||||
return ;
|
||||
// ne faccio una copia
|
||||
m_Arc1.CopyFrom( &Arc1) ;
|
||||
m_Arc2.CopyFrom( &Arc2) ;
|
||||
// gli archi devono avere il piano coincidente con XY
|
||||
if ( ! m_Arc1.GetNormVersor().IsZplus() && ! m_Arc1.GetNormVersor().IsZminus())
|
||||
if ( ! Arc1.GetNormVersor().IsZplus() && ! Arc1.GetNormVersor().IsZminus())
|
||||
return ;
|
||||
if ( ! m_Arc2.GetNormVersor().IsZplus() && ! m_Arc2.GetNormVersor().IsZminus())
|
||||
if ( ! Arc2.GetNormVersor().IsZplus() && ! Arc2.GetNormVersor().IsZminus())
|
||||
return ;
|
||||
|
||||
// verifico sovrapposizione box
|
||||
BBox3d boxArc1 ;
|
||||
if ( ! m_Arc1.GetLocalBBox( boxArc1))
|
||||
if ( ! Arc1.GetLocalBBox( boxArc1))
|
||||
return ;
|
||||
BBox3d boxArc2 ;
|
||||
if ( ! m_Arc2.GetLocalBBox( boxArc2))
|
||||
if ( ! Arc2.GetLocalBBox( boxArc2))
|
||||
return ;
|
||||
if ( ! boxArc1.OverlapsXY( boxArc2))
|
||||
return ;
|
||||
|
||||
// ne faccio una copia
|
||||
m_Arc1.CopyFrom( &Arc1) ;
|
||||
m_Arc2.CopyFrom( &Arc2) ;
|
||||
|
||||
// versore e distanza tra i centri
|
||||
Vector3d vtDir = ( m_Arc2.GetCenter() - m_Arc1.GetCenter()) ;
|
||||
vtDir.z = 0 ;
|
||||
|
||||
Reference in New Issue
Block a user