EgtGeomKernel 2.4b2 :
- in chiusura di Curva Composita con estremi più vicini di 10*EPS_SMALL si spostano gli estremi a metà strada - in creazione FlatRegion da FatCurve migliorata gestione curve quasi chiuse.
This commit is contained in:
+15
-8
@@ -136,14 +136,21 @@ GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius, bool bSquareEnds, b
|
||||
pCompo1->GetEndPoint( ptEnd) ;
|
||||
pCompo1->GetEndDir( vtEnd) ;
|
||||
pCompo1->GetMidPoint( ptMid) ;
|
||||
if ( Dist( ptStart, ptEnd) <= 2 * dRadius && Dist( ptStart, ptMid) > 2 * dRadius && Dist( ptEnd, ptMid) > 2 * dRadius) {
|
||||
double dAngEnd ; vtEnd.ToSpherical( nullptr, nullptr, &dAngEnd) ;
|
||||
double dAngStart ; vtStart.ToSpherical( nullptr, nullptr, &dAngStart) ;
|
||||
PtrOwner<ICurve> pClose( GetBiArc( ptEnd, dAngEnd, ptStart, dAngStart, 0.5)) ;
|
||||
if ( ! IsNull( pClose))
|
||||
pCompo1->AddCurve( Release( pClose)) ;
|
||||
else
|
||||
pCompo1->Close() ;
|
||||
if ( AreSamePointEpsilon( ptStart, ptEnd, 2 * dRadius) && Dist( ptStart, ptMid) > 2 * dRadius && Dist( ptEnd, ptMid) > 2 * dRadius) {
|
||||
if ( AreSamePointEpsilon( ptStart, ptEnd, max( 0.1 * dRadius, 10 * EPS_SMALL))) {
|
||||
Point3d ptNew = Media( ptStart, ptEnd) ;
|
||||
pCompo1->ModifyStart( ptNew) ;
|
||||
pCompo1->ModifyEnd( ptNew) ;
|
||||
}
|
||||
else {
|
||||
double dAngEnd ; vtEnd.ToSpherical( nullptr, nullptr, &dAngEnd) ;
|
||||
double dAngStart ; vtStart.ToSpherical( nullptr, nullptr, &dAngStart) ;
|
||||
PtrOwner<ICurve> pClose( GetBiArc( ptEnd, dAngEnd, ptStart, dAngStart, 0.5)) ;
|
||||
if ( ! IsNull( pClose))
|
||||
pCompo1->AddCurve( Release( pClose)) ;
|
||||
else
|
||||
pCompo1->Close() ;
|
||||
}
|
||||
}
|
||||
// tipo di offset
|
||||
int nOffsType = ( bSquareMids ? ICurve::OFF_EXTEND : ICurve::OFF_FILLET) ;
|
||||
|
||||
Reference in New Issue
Block a user