0030645: Modeling Algorithms - B-spline segmentation produces wrong parametrization
[occt.git] / tests / bugs / modalg_7 / bug30645_1
CommitLineData
6fd9bdf2 1puts "========"
2puts "0030645: Modeling Algorithms - B-spline segmentation produces wrong parametrization"
3puts "========"
4puts ""
5
6restore [locate_data_file bug30645.brep] result
7
8set tolerance 1.e-9
9segsur result 13.527990713022374 14.030423915738853 54.831990159753303 59.000000000000028 $tolerance
10
11set surf [dump result]
12
13regexp {VKnots +:\n(.*)} $surf full vknots
14set is_different_knots 1
15set vknots_list {}
16while { "$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
28if { $is_different_knots } {
29 puts "OK: all knots are different"
30} else {
31 puts "ERROR: segment has knots too close"
32}