Changes
Page history
some ideas for user interface adaptors
authored
Sep 27, 2016
by
joha2
Show whitespace changes
Inline
Side-by-side
Home.md
View page @
40820a64
...
...
@@ -78,3 +78,31 @@ Das opticalSystem kann die gloable Position von Oberflächen besser bestimmen: B
### ClassWithOptimizableVariables / OptimizableVariable
*
Is there any possibility to simplify it (i.e. to use it like:
`opt.AddVariable("blub", value=10.0); print(opt.blub)`
)?
## User interface
These ideas should simplify the user-pyrate interaction. This means they should simplify the extraction of
data from the optical system, the feed back of data into the system, and maybe in a distant future simplify
the interaction with the FreeCAD interface. :-)
### ExaminationClass
*
Gets data points from specific object (ExaminationClassAdaptor) and takes care of showing them in different ways
*
Different ways implemented by inheritance (TextfileExamination, PlotExamination, TableExamination)
*
Class may obtain inputs and feed it back into ExaminationClassAdaptor
### ExaminationClassAdaptor
*
Interface class between certain class and ExaminationClass
*
Implementes methods:
*
getDataPoints()
*
setDataPoints()
*
Idea is to obtain data from or writing to a class without writing too much code into the class itself
*
This class implements the format of proper input and output (usually numpy arrays)
*
This class checks the proper input and output
*
Therefore depending on the ExaminationClass adapted to it, we can produce file output of several quantities,
plots (e.g. spot diagrams), tables for in- and output
*
Target classes maybe OpticalSystem, Surface, Material, all things the user should interfere with
*
if the user cannot feed the data back into the target class: do not implement setDataPoints()
*
if the user cannot aquire the data from the target class: do not implement getDataPoints()
*
inherit all functional adaptors from abstract base class