Skip to content

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

  1. Drag a .dxf or .dwg file into the 2D Viewer
  2. The layer is automatically loaded and rendered

Upload Dialog

  1. Switch to 2D mode ()
  2. Open the Layers panel ()
  3. Click "Add Layer"
  4. Select "Upload DXF/DWG"
  5. 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

ToolIconFunction
SelectSelect elements and view properties
PanMove the drawing with the mouse
ToolboxDropdown 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

ButtonIconFunction
Fit AllFit all layers to view
Show AllShow all layers
LabelsToggle feature labels on/off

Panels

ButtonIconFunction
LayersToggle layers panel
PropertiesToggle properties panel

Mouse Controls

ActionControl
PanRight-click drag / Middle-click drag
ZoomMouse wheel
SelectLeft-click

Keyboard Shortcuts

KeyFunction
F / H / VFit all to view
+ / =Zoom in
-Zoom out
SSelect tool
PPan tool
MMeasure tool
IIdentify tool
LToggle labels
Space (hold)Temporary pan mode
Ctrl + ASelect all visible features
EscapeCancel current tool
DeleteClear 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

  1. Activate the Select tool ()
  2. Click on a feature in the drawing
  3. The feature is highlighted
  4. Properties are shown in the right panel

Identify

  1. Activate the Identify tool ()
  2. Click on a feature
  3. 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

BIM AVA Documentation