- Posts: 5711
- Thank you received: 2100
QT C++ code samples
- phillc54
- Offline
- Platinum Member
-
Less
More
7 years 3 months ago #139276
by phillc54
Replied by phillc54 on topic QT C++ code samples
What linux distribution are you running this on?
It seems to use a later libqt5core than what is available on stretch.
It seems to use a later libqt5core than what is available on stretch.
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
7 years 3 months ago - 7 years 3 months ago #139466
by Grotius
Replied by Grotius on topic QT C++ code samples
Hi Phil,
Thanks for your reply !
What linux distribution are you running this on?
Debian 9. Uname -r : 4.9.0-8-rt-amd128
It seems to use a later libqt5core than what is available on stretch.
It seems that version Qt 5.5 is compatible with most linux distro's, this is info from qt forum.
I am building on Qt 5.12.3. Wich linux version are you using Phil? Then i can try this to run myself and find a solution.
The latest program : we.tl/t-ygF2uelACM
To run, unzip and type in terminal : ./DxfDecoder
Cad logo :
DxfDecoder :
Linuxcnc :
Have done some nice coding in the mean time. C++ is becoming my second language.
Every day it become's more easy to code.
I have to explain some things about the program until it is at this moment.
I made some differences related to my earlyer program examples.
1. At this moment the program read lines, arc's and circles seperate.
Related to the first C program examples, the program now has 3 C++ classes. (in total 23 classes, 23 header files until today)
One class for Line, one class for Circle and one class for Arc.
Every class is in fact a separate program. It open's the dxf file, read's the data, and closes the file when reading is finished.
This result's in a more stable program flow and very easy debug situation, and a very easy expand structure, like adding Polylines later on in the fourth class. Or a class you want to imagine yourself.
2. The program has one base_array, divided in 2 classes. This array store's all the readed dxf data into memory places as long the pc is on.
One base array is of type double (for storing large accuracy numbers iike the number : 21.000215) and one base array is of type integer ( for storing simple numbers like 1,2 or 3. )
- The program read's the dxf files for line, circle and arc. All this data is straight stored into the base_array.
Everything you see in the attached pictures comes straight ahead out of the base array, the most simple form of memory data storing, up to millions of lines. And dynamic.
We can store this dxf data into a text file instead of an array for example , but a text file is hard to manipulate and order.
A array is a easy item (instrument or tool) to manipulate, copy, and edit data.
It is the key to make an ultra fast program that can do a stress test without any problem relating to other cad cam programs !
3. The program is very simple in setup. We read in line's, circle's and arc's, we have 2 base array's to store the data, and look what we can do so far without any logic like contour recognizing, difficult algoritmes etc.
4. The program has one C++ class with all the external variables. This program stucture i found out my self. This keep's all other source and header files so empty as possible. Every new Class needs the class <variables.ccp>. This file is the post office of the whole program.
5. Good luck with coding ! Giving up is the easy part !
Thanks for your reply !
What linux distribution are you running this on?
Debian 9. Uname -r : 4.9.0-8-rt-amd128
It seems to use a later libqt5core than what is available on stretch.
It seems that version Qt 5.5 is compatible with most linux distro's, this is info from qt forum.
I am building on Qt 5.12.3. Wich linux version are you using Phil? Then i can try this to run myself and find a solution.
The latest program : we.tl/t-ygF2uelACM
To run, unzip and type in terminal : ./DxfDecoder
Cad logo :
DxfDecoder :
Linuxcnc :
Have done some nice coding in the mean time. C++ is becoming my second language.
Every day it become's more easy to code.
I have to explain some things about the program until it is at this moment.
I made some differences related to my earlyer program examples.
1. At this moment the program read lines, arc's and circles seperate.
Related to the first C program examples, the program now has 3 C++ classes. (in total 23 classes, 23 header files until today)
One class for Line, one class for Circle and one class for Arc.
Every class is in fact a separate program. It open's the dxf file, read's the data, and closes the file when reading is finished.
This result's in a more stable program flow and very easy debug situation, and a very easy expand structure, like adding Polylines later on in the fourth class. Or a class you want to imagine yourself.
2. The program has one base_array, divided in 2 classes. This array store's all the readed dxf data into memory places as long the pc is on.
One base array is of type double (for storing large accuracy numbers iike the number : 21.000215) and one base array is of type integer ( for storing simple numbers like 1,2 or 3. )
- The program read's the dxf files for line, circle and arc. All this data is straight stored into the base_array.
Everything you see in the attached pictures comes straight ahead out of the base array, the most simple form of memory data storing, up to millions of lines. And dynamic.
We can store this dxf data into a text file instead of an array for example , but a text file is hard to manipulate and order.
A array is a easy item (instrument or tool) to manipulate, copy, and edit data.
It is the key to make an ultra fast program that can do a stress test without any problem relating to other cad cam programs !
3. The program is very simple in setup. We read in line's, circle's and arc's, we have 2 base array's to store the data, and look what we can do so far without any logic like contour recognizing, difficult algoritmes etc.
4. The program has one C++ class with all the external variables. This program stucture i found out my self. This keep's all other source and header files so empty as possible. Every new Class needs the class <variables.ccp>. This file is the post office of the whole program.
5. Good luck with coding ! Giving up is the easy part !
Last edit: 7 years 3 months ago by Grotius.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- phillc54
- Offline
- Platinum Member
-
Less
More
- Posts: 5711
- Thank you received: 2100
7 years 3 months ago #139523
by phillc54
All the libQt5 stuff seems to be 5.7.1-1
Replied by phillc54 on topic QT C++ code samples
I am using the ISO from the LinuxCNC website.I am building on Qt 5.12.3. Wich linux version are you using Phil? Then i can try this to run myself and find a solution.
Code:
phill@stretch ~ $ uname -a
Linux stretch 4.9.0-6-rt-amd64 #1 SMP PREEMPT RT Debian 4.9.88-1+deb9u1 (2018-05-07) x86_64 GNU/Linux
phill@stretch ~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.9 (stretch)
Release: 9.9
Codename: stretch
All the libQt5 stuff seems to be 5.7.1-1
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
7 years 3 months ago - 7 years 3 months ago #139607
by Grotius
Replied by Grotius on topic QT C++ code samples
Hi Phill.
Indeed i get the same error on my other pc that is on at my factory that has no QT installation.
Today i did some research on that pc. I have not finished because i had to go. I am at 50% of a solution. I think maybe
tomorrow i have the terminal command's ready to go... Later on i will make a install icon for you.
For you at your stage you could consider a qt installation. This you can use as text editor for your python projects. And you
can test the DxfDecoder coming time during update's. And make some request's to me.
Today i had not much time to code. But i did a nice thing.
Added a few setting files. They save the user preferences.. They load your default gcode intro, etc.
User can edit the file's. No programmer experience is needed. It's very easy.
This will be expanded with text input options after and before M3, M5 for your PlasmaC Gcode style... Do you like this?
To download this version, file stay's here one week : we.tl/t-t2iZnqEKrH
It has the file structure for user preferences included.
To start the program, unzip file and type in terminal : ./DxfDecoder
QT must be installed.
Indeed i get the same error on my other pc that is on at my factory that has no QT installation.
Today i did some research on that pc. I have not finished because i had to go. I am at 50% of a solution. I think maybe
tomorrow i have the terminal command's ready to go... Later on i will make a install icon for you.
For you at your stage you could consider a qt installation. This you can use as text editor for your python projects. And you
can test the DxfDecoder coming time during update's. And make some request's to me.
Today i had not much time to code. But i did a nice thing.
Added a few setting files. They save the user preferences.. They load your default gcode intro, etc.
User can edit the file's. No programmer experience is needed. It's very easy.
This will be expanded with text input options after and before M3, M5 for your PlasmaC Gcode style... Do you like this?
To download this version, file stay's here one week : we.tl/t-t2iZnqEKrH
It has the file structure for user preferences included.
To start the program, unzip file and type in terminal : ./DxfDecoder
QT must be installed.
Last edit: 7 years 3 months ago by Grotius.
The following user(s) said Thank You: phillc54
Please Log in or Create an account to join the conversation.
- phillc54
- Offline
- Platinum Member
-
Less
More
- Posts: 5711
- Thank you received: 2100
7 years 3 months ago #139636
by phillc54
Replied by phillc54 on topic QT C++ code samples
I may need to set up another machine for this as I am working on a QtVCP GUI so I do have some form of Qt installed and I am not sure if adding later versions will cause problems with that.
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
7 years 3 months ago #139644
by Grotius
Replied by Grotius on topic QT C++ code samples
Hi Phill,
Installing QT will not break other things. But i agree if you have very imporant work to do i would also go for the safe way.
That's why i frequently make backup's, just to be sure.
www.qt.io/download
If you download clonezilla, you can make a fast disk clone (takes 10 minutes) Then you have also a backup !! And you can try QT.
Installing QT will not break other things. But i agree if you have very imporant work to do i would also go for the safe way.
That's why i frequently make backup's, just to be sure.
www.qt.io/download
If you download clonezilla, you can make a fast disk clone (takes 10 minutes) Then you have also a backup !! And you can try QT.
Please Log in or Create an account to join the conversation.
Time to create page: 0.158 seconds