]> OCCT Git - occt-copy.git/commitdiff
0024035: Intersector is not symmetrical
authorika <ika@opencascade.com>
Thu, 27 Jun 2013 06:08:14 +0000 (10:08 +0400)
committerika <ika@opencascade.com>
Thu, 27 Jun 2013 09:56:52 +0000 (13:56 +0400)
asymmetrical check in  Standard_Boolean IntCurve_IntPolyPolyGen::findIntersect was changed to symmetrical.
fix wrong calculation of approx parameter on curve for last polygon segment
Added test case bugs/modalg_5/bug24035
Modified TODO in "de" test cases because there are small differences with old behaviour
Modified test case heal/split_closed_faces/G5 because of corrections in intersector's behavior, which lead to changes in checkshape

18 files changed:
src/IntCurve/IntCurve_IntPolyPolyGen.gxx
tests/bugs/modalg_5/bug24035 [new file with mode: 0644]
tests/de/iges_1/J9
tests/de/iges_1/K3
tests/de/iges_1/L8
tests/de/iges_1/P5
tests/de/iges_1/R8
tests/de/iges_2/A1
tests/de/iges_2/B8
tests/de/iges_2/C5
tests/de/iges_2/G5
tests/de/iges_3/A2
tests/de/step_1/D7
tests/de/step_2/A6
tests/de/step_3/C6
tests/de/step_3/D9
tests/de/step_3/E6
tests/heal/split_closed_faces/G5

