curve in PDF file seems to have a ton of unneeded points

Marc_Miller
Marc_Miller Member Posts: 111 ✭✭✭
I opened a PDF file up in some vector software and discovered that a simple curve had a ton of points, I was quite surprised by this since the shape should only need 7 points.  Is there a reason Onshape seems to be exporting curves like this, or a way to export a "simplified" curve?

I have attached an Onshape PDF drawing with a few simple shapes (exported from this file). 

The top circle has what I would expect, just four points.

The other curves have a huge number of points!  This "fat blue line" is really a ton of points all highlighted from a window select.  If I zoom way way in I eventually can see the individual points.




This is what I was expecting to see, just 7 points.
(I drew this as a circle and a rectangle and combined/merged them in the vector software Affinity Designer.)



Tagged:

Answers

  • NeilCooke
    NeilCooke Moderator, Onshape Employees Posts: 6,126 image
    PDF output is for viewing and printing, not vector editing, so we are just converting the drawing graphics as-is (a circle in computer graphics is just a polyline). 
    Senior Director, Technical Services, EMEA
  • Marc_Miller
    Marc_Miller Member Posts: 111 ✭✭✭
    Ok, thank you @NeilCooke
    We are sending PDF drawings to a laser cutter which is why I had noticed this in the first place. Sometimes not ideal with all those extra points. But I totally understand from Onshape's perspective that is probably not something you would suggest or expect a user to be doing with PDF drawings.
  • mahir
    mahir Member, Developers Posts: 1,324 ✭✭✭✭✭
    If sending to a laser cutter, perhaps exporting as DXF would be a better option.
  • Marc_Miller
    Marc_Miller Member Posts: 111 ✭✭✭
    @mahir I can do (and have done) that, but it's a Glowforge laser cutter and for whatever reason the Glowforge company decided they don't want to support DXF.  Something about it's not a standardized enough format to support.  What the heck, right? 

    So if I export a DXF I need an intermediate step (i'm using Inkscape) to open the DXF and save as an SVG for the laser.  Or if I export as PDF I have now discovered I can open it in Affinity Designer, do a Select All and run a "smooth curve" command that does a nice job of optimizing the nodes, and then save as PDF or SVG for the laser.  I was, of course, just hoping avoid the intermediate step each time.
  • fnxf
    fnxf Member, User Group Leader Posts: 147 PRO
    What about using a cloud conversion tool for that intermediate step? (e.g. https://convertio.co/dxf-svg/)
    Maybe that produces nice nodes...
  • Marc_Miller
    Marc_Miller Member Posts: 111 ✭✭✭
    Thank you @fnxf that's a good idea I will check out a bit more and keep in mind.
  • mahir
    mahir Member, Developers Posts: 1,324 ✭✭✭✭✭
    edited July 2020
    I've confirmed that when exporting as DXF and then opening in Inkscape you don't get all the extra points. And I suspect that if then converted to PDF via Inkscape that the extra points wouldn't be there either if using the appropriate conversion settings... maybe.