QT C++ code samples

More
03 Jul 2020 21:07 #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.
Attachments:
The following user(s) said Thank You: phillc54, tommylight, Clive S

Please Log in or Create an account to join the conversation.

More
07 Jul 2020 20:24 - 07 Jul 2020 20:38 #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 !
Attachments:
Last edit: 07 Jul 2020 20:38 by Grotius.
The following user(s) said Thank You: phillc54, tommylight

Please Log in or Create an account to join the conversation.

More
08 Jul 2020 18:28 - 08 Jul 2020 18:34 #174005 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi,

I tested the program to reproduce a mesa circuit board. :P
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:
Attachments:
Last edit: 08 Jul 2020 18:34 by Grotius.
The following user(s) said Thank You: phillc54, tommylight

Please Log in or Create an account to join the conversation.

More
11 Jul 2020 20:22 - 11 Jul 2020 20:36 #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 !
Attachments:
Last edit: 11 Jul 2020 20:36 by Grotius.
The following user(s) said Thank You: phillc54, tommylight

Please Log in or Create an account to join the conversation.

More
25 Jul 2020 15:39 - 25 Jul 2020 15:54 #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 !
Attachments:
Last edit: 25 Jul 2020 15:54 by Grotius.
The following user(s) said Thank You: phillc54, tommylight

Please Log in or Create an account to join the conversation.

More
25 Jul 2020 18:34 #175771 by tommylight
Replied by tommylight on topic QT C++ code samples
Very nice, indeed ! :)
The following user(s) said Thank You: Grotius

Please Log in or Create an account to join the conversation.

More
26 Jul 2020 20:16 - 26 Jul 2020 20:51 #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.
Attachments:
Last edit: 26 Jul 2020 20:51 by Grotius.
The following user(s) said Thank You: phillc54, tommylight, Clive S

Please Log in or Create an account to join the conversation.

More
26 Jul 2020 20:55 #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.
The following user(s) said Thank You: Grotius, thefabricator03

Please Log in or Create an account to join the conversation.

More
26 Jul 2020 21:05 #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 !

Please Log in or Create an account to join the conversation.

More
20 Sep 2020 08:33 #182839 by billykid
Replied by billykid on topic QT C++ code samples
i am never crashed, so i can go faster :-)
Attachments:

Please Log in or Create an account to join the conversation.

Time to create page: 0.657 seconds
Powered by Kunena Forum