Replies: 1 comment
|
I totally agree. Check out my refactor branch. I have it on hold while doing some PCB work, but it is generally function, just haven't tested it out enough to replace the current monstrosity. After you look at it, I'm happy to consider other options. It still isn't what I would do from scratch, but I'm trying to balance improvement with the effort of complete overhaul. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
classDiagram class AbstractDacylShape{ +json_config base_geo_methods() shape()* } AbstractDacylShape <|-- DactylMain class DactylMain{ +main() } DactylMain --o AbstractThumbCluster DactylMain --o Plate DactylMain --o ControllerMount DactylMain --o AbstractOled AbstractDacylShape <|-- Plate AbstractDacylShape <|-- ControllerMount AbstractDacylShape <|-- AbstractOled AbstractOled <|-- OledSliding AbstractOled <|-- OledUndercut AbstractOled <|-- OledClip class Engine{ box() rotate() union() ...() } AbstractDacylShape --o Engine AbstractDacylShape <|-- AbstractThumbCluster AbstractThumbCluster <|-- ThumbDefault AbstractThumbCluster <|-- ThumbMinidox AbstractThumbCluster <|-- ThumbCarbonfet AbstractThumbCluster <|-- ThumbTrackballOrbyl AbstractThumbCluster <|-- ThumbTrackballCJWhen Adding code for the monoblock, I encountered this code as a huge jungle, where I was able to add my code in a dirty way.
Therefore I would like to sugggest an more object orientated approach which could look like the UML diagram.
The basic idea is to introduce an AbstractDacylShape which handles the basic configuration json aspects adn all objects are inherit and therefore can generating 3D objects will be done in the here defined abstract mehtod.
DactylMain has reference to all components (type AbstractDacylShape). For sure its a risc that this class will explote in future.
All classes have their default parametrization and therefore the run_config.json only needs values to overwride.
What do you think of this suggestion. I am aware this is a huge rework, but I my impression is that the code already has evolved dramatically, that a disruptive change may help.
This UML is not fully worked out, it is more or less a base for discussion.
All reactions