Can you import PDF plans?

pdf
import

#1

I’ve got 2d plans from my architect and i’d like to create a 3d model in sketch up, but i can’t work out how to get the PDF into sketch up…


#2

According to this help article, SketchUp can’t import PDFs.
You can convert PDFs into jpg or png using softwares like Photoshop or GIMP. Also you can try online alternatives, such as: http://pdf2png.com/


#3

#4

To clarify, PDF files cannot be imported into SketchUp in Windows. On a Mac, which natively supports PDF files, you can import PDF files to use as reference.

On a windows machine you will have to convert into a supported file format (as @filibis And @sketch3d_de Pointed out)


How to insert any image into 3D warehouse
#5

Is there a technical drawback somehow and we shouldn’t expect in Windows to have this feature soon?


Also i’m pretty sure this was ‘No’ in the morning :joy:

Maybe it should be more like: “Yes (in Mac)” to be clearer.


#6

PDF | Vector | Yes

is wrong for the Mac version too, SU uses the Quartz PDF engine of the macOS for importing - even vectors - as a raster image only * iirc *


#7

Or “No (except for Mac)” or simply “Mac Only”.

Or even better, make SU for Win read pdf files. This would also be beneficial for plugin developers as we then could use the same cursors and toolbar icons for both Win and Mac.


#8

#9

I once attempted to create an importer to bring vector PDF into SketchUp as geometry, not as an image as currently done by the Mac importer. I ran into what seemed insurmountable differences between their modeling concepts, and I gave up.

Below is a discussion of what I found. Unless you are a developer or propellor-beanie type, you can stop reading at this point :wink: Maybe someone more clever than I can see ways to deal with the issues…

A PDF actually contains a program that is executed by a drawing engine to generate the graphic output. The program creates a “graphic context” that contains basic info such as coordinate system (origin, scale, transformation), fill patterns, line joint handling, etc. For a vector PDF, It then contains instructions on how to create a “path”, which is a sequence of commands saying things such as “move to”, “draw line to”, “draw arc to” with their associated parameters. After creating a path, the program tells the engine what to do with it: either “stroke” (output it as a line) or “fill” (output it as a filled area). There are also other uses of paths, such as creating clipping boundaries. Many PDFs create a new graphic context for each path. The graphics engine takes care of issues such as anti-aliasing based on the physical properties of the output medium and the overall scale it is told to use.

The difficulties start with a fundamental aspect of how the graphics engine operates: it uses a “painter’s algorithm”. That is, the conceptual model is of layers of paint applied to a canvas. Each successive item drawn simply overlays whatever was there before, without merging, blending, intersecting, or otherwise interacting with it. Said another way, the only memory the graphics engine has of what was drawn previously is the digital “paint” on the “canvas”, not what operations it came from or what it “is”. The equivalent in SketchUp would be that every path created would need to go into a new group! But even then, if the Faces (filled paths in PDF) were drawn on the same plane, you would get massive z-fighting in SketchUp because OpenGL does not use the painter’s algorithm.

In many samples I tested, I also found that the painter’s algorithm causes people to be imprecise when drawing lines in PDFs. Because they have width and end handling, two lines can appear to meet at a vertex when in fact they leave a gap or are misaligned. This caused problems with loops not closing when I attempted to convert filled paths to SketchUp Faces.

In the PDF graphics context, “lines” have fundamental properties that have no equivalent in SketchUp edges. They have a non-zero width, end termination (e.g. they can have a rounded end with the final point as the arc center) and a fill pattern. Where a path makes a corner, the context defines how to join the two edges meeting at the corner (miter, round, butt, etc.). Fundamentally, a PDF edge is no different from an area: the graphics engine generates an outline and then fills it. So, a PDF line would have to be represented as a Face in SketchUp with appropriate calculations to create the outline and fill pattern correctly. The number of Edges required is much larger than you might expect! I found that the alternative (just create a sequence of Edges down the center of the path) too often left gaps and misalignments.


