EgtGeomKernel :

- ridotte tolleranze su tangenza in intersezione archi.
This commit is contained in:
Dario Sassi
2024-07-17 09:00:33 +02:00
parent 8d1d3f766a
commit 66cec4a872
+8 -5
View File
@@ -17,6 +17,9 @@
using namespace std ;
//----------------------------------------------------------------------------
static const double EPS_INTER_ARC = 0.1 * EPS_SMALL ;
//----------------------------------------------------------------------------
IntersArcArc::IntersArcArc( const CurveArc& Arc1, const CurveArc& Arc2)
{
@@ -60,15 +63,15 @@ IntersArcArc::IntersArcArc( const CurveArc& Arc1, const CurveArc& Arc2)
vtDir /= dDist ;
// cerchi esterni -> nessuna intersezione
if ( dDist > m_Arc1.GetRadius() + m_Arc2.GetRadius() + EPS_SMALL)
if ( dDist > m_Arc1.GetRadius() + m_Arc2.GetRadius() + EPS_INTER_ARC)
return ;
// cerchi interni -> nessuna intersezione
if ( dDist < abs( m_Arc1.GetRadius() - m_Arc2.GetRadius()) - EPS_SMALL)
if ( dDist < abs( m_Arc1.GetRadius() - m_Arc2.GetRadius()) - EPS_INTER_ARC)
return ;
// cerchi coincidenti -> sovrapposizioni e/o intersezioni agli estremi
if ( dDist < EPS_SMALL && abs( m_Arc1.GetRadius() - m_Arc2.GetRadius()) < EPS_SMALL) {
if ( dDist < EPS_SMALL && abs( m_Arc1.GetRadius() - m_Arc2.GetRadius()) < EPS_INTER_ARC) {
// coefficiente da parametro dell'arco 1 a lunghezza
double dU2L = abs( m_Arc1.GetAngCenter()) * DEGTORAD * m_Arc1.GetRadius() ;
// determino se sono equiversi o controversi
@@ -236,7 +239,7 @@ IntersArcArc::IntersArcArc( const CurveArc& Arc1, const CurveArc& Arc2)
double dSqH = m_Arc1.GetRadius() * m_Arc1.GetRadius() - dA * dA ;
// cerchi tangenti esterni -> una intersezione
if ( abs( dDist - ( m_Arc1.GetRadius() + m_Arc2.GetRadius())) < EPS_SMALL) {
if ( abs( dDist - ( m_Arc1.GetRadius() + m_Arc2.GetRadius())) < EPS_INTER_ARC) {
// tolleranza tangenziale sull'intersezione
double dTgTol = ( dSqH > SQ_EPS_SMALL ? sqrt( dSqH) : EPS_SMALL) ;
// calcolo il punto di intersezione
@@ -358,7 +361,7 @@ IntersArcArc::IntersArcArc( const CurveArc& Arc1, const CurveArc& Arc2)
}
// cerchi tangenti interni -> una intersezione
if ( abs( dDist - abs( m_Arc1.GetRadius() - m_Arc2.GetRadius())) < EPS_SMALL) {
if ( abs( dDist - abs( m_Arc1.GetRadius() - m_Arc2.GetRadius())) < EPS_INTER_ARC) {
// tolleranza tangenziale sull'intersezione
double dTgTol = ( dSqH > SQ_EPS_SMALL ? sqrt( dSqH) : EPS_SMALL) ;
// determino quale dei due contiene l'altro