0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / tests / bugs / modalg_7 / bug31016_05
CommitLineData
b939a139 1puts ""
2puts "=========================================================================="
3puts "OCC31016: Projection of an ellipse or a circle is a B-spline in some cases"
4puts "=========================================================================="
5puts ""
6
7ellipse c 0 0 0 0.866025403784439 0 0.5 0.5 0 -0.866025403784439 20 10
8plane p 0 0 0 0 0 1
9projonplane r c p 0
10
11if {![regexp {Circle} [dump r]]} {
12 puts "ERROR: Projected curve is not a circle"
13}
14
15# calculate a parametric shift on the projected curve
16set pnt [ProjectCurvePointToPlaneAlongDir c 0 p]
17parameters r [lindex $pnt 0] [lindex $pnt 1] [lindex $pnt 2] 0.1 shift
18
19if {[CheckProjectionToPlane 100 c 0 [expr 2*[dval pi]] r [dval shift] [expr [dval shift]+2*[dval pi]] p]} {
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}