blob: 04b0d5cbf861d5bd819c5a4eddfca893e7b19bb2 [file] [edit]
puts ""
puts "=========================================================================="
puts "OCC31016: Projection of an ellipse or a circle is a B-spline in some cases"
puts "=========================================================================="
puts ""
set startPar 1
set endPar 4.5
ellipse c 0 0 0 0.866025403784439 0 0.5 0.5 0 -0.866025403784439 20 10
trim c c $startPar $endPar
plane p 0 0 0 0 0 1
projonplane r c p 1
if {![regexp {Circle} [dump r]]} {
puts "ERROR: Projected curve is not a circle"
}
if {[CheckProjectionToPlane 100 c $startPar $endPar r $startPar $endPar p {} 1.e-6]} {
puts ""
puts "OK: All sample points are projected correctly"
puts ""
} else {
puts ""
puts "ERROR: Projection is incorrect for some points"
puts ""
}