3bea4c16 |
1 | puts "================" |
2 | puts "OCC23165" |
3 | puts "================" |
4 | puts "" |
5 | ################################################################################################################### |
6 | # BndLib_Add3dCurve::Add incorrectly segmented original B-Spline what resulting in wrong bounding box or exception. |
7 | ################################################################################################################### |
8 | |
9 | catch { pload XDE } |
10 | |
11 | set BugNumber OCC23165 |
12 | |
13 | smallview |
14 | |
15 | # 1 step |
16 | set exception_status 0 |
3bea4c16 |
17 | |
18 | restore [locate_data_file OCC23165-edge1.brep] e1 |
19 | |
20 | donly e1 |
1a0339b4 |
21 | catch { bounding -s e1 } msg |
3bea4c16 |
22 | fit |
23 | |
24 | set index [lsearch $msg exception] |
25 | if {$index > -1} { |
26 | set exception_status 1 |
27 | } else { |
1a0339b4 |
28 | bounding -s e1 -save e1_x1 e1_y1 e1_z1 e1_x2 e1_y2 e1_z2 |
3bea4c16 |
29 | |
30 | set e1_good_x1 -17.610622244944413 |
31 | set e1_good_y1 -0.010622244944394899 |
32 | set e1_good_z1 -3.0106222449443973 |
33 | set e1_good_x2 -17.589377755055537 |
bcd19756 |
34 | set e1_good_y2 5.700038816113608 |
35 | set e1_good_z2 -1.6251884728673096 |
3bea4c16 |
36 | |
1a0339b4 |
37 | checkreal "e1_x1" [dval e1_x1] ${e1_good_x1} 0 0.001 |
38 | checkreal "e1_y1" [dval e1_y1] ${e1_good_y1} 0 0.001 |
39 | checkreal "e1_z1" [dval e1_z1] ${e1_good_z1} 0 0.001 |
40 | checkreal "e1_x2" [dval e1_x2] ${e1_good_x2} 0 0.001 |
41 | checkreal "e1_y2" [dval e1_y2] ${e1_good_y2} 0 0.001 |
42 | checkreal "e1_z2" [dval e1_z2] ${e1_good_z2} 0 0.001 |
3bea4c16 |
43 | } |
44 | |
45 | # 2 step |
46 | restore [locate_data_file OCC23165-curve.rle] c |
47 | mkedge result c 20 36 |
48 | |
49 | donly result |
1a0339b4 |
50 | set res [bounding -s result -save x1 y1 z1 x2 y2 z2 ] |
3bea4c16 |
51 | fit |
52 | |
3bea4c16 |
53 | set good_x1 -17.6105835090592 |
54 | set good_y1 -4.7133570660117909 |
55 | set good_z1 -4.3679100133425806 |
56 | set good_x2 -17.589416490940806 |
bcd19756 |
57 | set good_y2 5.7000000802283299 |
58 | set good_z2 -1.6252272087525899 |
3bea4c16 |
59 | |
1a0339b4 |
60 | checkreal "x1" [dval x1] ${good_x1} 0 0.001 |
61 | checkreal "y1" [dval y1] ${good_y1} 0 0.001 |
62 | checkreal "z1" [dval z1] ${good_z1} 0 0.001 |
63 | checkreal "x2" [dval x2] ${good_x2} 0 0.001 |
64 | checkreal "y2" [dval y2] ${good_y2} 0 0.001 |
65 | checkreal "z2" [dval z2] ${good_z2} 0 0.001 |
3bea4c16 |
66 | |
cd718a73 |
67 | if { ${exception_status} == 0 } { |
3bea4c16 |
68 | puts "${BugNumber}: OK" |
69 | } else { |
70 | puts "${BugNumber}: Faulty" |
71 | } |
72 | |
5747059b |
73 | checkview -display result -2d -path ${imagedir}/${test_image}.png |
58cf74e0 |
74 | checkprops result -l 15.8888 |
75 | checksection result |