EgtGeomKernel :
- correzione bug nella triangolazione bezier.
This commit is contained in:
@@ -2642,6 +2642,13 @@ Tree::FindInters( int& nId, const CurveLine& clTrim, const PolyLine& plPolygon,
|
||||
plSimplePolygon.RemoveAlignedPoints() ;
|
||||
pCC->FromPolyLine( plSimplePolygon) ;
|
||||
IntersCurveCurve icc( clTrim, *pCC) ;
|
||||
if ( icc.GetCrossOrOverlapIntersCount() < 1) {
|
||||
CurveLine clTrimExtended = clTrim ;
|
||||
clTrimExtended.ExtendEndByLen( 5 * EPS_SMALL) ;
|
||||
clTrimExtended.ExtendStartByLen( 5 * EPS_SMALL) ;
|
||||
IntersCurveCurve iccRetry( clTrimExtended, *pCC) ;
|
||||
icc = iccRetry ;
|
||||
}
|
||||
IntCrvCrvInfo iccInfo ;
|
||||
if ( icc.GetOverlaps()) {
|
||||
for ( int i = 0 ; i < icc.GetIntersCount() ; ++i) {
|
||||
@@ -2654,12 +2661,15 @@ Tree::FindInters( int& nId, const CurveLine& clTrim, const PolyLine& plPolygon,
|
||||
}
|
||||
else {
|
||||
int nLastInters = icc.GetIntersCount() -1 ;
|
||||
if( nLastInters < 0)
|
||||
return false ;
|
||||
icc.GetIntCrvCrvInfo( nLastInters, iccInfo) ;
|
||||
ptInters = iccInfo.IciA[0].ptI ;
|
||||
}
|
||||
|
||||
// determino il lato/vertice di uscita
|
||||
OnWhichEdge( nId, ptInters, nEdge) ;
|
||||
if( ! OnWhichEdge( nId, ptInters, nEdge))
|
||||
return false ;
|
||||
m_mTree[nId].m_vInters.back().nOut = nEdge ;
|
||||
// se è risultato che sono abbastanza vicino( di EPS_SMALL) ad un vertice allora il punto aggiunto sarà il vertice vero e proprio
|
||||
// se è abbastanza vicino ad un lato allora modifico le sue coordinate in modo che sia esattamente sul lato
|
||||
|
||||
Reference in New Issue
Block a user