A modern DXF file viewer and editor application with a clean, professional interface.
- Load and display DXF files with accurate rendering
- Zoom in/out using mouse wheel
- Pan by dragging with left mouse button
- Automatic centering and scaling of loaded drawings
- High-quality antialiasing for smooth rendering
- English and Turkish language options
- Dynamic language switching without restarting the application
- Language preference saved between sessions
- Complete translation of all UI elements, menus, and messages
- Easy to extend with additional languages
- Show/hide individual layers
- Select all or clear all layers with one click
- Navigate between layers (previous/next)
- Full support for layer colors (ACI and RGB)
- Visual layer tree with color indicators
- Create selection area with CTRL + left mouse button
- Multiple entity selection (hold CTRL key)
- Highlight selected entities
- Edit entity properties (color, layer, geometry)
- Delete selected entities
- Lines (LINE)
- Circles (CIRCLE)
- Arcs (ARC)
- Polylines (LWPOLYLINE)
- Polygons (POLYLINE)
- Splines (SPLINE)
- Ellipses (ELLIPSE)
- Points (POINT)
- Text (TEXT)
- Modern and user-friendly design
- File information display
- Layer tree view
- Customizable toolbar
- Fill mode for better visualization
- Language menu for switching between English and Turkish
- Persistent settings via JSON configuration
- Python 3.7 or higher
- PyQt6
- ezdxf
- numpy
- Clone the repository:
git clone https://github.com/mustafakbaser/DXF-Viewer.git
cd DXF-Viewer
- Create a virtual environment (optional but recommended):
python -m venv venv
# On Windows
venv\Scripts\activate
# On macOS/Linux
source venv/bin/activate
- Install the required packages:
pip install -r requirements.txt
- Clone the repository:
git clone https://github.com/mustafakbaser/DXF-Viewer.git
cd DXF-Viewer
- Install the required packages manually:
pip install PyQt6 ezdxf numpy
python src/main.py
-
Opening a DXF File:
- Click the "Open File" button
- Select a DXF file from your computer
- The file will be loaded and displayed in the canvas
-
Navigation:
- Zoom: Use the mouse wheel
- Pan: Click and drag with the left mouse button
- Reset view: Right-click and select "Reset View" from the context menu
-
Layer Management:
- Show/hide layers: Check/uncheck layers in the layer tree
- Select all layers: Click "Select All" button
- Hide all layers: Click "Clear All" button
- Navigate layers: Use "Prev" and "Next" buttons to cycle through layers
-
Entity Selection:
- Select single entity: Hold CTRL and click on an entity
- Select multiple entities: Hold CTRL and drag to create a selection rectangle
- Clear selection: Right-click and select "Clear Selection"
-
Language Settings:
- Change language: Go to Language menu and select English or Turkish
- Language preference is automatically saved for future sessions
- All UI elements will update immediately to the selected language
-
Entity Editing:
- Edit properties: Select an entity, right-click and select "Edit Properties"
- Delete entities: Select entities, right-click and select "Delete"
-
Fill Mode:
- Toggle fill mode: Click the "Fill" button to toggle fill mode for closed entities
DXF-Viewer/
├── src/
│ ├── main.py # Application entry point
│ ├── viewer.py # Main window and application logic
│ ├── dxf_handler.py # DXF file operations
│ └── widgets/
│ ├── canvas.py # Drawing canvas
│ └── file_panel.py # File and layer management panel
├── requirements.txt # Package dependencies
└── README.md # This file
- Clone the repository:
git clone https://github.com/mustafakbaser/DXF-Viewer.git
cd DXF-Viewer
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install development dependencies:
pip install -r requirements-dev.txt # If you have a separate dev requirements file
- Run the application:
python src/main.py
You can create a standalone executable using PyInstaller:
pip install pyinstaller
pyinstaller --onefile --windowed src/main.py
The executable will be created in the dist
directory.
- Support for more DXF entities (MTEXT, DIMENSION)
- Scale indicator
- Measurement tools
- Printing support
- Export to different formats (PNG, PDF)
- Multi-file support (tabs)
- Undo/redo operations
- Performance optimizations for large files
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.