From 80e49d439640f66357e30deeb807f4fdce036154 Mon Sep 17 00:00:00 2001 From: vro Date: Thu, 15 Nov 2012 15:19:42 +0400 Subject: [PATCH] 0022927: Regression with OCCT652 on Windows. DRAWEXE crashes during offsetcomshape. Check was added to avoid a crash if result is not reachable. Modified test case --- src/BRepOffset/BRepOffset_Tool.cxx | 9 +++++++-- tests/offset/compshape/A4 | 14 +++++++++----- 2 files changed, 16 insertions(+), 7 deletions(-) mode change 100644 => 100755 tests/offset/compshape/A4 diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index eda43498d1..c2a1918fa7 100755 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -3607,8 +3607,13 @@ void BRepOffset_Tool::ExtentFace (const TopoDS_Face& F, const TopoDS_Edge& E = TopoDS::Edge(exp2.Current()); if (ConstShapes.IsBound(E)) ToBuild.UnBind(E); if (ToBuild.IsBound(E)) { - EnLargeFace(TopoDS::Face(ToBuild(E)),StopFace,Standard_False); - BRepOffset_Tool::Inter3D (EF,StopFace,LInt1,LInt2,Side,E,Standard_True); + EnLargeFace(TopoDS::Face(ToBuild(E)),StopFace,Standard_False); + BRepOffset_Tool::Inter3D (EF,StopFace,LInt1,LInt2,Side,E,Standard_True); + // No intersection, it may happen for example for a chosen (non-offseted) planar face and + // its neighbour offseted cylindrical face, if the offset is directed so that + // the radius of the cylinder becomes smaller. + if (LInt1.IsEmpty()) + continue; if (LInt1.Extent() > 1) { // l intersection est en plusieurs edges (franchissement de couture) SelectEdge (F,EF,E,LInt1); diff --git a/tests/offset/compshape/A4 b/tests/offset/compshape/A4 old mode 100644 new mode 100755 index f5e133b5b5..76ae383f99 --- a/tests/offset/compshape/A4 +++ b/tests/offset/compshape/A4 @@ -4,14 +4,18 @@ ## Comment : From CV tests serie page 60 ## ====================================== -puts "*" -puts "TODO OCC22740 ALL: An exception was caught" -puts "TODO OCC22740 ALL: \\*\\* Exception \\*\\*" -puts "TODO OCC22740 ALL: Error : The offset can not be build" +#puts "*" +#puts "TODO OCC22740 ALL: An exception was caught" +#puts "TODO OCC22740 ALL: \\*\\* Exception \\*\\*" +#puts "TODO OCC22740 ALL: Error : The offset can not be build" +puts "TODO OCC23524 ALL: Error : The offset is not valid" restore [locate_data_file CCV_2_d1_gsw.rle] s explode s F catch {offsetcompshape result s -2 s_17} #real volume of result shape is unknow yet -set volume 0 + +set volume 534256 + + -- 2.39.5