]> OCCT Git - occt.git/commitdiff
0025480: Incorrect result of BRepOffsetAPI_MakePipe
authorjgv <jgv@opencascade.com>
Fri, 21 Nov 2014 11:04:52 +0000 (14:04 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 21 Nov 2014 11:05:24 +0000 (14:05 +0300)
Test case for CR25480

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

index 0cd81f3d6fcb33c89c65a4840f33a773283b8182..4c27561a7db5c268e008e02f5190302a4e8f418e 100644 (file)
@@ -274,18 +274,9 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire&  Spine,
   }
 
   ShapeUpgrade_RemoveLocations RemLoc;
+  RemLoc.SetRemoveLevel(TopAbs_COMPOUND);
   RemLoc.Remove(myFirst);
   myFirst = RemLoc.GetResult();
-  TopLoc_Location theLoc = myFirst.Location();
-  if (!theLoc.IsIdentity())
-  {
-    TopoDS_Shape NewMyFirst = BRepBuilderAPI_Copy(myFirst);
-    RemLoc.Remove(NewMyFirst);
-    NewMyFirst = RemLoc.GetResult();
-    TopLoc_Location theIdentity;
-    NewMyFirst.Location(theIdentity);
-    myFirst = BRepBuilderAPI_Transform(NewMyFirst, theLoc.Transformation(), Standard_True);
-  }
   
   myLoc->Law(myLoc->NbLaw())->GetDomain(first, last);
   myLoc->Law(myLoc->NbLaw())->D0(last,M, V);
@@ -308,16 +299,6 @@ void BRepFill_Pipe::Perform(const TopoDS_Wire&  Spine,
 
   RemLoc.Remove(myLast);
   myLast = RemLoc.GetResult();
-  theLoc = myLast.Location();
-  if (!theLoc.IsIdentity())
-  {
-    TopoDS_Shape NewMyLast = BRepBuilderAPI_Copy(myLast);
-    RemLoc.Remove(NewMyLast);
-    NewMyLast = RemLoc.GetResult();
-    TopLoc_Location theIdentity;
-    NewMyLast.Location(theIdentity);
-    myLast = BRepBuilderAPI_Transform(NewMyLast, theLoc.Transformation(), Standard_True);
-  }
   
 #if DRAW
   if (Affich) {
diff --git a/tests/bugs/modalg_5/bug25480 b/tests/bugs/modalg_5/bug25480
new file mode 100644 (file)
index 0000000..1b04a15
--- /dev/null
@@ -0,0 +1,26 @@
+puts "============"
+puts "OCC25480"
+puts "============"
+puts ""
+#######################################################################
+# Incorrect result of BRepOffsetAPI_MakePipe
+#######################################################################
+
+restore [locate_data_file bug25480_part1.brep] a
+restore [locate_data_file bug25480_part2.brep] b
+
+pipe result b a 1
+
+set square 48441
+
+set nb_v_good 224
+set nb_e_good 392
+set nb_w_good 196
+set nb_f_good 196
+set nb_sh_good 14
+set nb_sol_good 14
+set nb_compsol_good 0
+set nb_compound_good 8
+set nb_shape_good 1044
+
+set 2dviewer 1