
puts "==========="
puts "  BUC60960"
puts "==========="

proc do_offsets {i} {
    global c c1 c2 c3 c4 c5

    set poles {{0 0 1} {0 1 1} {1 1 1} {1 0 1} {2 0 1} {2 -1 1} {1 -1 1} \
		   {1 -2 1} {0 -2 1} {0 -1 1} {-1 -1 1} {-1 0 1}}
    set knots {{0 1} {1 1} {2 1} {3 1} {4 1} {5 1} {6 1} {7 1} {8 1} {9 1} \
		   {10 1} {11 1} {12 1}}
    eval 2dpbsplinecurve c 3 [llength $knots] [join $knots] [join $poles]


    if [catch {offset c1 c 0.1}] {puts "while creating c1 at step $i"}
    if [catch {offset c2 c 0.2}] {puts "while creating c2 at step $i"}
    if [catch {offset c3 c 0.3}] {puts "while creating c3 at step $i"}
    if [catch {offset c4 c 0.4}] {puts "while creating c4 at step $i"}
    if [catch {offset c5 c 0.5}] {puts "while creating c5 at step $i"}
    if [catch {offset c6 c 0.6}] {puts "while creating c6 at step $i"}
    if [catch {offset c7 c 0.7}] {puts "while creating c7 at step $i"}
    if [catch {offset c8 c 0.8}] {puts "while creating c8 at step $i"}
}

for {set i 0} {$i < 10} {incr i} {
    do_offsets $i
}


