From b9f21bee943820df03ac5e4b92d4adca9c567323 Mon Sep 17 00:00:00 2001 From: anv Date: Mon, 21 Sep 2015 15:58:53 +0300 Subject: [PATCH] 0026522: Exception while copying offset on C0 surface --- src/Geom/Geom_OffsetSurface.cxx | 2 +- src/GeomTools/GeomTools_SurfaceSet.cxx | 2 +- tests/bugs/moddata_3/bug26522 | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/moddata_3/bug26522 diff --git a/src/Geom/Geom_OffsetSurface.cxx b/src/Geom/Geom_OffsetSurface.cxx index 336b077ca4..cf107cb5cb 100644 --- a/src/Geom/Geom_OffsetSurface.cxx +++ b/src/Geom/Geom_OffsetSurface.cxx @@ -211,7 +211,7 @@ static void derivatives(Standard_Integer MaxOrder, Handle(Geom_Geometry) Geom_OffsetSurface::Copy () const { Handle(OffsetSurface) S; - S = new OffsetSurface (basisSurf, offsetValue); + S = new OffsetSurface (basisSurf, offsetValue, Standard_True); return S; } diff --git a/src/GeomTools/GeomTools_SurfaceSet.cxx b/src/GeomTools/GeomTools_SurfaceSet.cxx index adfe2b90cd..0e8513bd80 100644 --- a/src/GeomTools/GeomTools_SurfaceSet.cxx +++ b/src/GeomTools/GeomTools_SurfaceSet.cxx @@ -923,7 +923,7 @@ static Standard_IStream& operator>>(Standard_IStream& IS, GeomTools::GetReal(IS, O); Handle(Geom_Surface) BS; GeomTools_SurfaceSet::ReadSurface(IS,BS); - S = new Geom_OffsetSurface(BS,O); + S = new Geom_OffsetSurface(BS,O,Standard_True); return IS; } diff --git a/tests/bugs/moddata_3/bug26522 b/tests/bugs/moddata_3/bug26522 new file mode 100644 index 0000000000..72ad047861 --- /dev/null +++ b/tests/bugs/moddata_3/bug26522 @@ -0,0 +1,17 @@ +puts "================" +puts "OCC26522" +puts "================" +puts "" +####################################################### +## Exception while copying offset on C0 surface +####################################################### + +restore [locate_data_file bug26522_s.brep] s + +set info [checkshape s] + +if { [regexp "This shape seems to be valid" ${info}] == 1 } { + puts "OK: copying offset on C0 surface is correct" +} else { + puts "Error: copying offset on C0 surface is incorrect" +}