EgtGeomKernel 1.8d2 :
- correzione a CurveComposite::RemoveUndercutOnY per tratti di archi che sono praticamente linee verticali.
This commit is contained in:
+7
-8
@@ -2749,29 +2749,28 @@ CurveComposite::RemoveUndercutOnY( double dLinTol, double dAngTolDeg)
|
||||
double dYmin = b3Box.GetMin().y - DELTA_Y ;
|
||||
PtrOwner<ICurve> pCrv ;
|
||||
while ( pCrv.Set( ccCopy.RemoveFirstOrLastCurve( false))) {
|
||||
// se linea verticale non sottende alcunché, quindi la salto
|
||||
if ( pCrv->GetType() == CRV_LINE) {
|
||||
const CurveLine* pLine = GetBasicCurveLine( pCrv) ;
|
||||
if ( abs( pLine->GetStart().x - pLine->GetEnd().x) < EPS_SMALL) {
|
||||
pCrv.Reset() ;
|
||||
continue ;
|
||||
}
|
||||
}
|
||||
// creo la regione sottesa dalla curva
|
||||
PtrOwner<CurveComposite> pCompo( CreateBasicCurveComposite()) ;
|
||||
if ( IsNull( pCompo))
|
||||
return false ;
|
||||
pCompo->AddCurve( Release( pCrv)) ;
|
||||
// estremi
|
||||
Point3d ptStart, ptEnd ;
|
||||
pCompo->GetStartPoint( ptStart) ;
|
||||
pCompo->GetEndPoint( ptEnd) ;
|
||||
// se curva pressochè verticale non sottende alcunché, quindi la salto
|
||||
if ( abs( ptStart.x - ptEnd.x) < EPS_SMALL)
|
||||
continue ;
|
||||
// ordino gli estremi
|
||||
if ( ptStart.x < ptEnd.x) {
|
||||
swap( ptStart, ptEnd) ;
|
||||
pCompo->Invert() ;
|
||||
}
|
||||
// chiudo la curva
|
||||
pCompo->AddLine( Point3d( ptEnd.x, dYmin, ptEnd.z)) ;
|
||||
pCompo->AddLine( Point3d( ptStart.x, dYmin, ptStart.z)) ;
|
||||
pCompo->Close() ;
|
||||
// creo regione sottesa
|
||||
SurfFlatRegion Sfr ;
|
||||
Sfr.AddExtLoop( Release( pCompo)) ;
|
||||
if ( ! Sfr.IsValid())
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user