Skip to content

Building from drawings, photos and DXF

This is about building 3D from 2D material you already have. The input is a cover machining drawing you sent to a shop (PDF), a DXF exported from your PCB tool, a drawing sheet image from a wiki, or a product photo with a handful of dimensions written on it. The AI reads the material, produces a dimension table first, and then stacks a Body from that table the same way as in Building from scratch.

Say this What you get
“Build the cover plate from this PDF drawing” (vector PDF) Reads the circles, rectangles and dimension text inside the PDF and produces the plate and its hole pattern. Scale is confirmed by comparing dimension text against drawn distances
“Make a 3D PCB board from this DXF” Pulls only the OUTLINE layer polyline (corner arcs included) and the hole circles. Silkscreen and dimension lines are discarded
“Build the part from this drawing sheet” (image) Reads an isometric projection plus 12 dimensions into 4 features. With no original STEP, verification is by bbox, sketch DoF and screenshot
“Make a rack from two photos and five dimensions” The written dimensions are used as-is; the rest are set from photo proportions, with the reasoning recorded
“Build an observation frame from this structural DXF” Reads the pipe specifications from the bill-of-materials text, and reports which one it followed when the drawing and the BOM disagree
Say this
D:\work\cover_machining.pdf is a 1:1 vector drawing.
The outer rectangle is the cover plate; the inner rectangle is the dimension reference line.
Every circle is a hole and the diameters are in the dimension text.
1. First confirm the scale really is 1:1 by comparing the dimension text with the drawn distances.
2. Then show me a dimension table (diameter and centre coordinates per hole type). The plate thickness isn't on the drawing, so assume 3 mm.
3. Build the model only after I confirm.

From here you correct it — “round the Ø7 height to 115”, “on drawing 2 follow the drawn positions” — and then say “build it”.

Text, lines and circles are stored as coordinates, so this is the most accurate input. If the value converted at 1 pt = 25.4/72 mm matches the dimension text, it is 1:1. For positions with no dimension (hole heights and the like) the AI measures from the vectors and marks the value “no dimension, measured”.

The AI does not use FreeCAD’s DXF import. Hundreds of silkscreen and dimension polylines would each become an object and it would take over two minutes. Instead it reads the file directly and pulls only the outer polyline (vertices plus bulge for corner arcs) and the hole circles. On a structural drawing it also reads the bill-of-materials text and the DIMENSION entities. When the drawn geometry and the BOM disagree — a column drawn as 216 while the BOM says 267.4 — the AI picks one and reports that it did.

The AI reads the picture. There is a recorded session where a single isometric projection and a 12-dimension tutorial sheet became four features. Where the reading is ambiguous — whether a height is measured from the bottom or the front face — the AI states both interpretations, picks one, and records why. With no original to compare against, verification is bbox, sketch DoF 0, and screenshot comparison.

Given five dimensions (width 16.3, height 8.2 cm, and so on), the rest — depth, wall thickness, hole positions — come from photo proportions. Those values go into the parameters marked as assumptions, so you can measure the real thing and change them.

  • Get the dimension table first, confirm it, then let it build. Splitting it into two steps as in the prompt above catches misread dimensions before the model exists.
  • Always make it write down what it assumed. “3 mm thickness is an assumption” is what tells you later which numbers came from the drawing and which were estimates.
  • Reference lines without dimensions do not get built. Things like a connector outline reference with no dimensions are reported as “not machined”. Give it dimensions and ask again if you need them.
  • Mangled symbols (%%C240, □50) are usually a broken Ø. When the AI says it read them that way, check that it is right.
  • Drawing file paths are relative to the PC running the AI. For a NAS path, give it the drive letter (Z:\…).
Tool What it does
The AI’s own file reading PDF (vectors and text), DXF (polylines, circles, dimensions, BOM text), image reading — outside FreeCAD
build_features Sketches + Pad/Pocket in order, from the dimension table it read
get_screenshot · inspect_object Compares against the drawing via screenshots and bbox