Nº 01Tools / Viewer
DXF, SVG and STEP viewer
Open DXF, SVG, planar STEP and BREP files and look at their geometry, layer by layer. planex2d reads them in this tab, running on Pyodide/ngapp. Nothing is uploaded.
- Files stay on your computer
- Runs in your browser
- Built on the planex2d library
DXF, SVG, planar STEP or BREP. Nothing leaves your browser.
Drop files onto the sheet or use the button inside it. Large drawings are slower here than in Python on your machine.
Try a sample file
Each one opens in the viewer above. Download them to read the same files with planex2d in Python.
-
Fig. 1DXF
Mounting bracket
An L-shaped plate with tangent arcs and two holes, their center lines on a layer of their own.
-
Fig. 2SVG
Flange gasket
A ring with six bolt holes on a bolt circle, as a cutting file in millimeters.
-
Fig. 3STEP
-
Fig. 4BREP
What the viewer shows
Every file is read by planex2d's own readers, the same calls as in Python. This is what they take from each format.
DXF
From a DXF file the viewer takes the model space: lines, arcs, circles, polylines with their arc segments, splines and ellipses, and the entities inside block references. Text, hatches, dimensions and points are left out, as is the paper space. Each layer of the file becomes an entry in the legend, so a click hides or shows it.
planex2d joins ends that meet and cuts the edges against each other where they cross, as it does for every drawing it reads. A circle crossed by its center lines therefore shows as four arcs when the edges are colored by type, and the crossing points show as edge ends.
SVG
From an SVG file the viewer takes paths and shapes. Lines and circular arcs stay lines and arcs, Bézier curves become exact splines, and elliptical arcs become exact rational splines. Transforms are applied, and the y axis points up as in a drawing. Groups labeled as Inkscape layers become legend entries. Text and images are left out.
STEP and BREP
STEP and BREP files are read as planar parts: flat faces with their edges, which may be lines, arcs, circles, ellipses or B-splines. The faces are filled, and the names and colors a STEP file gives its parts are kept by the reader. The viewer opens planar files only. See STEP and BREP in the docs for the readers and their options.
Units
Sizes are shown in millimeters where the file names its length unit, converted from inches or meters where needed: a DXF file names it in its header, an SVG file in its width and height, a STEP file always. A file that names no unit shows its numbers as written, marked u. BREP files carry no unit, and an SVG file without one counts in CSS pixels (px).
How the viewer works
A small page around the planex2d Python library. It runs the same code you get with pip install planex2d, compiled to WebAssembly and loaded with Pyodide/ngapp.
- Load
The page loads Python and planex2d into this tab. Your browser keeps both in its cache, so later visits start faster.
- Read
When you open a file, the browser reads it from your disk into memory. No request carries it to a server.
- Convert
planex2d reads the file into exact geometry. Lines, arcs, circles and splines stay curves, and ends that touch are joined into wires.
- Draw
Plotly draws the geometry finely enough to stay smooth when you zoom in about ten times. A click on a layer in the legend hides or shows it.
Supported files
| Format | Extensions | Notes |
|---|---|---|
| DXF | .dxf | Lines, arcs, circles, polylines, splines and ellipses of the model space, by layer. See Files. |
| SVG | .svg | Paths and shapes, by group label. Text and images are left out. See SVG. |
| STEP | .step .stp | Planar parts, shown in millimeters. See STEP and BREP. |
| BREP | .brep | Planar parts. BREP names no unit, so the numbers are shown as written. |
Run it in Python
Everything the viewer does is available in the library. Install it and see Files in the docs for every reader.
$ pip install planex2d
import planex as px
plate = px.FromStep("slotted-plate.step")
px.Plot(plate, backend="plotly")
Privacy
Nothing is uploaded. Files are opened in this tab and are gone when you close it. Python, planex2d and the drawing library come from public package servers (jsDelivr and PyPI). See the privacy notice.
Limits
- The viewer opens planar STEP and BREP files only.
- In the browser, planex2d runs in one thread, so large drawings take longer than in Python on your machine.
- A file that does not open? Open an issue on GitHub and attach the file if you can.
Questions and answers
Is my file uploaded?
No. The file is read in this browser tab by planex2d, running on Pyodide/ngapp, and is gone when you close the tab. The page loads Python and its packages from jsDelivr and PyPI, but it never sends your file anywhere.
Do I need a CAD program to open a DXF file?
No. The viewer shows the geometry of a DXF file layer by layer in a current browser: lines, arcs, circles, polylines, splines and ellipses. Text, hatches and dimensions are not shown.
Which DXF entities does the viewer show?
LINE, ARC, CIRCLE, LWPOLYLINE and 2D POLYLINE with their arc segments, SPLINE and ELLIPSE from the model space, including those inside block references (INSERT). Everything else, and the paper space, is left out.
Can it open 3D STEP files?
No. The viewer opens planar STEP and BREP files only.
Why is the size shown in u?
The file names no length unit, so the viewer shows its numbers as written. BREP files never name one; a DXF file names it in its header ($INSUNITS).
Does it work on a phone?
Yes. The page fits small screens, files open with the Choose files button, and the drawing moves and zooms with the buttons above it.
Other tools on planex2d.org
Every tool runs on the planex2d library, in your browser.
-
Converters
Many DXF, SVG, STEP and BREP files in, one format out, all saved at once.
-
Calculator
Area, centroid, second moments and section moduli of a drawing, and the mass of a sheet part.
-
Contour checker
Open contours, gaps, doubled lines and tiny edges in DXF, SVG and STEP drawings, marked and repaired.
-
Nesting
Plies and flat parts placed on a roll for the shortest length, with the fiber direction kept.
-
Playground
planex2d code in the browser, beside what it prints and draws, shared as a link that carries the code.
The planex2d documentation shows the library behind the tools, and the homepage lists everything on planex2d.org.