0026201: Wrong processing of dissymetric chamfer: order of chords unjustly changes
authorjgv <jgv@opencascade.com>
Thu, 21 May 2015 10:56:47 +0000 (13:56 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 21 May 2015 10:57:51 +0000 (13:57 +0300)
Test-case for issue #26201

src/ChFiKPart/ChFiKPart_ComputeData_ChPlnCyl.cxx
tests/bugs/modalg_6/bug26201 [new file with mode: 0644]

index 700e2c8..e078593 100644 (file)
@@ -321,8 +321,8 @@ Standard_Boolean ChFiKPart_MakeChamfer(TopOpeBRepDS_DataStructure& DStr,
                                       const Standard_Real /*lu*/,
                                       const TopAbs_Orientation Or1,
                                       const TopAbs_Orientation Or2,
                                       const Standard_Real /*lu*/,
                                       const TopAbs_Orientation Or1,
                                       const TopAbs_Orientation Or2,
-                                      const Standard_Real Dis1,
-                                      const Standard_Real Dis2,
+                                      const Standard_Real dis1,
+                                      const Standard_Real dis2,
                                       const gp_Lin& Spine, 
                                       const Standard_Real First, 
                                       const TopAbs_Orientation Ofpl,
                                       const gp_Lin& Spine, 
                                       const Standard_Real First, 
                                       const TopAbs_Orientation Ofpl,
@@ -334,12 +334,6 @@ Standard_Boolean ChFiKPart_MakeChamfer(TopOpeBRepDS_DataStructure& DStr,
   //        _|_          Ofpl is orientation of the plane face allowing
   //         |4          to determine the side of the material
 
   //        _|_          Ofpl is orientation of the plane face allowing
   //         |4          to determine the side of the material
 
-
-  Standard_Real dis1=Dis1, dis2=Dis2; 
-  if (!plandab){
-      dis1 = Dis2;
-      dis2 = Dis1;}
-
   gp_Pnt OrSpine = ElCLib::Value(First,Spine);
   gp_Pnt POnCyl, POnPln, OrCyl;
 
   gp_Pnt OrSpine = ElCLib::Value(First,Spine);
   gp_Pnt POnCyl, POnPln, OrCyl;
 
diff --git a/tests/bugs/modalg_6/bug26201 b/tests/bugs/modalg_6/bug26201
new file mode 100644 (file)
index 0000000..6b6ce5b
--- /dev/null
@@ -0,0 +1,29 @@
+puts "========"
+puts "OCC26201"
+puts "========"
+puts ""
+#############################################################################
+# Wrong processing of dissymetric chamfer: order of chords unjustly changes
+#############################################################################
+
+smallview
+restore [locate_data_file OCC26201_m.brep] m
+copy m m_f
+copy m m_e
+explode m_f f
+explode m_e e
+copy m_e_47 e
+copy m_f_7 f
+donly m f e
+chamf r m e f 0.02 0.01
+explode r v
+explode m v
+donly r_19 m_41
+fit
+donly m r r_19 m_41
+distmini dd r_19 m_41
+set bug_info [dump dd_val]
+if {[lindex $bug_info 5] > 0.01} {
+  puts "ERROR: OCC26201 is reproduced. Minimum distance is too large."
+}
+set only_screen_axo 1