0023706: Cannot project point on curve
[occt.git] / tests / bugs / modalg_5 / bug23706_50
diff --git a/tests/bugs/modalg_5/bug23706_50 b/tests/bugs/modalg_5/bug23706_50
new file mode 100644 (file)
index 0000000..18eedbb
--- /dev/null
@@ -0,0 +1,40 @@
+puts "========"
+puts "OCC23706"
+puts "========"
+puts ""
+####################################
+## Cannot project point on curve
+####################################
+
+set x 3.0
+set y 3.0
+set z 2.0
+set pp_ch1 2.261838779028444
+set pp_ch2 2.7514388736312116
+set pp_ch3 3.5195936992321921
+set pp_ch4 3.9600115496393977
+set pp_ch5 5.4999999987220543
+set pp_ch6 6.8388132447593541
+set pp_ch7 7.8261046366621292
+
+restore [locate_data_file bug23706_c11.draw] c
+set info [proj c $x $y $z]
+
+regexp {parameter 1 += +([-0-9.+eE]+)} $info full pp1
+regexp {parameter 2 += +([-0-9.+eE]+)} $info full pp2
+regexp {parameter 3 += +([-0-9.+eE]+)} $info full pp3
+regexp {parameter 4 += +([-0-9.+eE]+)} $info full pp4
+regexp {parameter 5 += +([-0-9.+eE]+)} $info full pp5
+regexp {parameter 6 += +([-0-9.+eE]+)} $info full pp6
+regexp {parameter 7 += +([-0-9.+eE]+)} $info full pp7
+if { $pp1 != $pp_ch1 ||
+     $pp2 != $pp_ch2 ||
+     $pp3 != $pp_ch3 ||
+     $pp4 != $pp_ch4 ||
+     $pp5 != $pp_ch5 ||
+     $pp6 != $pp_ch6 ||
+     $pp7 != $pp_ch7} {
+   puts "Error : Projection is not correct"
+} else {
+   puts "OK: Projection is correct"
+}