QT C++ code samples

More
16 Nov 2019 13:36 #150473 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi Todd,

Here is some info what is happening after the algoritme has recognized the objects for inside each other, or not..
This output list, is the base how to go further in the process.. By list manipulation you can make a sequence for cutting.
There is beside that info almost unlimited to acces to info about product contour dimension, shape, area, etc.. that can be used by the process. We got about 75 parameters for each drawed item, divided up into 15 integers and 60 double value's. This includes everything up to dxf, stl, contournumbers, cw or ccw parameters, predifined intersection points, etc. So much info. More then a draftsight drawing. :woohoo:

I was thinking of how your program should calculate the process.

stand alone contour added *it : 2
master : 0 slave : 1
master : 0 slave : 1
master : 0 slave : 1
master : 0 slave : 1
master : 3 slave : 4
master : 3 slave : 4
master : 3 slave : 4
master : 3 slave : 4

Attachments:

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

More
22 Nov 2019 03:25 #150878 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi there,

I had some difficult programming time the last day's. But we can now nest 3 parts deep.
This mean's part 1, may contain part 2, and part 2 may contain part 3. It's a very hard logic to write, it takes some up's and down's..
The nice thing is, the g-code logic is from most inner part to most outher part. And is keep part's together. So very good..

The red line is cw, outside cutting.
The yellow line is ccw, inside cutting.
Triangulation is done in the color old gold.

Next step is to implement the contour offset. This will become a tiny blue line around the contours. It will look fantastic...

Example plate 2000x1000mm with some text and parts nested 3 parts deep :
Attachments:
The following user(s) said Thank You: phillc54, tommylight, Clive S

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

More
29 Nov 2019 07:46 #151477 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi linux friends,

A little project update for today.

The contour offset class is in progess. Todo is to calculate the new offset intersection point's. line-line, line-arc etc..
The triangulation is a quite a difficult class to get as espected. But we are quite far in coding that class at the moment.

The tiny blue line is the generated tool offset path, chosen a tool diameter of 1.5mm
Red is clockwise contour, Yellow is counter clockwise contour. When the intersection's are done, we make the lead-in and lead out-logic.

So far so good. Have a nice day !

Attachments:
The following user(s) said Thank You: phillc54, tommylight, Clive S

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

More
29 Nov 2019 18:51 - 29 Nov 2019 21:15 #151516 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi,

A short program update of today.

The contour intersection point's of the blue lines are calculated. It seems to work quite nice.


This cam calculation of 32 pieces of 100x100 products takes 1,39717 seconds to generate :

above 32 pieces have 1410 items like line's, arc's and circles.

Okey let's see if we can add lead-in and lead out to the products. Have a nice day !

Update : Auto generated lead in :
Attachments:
Last edit: 29 Nov 2019 21:15 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
30 Nov 2019 15:54 - 30 Nov 2019 18:07 #151580 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi,

Today we added the G-code class to the program and did a Linuxcnc test. Users only have to press the cam button to see the
output like this. Below the g-code output in a spoiler.

The lead-in is implemented as a kind of macro behind the screen. This makes it able to use a dxf lead in template for users.
Lead in may be a 3d curve for example. The curve only needs a begin point and endpoint, see it as a vector..




Everything looks good. Have to make a link to the cut sequence (keep parts together), no problem.

I want to ask the linux users to comment about the following items :

- who wants to use code snippets? for example : little holes below .. mm slower .. % or for example a lead in path dxf macro?
- g_code parameters like : pierce Z speed, lead in speed (this is maybe a new item), etc. etc.
- special features.. ??
- PlasmaC features or postprocessor features ??

Attached the test g-code output :
Warning: Spoiler! [ Click to expand ]


Okey we are at a exiting moment with the program now, have a nice day and don't forget to comment about program features.

Another test today :

Showing a example of a pipe flange. Here we show how the triangulation is done to get a solid product with opengl.


With triangulation as a solid view :


Linuxcnc output :


Gcode of pipe flange in spoiler :
Warning: Spoiler! [ Click to expand ]


Okey i see we can optimize the holes to do a shortest path with keep parts together..
The lead in is nice.. it point's always to the center of the circle.. even when it's a g2.
Attachments:
Last edit: 30 Nov 2019 18:07 by Grotius.
The following user(s) said Thank You: tommylight, Clive S

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

More
01 Dec 2019 00:17 #151621 by phillc54
Replied by phillc54 on topic QT C++ code samples
This just gets better and better, awesome job...

If users could create their own custom postprocessor, similar to say SheetCam would be good.
The following user(s) said Thank You: tommylight, Clive S, Grotius

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

More
02 Dec 2019 13:04 #151741 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi Phill,

Thank you for your advice.

Attached a example of how the post processor can be set up. At least how i think it can be done at this moment.

It has several more items, like a tool library, code snippets and a axis configuration. This all can be loaded and saved in a configuration file related to the program. Editing the configuration file can also be done in Geanny or Wordpad.

I think this Treemodel structure can also be nice for editing the contour cut path's in the main cad cam screen.

- Soon try to add pocket milling operations.

Attachments:
The following user(s) said Thank You: phillc54, tommylight, Clive S

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

More
04 Dec 2019 14:00 #151994 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi,

I programmed the tools in a seperate window. It's done in a tableview format. Just like excel. Tools can be saved and loaded trough the text file tools.txt.

The tooltable can add and delete lines, insert lines at a selected place, the lines can be moved up and down to sort your tool table.
I think this is quite good..



The text file can be edited off line. A tool.txt example output :
Warning: Spoiler! [ Click to expand ]


Okey this tool window template we can use as template for the postprocessor window and the machine head's window.
Problably the contour editing goes trough a tree structure..

Have a nice day !
Attachments:
The following user(s) said Thank You: phillc54, tommylight

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

More
13 Dec 2019 21:28 #152613 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi,

Bit by bit we go on. I had difficult times constructing a combobox with multiple data on the same line and qt has a tiny bug according
to display the toolbar order. So far no problems anymore.

At the moment doing some work on the cam window on the right of the screen. The treewidget is interacting with the contours.
The buttonboxes data in the toolbar are saved and loaded and refreshed during program execution.

I need some more time to make it as espected..

Have a nice day !

Attachments:
The following user(s) said Thank You: phillc54, tommylight, Clive S

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

Time to create page: 0.422 seconds
Powered by Kunena Forum