0031558: BRepOffsetAPI_MakeFilling algorithm makes turned inside out face
authorjgv <jgv@opencascade.com>
Mon, 18 May 2020 13:27:55 +0000 (16:27 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 22 May 2020 08:07:35 +0000 (11:07 +0300)
1. Modification in method BRepFill_Filling::Build - correction of building the wire.
2. Create new subgroup "filling" in the group "bugs".

52 files changed:
src/BRepFill/BRepFill_Filling.cxx
tests/bugs/filling/begin [new file with mode: 0644]
tests/bugs/filling/bug13904 [moved from tests/bugs/moddata_1/bug13904 with 100% similarity, mode: 0644]
tests/bugs/filling/bug16119 [moved from tests/bugs/moddata_1/bug16119 with 100% similarity, mode: 0644]
tests/bugs/filling/bug16833 [moved from tests/bugs/moddata_1/bug16833 with 100% similarity, mode: 0644]
tests/bugs/filling/bug22783 [moved from tests/bugs/modalg_2/bug22783 with 100% similarity, mode: 0644]
tests/bugs/filling/bug22786 [moved from tests/bugs/modalg_2/bug22786 with 100% similarity, mode: 0644]
tests/bugs/filling/bug23343 [moved from tests/bugs/modalg_7/bug23343 with 100% similarity, mode: 0644]
tests/bugs/filling/bug23380 [moved from tests/bugs/modalg_7/bug23380 with 100% similarity]
tests/bugs/filling/bug27775 [moved from tests/bugs/modalg_6/bug27775 with 100% similarity]
tests/bugs/filling/bug27873 [moved from tests/bugs/modalg_6/bug27873 with 100% similarity]
tests/bugs/filling/bug31464 [moved from tests/bugs/modalg_7/bug31464 with 100% similarity]
tests/bugs/filling/bug31558 [new file with mode: 0644]
tests/bugs/grids.list
tests/bugs/heal/bug26466 [moved from tests/bugs/modalg_6/bug26466 with 100% similarity]
tests/bugs/heal/bug27004 [moved from tests/bugs/modalg_7/bug27004 with 100% similarity]
tests/bugs/heal/bug27082_1 [moved from tests/bugs/modalg_6/bug27082_1 with 100% similarity]
tests/bugs/heal/bug27082_1i [moved from tests/bugs/modalg_6/bug27082_1i with 100% similarity]
tests/bugs/heal/bug27082_2 [moved from tests/bugs/modalg_6/bug27082_2 with 100% similarity]
tests/bugs/heal/bug27082_2i [moved from tests/bugs/modalg_6/bug27082_2i with 100% similarity]
tests/bugs/heal/bug27082_3 [moved from tests/bugs/modalg_6/bug27082_3 with 100% similarity]
tests/bugs/heal/bug27082_3i [moved from tests/bugs/modalg_6/bug27082_3i with 100% similarity]
tests/bugs/heal/bug27199 [moved from tests/bugs/modalg_6/bug27199 with 100% similarity]
tests/bugs/heal/bug27271 [moved from tests/bugs/modalg_6/bug27271 with 100% similarity]
tests/bugs/heal/bug27309 [moved from tests/bugs/modalg_6/bug27309 with 100% similarity]
tests/bugs/heal/bug27315 [moved from tests/bugs/modalg_6/bug27315 with 100% similarity]
tests/bugs/heal/bug27521_1 [moved from tests/bugs/modalg_6/bug27521_1 with 100% similarity]
tests/bugs/heal/bug27521_2 [moved from tests/bugs/modalg_6/bug27521_2 with 100% similarity]
tests/bugs/heal/bug28207 [moved from tests/bugs/modalg_6/bug28207 with 100% similarity]
tests/bugs/heal/bug28343_1 [moved from tests/bugs/modalg_6/bug28343_1 with 100% similarity]
tests/bugs/heal/bug28343_2 [moved from tests/bugs/modalg_6/bug28343_2 with 100% similarity]
tests/bugs/heal/bug28995 [moved from tests/bugs/modalg_7/bug28995 with 100% similarity]
tests/bugs/heal/bug29382 [moved from tests/bugs/modalg_7/bug29382 with 100% similarity]
tests/bugs/heal/bug29502 [moved from tests/bugs/modalg_7/bug29502 with 100% similarity]
tests/bugs/heal/bug29504_1 [moved from tests/bugs/modalg_7/bug29504_1 with 100% similarity]
tests/bugs/heal/bug29504_2 [moved from tests/bugs/modalg_7/bug29504_2 with 100% similarity]
tests/bugs/heal/bug29544_1 [moved from tests/bugs/modalg_7/bug29544_1 with 100% similarity]
tests/bugs/heal/bug29544_2 [moved from tests/bugs/modalg_7/bug29544_2 with 100% similarity]
tests/bugs/heal/bug29845 [moved from tests/bugs/modalg_7/bug29845 with 100% similarity]
tests/bugs/heal/bug30099 [moved from tests/bugs/modalg_7/bug30099 with 100% similarity]
tests/bugs/heal/bug30100_1 [moved from tests/bugs/modalg_7/bug30100_1 with 100% similarity]
tests/bugs/heal/bug30158_1 [moved from tests/bugs/modalg_7/bug30158_1 with 100% similarity]
tests/bugs/heal/bug30158_2 [moved from tests/bugs/modalg_7/bug30158_2 with 100% similarity]
tests/bugs/heal/bug30174 [moved from tests/bugs/modalg_7/bug30174 with 100% similarity]
tests/bugs/heal/bug30534 [moved from tests/bugs/modalg_7/bug30534 with 100% similarity]
tests/bugs/heal/bug30714 [moved from tests/bugs/modalg_7/bug30714 with 100% similarity]
tests/bugs/heal/bug30897 [moved from tests/bugs/modalg_7/bug30897 with 100% similarity]
tests/bugs/heal/bug30905 [moved from tests/bugs/modalg_7/bug30905 with 100% similarity]
tests/bugs/heal/bug30927 [moved from tests/bugs/modalg_7/bug30927 with 100% similarity]
tests/bugs/heal/bug31066 [moved from tests/bugs/modalg_7/bug31066 with 100% similarity]
tests/bugs/heal/bug31187 [moved from tests/bugs/modalg_7/bug31187 with 100% similarity]
tests/bugs/heal/bug31441 [moved from tests/bugs/modalg_7/bug31441 with 100% similarity]

index fedf0c3..d45e19c 100644 (file)
@@ -721,6 +721,7 @@ void BRepFill_Filling::Build()
       gp_Pnt aPnt = BRep_Tool::Pnt(V1);
       NewV1 = BRepLib_MakeVertex(aPnt);
       BB.UpdateVertex(NewV1, dmax);
+      myOldNewMap.Bind(V1.Oriented(TopAbs_FORWARD), NewV1);
     }
 
     if (myOldNewMap.IsBound(V2))
