dimanche 15 novembre 2015

design pattern for looping double Cartesian coordinates CNC Gcode

My goal is to create a proper object oriented/modular design for keeping dimensional data that is input by a user. This is user input data that describes the measurements of a part being made and will be called into other classes for math functions to be preformed, with the final goal of generating g-code to a text file.

1: Given that the original data should as I understand it be static final, would this be a good use of the singleton method regarding new instances of user input being declared for other classes that involve math functions that are changing/looping data?

2: Would it be an acceptable idea to have the new instance of the user input/singleton method in a interface for other classes to reference?

I am sure there are many ways to do this and I am looking for an understanding of any good design practices regarding this particular scenario.

Aucun commentaire:

Enregistrer un commentaire