2 puts "=========================================================================="
3 puts "OCC31016: Projection of an ellipse or a circle is a B-spline in some cases"
4 puts "=========================================================================="
11 ellipse c 0 0 0 0 0 1 2 1 0 20 10
12 trim c c $startPar $endPar
14 projonplane r c p [lindex $projDir 0] [lindex $projDir 1] [lindex $projDir 2] 0
16 if {![regexp {Ellipse} [dump r]]} {
17 puts "ERROR: Projected curve is not an ellipse"
20 # calculate a parametric shift on the projected curve
21 set pnt [ProjectCurvePointToPlaneAlongDir c $startPar p $projDir]
23 parameters ru [lindex $pnt 0] [lindex $pnt 1] [lindex $pnt 2] 0.1 shift
25 if {[CheckProjectionToPlane 100 c $startPar $endPar r [dval shift] [expr $endPar-$startPar+[dval shift]] p $projDir]} {
27 puts "OK: All sample points are projected correctly"
31 puts "ERROR: Projection is incorrect for some points"