QT C++ code samples

More
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.
The following user(s) said Thank You: phillc54, tommylight, Clive S

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

More
6 years 3 months ago - 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 !
Last edit: 6 years 3 months ago by Grotius.
The following user(s) said Thank You: phillc54, tommylight

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

More
6 years 3 months ago - 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. :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:
Last edit: 6 years 3 months ago by Grotius.
The following user(s) said Thank You: phillc54, tommylight

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

More
6 years 3 months ago - 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 !
Last edit: 6 years 3 months ago by Grotius.
The following user(s) said Thank You: phillc54, tommylight

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

More
6 years 3 months ago - 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 !
Last edit: 6 years 3 months ago by Grotius.
The following user(s) said Thank You: phillc54, tommylight

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

More
6 years 3 months ago #175771 by tommylight
The following user(s) said Thank You: Grotius

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

Time to create page: 0.123 seconds
Powered by Kunena Forum