0031016: Projection of an ellipse is a B-spline in some cases
[occt.git] / tests / bugs / modalg_7 / bug31016_21
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 startPar 1
8 set endPar 4.5
9
10 circle c 0 0 0  10
11 trim c c $startPar $endPar
12 plane p 0 0 0  1 0 1
13 projonplane r c p 1
14
15 if {![regexp {BSplineCurve} [dump r]]} {
16   puts "ERROR: Projected curve is not a B-spline curve"
17 }
18
19 if {[CheckProjectionToPlane 100 c $startPar $endPar r $startPar $endPar p {} 1.e-6]} {
20   puts ""
21   puts "OK: All sample points are projected correctly"
22   puts ""
23 } else {
24   puts ""
25   puts "ERROR: Projection is incorrect for some points"
26   puts ""
27 }