0031016: Projection of an ellipse is a B-spline in some cases
[occt.git] / tests / bugs / modalg_7 / bug31016_08
1 puts ""
2 puts "=========================================================================="
3 puts "OCC31016: Projection of an ellipse or a circle is a B-spline in some cases"
4 puts "=========================================================================="
5 puts ""
6
7 set projDir { 1 1 1 }
8
9 ellipse c 0 0 0  0 0 1  2 1 0  20 10
10 plane p 0 0 0  0 1 10
11 projonplane r c p [lindex $projDir 0] [lindex $projDir 1] [lindex $projDir 2] 1
12
13 if {![regexp {BSplineCurve} [dump r]]} {
14   puts "ERROR: Projected curve is not a B-spline curve"
15 }
16
17 if {[CheckProjectionToPlane 100 c 0 [expr 2*[dval pi]] r 0 [expr 2*[dval pi]] p $projDir 1.e-6]} {
18   puts ""
19   puts "OK: All sample points are projected correctly"
20   puts ""
21 } else {
22   puts ""
23   puts "ERROR: Projection is incorrect for some points"
24   puts ""
25 }