0031304: Configuration - TKACIS building failure due to duplicated symbol GeomFillFus...
[occt.git] / tests / bugs / modalg_7 / bug30645_1
1 puts "========"
2 puts "0030645: Modeling Algorithms - B-spline segmentation produces wrong parametrization"
3 puts "========"
4 puts ""
5
6 restore [locate_data_file bug30645.brep] result
7
8 set tolerance 1.e-9
9 segsur result 13.527990713022374 14.030423915738853 54.831990159753303 59.000000000000028 $tolerance
10
11 set surf [dump result]
12
13 regexp {VKnots +:\n(.*)} $surf full vknots
14 set is_different_knots 1
15 set vknots_list {}
16 while { "$vknots" != "\n\n" && $is_different_knots } {
17   regexp { +([0-9]+) +: +([-0-9.+eE]+) *([0-9]+)\n(.*)} $vknots full index knot weight rest
18   foreach k $vknots_list {
19     if { [expr abs($k - $knot)] < $tolerance } {
20       set is_different_knots 0
21     }
22   }
23
24   lappend vknots_list $knot
25   set vknots $rest
26 }
27
28 if { $is_different_knots } {
29   puts "OK: all knots are different"
30 } else {
31   puts "ERROR: segment has knots too close"
32 }