Clean DXF Import
Imports a DXF or DWG file as a clean sketch: points merged, duplicates and overlaps removed, lines, arcs, circles and splines that come in many pieces joined into one, and spline points reduced. A before and after preview shows what the cleaning did. Clean Sketch does the same for a sketch you already have.
Where to find it
SWPlugins Suite tab › Clean DXF Import. Select a plane or a flat face first, or start it inside an open 2D sketch; with nothing selected the drawing goes onto the Front plane.
Pick the file. It is read and cleaned before anything is written, and the page says what the cleaning did: how many pieces became how many lines, arcs, circles and splines, how many closed loops there are and how many ends are still open. The Task Pane shows the drawing before and after. OK writes the sketch.
What the cleaning does
- Ends that lie closer together than the tolerance become one point. Zero-length pieces, duplicates and pieces lying on each other are removed.
- A line, an arc or a circle that the file holds in many pieces becomes one entity. A run of short lines along a circle becomes an arc or a circle.
- A free curve becomes one spline with as few points as the fit allows. Outlines exported from drawing programs often arrive with thousands of points; they come out with a handful per curve.
- Lines that are horizontal or vertical within the tolerance are made exactly so, and radii within the tolerance of a round value take it.
- Tiny imperfections go: a nick, a small step or a sliver between longer pieces becomes one point, and loose bits and specks are removed.
- The tolerances come from the size of the drawing, so a 30 mm logo and a 2 m panel are both treated sensibly. You can set them yourself.
Options
The preview
- Top: the drawing as the file has it, every piece in its own colour, so you see where a curve is in pieces. Magenta rings mark where a small detail is removed.
- Bottom: the cleaned drawing. Lines are blue, arcs green, circles orange, splines grey with their points as small rings. Red dots are open ends.
- The wheel zooms, a drag moves, a double-click fits. Both halves share one view.
- A file with more than one layer lists its layers above the preview. Untick a layer to leave it out, for example a frame or dimensions; it stays visible in pale grey.
Clean Sketch
SWPlugins Suite tab › Clean Sketch cleans a sketch that is already in the part, with the same clean-up options and the same preview. It has its own page in these docs.
What you get
- Plain SOLIDWORKS sketch geometry: lines, arcs, circles and splines. Nothing depends on the add-in afterwards.
- Ends that belong together lie on exactly the same point, so SOLIDWORKS finds the closed contours and the sketch extrudes without repair.
- One Ctrl+Z takes back an import or a Clean Sketch of up to 200 entities.
Limits
- Text, hatches, dimensions and images are left out; the message lists what was skipped.
- Above 200 entities the sketch is written a faster way that Ctrl+Z does not take back. For Clean Sketch and for an import into an open sketch the page warns before OK: save the part first.
- Basic relations are added for up to 500 entities.
- A DWG is read through SOLIDWORKS’ own import: a new part appears for a moment and closes again. Layers are not available for DWG files.
- DXF files are read in their text form. Save a binary DXF as a text DXF or as DWG.
- A drawing with a contour inside a contour inside a contour, such as a ring around a letter with a hole, extrudes by selected contours only. That is how SOLIDWORKS treats such sketches.