Handle child nodes and update shape transformation to handle most path.

There are still some cases that do not produce the intended output, e.g.
a circle around the x axis flips the shape when crossing the x/y plane.