Fix multi-frustum polyline issue.
Fix clipping at last end point.
Fix expand direction when clipping.