QT C++ code samples
- tommylight
- Away
- Moderator
Less
More
- Posts: 19336
- Thank you received: 6474
02 Jul 2019 17:19 #138420
by tommylight
Replied by tommylight on topic QT C++ code samples
Do you accept crypto ? Can any of you buy beer or coffee with it ?
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
02 Jul 2019 21:11 - 02 Jul 2019 21:54 #138438
by Grotius
Replied by Grotius on topic QT C++ code samples
@Rod,
I made a few examples how to use the linked list in QT, also pointer mode is used.
When reading raw dxf data. So far as i can see the best option is to load the data into a parallel multidimensional array (memory).
It takes about 2 seconds to store 2.000.000 lines of future g-code lines into memory.
This input stay's as it is, unmodified, ready to be transformed into a interactive object later on in the same array, but new dimension.
I must explain my program flow a bit more :
1. Load raw dxf data into memory. During loading it sort's line's, arc's, circle's, cad color's, etc into the array's.
-- Array dimension 1.
2. The cubic formula to sort lines, arc, polyline into object's (closed contours)
-- Array dimension 2.
3. The user defined input's like cw or ccw movements, kerf width, feedrate, spindlespeed, g-code intro, g-code outtro, etc.
--Array dimension 3.
The last array dimension 3 is interactive with user input & opengl.
Rodw :rather than copying data from one array element to another.
This looks not interactive... Copying data from one array to another array would be one way forward, but not interactive backward's.
In my future case it uses a interactive list view (just like a dir view, sub file view) updated by the interactive array, it uses the OpenGL screen update timer.
@Tommy,
I don't use bitcoins for now. I have seen the movie about mtgoxs.
I made a few examples how to use the linked list in QT, also pointer mode is used.
When reading raw dxf data. So far as i can see the best option is to load the data into a parallel multidimensional array (memory).
It takes about 2 seconds to store 2.000.000 lines of future g-code lines into memory.
This input stay's as it is, unmodified, ready to be transformed into a interactive object later on in the same array, but new dimension.
I must explain my program flow a bit more :
1. Load raw dxf data into memory. During loading it sort's line's, arc's, circle's, cad color's, etc into the array's.
-- Array dimension 1.
2. The cubic formula to sort lines, arc, polyline into object's (closed contours)
-- Array dimension 2.
3. The user defined input's like cw or ccw movements, kerf width, feedrate, spindlespeed, g-code intro, g-code outtro, etc.
--Array dimension 3.
The last array dimension 3 is interactive with user input & opengl.
Rodw :rather than copying data from one array element to another.
This looks not interactive... Copying data from one array to another array would be one way forward, but not interactive backward's.
In my future case it uses a interactive list view (just like a dir view, sub file view) updated by the interactive array, it uses the OpenGL screen update timer.
@Tommy,
I don't use bitcoins for now. I have seen the movie about mtgoxs.
Attachments:
Last edit: 02 Jul 2019 21:54 by Grotius.
The following user(s) said Thank You: rodw
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19336
- Thank you received: 6474
02 Jul 2019 22:30 #138446
by tommylight
I use them for the last 2 or 3 years, and I did mine some at the very beginning of bitcoin, but it had no value then so I did not bother much.
Now it is a very nice and useful system, but it has no connection with reality. Until that happens not much use of it, but that does not stop me from paying 145 euro in electricity every month. And I do not worry about hacking, I am a paranoid network security expert with over 10 years of professional experience.
Now Facebook is making a crypto payment system with some other big players like Visa and MasterCard.
When you do start using it, let me know, I'll buy you a Heineken or two.
Replied by tommylight on topic QT C++ code samples
@Tommy,
I don't use bitcoins for now. I have seen the movie about mtgoxs.
I use them for the last 2 or 3 years, and I did mine some at the very beginning of bitcoin, but it had no value then so I did not bother much.
Now it is a very nice and useful system, but it has no connection with reality. Until that happens not much use of it, but that does not stop me from paying 145 euro in electricity every month. And I do not worry about hacking, I am a paranoid network security expert with over 10 years of professional experience.
Now Facebook is making a crypto payment system with some other big players like Visa and MasterCard.
When you do start using it, let me know, I'll buy you a Heineken or two.
Please Log in or Create an account to join the conversation.
03 Jul 2019 00:03 #138468
by Grotius
Replied by Grotius on topic QT C++ code samples
Një ide e mirë do të ishte importimi i djathit të dhisë tek holandezët, kamioni mund të kthehet plot me Heineken në Kosovë.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19336
- Thank you received: 6474
03 Jul 2019 09:46 #138505
by tommylight
Replied by tommylight on topic QT C++ code samples
That is a nice idea ! Although i do not eat cheese, except in pizza!
And we do have Heineken here everywhere.
You learned Albanian very quickly !
And we do have Heineken here everywhere.
You learned Albanian very quickly !
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
04 Jul 2019 00:51 #138580
by Grotius
Replied by Grotius on topic QT C++ code samples
Yes Tommy,
Cheers !
Cad drawing :
dxfDecoder opengl output :
There was one very difficult part related to arc's to solve for me today, it looked like a bug.
Was only a issue in the opengl output. In the flower you see almost closed arc's. The can give
proglem's when end angle is lower then start angle. Then end angle needs to be made bigger.
Sinds we use radian's it's multiplied by 2*M_PI.
I solved it after hours with this online article.
//if (endAngle < startAngle)
//endAngle += 2*pi;
//https://stackoverflow.com/questions/39344403/opengl-how-fix-direction-draw-circle-semi-circle-arc-from-start-to-end-point-giv
But it's going good. The opengl is full color and does line, arc's and circles. So far so good !!
Up to the next level tomorrow !!
Cheers !
Cad drawing :
dxfDecoder opengl output :
There was one very difficult part related to arc's to solve for me today, it looked like a bug.
Was only a issue in the opengl output. In the flower you see almost closed arc's. The can give
proglem's when end angle is lower then start angle. Then end angle needs to be made bigger.
Sinds we use radian's it's multiplied by 2*M_PI.
I solved it after hours with this online article.
//if (endAngle < startAngle)
//endAngle += 2*pi;
//https://stackoverflow.com/questions/39344403/opengl-how-fix-direction-draw-circle-semi-circle-arc-from-start-to-end-point-giv
But it's going good. The opengl is full color and does line, arc's and circles. So far so good !!
Up to the next level tomorrow !!
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
04 Jul 2019 20:42 - 04 Jul 2019 21:24 #138642
by Grotius
Replied by Grotius on topic QT C++ code samples
@Project update...
Today i added a few button's to the screen. Google has provided 800 open source button's. So i downloaded them, thanks google !
I added a dxf program logo, that looks nice to me. Mention the multicolor.
The treeview side screen is interactive with the parallel multidimensional array's.
I think i go to work at the contour recognize formula tomorrow... Then the treeview can display closed contours etc.
Attached the program file, if you want to try it.
Unzip and type in terminal : ./DxfDecoder
It will load the drawing by clicking the file opener. Today it has a limited g-code output to 0 lines...
Today i added a few button's to the screen. Google has provided 800 open source button's. So i downloaded them, thanks google !
I added a dxf program logo, that looks nice to me. Mention the multicolor.
The treeview side screen is interactive with the parallel multidimensional array's.
I think i go to work at the contour recognize formula tomorrow... Then the treeview can display closed contours etc.
Attached the program file, if you want to try it.
Unzip and type in terminal : ./DxfDecoder
It will load the drawing by clicking the file opener. Today it has a limited g-code output to 0 lines...
Attachments:
Last edit: 04 Jul 2019 21:24 by Grotius.
Please Log in or Create an account to join the conversation.
- tommylight
- Away
- Moderator
Less
More
- Posts: 19336
- Thank you received: 6474
04 Jul 2019 21:19 #138644
by tommylight
Replied by tommylight on topic QT C++ code samples
Looks awesome ! Nice work.
Regards,
Tom.
Regards,
Tom.
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
04 Jul 2019 22:17 - 05 Jul 2019 00:16 #138648
by Grotius
Replied by Grotius on topic QT C++ code samples
Hi Tommy,
Thanks for your reply !
I have done a stress test for the DxfDecoder.
1200 DxfDecode logo's to load in one sheet of metal.
Pc status :
Now doing the same stress test with sheetcam.
Output of sheetcam :
Pc status :
Sheetcam can not do this job unfortunately. It's still busy after 30 minutes.
My conclusion so far as i can see about the Sheetcam stress test :
It duplicates all the ... vector's, then removes all the ... duplicated vecor's.
It's doing all kind of processes. But it does not read raw dxf data into memory, that's for sure !!
It uses a different procedure, cq program flow.
The last stress test was for the python coded dxf2gode.
Pc status :
No output for this program.
Empty screen for this program.
Conclusion for the Python coded Dxf2Gcode program, It used the most memory related to the other 2 cad/cam program's.
All 3 stress test's where done when youtube was active :
Gëzuar, dhe shpresoj se ne mund të krijojmë diçka të bukur në periudhën e ardhshme.
Thanks for your reply !
I have done a stress test for the DxfDecoder.
1200 DxfDecode logo's to load in one sheet of metal.
Pc status :
Now doing the same stress test with sheetcam.
Output of sheetcam :
Pc status :
Sheetcam can not do this job unfortunately. It's still busy after 30 minutes.
My conclusion so far as i can see about the Sheetcam stress test :
It duplicates all the ... vector's, then removes all the ... duplicated vecor's.
It's doing all kind of processes. But it does not read raw dxf data into memory, that's for sure !!
It uses a different procedure, cq program flow.
The last stress test was for the python coded dxf2gode.
Pc status :
No output for this program.
Empty screen for this program.
Conclusion for the Python coded Dxf2Gcode program, It used the most memory related to the other 2 cad/cam program's.
All 3 stress test's where done when youtube was active :
Gëzuar, dhe shpresoj se ne mund të krijojmë diçka të bukur në periudhën e ardhshme.
Last edit: 05 Jul 2019 00:16 by Grotius.
Please Log in or Create an account to join the conversation.
08 Jul 2019 22:24 - 09 Jul 2019 00:27 #138901
by Grotius
Replied by Grotius on topic QT C++ code samples
@Project update..
Me had a hard C and C++ time the last day's. That's a reason to be quiet.
The contour recognize formula was very hard to do. Studied different existing algoritmes, etc.
I made a brand new algoritme from scratch. Off course i made multiple algoritme's from scratch in different styles.....
Now we have a very efficient algoritme. If someone has a idea for a name for this algoritme...
Algoritme output :
Part of the message is hidden for the guests. Please log in or register to see it.
Closed contours can also be :
Part of the message is hidden for the guests. Please log in or register to see it.
And the trick boxs is even bigger. We can make closed contours on tollerance input...
If the opening between point's is 5mm. We can make a closed contour, no problem.
Part of the message is hidden for the guests. Please log in or register to see it.
Up to the next gear....
Me had a hard C and C++ time the last day's. That's a reason to be quiet.
The contour recognize formula was very hard to do. Studied different existing algoritmes, etc.
I made a brand new algoritme from scratch. Off course i made multiple algoritme's from scratch in different styles.....
Now we have a very efficient algoritme. If someone has a idea for a name for this algoritme...
Algoritme output :
Part of the message is hidden for the guests. Please log in or register to see it.
Closed contours can also be :
Part of the message is hidden for the guests. Please log in or register to see it.
And the trick boxs is even bigger. We can make closed contours on tollerance input...
If the opening between point's is 5mm. We can make a closed contour, no problem.
Part of the message is hidden for the guests. Please log in or register to see it.
Up to the next gear....
Attachments:
Last edit: 09 Jul 2019 00:27 by Grotius.
The following user(s) said Thank You: tommylight
Please Log in or Create an account to join the conversation.
Time to create page: 0.541 seconds