diff --git a/CONTEXT.md b/CONTEXT.md index 3aaeaf8..8add36e 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -8,7 +8,19 @@ Don't ask for unrelated files to be added to the chat. ## Architecture -... +The application is structured using a Model-View-Controller (MVC) architecture to ensure a clear separation of concerns, making the codebase easier to maintain and extend. + +* **Model:** This layer represents the application's data and business logic. It knows nothing about the user interface. + * `Document`: Manages the collection of all features. + * `Feature`, `SketchFeature`: Represent individual components or operations in the CAD model. + +* **View:** This layer is responsible for displaying the data from the Model and capturing user input. It should be as "dumb" as possible, delegating all actions to the Controller. + * `MainWindow`: The main application window, toolbars, and menus. + * `ViewportWidget`: The 3D OpenGL viewport for rendering the model. + * `FeatureBrowser`: The UI component that lists the features in the document. + +* **Controller:** This layer acts as the intermediary between the Model and the View. It contains the application's core logic. + * `ApplicationController`: The "brains" of the application. It is created in `main()` and passed to the UI. It responds to user actions from the View, manipulates the Model, and uses signals and slots to notify the View of any state changes. ## Development Log