Cleaning Up a Drawing
Edit › Clean Up Drawing… makes a drawing ready to cut: lines drawn twice are taken out, overlaps trimmed, small gaps closed, and pieces that run on from each other made one. It is meant above all for drawings imported from other programs (DXF, DWG, PDF, Illustrator …), which often come with doubled lines, lines that stop just short of each other, and arcs broken into many pieces or many short lines: a cutting table or a router then cuts the same line twice, or a shape that should be closed isn't, so it can't be pocketed or laid out.
What is cleaned
The lines and curves selected, or, with nothing selected, every line and curve on the page you are working on: lines, arcs, circles, polylines, splines, Béziers and ellipses. Points, text, dimensions, pictures, parts and infinite lines are left as they are, as is anything hidden or on the Construction layer.
Each layer is cleaned on its own, so a crease along a cut is never merged into the cut, and elements with settings of their own (tool settings, bridges, line width …) are cleaned apart from the others and keep them. The cleaned elements take the place of the old ones, on the same layers.
The options
| Option | What it does |
|---|---|
| Largest gap to close | Ends this close together that touch nothing are joined: lines and arcs are extended along their own line or circle to meet, or to run into the element they fall short of. 0 leaves gaps alone. The default is 0.1 mm (0.004″). |
| Bridge other gaps | Where two ends can't be met by extending them (two curves, or two lines side by side), a line's end is moved, or a short line added. |
| Take out duplicates and overlaps | Elements drawn twice are taken out, and where two elements partly overlap (two lines along each other, an arc over a circle) the overlap is cut out of the shorter. |
| Merge pieces | Lines that run on in a straight line become one line, arcs of the same circle one arc; polylines and splines become their lines and arcs. |
| Arcs for runs of short lines | Runs of short lines that lie on one circle (arcs exported as lines) become one arc, from the number of lines given. |
| Tolerance, Shortest piece kept | (Advanced) How close ends must be to be the same point, and the shortest piece kept: shorter pieces, and slivers left by trimming overlaps, are taken out. |
The options are remembered for next time, separately for millimetre and inch drawings.
Parametric drawings
Cleaning works on the shapes as they are now: the cleaned lines and arcs are new elements on new points fixed where they are. They no longer follow the drawing's variables.
So elements that are built on variables or other points (a line to P4=[W/2,H], a piece or offset of another
element) are left out unless you tick Clean parametric elements too; the dialog says how many there are, and
the Interactive window says how many were left out (or fixed). An element that something else is defined on (a point
ONELEMENT on it, a fillet …) is kept on the Construction layer, so that still works.
Afterwards
The Interactive window says what was done: how many elements were cleaned into how many, and how many duplicates were taken out, overlaps trimmed, gaps closed and tiny pieces taken out. The new elements are selected. Undo puts the drawing back as it was in one step.
See also: Tidy Drawing (merges points without changing what is drawn), G-code, DXF.