diff --git a/src/BRepFill/BRepFill_Pipe.cxx b/src/BRepFill/BRepFill_Pipe.cxx index 0cd81f3d6f..4c27561a7d 100644 --- a/src/BRepFill/BRepFill_Pipe.cxx +++ b/src/BRepFill/BRepFill_Pipe.cxx @@ -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 index 0000000000..1b04a15923 --- /dev/null +++ b/tests/bugs/modalg_5/bug25480 @@ -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