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

@ -264,7 +264,7 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
const Standard_Real ToU2,
const Standard_Real FromV1,
const Standard_Real ToV2,
// const Standard_Real ParametricTolerance,
// const Standard_Real ParametricTolerance,
const Standard_Real ,
const Standard_Boolean SameUOrientation,
const Standard_Boolean SameVOrientation )
@ -355,7 +355,7 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
//purpose :
//=======================================================================
Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
Handle(Geom_BSplineSurface) GeomConvert::SurfaceToBSplineSurface
(const Handle(Surface)& Sr)
{
Standard_Real U1, U2, V1, V2;
@ -863,16 +863,31 @@ Handle(BSplineSurface) GeomConvert::SplitBSplineSurface
else { // In other cases => Approx
Standard_Real Tol3d=1.e-4;
Standard_Integer MaxDegree =14, MaxSeg;
GeomAbs_Shape cont;
Standard_Integer MaxDegree = 14, MaxSeg;
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,
MaxDegree,MaxDegree,MaxSeg,1);
GeomConvert_ApproxSurface BSpS(Sr, Tol3d, ucont, vcont,
MaxDegree, MaxDegree, MaxSeg, 1);
TheSurface = BSpS.Surface();
}
} // Fin du cas direct

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