From b32594a04b2fda0ceacfb4769d79b309d146c01c Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Mon, 9 Feb 2026 16:39:17 -0700 Subject: [PATCH] Add CONTEXT.md --- .gitignore | 1 - CONTEXT.md | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 CONTEXT.md diff --git a/.gitignore b/.gitignore index 2c9abeb..4b9625c 100644 --- a/.gitignore +++ b/.gitignore @@ -148,6 +148,5 @@ secrets.h output.* out.* *.csv -*.txt *.json .aider* diff --git a/CONTEXT.md b/CONTEXT.md new file mode 100644 index 0000000..5e66d1e --- /dev/null +++ b/CONTEXT.md @@ -0,0 +1,25 @@ +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.