0024597: Missing internal vertex in the result of General Fuse Operation
[occt.git] / tests / bugs / modalg_5 / bug23706_5
1 puts "============"
2 puts "OCC23706"
3 puts "============"
4 puts ""
5 #########################################################################
6 # Cannot project point on curve
7 #########################################################################
8
9 2dbsplinecurve 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
10 2dbsplinecurve c2 2 4 1 3 2 1 3 1 5 3 6 3 1 5 5 1 5 5 1 3 9 1 2 11 1
11 set info [2dintersect c1 c2]
12
13 if { [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 p11
17    regexp {Intersection point 1 +: +[-0-9.+eE]+ +([-0-9.+eE]+)} $info full p12
18 }
19
20 if { [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
27 set p21 [expr int($p21t)]
28 set p22 [expr int($p22t)]
29
30 if { ${p11} != 5 || ${p12} != 5 || ${p21} != 4 || ${p22} != 7 } {
31     puts "Error : Points of intersection have wrong coordinates"
32 } else {
33     puts "OK: Points of intersection are right"
34 }