From 062d7dfd6208dee0371be2777190d37387aadc68 Mon Sep 17 00:00:00 2001 From: ink Date: Thu, 30 Apr 2015 14:09:32 +0300 Subject: [PATCH] 0021727: BRepBuilderAPI_Copy (and possibly other similar tools) create new shape in Frozen state Set the value of flag Frozen to false for shape created in BRepTools_Modifier. If shape is not newly created then value of flag Frozen don't changed. Test-case for issue #21727 --- src/BRepTools/BRepTools_Modifier.cxx | 1 - tests/bugs/modalg_6/bug21727 | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 tests/bugs/modalg_6/bug21727 diff --git a/src/BRepTools/BRepTools_Modifier.cxx b/src/BRepTools/BRepTools_Modifier.cxx index 0b47f43dfb..059eb9a440 100644 --- a/src/BRepTools/BRepTools_Modifier.cxx +++ b/src/BRepTools/BRepTools_Modifier.cxx @@ -544,7 +544,6 @@ Standard_Boolean BRepTools_Modifier::Rebuild // Set flag of the shape. result.Orientation(ResOr); - result.Free (S.Free()); result.Modified (S.Modified()); result.Checked (S.Checked()); result.Orientable(S.Orientable()); diff --git a/tests/bugs/modalg_6/bug21727 b/tests/bugs/modalg_6/bug21727 new file mode 100644 index 0000000000..ef64930734 --- /dev/null +++ b/tests/bugs/modalg_6/bug21727 @@ -0,0 +1,23 @@ +puts "========" +puts "OCC21727" +puts "========" +puts "" +########################################################################################### +# BRepBuilderAPI_Copy (and possibly other similar tools) create new shape in Frozen state +########################################################################################### + +box b 10 10 10 +set bug_info [whatis b] +if {[lindex $bug_info 6] != "Free"} { + puts "ERROR: OCC21727 is reproduced. Shape b does not have flag FREE." +} +compound b c +set bug_info [whatis b] +if {[lindex $bug_info 6] == "Free"} { + puts "ERROR: OCC21727 is reproduced. Shape b has flag FREE." +} +tcopy b q +set bug_info [whatis q] +if {[lindex $bug_info 6] != "Free"} { + puts "ERROR: OCC21727 is reproduced. Shape q does not have flag FREE." +}