Restoring test cases removed by last commit.
[occt.git] / tests / bugs / moddata / bug253
CommitLineData
a87752f3 1puts "========"
2puts "OCC253"
3puts "========"
4
5######################################################
6## Exception while segment operation on periodic BSpline curve.
7## More over it seems that command segment in Draw doesnot work.
8######################################################
9
10restore [locate_data_file OCC253.draw] result
11############### checkshape c1 # is not a topological shape
12
13smallview -2D-
14
15#store dump of initial curve
16set init_dump [dump result]
17
18set ufirst 0.500000000000006
19set ulast 1.00000000015925
20catch { segment result $ufirst $ulast }
21
22#compare dump of initial curve and dump of result one
23set result_dump [dump result]
24if { $init_dump == $result_dump} {
25 puts "Faulty OCC253: command segment does NOT do anything"
26}
27
28#retrieve amount of knots of result curve from dump
29regexp { +Degree +[-0-9.+eE]+, +[-0-9.+eE]+ +Poles, +([-0-9.+eE]+) +KnotsPoles +:} $result_dump full KnotsNumber
30#create string to be found in result dump
31set trueLastKnot "$KnotsNumber : 1.00000000015925 "
32
33#verify parametrization of result curve
34if { [regexp "1 : 0.500000000000006 " $result_dump] && [regexp $trueLastKnot $result_dump]} {
35 puts " OCC253 is OK: command segment works properly"
36} else {
37 puts "Faulty OCC253: parametrization of result curve is wrong"
38}
39
402dfit
41set 2dviewer 0
42
43