0024920: Invalid result of Pipe construction
authorjgv <jgv@opencascade.com>
Thu, 29 May 2014 11:11:00 +0000 (15:11 +0400)
committerapn <apn@opencascade.com>
Thu, 29 May 2014 11:12:29 +0000 (15:12 +0400)
Added test case bugs/modalg_5/bug24920

src/BRepFill/BRepFill_ShapeLaw.cxx
tests/bugs/modalg_5/bug24920 [new file with mode: 0644]

index d97efc9..71a9d0b 100644 (file)
@@ -161,6 +161,9 @@ void BRepFill_ShapeLaw::Init(const Standard_Boolean Build)
              IsReallyClosed = V1.IsSame(V2);
            }
          }
+          if (IsReallyClosed &&
+              Abs(C->FirstParameter() - First) > Precision::PConfusion())
+            IsReallyClosed = Standard_False; //trimmed curve differs
 
          if ((ii>1) || !IsReallyClosed ) { // Trim C
            Handle(Geom_TrimmedCurve) TC = new Geom_TrimmedCurve(C,First, Last);
diff --git a/tests/bugs/modalg_5/bug24920 b/tests/bugs/modalg_5/bug24920
new file mode 100644 (file)
index 0000000..b1dcc74
--- /dev/null
@@ -0,0 +1,15 @@
+puts "=========="
+puts "OCC24920"
+puts "=========="
+puts ""
+#########################################
+# Invalid result of Pipe construction
+#########################################
+
+restore [locate_data_file bug24920_Comp.brep] c
+
+explode c
+pipe result c_1 c_2
+checkshape result
+
+set 2dviewer 1