I will not improve it more... I have working version for my purposes... What you should do to make it working is converting all curves to reverse possible curves - so arc should become spline - 2nd degree and planar curve... Then you should check for intersections at each end of curves and finally you should apply REVERSE command on those curves that don't satisfy rule of CCW as desired orientation... Finally you run routine and pick curves also in CCW manner... If there are no gaps between curves, routine should work and create desired result - mesh or (I forgot what... Polygon Mesh, Polyface Mesh, or...)