mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +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:
parent
0a512187fd
commit
7331b4eec9
@ -864,14 +864,29 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
|
|||||||
else { // In other cases => Approx
|
else { // In other cases => Approx
|
||||||
Standard_Real Tol3d=1.e-4;
|
Standard_Real Tol3d=1.e-4;
|
||||||
Standard_Integer MaxDegree = 14, MaxSeg;
|
Standard_Integer MaxDegree = 14, MaxSeg;
|
||||||
GeomAbs_Shape cont;
|
GeomAbs_Shape ucont = GeomAbs_C0, vcont = GeomAbs_C0;
|
||||||
GeomAdaptor_Surface AS(Sr);
|
GeomAdaptor_Surface AS(Sr);
|
||||||
if (AS.NbUIntervals(GeomAbs_C2) > 1 || AS.NbVIntervals(GeomAbs_C2) > 1 )
|
//
|
||||||
cont=GeomAbs_C1;
|
if (Sr->IsCNu(2))
|
||||||
else
|
{
|
||||||
cont=GeomAbs_C2;
|
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);
|
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);
|
MaxDegree, MaxDegree, MaxSeg, 1);
|
||||||
TheSurface = BSpS.Surface();
|
TheSurface = BSpS.Surface();
|
||||||
}
|
}
|
||||||
|
13
tests/bugs/modalg_5/bug25976
Normal file
13
tests/bugs/modalg_5/bug25976
Normal 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
|
Loading…
x
Reference in New Issue
Block a user