Closed shpi closed 4 years ago
I can have a go at making one of these as it could be useful in pi3d. Do you have any links to images on line with the ideal structure?
Example image of 360° version via mail. I think we can reuse part of dial class.
Added pi3d end of the system https://github.com/tipam/pi3d/blob/develop/pi3d/shape/Slice.py I will make a shpi class to display values using this. Normally these are used like pie charts - stacked to fill 360 degrees. Which variables do you think should be displayed this way?
for example: disk usage cpu usage (load) ram usage
but also cpu temperature could be possible (reference to max 85°)
Rudimentary system. https://github.com/shpi/zero_main_application/commit/1856f85212ced2edd4714766724a71bfaaeba999 The options in arguments should be self explanatory but here is a pic of concentric=False, full_range=False
and concentric=True, full_range=400
I will add the numbers at the centre points of each slice (midway between inner and outer).
One thing that might be worth considering is switching to a Shape parent and child system for slides. That would allow graphics.slider_change() to move everything at once. I will set Donut up that way to see how well it works.
Added numbers on each slice. Also I've used a system of an 'empty' object (triangle with z=-1.0) with children. Adding PointText as a child is a bit messy (as PointText is a wrapper for other things and draw() does a re_init as well as text.draw()) so I've left that out. PS I think I will make Shape.set_material() accept either a three tuple or four tuple (as works with TextBlock) so that the donut can be partially transparent.