Files
unnamed-cad-software/CONTEXT.md
2026-02-09 16:39:17 -07:00

26 lines
2.0 KiB
Markdown

Project Goal: To build an open source cross-platform Fusion 360 3D CAD clone using C++, Qt, and OpenGL.
Features should be as close to Fusion 360 as possible.
Development Summary:
1 Initial Setup: We created the basic application structure with a MainWindow class. This window was set up with a top toolbar to act as a banner for tools and a central widget area as a
placeholder for the 3D viewport.
2 3D Viewport Implementation: We created a ViewportWidget class (inheriting from QOpenGLWidget) to handle 3D rendering. This widget replaced the initial placeholder. To test functionality,
we rendered a simple, multi-colored 3D cube in the center of the viewport.
3 Camera Controls: We implemented mouse-based camera controls in the ViewportWidget:
• Zoom: Mouse scroll wheel.
• Rotate: Middle mouse button drag.
• Pan: Shift + Middle mouse button drag.
4 View Cube: We added a view orientation cube (like in Fusion 360) to the top-right corner of the viewport.
• The first version used QPainter to draw 2D text labels ("TOP", "FRONT", etc.) over the 3D cube.
• We then improved this by rendering the labels as textures directly onto the faces of the 3D view cube, so they rotate with the cube.
5 Refactoring: To improve code organization, all logic related to the view cube (drawing, texturing, and axis lines) was extracted from ViewportWidget into its own dedicated ViewCube class.
6 UI Toolbar: We implemented a tabbed toolbar in the MainWindow to mimic the Fusion 360 UI.
• Created "SOLID", "SURFACE", and "TOOLS" tabs.
• Added "Create Sketch" and "Extrude" QToolButtons to the "SOLID" tab, complete with custom SVG icons loaded via a Qt resource file (.qrc).
7 Code Cleanup & Bug Fixes:
• Removed the initial colorful test cube from the main scene.
• Fixed a build error caused by a typo (QMatrix4xá4 instead of QMatrix4x4) that was introduced during the cleanup.
• Resolved a Qt6 compatibility issue by replacing a legacy Qt5 OpenGL header include with its modern equivalent.