EgtGeomKernel :
- correzione a GetSurfFlatRegionFromFatCurve nel caso di curve quasi chiuse su piani inclinati.
This commit is contained in:
+13
-2
@@ -143,9 +143,20 @@ GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius, bool bSquareEnds, b
|
||||
pCompo1->ModifyEnd( ptNew) ;
|
||||
}
|
||||
else {
|
||||
double dAngEnd ; vtEnd.ToSpherical( nullptr, nullptr, &dAngEnd) ;
|
||||
double dAngStart ; vtStart.ToSpherical( nullptr, nullptr, &dAngStart) ;
|
||||
Frame3d frLoc ;
|
||||
if ( ! AreSameVectorApprox( vtExtr, Z_AX))
|
||||
frLoc.Set( ORIG, vtExtr) ;
|
||||
|
||||
// costruisco il biarco nel piano della curva
|
||||
ptStart.ToLoc( frLoc) ;
|
||||
ptEnd.ToLoc( frLoc) ;
|
||||
Vector3d vtELoc( vtEnd) ; vtELoc.ToLoc( frLoc) ;
|
||||
Vector3d vtSLoc( vtStart) ; vtSLoc.ToLoc( frLoc) ;
|
||||
double dAngEnd ; vtELoc.ToSpherical( nullptr, nullptr, &dAngEnd) ;
|
||||
double dAngStart ; vtSLoc.ToSpherical( nullptr, nullptr, &dAngStart) ;
|
||||
PtrOwner<ICurve> pClose( GetBiArc( ptEnd, dAngEnd, ptStart, dAngStart, 0.5)) ;
|
||||
// porto il biarco in globale
|
||||
pClose->ToGlob( frLoc) ;
|
||||
if ( ! IsNull( pClose))
|
||||
pCompo1->AddCurve( Release( pClose)) ;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user