0030760: Modeling Algorithms - Intersection fails in Occt 7.3.0
[occt.git] / tests / bugs / modalg_7 / bug30645_2
CommitLineData
6fd9bdf2 1puts "========"
2puts "0030645: Modeling Algorithms - B-spline segmentation produces wrong parametrization"
3puts "========"
4puts ""
5
6bsplinecurve result 3 4 \
72.0 4 2.5 2 2.9 2 3.0 4 \
8117.9 0.0 11.6 1 \
9116.7 0.0 11 1 \
10115.8 0.0 10.5 1 \
11114.4 0.0 9.7 1 \
12113.9 0.0 9.4 1 \
13113.3 0.0 9.1 1 \
14113.1 0.0 9.0 1 \
15113.0 0.0 8.9 1
16
17
18set tolerance 2.e-9
19segment result 2.5 2.900000001 $tolerance
20
21set crv [dump result]
22
23regexp {Knots +:\n(.*)} $crv full knots
24set is_different_knots 1
25set knots_list {}
26while { "$knots" != "\n" && $is_different_knots } {
27 regexp { +([0-9]+) +: +([-0-9.+eE]+) *([0-9]+)\n(.*)} $knots full index knot weight rest
28 foreach k $knots_list {
29 if { [expr abs($k - $knot)] < $tolerance } {
30 set is_different_knots 0
31 }
32 }
33
34 lappend knots_list $knot
35 set knots $rest
36}
37
38if { $is_different_knots } {
39 puts "OK: all knots are different"
40} else {
41 puts "ERROR: segment has knots too close"
42}