- Posts: 2419
- Thank you received: 0
QT C++ code samples
6 years 3 months ago #173553
by Grotius
Replied by Grotius on topic QT C++ code samples
Hi,
Step by step the program is going forward.
At the moment the true spline in integrated and the offset is done by a linestrip.
Have changed much of the arc code. Arcs are normally drawed with arc start and arc end angle.
Okey this is getting quite complex if we are handling g2 and g3 arc's, that have to be splitted up at intersection points in multiple arc's.
So i changed the arc code into a 3 point arc segment. So we don't have to deal with arc start and arc end angles any more.
Today i writed down my program errors, and where they came from, yesterday i was searching for hours at one bug :
1. I made a function that did not work correctly. The cause was another function that worked after the function wich was given wrong output.
2. A formula fault. like : angle_a+angle_b/2 had to be (angle_a+angle_b)/2
3. Wrong arc-arc intersections. Solution was to update the radius of the arcs.
A picture. I have much work to do. But today it's going quite good. Yesterday was not good.
I think i have a solution for inner islands, we will see.
Have a nice day !
Source code attached.
Step by step the program is going forward.
At the moment the true spline in integrated and the offset is done by a linestrip.
Have changed much of the arc code. Arcs are normally drawed with arc start and arc end angle.
Okey this is getting quite complex if we are handling g2 and g3 arc's, that have to be splitted up at intersection points in multiple arc's.
So i changed the arc code into a 3 point arc segment. So we don't have to deal with arc start and arc end angles any more.
Today i writed down my program errors, and where they came from, yesterday i was searching for hours at one bug :
1. I made a function that did not work correctly. The cause was another function that worked after the function wich was given wrong output.
2. A formula fault. like : angle_a+angle_b/2 had to be (angle_a+angle_b)/2
3. Wrong arc-arc intersections. Solution was to update the radius of the arcs.
A picture. I have much work to do. But today it's going quite good. Yesterday was not good.
I think i have a solution for inner islands, we will see.
Attachment not found
Have a nice day !
Source code attached.
Please Log in to join the conversation.
6 years 3 months ago #173909
by Grotius
Replied by Grotius on topic QT C++ code samples
Hi, Much work to do, but with succes !We can now do a pocket offset with islands. Also is used the true spline in the example.So next step is finisch the pocket class and investegate a nesting algoritme.
Have a nice day !
Attachment not found
Have a nice day !
Please Log in to join the conversation.
6 years 3 months ago #174005
by Grotius
Replied by Grotius on topic QT C++ code samples
Hi,
I tested the program to reproduce a mesa circuit board.
Did a trace bitmap and object to path in Inkscape.
Then i loaded the Inkscape dxf into the CadCam program.
The milling offset's are started at 0.1mm and up to 8-9mm pocket offset in total.
I think this is quite a nice output.
program output:
close up, here you see the 3 times 0.1mm offset path's, followed by a 1 mm offset path.
orginal picture:
I tested the program to reproduce a mesa circuit board.
Did a trace bitmap and object to path in Inkscape.
Then i loaded the Inkscape dxf into the CadCam program.
The milling offset's are started at 0.1mm and up to 8-9mm pocket offset in total.
I think this is quite a nice output.
program output:
Attachment not found
close up, here you see the 3 times 0.1mm offset path's, followed by a 1 mm offset path.
Attachment not found
orginal picture:
Attachment not found
Please Log in to join the conversation.
6 years 3 months ago #174324
by Grotius
Replied by Grotius on topic QT C++ code samples
Hi,
Project update. Integrated a nesting algoritme.
Have to do some work at the nesting rotation, look at difficult shapes, but i am happy with the result so far.
The blue line is a reference plate with dimension 2000x1000mm
Nesting before :
After nesting :
Some more bulk nesting before :
Bulk nesting after :
I think the result is quite nice.
Have a nice day !
Project update. Integrated a nesting algoritme.
Have to do some work at the nesting rotation, look at difficult shapes, but i am happy with the result so far.
The blue line is a reference plate with dimension 2000x1000mm
Nesting before :
Attachment not found
After nesting :
Attachment not found
Some more bulk nesting before :
Attachment not found
Bulk nesting after :
Attachment not found
I think the result is quite nice.
Have a nice day !
Please Log in to join the conversation.
6 years 3 months ago #175746
by Grotius
Replied by Grotius on topic QT C++ code samples
Hi,
Short project update.
The program has now :
- Tools, set up tools like milling, drilling, plasma-laser and oxyfuel.
- Heads, set up your heads for Z, A, etc. with xy offsets.
- Operations, pockets (with or without islands), outside offset, no offset, inside offset, drill hole.
- Jobs, create a job list, select a cad layer and do a operation. Cad layers are highlited when selecting the layer in the combobox.
- All program settings are saved in textfiles for next startup.
Result :
Nesting has improved.
- automatic add's new plate when previous plate is full.
Nesting result :
I have to say, nesting can be improved in the future. For now it's okey.
The pocket milling has the toolradius offset for first offset. Then for next offsets, you can select an overlap input
from 0 to 1 for pockets. You can spot the overlap result in the first picture.
If you do the hole drill operation. It will only drill the hole if the hole is equel or bigger then the tool. You can see the holes as blue circulair outputs in the first picture.
Next thing to do is add the lead in and lead outs into the program.
Have a nice day !
Short project update.
The program has now :
- Tools, set up tools like milling, drilling, plasma-laser and oxyfuel.
- Heads, set up your heads for Z, A, etc. with xy offsets.
- Operations, pockets (with or without islands), outside offset, no offset, inside offset, drill hole.
- Jobs, create a job list, select a cad layer and do a operation. Cad layers are highlited when selecting the layer in the combobox.
- All program settings are saved in textfiles for next startup.
Result :
Attachment not found
Nesting has improved.
- automatic add's new plate when previous plate is full.
Nesting result :
Attachment not found
I have to say, nesting can be improved in the future. For now it's okey.
The pocket milling has the toolradius offset for first offset. Then for next offsets, you can select an overlap input
from 0 to 1 for pockets. You can spot the overlap result in the first picture.
If you do the hole drill operation. It will only drill the hole if the hole is equel or bigger then the tool. You can see the holes as blue circulair outputs in the first picture.
Next thing to do is add the lead in and lead outs into the program.
Have a nice day !
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
6 years 3 months ago #175771
by tommylight
Replied by tommylight on topic QT C++ code samples
Very nice, indeed !
Please Log in to join the conversation.
6 years 3 months ago #175961
by Grotius
Replied by Grotius on topic QT C++ code samples
Thank you Tom !
The programming goes fast now !!
Today programmed the most of the c++ gcode into the program.
Tested contours and pockets okey so far.
Added :
- gcode linenumbers (N) on or off
- gcode user defined decimal precision output
- m code character choice for delay,
- made pre-settings for filepath's and file extensions.
- all can be saved for next startup.
Todo :
- write c++ gcode for drill operations, including drill retract option.
- use dijkstra's shortest path algorime to use the cnc more efficient.
The result :
Every day we are closer to the release date. :blink:
Soon will provide a pre-release to use for cam. Integrating the Cad stuff again takes some more time.
The programming goes fast now !!
Today programmed the most of the c++ gcode into the program.
Tested contours and pockets okey so far.
Added :
- gcode linenumbers (N) on or off
- gcode user defined decimal precision output
- m code character choice for delay,
- made pre-settings for filepath's and file extensions.
- all can be saved for next startup.
Todo :
- write c++ gcode for drill operations, including drill retract option.
- use dijkstra's shortest path algorime to use the cnc more efficient.
The result :
Attachment not found
Attachment not found
Every day we are closer to the release date. :blink:
Soon will provide a pre-release to use for cam. Integrating the Cad stuff again takes some more time.
Please Log in to join the conversation.
- tommylight
-
- Away
- Administrator
-
Less
More
- Posts: 22010
- Thank you received: 3
6 years 3 months ago #175970
by tommylight
Replied by tommylight on topic QT C++ code samples
Isle of man, TT ! 
To old for that now, have not driven any of my bikes over 96KMH in last ..... 20 years ! :blush:
Still to scared of them since i had a mild crash 33 years ago, nothing broken just some bruises and scratches, but the fear remained.
To old for that now, have not driven any of my bikes over 96KMH in last ..... 20 years ! :blush:
Still to scared of them since i had a mild crash 33 years ago, nothing broken just some bruises and scratches, but the fear remained.
Please Log in to join the conversation.
6 years 3 months ago #175974
by Grotius
Replied by Grotius on topic QT C++ code samples
Same for me. Crashed hard on my right knee in my younger years. Never bought a motorcylce again, just to stay safe !
But isle of man is stil on my bucket list !
But isle of man is stil on my bucket list !
Please Log in to join the conversation.
Time to create page: 0.147 seconds
