0025957: nurbsconvert modifies original shape
[occt.git] / tests / bugs / modalg_6 / bug27664_1
1 puts "========"
2 puts "OCC27664"
3 puts "========"
4 puts ""
5 #################################################
6 # Incomplete intersection curve from the attached shapes
7 #################################################
8
9 set ExpTol 1.0e-7
10 set GoodNbCurv 3
11 set GoodLength 0.6288896355727489
12
13 restore [locate_data_file bug27664_pl0.brep] pl0
14 restore [locate_data_file bug27664_nsh_8.brep] nsh_8
15 explode nsh_8 f
16 explode pl0 f
17
18 set log [bopcurves pl0_1 nsh_8_4 -2d]
19
20 regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
21
22 if {${NbCurv} != ${GoodNbCurv}} {
23   puts "Error: Number of curves is bad!"
24 }
25
26 checkreal TolReached $Toler $ExpTol 0.0 0.1
27
28 set clen 0.0
29
30 for {set ic 1} { $ic <= ${NbCurv} } { incr ic} {
31   
32   set le [length c_$ic]
33   regexp "The length c_$ic is +(\[-0-9.+eE\]+)" ${le} full ll
34   
35   puts "ll = $ll"
36   
37   set clen [expr $clen+$ll]
38 }
39
40 puts "Summary length = $clen"
41
42 checkreal Length $clen $GoodLength 0.0 1.0e-5
43
44 smallview
45 don c_*
46 fit
47 display pl0_1 nsh_8_4
48
49 checkview -screenshot -2d -path ${imagedir}/${test_image}_1.png
50
51 top
52 don c_*
53 fit
54 display pl0_1 nsh_8_4
55
56 checkview -screenshot -2d -path ${imagedir}/${test_image}_2.png