5 #########################################################################
6 # Number of intersection points for 2d curves depends on the order of arguments in command "2dintersect"
7 #########################################################################
9 restore [locate_data_file bug25593_face1.brep] b
13 set info1 [2dintersect b_2 b_3 -tol 1.e-10]
14 regexp {Intersection point 1 : +([-0-9.+eE]+) +([-0-9.+eE]+)} $info1 full p1x p1y
15 regexp {parameter on the fist: +([-0-9.+eE]+) +parameter on the second: +([-0-9.+eE]+)} $info1 full par1f par1s
18 set info2 [2dintersect b_3 b_2 -tol 1.e-10]
19 regexp {Intersection point 1 : +([-0-9.+eE]+) +([-0-9.+eE]+)} $info2 full p2x p2y
20 regexp {parameter on the fist: +([-0-9.+eE]+) +parameter on the second: +([-0-9.+eE]+)} $info2 full par2f par2s
23 if { [regexp "Intersection point 1" $info1] != 1 } {
24 puts "Error : Intersection 1 should have one point"
27 if { [regexp "Intersection point 2" $info1] == 1 } {
28 puts "Error : Intersection 1 should have one point"
34 if { [regexp "Intersection point 1" $info2] != 1 } {
35 puts "Error : Intersection 2 should have one point"
38 if { [regexp "Intersection point 2" $info2] == 1 } {
39 puts "Error : Intersection 2 should have one point"
44 if { $NbIP1 != 1 || $NbIP2 != 1 } {
45 puts "ERROR: Wrong solutions number"
47 puts "p1x=$p1x p1y=$p1y par1f=$par1f $par1s"
48 puts "p2x=$p2x p2y=$p2y par2f=$par2f $par2s"
49 set sqd [expr ($p1x-$p2x)*($p1x-$p2x)+($p1y-$p2y)*($p1y-$p2y)]
50 if { $sqd > 1.0e-14 } {
51 puts "ERROR: Intersection points are different"
53 puts "OK: Intersection points are equal"
55 if { (abs($par1f - $par2s) > 1.0e-9) || (abs($par1s - $par2f) > 1.0e-9) } {
56 puts "ERROR: Parameters on intersecting curves are not coincided"
58 puts "OK: Parameters on intersecting curves are coincided"