EgtGeomKernel 1.6f4 :

- ApproxWithLines di curve con nuove opzioni
- semplificata CurveComposite
- completate IntersLineTria e IntersLineSurfTm
- aggiunta MakeConvex a PolyLine.
This commit is contained in:
Dario Sassi
2015-06-30 14:04:02 +00:00
parent 82195db8cc
commit b8bf9b2f21
10 changed files with 310 additions and 209 deletions
+10 -3
View File
@@ -1012,10 +1012,11 @@ CurveArc::ApproxWithLines( double dLinTol, double dAngTolDeg, int nType, PolyLin
return false ;
// determino se approssimazione interna o esterna
bool bCCW = ( (( m_VtExtr * m_VtN) > - EPS_ZERO) ? ( m_dAngCenDeg > 0) : ( m_dAngCenDeg < 0)) ;
Vector3d vtExtr = ( m_VtExtr.IsSmall() ? Z_AX : m_VtExtr) ;
bool bCCW = ( (( vtExtr * m_VtN) > - EPS_ZERO) ? ( m_dAngCenDeg > 0) : ( m_dAngCenDeg < 0)) ;
bool bInside = true ;
if ( ( nType == APL_RIGHT && bCCW) ||
( nType == APL_LEFT && ! bCCW))
if ( ( ( nType == APL_RIGHT || nType == APL_RIGHT_CONVEX) && bCCW) ||
( ( nType == APL_LEFT || nType == APL_LEFT_CONVEX) && ! bCCW))
bInside = false ;
// eseguo approssimazione
@@ -1027,6 +1028,12 @@ CurveArc::ApproxWithLines( double dLinTol, double dAngTolDeg, int nType, PolyLin
return false ;
}
// se necessario, sistemo per convessità dalla parte ammessa
if ( nType == APL_RIGHT_CONVEX || nType == APL_LEFT_CONVEX) {
if ( ! PL.MakeConvex( vtExtr, ( nType == APL_LEFT_CONVEX)))
return false ;
}
return true ;
}