Wednesday 27 January 2021

From PDF to a Useful Part

 The gear example in this post came from a pdf intended for scroll saw users. This type of pdf can be opened directly in Inkscape.  The idea is the parts are printed on paper at full scale and the paper is then glued to a piece of wood.


 It's also possible to extract a drawing from a generic pdf using Inkscape's import via poppler option.  This wrench was extracted from a pdf repair manual.  The commands Ungroup, Path Break Apart and Path Combine were used to complete the task.  This trick could come in handy for transforming a logo to dxf or getting artwork for engraving.

This post is in part an expansion of a previous post:

https://steppingintocnc.blogspot.com/2021/01/freecad-dxf-problem-and-solution.html  


The pdf page on the left has some items that need to be removed as gear on the top right is all that's needed.  A sharp eye will notice a cleaner drawing exists on the bottom left so this isn't the best example.  Also Acrobat Reader has tools to simplify this task but open source tools do all that's needed.



In Inkscape turn off the page border in drawing preferences.  Left click and drag a selection box around the desired item.  From the Edit menu select invert selection and hit the delete key.  The page is now reduced to the image on the left.

 

 

 

 


 The image on the left shows all that is needed from the pdf page.  Reaching  this point can be a bit of a pixel hunt but drag-select can speed things up considerably.

 

 

 

 

 

Inkscape can export in dxf format but I've had some less than great experiences with that exporter.  QCAD has a very good svg importer so the drawing was saved as an Inkscape svg.  Inkscape by default is set to 90 dpi but if unsure check the application preference settings.

On the left is the svg imported in QCAD.  There are a huge number of segments so a decision will need to be made whether use as-is or recreate some of the geometry.  In this case the mess of segments in the centre were replaced with a true circle.  Before saving the dxf file make sure the drawing preferences are set to mm.


 

 

 

 

 

The next step is importing the dxf into FreeCAD.  It's also possible to import the svg file directly into FreeCAD but I find it easier to manipulate this type of file in QCAD.  I also have some reason to suspect the QCAD dxf is a more accurate representation of the original drawing compared to how FreeCAD interprets the svg.

From this point on the procedure is a rehash of the post mentioned at the top of this page.  And now a small note regarding the pocketing operation problems that prompted that post..............


    On this part I had best results by making the pocket the first operation and some grief doing this in any other order.  The vertical surface of the pocket is easily selected as the pocket geometry.  Good thing I got rid of all the segments eh ?

No comments:

Post a Comment

Note: only a member of this blog may post a comment.