@@ -730,6 +731,7 @@ void BRepFill_Filling::Build()
       gp_Pnt aPnt = BRep_Tool::Pnt(V2);
       NewV2 = BRepLib_MakeVertex(aPnt);
       BB.UpdateVertex(NewV2, dmax);
+      myOldNewMap.Bind(V2.Oriented(TopAbs_FORWARD), NewV2);
     }
 
     NewV1.Orientation(TopAbs_FORWARD);
@@ -742,9 +744,6 @@ void BRepFill_Filling::Build()
     BRepLib::SameParameter(NewEdge, dmax, Standard_True);
     FinalEdges.Append(NewEdge);
     myOldNewMap.Bind(InitEdge.Oriented(TopAbs_FORWARD), NewEdge.Oriented(TopAbs_FORWARD));
-    myOldNewMap.Bind(V1.Oriented(TopAbs_FORWARD), NewV1.Oriented(TopAbs_FORWARD));
-    if (!V1.IsSame(V2))
-      myOldNewMap.Bind(V2.Oriented(TopAbs_FORWARD), NewV2.Oriented(TopAbs_FORWARD));
   }
   
   TopoDS_Wire FinalWire = WireFromList(FinalEdges);
diff --git a/tests/bugs/filling/begin b/tests/bugs/filling/begin
new file mode 100644 (file)
index 0000000..e18313f
--- /dev/null
@@ -0,0 +1,4 @@
+set subgroup filling
+
+
+
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/moddata_1/bug13904
rename to tests/bugs/filling/bug13904
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/moddata_1/bug16119
rename to tests/bugs/filling/bug16119
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/moddata_1/bug16833
rename to tests/bugs/filling/bug16833
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/modalg_2/bug22783
rename to tests/bugs/filling/bug22783
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/modalg_2/bug22786
rename to tests/bugs/filling/bug22786
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from tests/bugs/modalg_7/bug23343
rename to tests/bugs/filling/bug23343
diff --git a/tests/bugs/filling/bug31558 b/tests/bugs/filling/bug31558
new file mode 100644 (file)
index 0000000..f004548
--- /dev/null
@@ -0,0 +1,29 @@
+puts "=========================================================================="
+puts "OCC31558: BRepOffsetAPI_MakeFilling algorithm makes turned inside out face"
+puts "=========================================================================="
+puts ""
+
+brestore [locate_data_file bug31558.brep] a
+
+explode a e
+
+filling result 1 0 9  a_2 0  3.5000410449283663 0.62831853071795896 a 1  3.5000410449283663 1.2566370614359179 a 1  3.5000410449283663 1.8849555921538768 a 1  3.5000410449283663 2.5132741228718358 a 1  3.5000410449283663 3.1415926535897949 a 1  3.5000410449283663 3.7699111843077535 a 1  3.5000410449283663 4.3982297150257130 a 1  3.5000410449283663 5.0265482457436717 a 1  3.5000410449283663 5.6548667764616303 a 1
+
+checkshape result
+
+checknbshapes result -face 1 -wire 1 -edge 1 -vertex 1
+
+set tolres [checkmaxtol result]
+
+if { ${tolres} > 2.e-5} {
+   puts "Error: bad tolerance of result"
+}
+
+checkprops result -s 153.938
+
+smallview
+isos result 10
+donly result
+fit
+
+checkview -screenshot -2d -path ${imagedir}/${test_image}.png
index 1dbf874..98f0679 100755 (executable)
@@ -20,3 +20,4 @@
 020 stlvrml
 021 splitshape
 022 splitshape_1
+023 filling
\ No newline at end of file