center's Z location. An eons-old comment in the code said:
/* Curves need to be 2d, never offset in
* Z. Is a somewhat arbitrary restriction,
* would probably be nice to remove. */
I couldn't find any other reason for the restriction other than 2D curves
limit the point's Z component to 0, so added a check to only forve the
center Z to 0 when the curve is 2D. If there are other reasons for the
restriction, then this commit may need to be rolled back.