#linuxcnc Logs
Sep 09 2024
#linuxcnc Calendar
12:54 AM Deejay: moin
01:41 AM lcnc-relay: <meisterdippel> moin
01:45 AM lcnc-relay: <vibram> hello
04:03 AM JT-Cave: morning
04:41 AM Tom_L: morning
06:53 AM rdtsc-wk: Morning gents
07:02 AM lcnc-relay: <meisterdippel> what's up
07:04 AM lcnc-relay: <meisterdippel> i need someone with a plasma cutter to test my CAM: 'viaconstructor'
07:05 AM lcnc-relay: <meisterdippel> or generally someone who mills a lot in 2D
07:08 AM lcnc-relay: <meisterdippel> I'll buy you a beer too 🙂
07:30 AM rdtsc-wk: wish I had a plasma cutter; someone here likely does though. oh, looks like some pics are 404 not found on the github
07:38 AM rdtsc-wk: all the screenshots are 404
07:52 AM lcnc-relay: <meisterdippel> thanks, better now ? (the screenshots)
07:54 AM rdtsc-wk: perfect, thanks. seems like a really great tool, dang it now want to make a plasma cnc heheh
07:59 AM bjorkint0sh: <mrec> german engineering will always win ... Since 2003, OPTIMUM Maschinen Germany GmbH has produced a large share of its metalworking machines in its own factory in Yangzhou China.
08:01 AM skunkworks: rdtsc-wk: not a scaling issue - just haven't set the scale of the pwmgen yet. (defaults to 1)
08:08 AM Tom_L: sunny & 60F... enjoying these fall mornings
08:20 AM JT-Shop: 46°F and sunny here
08:23 AM Tom_L: JT-Shop, one the resource file is built you don't need the images files present?
08:31 AM JT-Cave: correct
08:32 AM JT-Cave: https://gnipsel.com/linuxcnc/flexgui/resources.html
08:32 AM Tom_L: so once it's built it can be moved from one app to another as a shared resource
08:32 AM JT-Cave: just started that
08:32 AM JT-Cave: yup
08:32 AM Tom_L: as long as it's in the source folder
08:33 AM Tom_L: i wonder if i should rename mine since eventually they may end up in flex
08:35 AM rdtsc-wk: Flex: https://st2.depositphotos.com/1726139/5312/i/950/depositphotos_53121453-stock-photo-close-up-on-a-bodybuilder.jpg
08:37 AM Tom_L: JT-Cave, in that link i gave you, i noticed they're using alias. any reason to use or not use it? does it make things easier?
08:37 AM Tom_L: <file alias="penguin.png">animal-penguin.png</file>
08:42 AM JT-Cave: I didn't notice that got that link handy?
08:43 AM Tom_L: https://www.pythonguis.com/tutorials/qresource-system/
08:46 AM JT-Cave: hmm
08:47 AM JT-Cave: looks like you could have a shorter name that's used by the program by using an alias
08:47 AM JT-Cave: now if I could just figure out how to import a python file that's not on the system path...
08:49 AM Tom_L: i'm wondering what -name does on the rcc command line
08:49 AM -!- #linuxcnc mode set to +v by ChanServ
09:00 AM Tom_dev: Create an external initialization function with <name>.
09:00 AM JT-Cave: I'm not seeing -name being used
09:00 AM Tom_L: i just did 'rcc' in the term and got the short help
09:00 AM Tom_dev: https://doc.qt.io/qt-6/rcc.html
09:05 AM JT-Cave: now I can't reinstall qtbase5-dev-tools 404 not found
09:06 AM Tom_dev: it's in synaptic
09:08 AM JT-Cave: looks like qt5 got some updates and that lib is no longer there
09:09 AM Tom_L: synaptic said i didn't have it installed
09:15 AM Tom_dev: designer sure makes it alot easier to create the xml file
09:16 AM JT-Shop: yup
09:23 AM Tom_L: RESOURCES not SES
09:23 AM Tom_L: you don't have that working yet do you?
09:23 AM JT-Shop: opps
09:23 AM JT-Shop: no
09:23 AM Tom_L: ok
09:24 AM JT-Shop: https://gnipsel.com/linuxcnc/flexgui/ini.html
09:24 AM JT-Shop: got one spelled right
09:24 AM Tom_L: hah
09:25 AM Tom_L: you might say what ini section to add it to
09:26 AM Tom_L: nevermind... it's at the top
09:36 AM -!- #linuxcnc mode set to +v by ChanServ
10:05 AM Unterhaus_ is now known as Unterhausen
11:17 AM Tom_L: JT-Cave1, https://stackoverflow.com/questions/10161568/import-python-module-not-on-path
11:44 AM rdtsc-wk: forced-move to Qt6?
11:45 AM Tom_L: pretty sure he's using Qt6 already
11:45 AM Tom_L: just qt5 designer
11:58 AM Unterhausen: I searched for arm assembler and google thought I would like to know if arm assembly is a programming language
11:58 AM rdtsc-wk: or a task doctors perform on broken arms? :)
12:11 PM bjorkintosh: Unterhausen: it is a quag, a mire, and a quagmire.
12:12 PM Tom_L: what about gasm?
12:12 PM bjorkintosh: hahaha
12:13 PM Unterhausen: programming in assembly is never fun, but I assume that Arm is better than 8086
12:13 PM Unterhausen: this may be misguided on my part, however
12:14 PM Unterhausen: would be nice if it was better than z80
12:15 PM Tom_L: alot more registers to set up than say pic or avr
12:15 PM bjorkintosh: Unterhausen: why not just use C?
12:16 PM bjorkintosh: arm assembly has 1001 variations.
12:16 PM Unterhausen: I have some code I just want to fix up
12:16 PM bjorkintosh: ah
12:17 PM Unterhausen: unless it isn't too hard to port the assembly to c, which would be pretty useful
12:18 PM -!- #linuxcnc mode set to +v by ChanServ
12:18 PM bjorkintosh: Unterhausen: for such drudgery, things like claude ai are pretty helpful.
12:19 PM bjorkintosh: it won't do everything, but you'll at least get 80% of it quickly knocked out.
12:21 PM Unterhausen: claud ai will port code?
12:23 PM bjorkintosh: I don't see why not. it might not work right away but it'll be an okay guide.
12:26 PM rdtsc-wk: interesting comments on arm assembly: https://stackoverflow.com/questions/43574163/why-is-gnu-as-syntax-different-between-x86-and-arm
02:47 PM Tom_L: JT-Cave, do you know how to access the files compiled in resources.py?
02:55 PM Tom_L: would it just be background-image: url("filename.png") ?
03:14 PM rdtsc-wk: looks like resources.py just stores the data as bytes: qt_resource_data = b"\x00\x00\x01\x14\... so 'qt_resource_data' should suffice as the name
03:15 PM Tom_L: has to be a way to differentiate between files since there are a good dozen in the .py file
03:16 PM -!- #linuxcnc mode set to +v by ChanServ
03:16 PM Tom_dev: for my test qss i used: background-image: url("inX-Y+.png");
03:18 PM rdtsc-wk: yeah it's pretty large... looking through it, there is only one declaration of 'qt_resource_data'
03:18 PM rdtsc-wk: https://github.com/jethornton/flexgui/blob/master/flexgui/src/libflexgui/resources.py
03:19 PM rdtsc-wk: you should be able to add a 'flex_image1 = b"..."` section and include the image bytes, then use 'flex_image1' in the code as the filename (I assumed as large as it was that this was already the case.)
03:20 PM rdtsc-wk: I bet JT has a scipt or tool to convert a file into such a statement
03:20 PM Tom_L: for my tests since we haven't used a resource file yet i've hardcoded the path to my images
03:21 PM Tom_L: you create a .qrc file then rcc compiles it into a resources.py file
03:21 PM Tom_L: the qrc file is just xml
03:23 PM Tom_dev: http://paste.debian.net/1328915/
03:23 PM Tom_dev: some test code i've been messing with
03:25 PM Tom_dev: near as i can tell it imports the file
03:25 PM Tom_dev: linuxcnc starts up but no images displayed
03:26 PM Tom_dev: well, i get an error 'no module named resources'
03:27 PM rdtsc-wk: I think that would have to be import resources.py
03:27 PM Tom_dev: you don't add the .py
03:28 PM Tom_dev: import resources.py
03:28 PM Tom_dev: ModuleNotFoundError: No module named 'resources'
03:28 PM Tom_dev: either way
03:29 PM rdtsc-wk: If it does really did import the resources.py file, then there should exist 'qt_resource_data' - could test for that with: if (qt_resource_data): print('qt_resource_data exists!)
03:30 PM rdtsc-wk: wonder if import is only looking for system libraries or defined paths
03:30 PM Tom_dev: that may be the problem
03:31 PM rdtsc-wk: you can import a .py file if it's alongside the calling .py file, but that might get a little hairy if they are in different paths
03:32 PM rdtsc-wk: as an alternative, see: https://stackoverflow.com/questions/3715244/is-it-possible-to-code-images-into-a-python-script
03:38 PM Tom_dev: background-image: url("inX-Y+.png"); is correct if the png is in the working directory
03:39 PM rdtsc-wk: could leave it that way, as long as it works on most installs
03:39 PM Tom_dev: we'll figure it out or know why
03:45 PM john__ is now known as JT-Auto-Shop
03:45 PM JT-Auto-Shop: I was going to say something but forgot
03:46 PM Tom_dev: well remember! it was important!
03:47 PM Tom_dev: background-image: url("./images/inX-Y+.png");
03:47 PM Tom_dev: works too if you want to keep them separate
03:50 PM Tom_dev: https://stackoverflow.com/questions/36673900/importing-resource-file-to-pyqt-code
03:50 PM Tom_dev: that's ver 4 though
03:55 PM Tom_dev: there is a pyuic6
03:59 PM rdtsc-wk: just an aside, the Parker Apex 6152 had an interesting fault. The resolver output signal was too hot, causing bad distortion, and fooling the drive into thinking the shaft was always spinning (which prevented all operation with no fault reported.) Solution was to reduce the resolver excite output to a sane level by decreasing the opamp feedback resistance, thus lowering the gain. All the components tested within specs so unsure why/how it got so high.
03:59 PM rdtsc-wk: The oscillator level was fine - only the driver stage was too hot. Mondays are aloof with weirdness.
04:14 PM JT-Auto-Shop: Tom_L, that prob won't work with flexgui installed and the images are not in the same directory as the main file
04:47 PM Tom_L: JT-Auto-Shop, so just have an image folder for all those instead?
04:49 PM Tom_L: by doing that it wouldn't affect the flexgui core
04:50 PM JT-Auto-Shop: it might work if you have the absolute path to the images, python can't import an image to make it available for the qss
04:51 PM JT-Auto-Shop: that's why you run the program to convert the images to binary in a python file
04:51 PM Tom_L: right
04:51 PM JT-Auto-Shop: much easier to just import the resources file now that I know how...
04:51 PM Tom_L: you do?
04:51 PM JT-Auto-Shop: yup
04:52 PM Tom_L: i thought you were stuck on that
04:52 PM Tom_L: how do you access the png inside the file then?
04:52 PM Tom_L: :/file.png ?
04:52 PM JT-Auto-Shop: I _was_ stuck...
04:52 PM JT-Auto-Shop: file.png iirc
04:53 PM JT-Auto-Shop: it's down in the beer cave
04:53 PM Tom_L: you don't need the ":" within the resources file?
04:53 PM Tom_L: i thought you needed that
04:53 PM Tom_L: well go have a beer...
04:53 PM Tom_L: :)
04:54 PM Tom_L: get your c3 parts sorted out?
04:55 PM Tom_L: i was trying a bit this afternoon on import but didn't get anywhere
05:00 PM rdtsc-wk: bad news for those growing avacados from seed... https://www.youtube.com/watch?v=2-Gl1a7YsFI
05:05 PM Tom_L: you may be able to add a link from within designer
05:05 PM Tom_L: on the button stylesheet option
05:07 PM xxcoder: rdtsc-wk: https://www.youtube.com/watch?v=CL0IVzjmB_U https://www.youtube.com/watch?v=anUdo8tZlh0
05:09 PM Tom_L: JT-Auto-Shop, http://tom-itx.no-ip.biz:443/~webpage/cnc/JT-SHOP/flexgui/stylesheet_editor.png
05:16 PM JT-Auto-Shop: designer
05:17 PM Tom_L: is that where you make the connection within the resources file?
05:31 PM JT-Auto-Shop: no, that's done in the qss file
05:32 PM Unterhaus_ is now known as Unterhausen
05:32 PM Tom_L: i think you can do it either place. i just tested one png using the designer stylesheet
05:33 PM Tom_L: then edited the path to make sure
05:37 PM JT-Auto-Shop: yup you can add images in designer, be interesting to look at xml to see what the code is
05:38 PM Tom_L: i tested one img but didn't save it
05:39 PM -!- #linuxcnc mode set to +v by ChanServ
05:40 PM Tom_dev: <property name="styleSheet">
05:40 PM Tom_dev: <string notr="true">background-image: url(./inX+Y+.png);</string>
05:40 PM Tom_dev: </property>
05:40 PM Tom_L: from the UI file
05:41 PM Tom_L: so you can imbed them there or have them in the qss file
05:41 PM Tom_L: i edited the url(. it was url(:
05:44 PM Tom_dev: http://paste.debian.net/1328921/
05:44 PM Tom_dev: the whole button ui code
05:45 PM JT-Auto-Shop: weird
05:46 PM Tom_L: works the same as the qss
05:46 PM Tom_L: but it has the :/ for the file which i think looks in the resource file
05:47 PM Tom_L: if i can figure out how to attach the resource file i'll test that
06:19 PM lcnc-relay: <roguish> rum and tonic time.......... bbt
06:23 PM unreal: corona beer time :)
06:23 PM unreal is now known as _unreal_
06:34 PM xxcoder: yo rou
06:34 PM xxcoder: roy
06:36 PM roycroft: hello
06:36 PM roycroft: the vps from which i irc was down - i just got it running again
06:37 PM roycroft: i also just mailed international ballots, and i generated the list of addresses from our shiny new membership database!
06:37 PM xxcoder: fancy
06:37 PM JT-Cave: Tom_L, https://paste.debian.net/1328928/
06:38 PM roycroft: it's already way better than the old database, and orders of magnitude better than the spreadsheets we've been maintaining for the past year and a half, and this is only the first release of the product - over the course of the next five years, it's going to be packed with new features
06:39 PM roycroft: our inventory database is a steaming pile of buffalo turds, and always will be
06:39 PM roycroft: it is being managed by a person with no formal it experience, and is being written and run by a bunch of amateurs who are all self-taught
06:39 PM roycroft: i work in it for a living, and am overseeing the membership database
06:40 PM roycroft: and i found some professionals who do db work for large corporations for a living to write mine
06:40 PM roycroft: there's a real difference between self-taught and professionally-trained
07:06 PM Tom_L: JT-Cave, thanks
07:12 PM Tom_L: what does foo.announce() do?
07:13 PM Tom_L: module 'foo' has no attribute 'announce'
07:13 PM Tom_L: it does look like it tried to read resources.py
07:14 PM mrec: interesting, microsoft read my post in their community forum that their partner portal is flawed, they removed the post and sent an email that they are working on it.
07:26 PM rdtsc: too little, too late mrec
07:39 PM JT-Cave: foo.py had just this in it
07:39 PM JT-Cave: def announce():
07:39 PM JT-Cave: print("Imported!")
07:39 PM Tom_L: i figured it was something simple
07:40 PM Tom_L: i printed the data, name & struct from the file just to verify it created it
07:40 PM Tom_L: from foo
07:48 PM Tom_L: ok i got it working
07:48 PM Tom_L: thanks
07:48 PM Tom_L: now to figure out how to access the data in foo using resources.py
08:03 PM rdtsc: JT, managed to find better pics of the snow blower plastic. Apparently it's by Flambeau plastics: https://www.amazon.com/Replacement-Toro-mower-105-2994-SHROUD-TANK/dp/B003X9TJRK/ref=sr_1_12 anyways, guess it's try to repair or replace.
08:04 PM Tom_L: Could not create pixmap from :/inX-Y+.png
08:43 PM -!- #linuxcnc mode set to +v by ChanServ
08:49 PM rdtsc: For the dude that has everything: https://www.ebay.com/itm/365071807632
09:00 PM xxcoder: world famous engine lol
09:04 PM rdtsc: think this would be harder than just being on a riding mower lol
09:23 PM lcnc-relay: <xxcodery> can do it from shade
09:30 PM rdtsc is now known as rdtsc_away