1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-07-25 12:55:50 +03:00

0028012: Exception while intersecting two surfaces

Test case for issue CR28012
This commit is contained in:
anv 2016-11-02 15:46:52 +03:00 committed by apn
parent ff1541f179
commit bc9a61ec69
2 changed files with 66 additions and 51 deletions

View File

@ -1894,7 +1894,7 @@ void IntPatch_PrmPrmIntersection::Perform(const Handle(Adaptor3d_HSurface)& S
PW.Perform(StartParams); PW.Perform(StartParams);
if(PW.IsDone()) { if(PW.IsDone()) {
if(PW.NbPoints()>2) {
Point3dDebut = PW.Value(1).Value(); Point3dDebut = PW.Value(1).Value();
Point3dFin = PW.Value(PW.NbPoints()).Value(); Point3dFin = PW.Value(PW.NbPoints()).Value();
@ -1919,8 +1919,6 @@ void IntPatch_PrmPrmIntersection::Perform(const Handle(Adaptor3d_HSurface)& S
trans2 = IntSurf_Out; trans2 = IntSurf_Out;
} }
Standard_Real TolTang = TolTangency; Standard_Real TolTang = TolTangency;
Handle(IntPatch_WLine) wline = new IntPatch_WLine(PW.Line(),Standard_False,trans1,trans2); Handle(IntPatch_WLine) wline = new IntPatch_WLine(PW.Line(),Standard_False,trans1,trans2);
IntPatch_RstInt::PutVertexOnLine(wline,Surf1,D1,Surf2,Standard_True,TolTang); IntPatch_RstInt::PutVertexOnLine(wline,Surf1,D1,Surf2,Standard_True,TolTang);
@ -1947,7 +1945,7 @@ void IntPatch_PrmPrmIntersection::Perform(const Handle(Adaptor3d_HSurface)& S
//--------------- //---------------
SLin.Append(wline); SLin.Append(wline);
empt = Standard_False; empt = Standard_False;
}
} }
} }
} }

View File

@ -0,0 +1,17 @@
puts "========"
puts "OCC28012"
puts "========"
puts ""
#################################################
# Exception while intersecting two surfaces
#################################################
restore [locate_data_file bug28012_s1.draw] s1
restore [locate_data_file bug28012_s2.draw] s2
intersect result s1 s2 0.00012162815337817315 0.0010404164685680738 0.99999999999999989 0.22068942273845651
smallview
fit
checkview -screenshot -2d -path ${imagedir}/${test_image}.png