Gallery, Projects and General > The Design Shop

DIY DRO for lathe or mill

<< < (5/5)

AdeV:
Hi Bill,

That's pretty much what I'd wanted to do with the Python/Gtk (also tried TkInter, but fell out with that one as well - Qt didn't look any better); just building and positioning the controls was an absolute nightmare, never mind moving them on the fly, or cropping them inside a viewport...

Rather than use labels for the fractions, I just use a giant PNG file (6400px & change tall, 50px wide, about 5k in size), which I build with an ImageMagick script (which is itself built with a Bash script); this covers +/- 1" in 64ths (with /128th marks, but no legend). I simply use this as a background image on a fixed-sized div, and change the position to show the correct bit. Had to go with + and - sections, otherwise the tape effect "bounced" between +ve and -ve readings instead of continuing to roll in the same direction...

Your whole number is better than mine at the moment (which is just a fixed display), I'll use a similar technique to yours I think for that - an absolute-positioned field, which gets rolled up/down as the next number comes into play.

I just need to transfer the UI/browser app to the Pi, to see if I'm going to need to use a Pi4 to get enough performance, or whether a 3+ will suffice. I'm hoping the latter will do.

Reliability seems good - I've had the thing running on my desk for several days, powered via the computer's USB port, and it's worked flawlessly - but, then, most of the complex stuff isn't there yet!

Cheers,
Ade.

BillTodd:

--- Quote ---positioning the controls was an absolute nightmare,
--- End quote ---

GTK and kivy have a completely different paradigm for form design compared to MS (windows) absolute position: the controls are placed and sized automatically and are only influenced by size-hints (proportions) . There are ways to place and position using co-ordinates but without any Wysiwyg IDE (that I've found),  it's a PITA to design exactly what you want.

I was going to look into recreating the dial in kivy , but got distracted by an email from Doug Self about a German  book publisher wanting to use a still from one of my engine animations  to illustrate a Horse gait  !  to which I had to reply with this:

https://drive.google.com/file/d/1pAxOsuQEV9IGkRlEPe2Rhh5Sbauc1p1t/view?usp=sharing

AdeV:
I tried using Glade to design the Gtk layout - but even that's a pig to get everything lined up; and (from what I recall) you then use the output from Glade + a library to generate your UI on the fly.

All in all, none of the UIs I've tried for Linux, are really suitable for doing a fixed-layout on a fixed-screen; they're all designed to be flexible - which is great 99% of the time, but this is the 1%...

I'm hoping to get to the point where I can try the entire app end-to-end on the Pi today; if so, that'll give me an idea if I'll got the performance I need out of the Pi3+,

Navigation

[0] Message Index

[*] Previous page

Go to full version