1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/modalg_7/bug31016_11
azv b939a13923 0031016: Projection of an ellipse is a B-spline in some cases
Improve projection of ellipse and circle on a plane in case of the same parametrization of the original curve and the projected one is not necessary. Now the projection is a canonical curve instead of B-spline.
2020-07-20 16:57:29 +03:00

24 lines
720 B
Plaintext

puts ""
puts "=========================================================================="
puts "OCC31016: Projection of an ellipse or a circle is a B-spline in some cases"
puts "=========================================================================="
puts ""
ellipse c 0 0 0 0.866025403784439 0 0.5 0.5 0 -0.866025403784439 20 10
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 0 [expr 2*[dval pi]] r 0 [expr 2*[dval pi]] 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 ""
}