A simple CAD (Computer-Aided Design) application built with Pygame, designed to create and edit basic shapes such as lines, rectangles, circles, and polygons. This project demonstrates the integration of interactive tools, grid snapping, and undo/redo functionality, making it a great foundation for more advanced CAD systems.
- 🛠️ Drawing Tools: Select, Line, Rectangle, Circle, and Polygon tools.
- 📏 Grid Snap: Toggleable grid snapping for precise alignments.
- 🔄 Undo/Redo: Command stack system for seamless editing.
- 🎯 Shape Selection: Drag and drop shapes with intuitive controls.
- 🌐 Zoom & Pan: Effortlessly navigate the canvas.
- Python 3.8+
- Pygame library installed (
pip install pygame
)
- Tools:
S
: Select toolL
: Line toolR
: Rectangle toolO
: Circle toolP
: Polygon tool
- Actions:
Ctrl+Z
: UndoCtrl+Y
: RedoDelete
: Remove selected shapesTab
: Toggle grid snappingEnter
: Complete a polygonMiddle Mouse
: Pan viewShift + Click
: Add to selectionEsc
: Exit
Contributions are welcome! Feel free to fork the project, submit pull requests, or open issues.
This project is licensed under the MIT License.