6f5db508 |
1 | puts "========" |
2 | puts "0030869: Modeling Data - BRepAdaptor_CompCurve incorrectly evaluates the boundary points" |
3 | puts "========" |
4 | puts "" |
5 | |
6 | pload QAcommands |
7 | |
8 | # create wire consisting of a single edge based on a trimmed circle |
9 | circle c 1 0 0 0 -1 0 0 0 -1 1 |
10 | trim c c 1.5707963267949 4.71238898038469 |
11 | mkedge e c |
12 | orientation e R |
13 | wire w e |
14 | |
15 | # compute boundary points using BRepAdaptor_CompCurve |
16 | set log [OCC30869 w] |
17 | |
18 | set lines [split $log "\n"] |
19 | |
20 | if {![regexp {([-0-9.+eE]*): point ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*), tangent ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*)} [lindex $lines 0] full t1 x1 y1 z1 dx1 dy1 dz1]} { |
21 | puts "Error: first point is not computed" |
22 | } |
23 | |
24 | if {![regexp {([-0-9.+eE]*): point ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*), tangent ([-0-9.+eE]*) ([-0-9.+eE]*) ([-0-9.+eE]*)} [lindex $lines 1] full t2 x2 y2 z2 dx2 dy2 dz2]} { |
25 | puts "Error: last point is not computed" |
26 | } |
27 | |
28 | # compute reference values |
29 | |
30 | # inverse the curve as the edge in the wire is reversed |
31 | circle ci 1 0 0 0 1 0 0 0 -1 1 |
32 | trim ci ci 1.5707963267949 4.71238898038469 |
33 | |
34 | cvalue ci 1.5707963267949 x1_ref y1_ref z1_ref dx1_ref dy1_ref dz1_ref |
35 | cvalue ci 4.71238898038469 x2_ref y2_ref z2_ref dx2_ref dy2_ref dz2_ref |
36 | |
37 | # compare the values |
38 | set tol_abs 1.e-7 |
39 | set tol_rel 1.e-7 |
40 | |
41 | checkreal first_pnt_x $x1 [dval x1_ref] $tol_abs $tol_rel |
42 | checkreal first_pnt_y $y1 [dval y1_ref] $tol_abs $tol_rel |
43 | checkreal first_pnt_z $z1 [dval z1_ref] $tol_abs $tol_rel |
44 | |
45 | checkreal first_tgt_x $dx1 [dval dx1_ref] $tol_abs $tol_rel |
46 | checkreal first_tgt_y $dy1 [dval dy1_ref] $tol_abs $tol_rel |
47 | checkreal first_tgt_z $dz1 [dval dz1_ref] $tol_abs $tol_rel |
48 | |
49 | checkreal last_pnt_x $x2 [dval x2_ref] $tol_abs $tol_rel |
50 | checkreal last_pnt_y $y2 [dval y2_ref] $tol_abs $tol_rel |
51 | checkreal last_pnt_z $z2 [dval z2_ref] $tol_abs $tol_rel |
52 | |
53 | checkreal last_tgt_x $dx2 [dval dx2_ref] $tol_abs $tol_rel |
54 | checkreal last_tgt_y $dy2 [dval dy2_ref] $tol_abs $tol_rel |
55 | checkreal last_tgt_z $dz2 [dval dz2_ref] $tol_abs $tol_rel |