I have a general question not necessary related to Rhino, about PDF file format.
Context:
The building construction industry loves this horrible format. The problem comes when you want to build something real out of it: a bridge, a building, a tunnel, and so on. We know this format was created for paper printing, not for CAD modeling. Ultimately, the client most often sends PDF files to construction companies. Forget about IFC and DWG we are still far behind. Then construction companies import these files, and every object loses precision due to rounding or other conversion losses. A typical technician rebuilds this data within several days by redrawing, but not using PDF data due to spit out coordinates like 0.99999.
Question:
Has anyone a solution to retrieve precise CAD drawings out of PDF files?
PDF format is limited to 200 x 200 inches. So using PDF for construction purposes at 1:1 is generally impossible, and will require scaling.
A work around that I have not tried is indicated below. However, as it mentions modifying the DPI, that would seem to indicate that precision would be limited to discrete increments, preventing the use of dimensions to the original precision.
I suppose my comment is irrelevant after rereading your post. Once the PDF has been saved, the damage is already done and the original precision is lost.
No, but STEP AP242 (great, high precision), DXF (ASCII, also great) and DWG (proprietary) are all better and already broadly available and supported, but there’s a reason why people like PDFs - spoiler alert - it’s the same as why you don’t share your PSD files with other people, but rather a flattened, nicely compressed JPG instead, or your Rhino or Fusion360 files, but a nicely triangulated, high-poly 3MF.
It’s about gatekeeping, being inconsiderate, not willing to share, holding other people back, and because you can even open PDFs on your stupid iPad.
Ah, I have such fond memories of my second or third architecture internship, where I spent 6 weeks redrawing/tracing a ton of super intricate historical facade plans from a technical PDF in AutoCAD. Fun times!
It’s about gatekeeping, being inconsiderate, not willing to share, holding other people back, and because you can even open PDFs on your stupid iPad.
It is crazy that this behavior goes deeply till the end you build actual things… It means that every partner remodels every model from scratch. These ideas about IFC, BIM, perfect computational workflows never works in real life and are just academic ideas.
Does anyone worked at such a problem - cleaning up PDF drawings?
e.g. trying to round coordinates to near integer or other techniques? Or the nature of the problem is not trivial to solve at all?
not trivial to solve, but you can have a script that “snaps” each point of the converted and properly scaled geometry to the nearest meaningful unit, say, millimeter. This still leaves some edge cases, but it should save some significant amount of time
I have “manually”, a lot, but not programmatically. I guess it would be a hard problem to solve with code?
Worst case, the PDF is flattened and you’d have to basically train a neural net to interpret the image as numerical vector data, while loosing a ton of precision in the process.
Best case, the PDF is clean, unflattened and has good numerical precision, you’d still need a complex logic to reinterpret what belongs together, what to explode, what to discretise, what to get rid of, …, basically reversing what the PDF-exporter has done different from what you expect, and convert everything to a specific software, like Rhino geometry types. Seems like a deep, deep rabbit hole to go down to.
The problem is not the PDF and therefore the solution is not a new importer or some AI powered cleaner.
The problem is human behaviour: people use an inappropriate tool because that’s the easiest way to do it.
You can address this in two ways: a) you can convince people to stop what they are used to and embrace something more difficult (good luck with that). Or b) you can force compliance by working with the appropriate standards body to define acceptable interchange mechanisms and/or get the client to make it contractual.