0021898: Empty result of intersection between a surface of revolution and a line
authorapn <apn@opencascade.com>
Wed, 29 Oct 2014 14:40:41 +0000 (17:40 +0300)
committerbugmaster <bugmaster@opencascade.com>
Thu, 30 Oct 2014 09:58:51 +0000 (12:58 +0300)
Added test case bugs/modalg_5/bug21898

tests/bugs/modalg_5/bug21898 [new file with mode: 0644]

diff --git a/tests/bugs/modalg_5/bug21898 b/tests/bugs/modalg_5/bug21898
new file mode 100644 (file)
index 0000000..56f9e9f
--- /dev/null
@@ -0,0 +1,42 @@
+puts "========="
+puts "OCC21898"
+puts "========="
+puts ""
+###########################################################################
+# Empty result of intersection between a surface of revolution and a line
+###########################################################################
+
+restore [locate_data_file bug21898_intersect_1.brep] a
+explode a
+mksurface s a_1
+mkcurve l a_2
+mkcurve l1 a_3
+
+intersect r l s
+regexp {Point +: +([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} [dump r] full pnt1_x pnt1_y pnt1_z
+if { $pnt1_x == 0 || $pnt1_y == 0 || $pnt1_z == 0 } {
+  puts "Error: there is not intersection between surface and first curve"
+}
+
+intersect r1 l1 s
+regexp {Point +: +([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} [dump r1] full pnt2_x pnt2_y pnt2_z
+if { $pnt2_x == 0 || $pnt2_y == 0 || $pnt2_z == 0 } {
+  puts "Error: there is not intersection between surface and second curve"
+}
+
+vertex v r
+distmini d v a_1
+regexp {([-0-9.+eE]+)} [dump d_val] full dist1
+
+vertex v1 r1
+distmini d v1 a_1
+regexp {([-0-9.+eE]+)} [dump d_val] full dist2
+
+if { $dist1 > 1.e-7 || $dist2 > 1.e-7} {
+  puts "Error: Wrong 3d point between surface and curve"
+} else {
+  puts "OK: Correct 3d point between surface and curve"
+}
+
+axo
+set only_screen_axo 1