1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-10 18:51:21 +03:00

0025976: Conversion of an offset face from a spline into a spline face hangs-up the application

Tests-case for issue #25976
This commit is contained in:
ifv 2015-03-26 15:42:42 +03:00 committed by apn
parent 0a512187fd
commit 7331b4eec9
2 changed files with 230 additions and 202 deletions

View File

@ -864,14 +864,29 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
else { // In other cases => Approx
Standard_Real Tol3d=1.e-4;
Standard_Integer MaxDegree = 14, MaxSeg;
GeomAbs_Shape cont;
GeomAbs_Shape ucont = GeomAbs_C0, vcont = GeomAbs_C0;
GeomAdaptor_Surface AS(Sr);
if (AS.NbUIntervals(GeomAbs_C2) > 1 || AS.NbVIntervals(GeomAbs_C2) > 1 )
cont=GeomAbs_C1;
else
cont=GeomAbs_C2;
//
if (Sr->IsCNu(2))
{
ucont=GeomAbs_C2;
}
else if(Sr->IsCNu(1))
{
ucont=GeomAbs_C1;
}
//
if (Sr->IsCNv(2))
{
vcont=GeomAbs_C2;
}
else if(Sr->IsCNv(1))
{
vcont=GeomAbs_C1;
}
//
MaxSeg = 4*(AS.NbUIntervals(GeomAbs_CN)+1)*(AS.NbVIntervals(GeomAbs_CN)+1);
GeomConvert_ApproxSurface BSpS(Sr,Tol3d,cont,cont,
GeomConvert_ApproxSurface BSpS(Sr, Tol3d, ucont, vcont,
MaxDegree, MaxDegree, MaxSeg, 1);
TheSurface = BSpS.Surface();
}

View File

@ -0,0 +1,13 @@
puts "========"
puts "OCC25976"
puts "========"
puts ""
##########################################################################################
# Conversion of an offset face from a spline into a spline face hangs-up the application
##########################################################################################
smallview
restore [locate_data_file OCC25976-copiedFace.brep] f
nurbsconvert r f
fit
set only_screen_axo 1