0025270: OCCT fails to calculate extrema between extruded surface and line
[occt.git] / tests / bugs / modalg_5 / bug23706_4
CommitLineData
32ca7a51 1puts "============"
2puts "OCC23706"
3puts "============"
4puts ""
5#########################################################################
6# Cannot project point on curve
7#########################################################################
8
92dbsplinecurve c1 2 5 0 3 0.2 1 0.3 1 0.4 1 0.5 3 2 0 1 3 -1 1 5 5 1 5 5 1 6 8 1 4 7 1
102dbsplinecurve c3 2 4 1 3 2 1 3 1 5 3 6 3 1 5.001 5.01 1 5.001 5.01 1 3 9 1 2 11 1
11set info [2dintersect c1 c3]
12
13if { [regexp "Intersection point 1" $info] != 1 } {
14 puts "Error : Intersection should have two points"
15} else {
16 regexp {Intersection point 1 +: +([-0-9.+eE]+)} $info full p11t
17 regexp {Intersection point 1 +: +[-0-9.+eE]+ +([-0-9.+eE]+)} $info full p12t
18}
19
20if { [regexp "Intersection point 2" $info] != 1 } {
21 puts "Error : Intersection should have two points"
22} else {
23 regexp {Intersection point 2 +: +([-0-9.+eE]+)} $info full p21t
24 regexp {Intersection point 2 +: +[-0-9.+eE]+ +([-0-9.+eE]+)} $info full p22t
25}
26
27set p11 [expr round($p11t*10000)]
28set p12 [expr round($p12t*10000)]
29set p21 [expr round($p21t*10000)]
30set p22 [expr round($p22t*10000)]
31
32if { ${p11} != 50024 || ${p12} != 50072 || ${p21} != 40024 || ${p22} != 70012 } {
33 puts "Error : Points of intersection have wrong coordinates"
34} else {
35 puts "OK: Points of intersection are right"
36}
37