Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Options
Export sketch as piecewise polyline.

It's been a while since I've written any featurescript. I'm looking for the following solution. I would like to be able to select N closed and open chains of sketch entities and with a provided tolerance tesselate them into N piecewise polylines and then either print them to the console or copy them to the clipboard. Is this relatively simple?
Tagged:
0
Comments
Would be easier to export as DXF with "export splines as polylines" option
Not really. I want a simple tool I can use to generate me polylines I can paste directly into a c++ program as test data. Using the OnShape sketcher and having a tool that can copy the sketch data to the clipboard as a
std::vector<std::vector<Point2D» foo = { …… }
is what I would like to have. It would probably exporting DXF and then processing that DXF with another tool to get what I want but it would be nice to have an all in one UI driven by featurescript that would do this for me. I can't imagine this useful to anyone else but me ;)
You're not the only one who has a use for a tolerance based polyline script. When I did my Delaunay Triangulation script I settled for a basic global resolution subdivision script but there are times when I'll want more local curvature aware tolerancing for this and other scripts I'm working on. Export-import routines probably work for a lot of applications but it's definitely cleaner to keep everything at the feature level in my opinion.