I am working with a pattern making software that exports to a PDF. I cannot control the output vectors. When I open this file, the file in Illustrator has a million short line segments that are all straight lines.

[![enter image description here](https://i.stack.imgur.com/y4ckI.png)](https://i.stack.imgur.com/y4ckI.png)

I have tried joining them. I also tried using the script Join Reasonably. Both have about the same result. If I kept the line black, that wouldn't be a problem, but when I give the line a special brush, I get this:

[![enter image description here](https://i.stack.imgur.com/QY0Lt.png)](https://i.stack.imgur.com/QY0Lt.png)

Is there a script or extension I can use to either turn an area of my shape into a smooth curve with handles and maybe only one or two anchor points? If there isn't, is it possible a script can be created to do this? 

What I currently do is just use the existing shape as a guide and redraw the shape over it with a new layer. It is very time consuming when I'm dealing with 500+ of these at a time. Any advice? Thanks in advance.