0027341: Incorrect exact HLR results
[occt.git] / tests / bugs / modalg_6 / bug24803
CommitLineData
138ac530 1puts "========"
2puts "OCC24803"
3puts "========"
4puts ""
5###########################################################
6# improve the result of v/v interference for two vertices case
7###########################################################
8
9set x1 0
10set y1 0
11set z1 0
12set tolerance1 1.0
13vertex v1 $x1 $y1 $z1
14settolerance v1 $tolerance1
15
16set x2 4
17set y2 0
18set z2 0
19vertex v2 $x2 $y2 $z2
20set tolerance2 3.5
21settolerance v2 $tolerance2
22
23bop v1 v2
24bopcommon res
25
26regexp {Tolerance +MAX=([-0-9.+eE]+)} [tolerance res] full MaxTolerance
27puts "MaxTolerance=$MaxTolerance"
28
29set expected_MaxTolerance 4.25
30set tol_abs_MaxTolerance 0.1
31set tol_rel_MaxTolerance 0.1
32checkreal "MaxTolerance" ${MaxTolerance} ${expected_MaxTolerance} ${tol_abs_MaxTolerance} ${tol_rel_MaxTolerance}
33
34set info [dump res]
35regexp "Tolerance : +(\[-0-9*\.+eE\]+)" $info full tolerance_res
36regexp "Point 3D : +(\[-0-9*\.+eE\]+), +(\[-0-9*\.+eE\]+), +(\[-0-9*\.+eE\]+)" $info full x_res y_res z_res
37puts "tolerance_res=$tolerance_res"
38puts "x_res=$x_res y_res=$y_res z_res=$z_res"
39
40set expected_tolerance 4.25
41set tol_abs_tolerance 0.1
42set tol_rel_tolerance 0.1
43checkreal "tolerance" ${tolerance_res} ${expected_tolerance} ${tol_abs_tolerance} ${tol_rel_tolerance}
44
45set expected_x_res 3.25
46set tol_abs_x_res 0.1
47set tol_rel_x_res 0.1
48checkreal "x_res" ${x_res} ${expected_x_res} ${tol_abs_x_res} ${tol_rel_x_res}
49
50set expected_y_res 0
51set tol_abs_y_res 0.1
52set tol_rel_y_res 0.1
53checkreal "y_res" ${y_res} ${expected_y_res} ${tol_abs_y_res} ${tol_rel_y_res}
54
55set expected_z_res 0
56set tol_abs_z_res 0.1
57set tol_rel_z_res 0.1
58checkreal "z_res" ${z_res} ${expected_z_res} ${tol_abs_z_res} ${tol_rel_z_res}
59
60circle c1 $x1 $y1 $z1 $tolerance1
61circle c2 $x2 $y2 $z2 $tolerance2
62circle c_res $x_res $y_res $z_res $tolerance_res
63
64view 1 +X+Y 465 20 400 400
65fit
66
67xwd $imagedir/${test_image}.png