]> OCCT Git - occt-copy.git/commitdiff
0026522: Exception while copying offset on C0 surface
authoranv <anv@opencascade.com>
Mon, 21 Sep 2015 12:58:53 +0000 (15:58 +0300)
committerabv <abv@opencascade.com>
Tue, 22 Sep 2015 19:07:21 +0000 (22:07 +0300)
src/Geom/Geom_OffsetSurface.cxx
src/GeomTools/GeomTools_SurfaceSet.cxx
tests/bugs/moddata_3/bug26522 [new file with mode: 0644]

index 336b077ca474a98a79e4a33a4765943266012413..cf107cb5cbcd08e4e548d38af31ed798bd7bca75 100644 (file)
@@ -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;
 }
 
index adfe2b90cddfc03579ff8ec11081a17dad695041..0e8513bd80153388f66168955c06cdd9d1f69e2e 100644 (file)
@@ -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 (file)
index 0000000..72ad047
--- /dev/null
@@ -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"
+}