While developing model class, several architectural issues came to light. The model class would have to hold a complex GeometryCore::StepPlugin::StepPluginOpoerations object which is not only too complicated but also unreadable.
The GeometryCore code was developed before the Model class appeared so it is now outdated.
It would make more sense if the model class held objects like Geometry and Mesh since any operation on geometry anyway has to be updated in the model. The idea is to make all those operations from the MainWindow->Model->Geometry level rather than MainWindow->GeometryOperations. In the current state, the model has to either hold copies of the geometry entities created in GeometryOperataions or pointers to them. The proposed architecture would be more straightforward and readable as any operation on geometry would be explicitly connected to the Model object.
Suggested changes:
rework STEPPlugin and GeometryOpertaions into an GeometryImporter class with objects like STEPImporter and STLImporter
The STEPImporter would have the STEPImporter.load method that interprets the file, creates partsMap/actorsMap, and passes them into the model.
Developmenet of new Geometry class held by Model where all future geometry operations would be implemented (extrudes etc.).
Developement of new Mesh class held by model where all mesh operations would be defined
Downsides:
The geometry class would anyway have to call some sort of actor creation method if some new object would be created in the GUI instead of reading the step file. (that's the problem for the future)
A lot of work to rework the GeometryCore
Upsides:
Explicit relation between model its geometry and its mesh resulting in better readability of the code
Separation of the import from functions from the geometry entities like edges, faces, etc
While developing model class, several architectural issues came to light. The model class would have to hold a complex GeometryCore::StepPlugin::StepPluginOpoerations object which is not only too complicated but also unreadable. The GeometryCore code was developed before the Model class appeared so it is now outdated.
It would make more sense if the model class held objects like Geometry and Mesh since any operation on geometry anyway has to be updated in the model. The idea is to make all those operations from the MainWindow->Model->Geometry level rather than MainWindow->GeometryOperations. In the current state, the model has to either hold copies of the geometry entities created in GeometryOperataions or pointers to them. The proposed architecture would be more straightforward and readable as any operation on geometry would be explicitly connected to the Model object.
Suggested changes:
Downsides:
Upsides: