# Trace a photo

Got a photo of your tools? The Gridfinity Layout Tool finds the outline of each tool in it and turns each one into a cutout that fits. Use this page when the photo is already on your computer. To take a new photo with your phone, see [Scan with your phone](https://gridfinitylayouttool.com/docs/cutouts/phone-scan). Either way, the photo stays on your device, unless you let [our GPU server](https://gridfinitylayouttool.com/docs/cutouts/photo-trace#sharper-outlines-from-our-gpu-server) trace it.

## Open Trace a photo

1. Open the cutout editor. See [Cutout basics](https://gridfinitylayouttool.com/docs/cutouts/basics#open-the-cutout-editor).
2. Click **Scan a tool** in the editor header, then **From a photo on this computer**.
3. Drop a photo on the window, or click **Choose a photo**.

*Video: Clicking Scan a tool in the editor header, then From a photo on this computer. Trace a photo opens, and Choose a photo loads a photo of three tools on the calibration sheet, each with a traced outline.*

Shortcut: drop a photo straight on the board, or paste one with <kbd>Ctrl</kbd>+<kbd>V</kbd>. **Trace a photo** then opens with that photo.

A HEIC photo from an iPhone opens in every browser. Chrome and Firefox can't read HEIC themselves, so the first time, they download a reader for it. That needs a connection and takes a moment. After that, a HEIC photo opens offline too.

## Take a photo that traces well

A good photo saves you cleanup later.

- Lay the tools on a plain surface, with a gap between each tool.
- Take the photo from straight above, from as high as you can reach, and zoom in. A thick tool then looks less large.
- Put a size reference in the photo: a plain sheet of A4 or US Letter paper under the tools, a bank card, the printed calibration sheet, a Gridfinity baseplate or a measuring strip. [Scan with your phone](https://gridfinitylayouttool.com/docs/cutouts/phone-scan#pick-a-size-reference) tells you how to place each one.

## Set the scale

When the photo has a size reference, the Layout Tool finds it and sets the scale for you. The **Scale** section tells you which reference it used.

When a plain sheet of paper sets the scale, the section also shows the paper size. Pick the other size if it is wrong, or pick **Not paper** if the outlined shape isn't a sheet of paper.

When a card sets the scale, the photo labels its outline **Card**. If that shape isn't a card, click **That’s not a card**. The Layout Tool looks for the tools again and does not use that shape for the scale. If the shape then shows as a tool, remove it from the list.

No reference in the photo? Set the scale yourself with one of these:

- **Set length** on a tool in the **Tools** list: type the length of its longest side in millimeters, and click **Set**. Every size in the photo then comes from that length.
- **Draw a ruler**: click both ends of something with a known length. Type it in **Length (mm)** and click **Set scale**.
- **Mark paper corners**: pick **A4** or **US Letter**, then click the four corners of the sheet. The Layout Tool then looks for tools only on the sheet.

A ruler, marked paper or a tool length also replaces a reference that set the wrong scale. To move a ruler end or a corner, drag it. While you place a point, a magnifier shows the area under it close up.

> **Warning**
>
> If the photo shows the sheet at a steep angle, take the photo again from above, or draw a ruler. At a steep angle, the long and short sides of the sheet look alike.

## Pick the tools

The **Tools** section lists each tool that the Layout Tool finds. If the list isn't right yet, you can fix it here:

- Click a tool in the photo to draw its outline again, or to add a tool that it missed.
- Remove a tool that you don't want.
- Point at a tool in the list to mark it on the photo. Once the photo has a scale, its size shows under it. Each size is the smallest box around the tool, the size that it lands at, in the unit that you measure in. Point at a size in the list to see it in millimeters.
- Click **Draw region** and drag a box around the tools to look only in that area.
- Move **Sensitivity** up to find faint tools, or down to drop shadows and specks. **Auto** lets the Layout Tool choose.

When the outlines look right, click the add button to put the tools in the bin. For one tool, it reads **Add to bin**. Several tools come in as one group, so you can move them as a block. The editor then asks how thick each tool is. See [Set the tool thickness](https://gridfinitylayouttool.com/docs/cutouts/import-svg-stl#set-the-tool-thickness).

On the way in, each tool gets two changes:

- It turns square to its smallest box, so its selection box fits it closely. A tool that lay at a slant in the photo does not get a large square box. Several tools are laid out side by side so that none overlaps another.
- Its outline is fitted with smooth curves that stay within 0.1 mm of the trace. A traced edge then has few points to edit, not hundreds.

*Picture: Trace a photo shows three tools on a calibration sheet, each with a traced outline.*

## Keep holes as islands

Some tools have holes, such as the ring of a spanner. Turn on **Keep holes** to keep plastic in each hole. This plastic is an **island**: it stays at full height inside the cutout, and the tool sits around it. A tool that lies inside a hole comes in as a separate tool.

**Keep holes** is off at the start, because a shiny reflection can look like a hole.

*Video: Turning on Keep holes in Trace a photo. The ring of the wrench gets an outline of its own, so plastic stays in the hole.*

In the bin, the clearance makes each island smaller, and the entry edge runs around it. A cutout keeps up to 64 islands. When an island gets too thin to print, **Pocket checks** shows a warning with **Remove thin islands**.

## Tidy up an outline

A traced outline can come out a little lumpy. Before you add the tools, **Clean up outlines** changes every outline in the photo. After you add them, select one traced or drawn outline in the cutout editor and open **Outline**:

| Setting                                            | What it does                                                                                                                                                                   |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Simplify**    | Fits the outline with fewer points. A higher value gives a simpler outline.                                                                                                    |
| **Smooth into curves**      | Changes many short straight steps into smooth curves with handles.                                                                                                             |
| **Straighten edges**  | Makes edges that are almost square to the bin fully square.                                                                                                                    |
| **Mirror**      | Makes the outline the same on both sides of a **Mirror line**. **Keep** picks one half, or the average of both. |
| **Round inside corners** | Rounds the inside corners of the outline.                                                                                                                                      |

Feel free to experiment. Each change starts from the outline that you had when you opened the section, so you can move a slider back and forth. **Reset outline** puts the outline back. With several tools in one photo, mirror each tool after you add it.

*Video: In Clean up outlines, moving Simplify to 0.7 mm and turning on Smooth into curves. The outlines of the screwdriver and the pliers change in the photo as the controls move.*

## Edit points up close

For a precise fix, move the points yourself:

1. Select a traced or drawn outline and click **Edit points**. You can also double-click the outline, or press <kbd>Enter</kbd>. For a tool in a group, the first double-click selects the tool and the next one opens its points.
2. Make the fix:
   - Drag a point or a curve handle to move it. Click an edge to add a point.
   - Drag an edge to pull it. The outline near the edge follows, less and less out to the ring that shows the reach. Press <kbd>[</kbd> or <kbd>]</kbd> to make the reach smaller or larger. The pulled part gets few points again when you let go, and the rest of the outline does not change.
   - Shift-click points, or drag a box around them, to select several. Drag one of them, or press the arrow keys, to move them all.
   - Drag a corner of the box around the selected points to scale them. Drag the dot above the box to turn them. Hold <kbd>Shift</kbd> to keep the proportions, or to turn in 15 degree steps.
   - Click **Smooth** or **Corner** to make the selected points curve through, or make a sharp corner.
   - Press <kbd>Delete</kbd> to remove the selected points.
3. Click **Done**, or press <kbd>Esc</kbd>, when you finish.

The points of the islands are editable too. One selection holds the points of one ring: the outline or one island. While you drag a point, a magnifier in the corner shows it close up, so it lands right on the edge.

## Sharper outlines from our GPU server

When our GPU server is on, it can trace the photo again at up to 4096 pixels on the long edge. Thin tips and shiny steel usually come out sharper than on this device.

This device's trace shows at once. Unless you picked **Always** or **Never** in Settings, a card on the photo then offers the server. Nothing goes to the server before you pick:

- **Always** sends this photo and the photos of later scans.
- **Just this one** sends only this photo.
- **Not now** keeps this device's trace, and the next photo offers the server again.

A photo sized by a baseplate or a measuring strip stays on this device with each answer.

A line above the photo shows each step on the server. A GPU that must start first usually needs less than 30 seconds. To stop the server and keep this device's trace, click **Keep this device's trace**. If the server doesn't answer, click **Try again**.

The server's trace takes the place of this device's when it finishes. When it found more or fewer tools, the line above the photo says how many. To go back, pick **This device** on that line. Each side keeps your changes, and the side on screen is the one that goes in the bin. If you change the trace before the server finishes, your change stays, and the server's trace waits under **Our GPU server**.

To change your answer, go to Settings, **Privacy**, and pick **Ask each scan**, **Always** or **Never** under **Sharper tool outlines**. A self-hosted copy doesn't have the server. [Your data and privacy](https://gridfinitylayouttool.com/docs/introduction/your-data#tool-photos) explains what a photo sends and where it goes.

## Save traced tools as a file

Need the outline for something other than a bin? In **Trace a photo**, click **Export** and pick a **File format**:

| Format                                                                 | Use it for                                                                                                         |
| ---------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------ |
| **SVG** or **DXF** | A laser cutter, a vinyl cutter or a vector app.                                                                    |
| **STL**                                      | A solid to subtract from a model in your CAD app. Set its **Thickness**, which starts at 10 mm. |

The outlines are at true size. Tick the clearance box to add 0.4 mm on each side, the same room that a cutout leaves around the tool. On a phone, **Download** on the review screen does the same.

## When it goes wrong

### The add button stays gray

Set the scale first. Click **Draw a ruler** and mark something of known length. Or click **Mark paper corners** and mark the four corners of the sheet. If you know how long one of the tools is, click **Set length** on it instead.

Without a size reference, the Layout Tool can't tell how big the tools are. So it adds nothing to the bin, and a note beside the buttons asks you to set the scale.

### Tools are missing, or a shadow counts as a tool

Click each missing tool in the photo. To leave out the clutter, click **Draw region** and drag a box around the tools. Then move **Sensitivity** up for faint tools, or down to drop shadows and specks.

The Layout Tool finds a tool by how its color differs from the surface. A tool in a color close to the surface can stay hidden, and a dark shadow can look like a tool.

### The paper corners don't make a sheet

Drag each corner point onto a corner of the paper. Does the message say that the long and short sides look alike? Then take the photo again from straight above, or draw a ruler.

The four corners set the scale from the known size of an A4 or US Letter sheet. At a steep angle, the long side and the short side look almost the same length.

### An outline setting has no effect

Move the slider back a little, or click **Reset outline**.

Some values don't leave one clean pocket, for example when a mirror keeps a half that is in two parts, such as the top half of a U. The Layout Tool then keeps the outline as it was, and a message tells you so.

## Next steps

- [Scan with your phone](https://gridfinitylayouttool.com/docs/cutouts/phone-scan): take the photo with your phone and send the outline to the computer.
- [Arrange cutouts](https://gridfinitylayouttool.com/docs/cutouts/arranging): pack the traced tools in the bin.
- [Check before you print](https://gridfinitylayouttool.com/docs/cutouts/print-checks): print a fit test before the full bin.
