- Posts: 2419
- Thank you received: 2349
QT C++ code samples
- Grotius
- Offline
- Platinum Member
-
Less
More
7 years 3 months ago - 7 years 3 months ago #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... :laugh:
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... :laugh:
Last edit: 7 years 3 months ago by Grotius.
Please Log in or Create an account to join the conversation.
- tommylight
- Offline
- Moderator
-
Less
More
- Posts: 22011
- Thank you received: 7491
7 years 3 months ago #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.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
7 years 3 months ago - 7 years 3 months ago #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: 7 years 3 months ago by 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 - 7 years 3 months ago #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....
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.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
7 years 3 months ago - 7 years 3 months ago #139019
by Grotius
Replied by Grotius on topic QT C++ code samples
@Project update.
Arc's are included in contour recognize today.
In relation to raw dxf data, the arc's can predict the cw or ccw so simple. (g2 or g3)
The cw and cww recognize has to have a algoritme...
A few lines of C++ algoritme is not enough.
A good algoritme looks like auto nesting. Then
it can recognize inner and outher contours without any problem.
Colorcode 1 = cad red.
The arc is swapped from g2 to g3 by the algoritme to match the contour direction, see terminal output for this arc.
For this contour we know it's a ccw contour. But if it was a reqtangular shape without the arc, we only have line's to define a cw or ccw shape. That makes it more difficult.
And a final predict algoritme solution (code) is not alway's working with very complex shapes for lines. So i have to find a solution for this. 90% of the algoritme will work, but 10% will not work by complex shapes that are multiple inlined.
I will think about the auto nesting option coming day's. This will solve any contour direction cw or ccw recognize problem at once.
We can put out the g-code for now. But that will provide a basic program. It's my job to bring something new.
Will try to investegate auto nesting, product rotation, mirroring and optimalisation for plates.
Why not try to write some code from scratch. Try to translate your vision into output. In fact you only have to write the template.
The following linked program (deepnest) can not mirror the product and optimalisize it in the nesting... It's open source.
deepnest.io/ (open source, so far so good).
It's used for nesting Dassault Systems, a program called Fusion. Only available for Mac and Windows.
Today i looked by customer at deepnest, mirroring would be more effiecient. But deepnest can not mirror the product and
update the nesting.
So Linux has to use a VM (virtual machine). Strange isn't it? We are going to show something to Dassault Systems coming time.
And the final solution, that is not for sale and no hiring licences.
I won't look at the source code of this program. Better is to translate your own imagine into code.
Take for example the stress test in previous post's. I was advised to improve the python code dxf2gcode. But i would stay
in a problem situation, even when i would upgrade the python code.
Part of the message is hidden for the guests. Please log in or register to see it.
Arc's are included in contour recognize today.
In relation to raw dxf data, the arc's can predict the cw or ccw so simple. (g2 or g3)
The cw and cww recognize has to have a algoritme...
A few lines of C++ algoritme is not enough.
A good algoritme looks like auto nesting. Then
it can recognize inner and outher contours without any problem.
Colorcode 1 = cad red.
The arc is swapped from g2 to g3 by the algoritme to match the contour direction, see terminal output for this arc.
For this contour we know it's a ccw contour. But if it was a reqtangular shape without the arc, we only have line's to define a cw or ccw shape. That makes it more difficult.
And a final predict algoritme solution (code) is not alway's working with very complex shapes for lines. So i have to find a solution for this. 90% of the algoritme will work, but 10% will not work by complex shapes that are multiple inlined.
I will think about the auto nesting option coming day's. This will solve any contour direction cw or ccw recognize problem at once.
We can put out the g-code for now. But that will provide a basic program. It's my job to bring something new.
Will try to investegate auto nesting, product rotation, mirroring and optimalisation for plates.
Why not try to write some code from scratch. Try to translate your vision into output. In fact you only have to write the template.
The following linked program (deepnest) can not mirror the product and optimalisize it in the nesting... It's open source.
deepnest.io/ (open source, so far so good).
It's used for nesting Dassault Systems, a program called Fusion. Only available for Mac and Windows.
Today i looked by customer at deepnest, mirroring would be more effiecient. But deepnest can not mirror the product and
update the nesting.
So Linux has to use a VM (virtual machine). Strange isn't it? We are going to show something to Dassault Systems coming time.
And the final solution, that is not for sale and no hiring licences.
I won't look at the source code of this program. Better is to translate your own imagine into code.
Take for example the stress test in previous post's. I was advised to improve the python code dxf2gcode. But i would stay
in a problem situation, even when i would upgrade the python code.
Part of the message is hidden for the guests. Please log in or register to see it.
Last edit: 7 years 3 months ago by Grotius.
The following user(s) said Thank You: chimeno, tommylight
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 #139271
by Grotius
Replied by Grotius on topic QT C++ code samples
Today me have got a very basic program for you... :whistle:
It's not much, but it's something usefull for now. And it's free to use.
It can handle lines, arc's and circles. It's only for closed contours at this moment.
It can load a dxf file and save a ngc file to your specification's for linux only :laugh:
Me will not compile for windows or mac.
It's very basic, it has passed the stress test so far for 250.000+ objects.
Download link : we.tl/t-llYhQ4ei1J
Download it. To start up, unzip and type in terminal : ./DxfDecoder
The DxfDecoder gui :
The Linux Axis gui :
Next week i hope to improve some code.
We are at the beginning of something nice...
It's not much, but it's something usefull for now. And it's free to use.
It can handle lines, arc's and circles. It's only for closed contours at this moment.
It can load a dxf file and save a ngc file to your specification's for linux only :laugh:
Me will not compile for windows or mac.
It's very basic, it has passed the stress test so far for 250.000+ objects.
Download link : we.tl/t-llYhQ4ei1J
Download it. To start up, unzip and type in terminal : ./DxfDecoder
The DxfDecoder gui :
The Linux Axis gui :
Next week i hope to improve some code.
We are at the beginning of something nice...
Last edit: 7 years 3 months ago by Grotius.
The following user(s) said Thank You: phillc54, tommylight, snoozer77
Please Log in or Create an account to join the conversation.
Time to create page: 0.228 seconds