#10

Regarding importing pf plans to SketchUp I managed to do that on Windows by importing the PDF ti Inkscape and from there export a DXF i believe. However all the coordinates on the 1:100 PDF drawing had been rounded to the point where it was almost impossible to work with in SU. Suddenly parallel lines weren’t considered parallel anymore and perpendicular ones weren’t perpendicular. It was good enough to use as an outline for modeling everything anew but using the geometry as it was would cause massive problems later in SketchUp. I think most applications that creates PDFs round coordinates to something that works great when looked at but can’t be scaled up and worked on later in a modeler.


#11

I just tried a quick test using Illustrator to Place a PDF and then export the vectors shapes as DWG, which came into SketchUp ok. But that was a simple drawing. Does anyone have a more complex PDF that contains vectors that I can try?


#12

If you click “Se ritningar” on this page a list of pdf drawings will be shown. The problem with lines stop being parallel/perpendicular happens especially on diagonal lines because the coordinates are rounded differently. If a line is parallel to an axis both the start and end will be rounded the same and it will keep being parallel to that axis. The distance between two parallel lines might be altered anyway though.


#13

I opened the PDF in Illustrator and did an export to DXF. The attached image shows the settings I used. If I zoom into two lines that seem not to be parallel in SketchUp, and zoom into the same area in the PDF, they are similarly not parallel.

I’ll attach my skp file as well (as zip to get the file size down).

pdftest.zip (1.3 MB)


#14

a free alternative to Inkscape for converting to the DXF format would be ‘Ghostscript/GSView’ plus addon ‘pstoedit’.

download and install:
• PostScript/PDF Processor : Ghostscript x32 (AGPL)
• Graphical User Interface : GSView
. - alternatively : GhostFriend
• additional Vector Formats : pstoedit


#15

I finally just bought a license to PDF2CAD as I do this 2-3 times a week. Even if I wasn’t on a Mac I only bring in native PDF when it won’t translate to DWG / DXF. Having the PDF converted to geometry works really well, speeds my modeling, and sometimes helps me catch issues before I get too far along with my work.


#16

Are the PDF’s you bring in Vector PDF’s?


#17

Yes, those I convert first with PDF2CAD (there are other options). If it doesn’t convert I bring it in as a PDF (I’m on a Mac) and work with it the best I can.


#18

I’ll have to check what AutoCad does to these. Newer versions can also import and explode vector PDFs. The accuracy problems might stem from the PDF format itself.


#19

I recently completed a project that started with importing PDF plans. The on-line conversion tool file size limits meant that I couldn’t convert them (without purchasing a license), so I imported as images into SU.

Do you have any thoughts on how to optimize the quality of an imported (rasterized) pdf? They can be really ‘jaggy’, sometimes to the point of being unusable.

Also, what’s the license cost for PDF2CAD? For a one-off project, it didn’t seem worth a license. But now that we have more projects in the pipeline that include this workflow, I’m looking at that option. The time savings alone of not having to trace over a PDF image seems like the cost would quickly be recuperated.

Are you happy with quality of the converted files?


#20

I think the jaggy bit is a function of SU more than anything. You could always convert to a hi DPI JPG or PNG and see if that helps and place as an image.

Regarding PDF2CAD:
I think I paid ~$200 US a few years ago, and recently upgraded to the latest version. I use it at least 2-3 times a week. I’m not relying on it for precise placement - I usually double check and verify that what I’m drawing (primarily overlaying timber frame structures) fits both the design intent, the wall build up, and then digging into the details. Like anything the better the draftsman, the better the output.

Quality depends on lots of things - but I’ve been really happy with it. I usually convert, pull the files into DraftSight (still free on the Mac) and do basic clean up - delete any hatches, title blocks, etc. - then I import them all into SketchUp and use the tape measure to set the proper scale.

Here are a few screen caps - from a simple floor plan, from bringing in EVERYTHING that I had to work with after conversion.