0030829: BRepExtrema_ShapeProximity crashes with shape from STL/WRL
[occt.git] / tests / bugs / moddata_2 / bug253
1 puts "========"
2 puts "OCC253"
3 puts "========"
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
10 restore [locate_data_file OCC253.draw] result
11 ############### checkshape c1 # is not a topological shape
12
13 smallview -2D-
14
15 #store dump of initial curve 
16 set init_dump [dump result]
17
18 set ufirst 0.500000000000006
19 set ulast 1.00000000015925
20 catch { segment result $ufirst $ulast }
21
22 #compare dump of initial curve and dump of result one
23 set result_dump [dump result]
24 if { $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
29 regexp { +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
31 set trueLastKnot "$KnotsNumber : 1 4"
32
33 #verify parametrization of result curve
34 if { [regexp "1 : 0.5 4" $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
40 2dfit
41 checkview -display result -2d -path ${imagedir}/${test_image}.png
42
43