index 0fb97a7db8e58ae03e06bbabbe82478d73c61bbe..e0a0bc67acba354ca9e8cd3c4660caa8198d27cf 100755 (executable)
@@ -967,12 +967,12 @@ Standard_Boolean IntCurve_IntPolyPolyGen::findIntersect(
       Standard_Real _PolyUInf,_PolyVInf;
 
       SPnt1.InfoFirst(Type,SegIndex1onP1,ParamOnLine);
-      if(SegIndex1onP1 >= thePoly1.NbSegments()) { SegIndex1onP1--; ParamOnLine = 1.0; }
+      if(SegIndex1onP1 > thePoly1.NbSegments()) { SegIndex1onP1--; ParamOnLine = 1.0; }
       if(SegIndex1onP1 <= 0) { SegIndex1onP1=1; ParamOnLine = 0.0; }
       _PolyUInf = thePoly1.ApproxParamOnCurve(SegIndex1onP1,ParamOnLine);
       
       SPnt1.InfoSecond(Type,SegIndex1onP2,ParamOnLine);
-      if(SegIndex1onP2 >= thePoly2.NbSegments()) { SegIndex1onP2--; ParamOnLine = 1.0; }
+      if(SegIndex1onP2 > thePoly2.NbSegments()) { SegIndex1onP2--; ParamOnLine = 1.0; }
       if(SegIndex1onP2 <= 0) { SegIndex1onP2=1; ParamOnLine = 0.0; }
       _PolyVInf = thePoly2.ApproxParamOnCurve(SegIndex1onP2,ParamOnLine);
       
@@ -1094,16 +1094,16 @@ Standard_Boolean IntCurve_IntPolyPolyGen::findIntersect(
 
 
        if(Pos1==IntRes2d_Middle && Pos2!=IntRes2d_Middle) { 
-         PolyUInf=TheProjPCur::FindParameter( C1,P2,D1.FirstParameter(),D1.LastParameter(),TheCurveTool::EpsX(C1));
+         PolyUSup=TheProjPCur::FindParameter( C1,P2,D1.FirstParameter(),D1.LastParameter(),TheCurveTool::EpsX(C1));
        }
        else if(Pos1!=IntRes2d_Middle && Pos2==IntRes2d_Middle) { 
-         PolyVInf=TheProjPCur::FindParameter( C2,P1,D2.FirstParameter(),D2.LastParameter(),TheCurveTool::EpsX(C2));
+         PolyVSup=TheProjPCur::FindParameter( C2,P1,D2.FirstParameter(),D2.LastParameter(),TheCurveTool::EpsX(C2));
        }
        else if(Abs(ParamInfOnCurve1-ParamSupOnCurve1) > Abs(ParamInfOnCurve2-ParamSupOnCurve2)) { 
-         PolyVInf=TheProjPCur::FindParameter( C2,P1,D2.FirstParameter(),D2.LastParameter(),TheCurveTool::EpsX(C2));
+         PolyVSup=TheProjPCur::FindParameter( C2,P1,D2.FirstParameter(),D2.LastParameter(),TheCurveTool::EpsX(C2));
        }
        else { 
-         PolyUInf=TheProjPCur::FindParameter( C1,P2,D1.FirstParameter(),D1.LastParameter(),TheCurveTool::EpsX(C1));
+         PolyUSup=TheProjPCur::FindParameter( C1,P2,D1.FirstParameter(),D1.LastParameter(),TheCurveTool::EpsX(C1));
        }
        
        if(IntImpParGen::DetermineTransition( Pos1,Tan1,Trans1,Pos2,Tan2,Trans2,TolConf)
diff --git a/tests/bugs/modalg_5/bug24035 b/tests/bugs/modalg_5/bug24035
new file mode 100644 (file)
index 0000000..d45dd33
--- /dev/null
@@ -0,0 +1,31 @@
+puts "============"
+puts "OCC24035"
+puts "============"
+puts ""
+######################################################
+# Intersector is not symmetrical
+######################################################
+
+restore [locate_data_file bug24035_face1] face1
+restore [locate_data_file bug24035_face2] face2
+
+decho off
+set info1 [checkshape face1]
+set info2 [checkshape face2]
+decho on
+
+set status 0
+if { [regexp "Faulty shapes in variables faulty_1 to faulty_2" $info1] != 1 } {
+    puts "Error : There is no 2 mistakes by checkshape on face1
+    set status 1
+}
+if { [regexp "Faulty shapes in variables faulty_1 to faulty_2" $info2] != 1 } {
+    puts "Error : There is no 2 mistakes by checkshape on face2
+    set stauts 1
+}
+
+if { $status != 0 } {
+    puts "Error : Intersector is not symmetrical"
+} else {
+    puts "OK : Intersector is symmetrical"
+}
index 7fae5a3b8d889b9d9f6da7969a694e57b2a6764b..4bb3a9d15924d4985558ca16949f828cb77e346d 100644 (file)
@@ -1,7 +1,5 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
-puts "TODO CR23096 ALL: TPSTAT : Faulty" 
-puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" 
-
+puts "TODO CR23096 ALL: TPSTAT : Faulty"
 
 set filename CTS21655.igs
 
index ed3f605c1f4a5c51580f19fae491c44c2d90c0f7..a1f4346cbe52f39ddf307d1f4f856579759b60c5 100644 (file)
@@ -1,5 +1,6 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
-puts "TODO CR23096 ALL: LABELS : Faulty" 
+puts "TODO CR23096 ALL: LABELS : Faulty"
+puts "TODO OCC24035 ALL: Error : 1 differences with reference data"
 
 
 set filename FRA62468-1.igs
index d5ca56d162fdfd10b1fc87f36c466ff2c435847b..bc56415a9f381e5a813b5de6aac259b4abab17d9 100644 (file)
@@ -1,6 +1,8 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
-puts "TODO CR23096 ALL: LABELS : Faulty" 
-puts "TODO CR23096 Mandriva2010: Error : 3 differences with reference data found :"
+puts "TODO CR23096 ALL: LABELS : Faulty"
+puts "TODO OCC24035 ALL: CHECKSHAPE : Faulty"
+puts "TODO OCC24035 ALL: NBSHAPES : Faulty"
+puts "TODO OCC24035 ALL: Error : 4 differences with reference data"
 
 set LinuxDiff 3
 set filename PRO14319.igs
index 283a2cf51bc47f3503d8d3210dea3941509ebbf3..1b3ef496a475b1f734dc3e00ccc508a02a1f80d5 100644 (file)
@@ -1,6 +1,6 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
 puts "TODO CR23096 ALL: LABELS : Faulty" 
-puts "TODO CR23096 Mandriva2010: Error : 2 differences with reference data found :"
+puts "TODO OCC24035 ALL: Error : 2 differences with reference data"
 
 set LinuxDiff 2
 set filename brazo1.igs
index e19db512b4c114052f322edcaefe21c72bfa1773..a9ec11e01a4ef3067fa51b806a46f27741a07d1e 100644 (file)
@@ -1,6 +1,6 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
 puts "TODO CR23096 ALL: LABELS : Faulty" 
-puts "TODO CR23096 Mandriva2010: Error : 5 differences with reference data found :"
+puts "TODO OCC24035 ALL: Error : 5 differences with reference data"
 
 set LinuxDiff 5
 set filename BUC60743.igs
index 42debde47a9ce88fd4306a8f7b59a924d0ad8c7d..d6aeb92ecb83908b5884fd0ef0e653e687232a1a 100644 (file)
@@ -1,6 +1,6 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
 puts "TODO CR23096 ALL: STATSHAPE : Faulty" 
-
+puts "TODO OCC24035 ALL: Error : 3 differences with reference data"
 
 set filename CCI60011.igs
 
index 93cd27506615acfd1f8d2e42cb3cf83a7b440e9f..148311e129d5580cdfe06df46853e8d7518f3d24 100644 (file)
@@ -1,7 +1,7 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
 puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" 
 puts "TODO CR23096 ALL: LABELS : Faulty" 
-puts "TODO CR23096 Mandriva2010: Error : 1 differences with reference data found :"
+puts "TODO OCC24035 ALL: Error : 1 differences with reference data"
 
 set LinuxDiff 1
 set filename FRA62468-2.igs
index 13be1c651b00d7aec56dcc7e6706163f32ea2df2..5ceae213fb1d994c6a2bd81444eeb29a4657b952 100644 (file)
@@ -1,7 +1,7 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
 puts "TODO CR23096 ALL: NBSHAPES : Faulty" 
 puts "TODO CR23096 ALL: TOLERANCE : Faulty" 
-
+puts "TODO OCC24035 ALL: Error : 3 differences with reference data"
 
 set filename sim6049.igs
 
index 81f41911397b5f56c0b70c2fb28b166d72a6e488..93b0930e066b86fee991f81ff25976e2a9a14676 100644 (file)
@@ -2,7 +2,7 @@
 puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" 
 puts "TODO CR23096 ALL: LABELS : Faulty" 
 puts "TODO CR23096 ALL: COLORS : Faulty" 
-puts "TODO CR23096 Mandriva2010: Error : 4 differences with reference data found :"
+puts "TODO OCC24035 ALL: Error : 3 differences with reference data"
 
 set LinuxDiff 4
 set filename PRO11641.igs
index f353495c37ab73980348e6d6d6352f4867fe628d..ba61150ed4555dee06f2a0377269e9386939b25a 100644 (file)
@@ -2,7 +2,7 @@
 puts "TODO CR23096 ALL: LABELS : Faulty" 
 puts "TODO CR23096 ALL: COLORS : Faulty" 
 puts "TODO CR23096 ALL: LAYERS : Faulty" 
-puts "TODO CR23096 Mandriva2010: Error : 5 differences with reference data found :"
+puts "TODO OCC24035 ALL: Error : 3 differences with reference data"
 
 set LinuxDiff 5
 set filename UKI60094.igs
index 35ffcbd122599fbb85e7edbd7ddd227439302dbd..e0e2f226e8262e6fb0e8e720b40b8ce59a2c3947 100644 (file)
@@ -1,7 +1,5 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
 puts "TODO CR23096 ALL: TPSTAT : Faulty" 
-puts "TODO CR23096 ALL: TOLERANCE : Faulty" 
-
 
 set filename obtu.stp
 
index f31ba5e6eedc790d05d120f087762006d028da69..a0cede512622c33ecaa19f2d6d62d8f52316f71d 100644 (file)
@@ -1,8 +1,6 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
-puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" 
 puts "TODO CR23096 ALL: NBSHAPES : Faulty" 
 
-
 set filename t3d_opt.stp
 
 set ref_data {
index b5b2fd384300e5ef1b62b8995e96cf71d22c3ee9..f1045c951d1d821a6a0c55e27d2d0ad10a2c5c6c 100644 (file)
@@ -1,7 +1,6 @@
 # !!!! This file is generated automatically, do not edit manually! See end script
 puts "TODO CR23096 ALL: CHECKSHAPE : Faulty" 
-puts "TODO CR23096 ALL: TOLERANCE : Faulty" 
-
+puts "TODO OCC24035 ALL: Error : 3 differences with reference data"
 
 set filename trj3_pm1-ug-203.stp
 
index 7d3df418344e21d6e772428a8292ec81b60e7145..edb2c5e21d4f6299db9b5324d042f8e6d963f004 100644 (file)
@@ -3,7 +3,7 @@ puts "TODO CR23096 ALL: TPSTAT : Faulty"
 puts "TODO CR23096 ALL: NBSHAPES : Faulty" 
 puts "TODO CR23096 ALL: STATSHAPE : Faulty" 
 puts "TODO CR23096 ALL: TOLERANCE : Faulty" 
-puts "TODO CR23096 Mandriva2010: Error : 3 differences with reference data found :"
+puts "TODO OCC24035 ALL: Error : 2 differences with reference data"
 
 set LinuxDiff 3
 set filename 53921163S0.stp
index 07efe2e1455f3b03a55ad385020332ee1ec9632f..964b2f5674d3565928b3c540a7eb55c05acb6716 100644 (file)
@@ -2,7 +2,7 @@
 puts "TODO CR23096 ALL: TPSTAT : Faulty" 
 puts "TODO CR23096 ALL: STATSHAPE : Faulty" 
 puts "TODO ?CR23096 ALL: TOLERANCE : Faulty" 
-puts "TODO CR23096 Mandriva2010: Error : 3 differences with reference data found :"
+puts "TODO OCC24035 ALL: Error : 2 differences with reference data"
 
 set LinuxDiff 3
 set filename Z8M6SAT.stp
index 3a4b78461955e0259be75942a5753b9a03cc18f0..ae80cdd8c90004f8e4dbe1de5b1f80f9fa28e717 100644 (file)
@@ -1 +1,2 @@
+puts "TODO OCC24035 ALL: Faulty shapes in variables faulty_1 to faulty_"
 restore [locate_data_file wrong_checkshape_2.brep] a