[NF] GUI Live Preview of Geometry
Hello to everyone,
it would be nice to have a live preview of the geometry inputs within the GUI.
As a first step, this would require to have meaningful default parameter for everything. The question is, how to do that. Of course the class definions should be updated therefore, but that may not be sufficient. If for instance the default lamination diameters are changed in a way, that the default slot pitch is exceeded by the slot width, the slot preview will be invalid. So either there has to be an error/warning (since the user can also input invalid slot parameter by accident) or the default parameter have to be corrected within the GUI corresponding to the previous user inputs, which seems to be a difficult task.
The next step then, would be to use matplotlib to plot the geometry instead of the images.
Best regards, Sebastian
For this topic I suggest to start with the slots (then the holes).
My idea would be to take advantage of the step by step design of the machine by supposing that the lamination dimensions are set. If we create a complete default machine we would set default lamination dimensions and then default slot dimensions.
For the slot default parameter, my idea would be to add a new method to the slot "set_default" that would compute (and set) the default value for each slot type. These values would be computed according to Rint and Rext of the lamination and Zs (if provided otherwise we just set a default Zs as well). Basically we would create a default slot and scale it according to the current lamination dimension.
In the GUI would would just need to call the set_default when changing the slot type (if there is no previous slot of this type).
For the matplotlib display, it can be interesting to find a way to display the schematics on the current slot (to avoid to have the schematics and the current slot in two different widget). For clarity we can imagine that the current selected widget is highlighted in the display (name in red ? remove all other parameter name ?)
Best regards, Pierre