2D CAD Viewer
The 2D CAD Viewer allows you to display and analyze DXF/DWG drawings directly in the browser.
Overview
The 2D Viewer is based on Paper.js and complements the 3D Viewer with a powerful 2D view for:
- CAD drawings - Display and analyze DXF/DWG files
- GIS data - Import WFS layers and GeoJSON
- Collision detection - Detect overlaps between 2D layers
- Measurements - Measure distances and areas
- Export - Export as PNG, SVG, GeoJSON, and DXF
Switching Between 3D and 2D
Use the mode switch (top right in the viewer):
- 3D - xeokit 3D Viewer
- 2D - Paper.js 2D Viewer
The switch can be repositioned via drag & drop.
When to Use 2D?
Use the 2D Viewer for:
- Site plan analysis (DXF floor plans)
- GIS data visualization with basemaps
- 2D collision detection between layers
- Precise area measurements
Uploading DXF/DWG
Drag & Drop
- Drag a
.dxfor.dwgfile into the 2D Viewer - The layer is automatically loaded and rendered
Upload Dialog
- Switch to 2D mode ()
- Open the Layers panel ()
- Click "Add Layer"
- Select "Upload DXF/DWG"
- Choose the file
Supported Formats
- DXF - Drawing Exchange Format (all versions)
- DWG - AutoCAD native (converted via ezdxf)
Toolbar
The toolbar provides access to all 2D functions:
Tools
| Tool | Icon | Function |
|---|---|---|
| Select | Select elements and view properties | |
| Pan | Move the drawing with the mouse | |
| Toolbox | Dropdown with advanced tools |
Toolbox Menu
Via you can access:
- Measure - Measure distances and areas
- Identify - View element properties on click
- Collision Detection - Detect 2D overlaps
- Basemap - Enable background map
- Export - Export the drawing
View
| Button | Icon | Function |
|---|---|---|
| Fit All | Fit all layers to view | |
| Show All | Show all layers | |
| Labels | Toggle feature labels on/off |
Panels
| Button | Icon | Function |
|---|---|---|
| Layers | Toggle layers panel | |
| Properties | Toggle properties panel |
Navigation
Mouse Controls
| Action | Control |
|---|---|
| Pan | Right-click drag / Middle-click drag |
| Zoom | Mouse wheel |
| Select | Left-click |
Keyboard Shortcuts
| Key | Function |
|---|---|
F / H / V | Fit all to view |
+ / = | Zoom in |
- | Zoom out |
S | Select tool |
P | Pan tool |
M | Measure tool |
I | Identify tool |
L | Toggle labels |
Space (hold) | Temporary pan mode |
Ctrl + A | Select all visible features |
Escape | Cancel current tool |
Delete | Clear all measurements |
Temporary Pan
Hold the Space key to temporarily switch to pan mode. When you release it, the previous tool returns.
Feature Selection
Single Selection
- Activate the Select tool ()
- Click on a feature in the drawing
- The feature is highlighted
- Properties are shown in the right panel
Identify
- Activate the Identify tool ()
- Click on a feature
- A popup shows the key properties
Properties Panel
The right panel shows for selected features:
- Layer - Associated CAD layer
- Type - Geometry type (line, polygon, point, etc.)
- Attributes - DXF attributes (layer, color, linetype, etc.)
- Coordinates - Geometry coordinates
Performance Tips
Large DXF Files
- Hide layers you don't need to speed up rendering
- Use the class filter to show only relevant feature classes
- Use bounding box zoom for detail areas
See Also
- 2D Layers & Import - Layer management and data import
- 2D Tools - Measurement, labeling, collision, and export
- 3D Viewer - 3D navigation and element selection
- GIS Integration - Import GIS data