QT C++ code samples

More
6 years 11 months ago #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

Attachment not found

Please Log in to join the conversation.

More
6 years 11 months ago #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 :

Attachment not found

Please Log in to join the conversation.

More
6 years 11 months ago #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 !

Attachment not found

Please Log in to join the conversation.

More
6 years 11 months ago #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.

Attachment not found



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

Attachment not found


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 :

Attachment not found

Please Log in to join the conversation.

More
6 years 11 months ago #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..

Attachment not found


Attachment not found



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!


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.

Attachment not found



With triangulation as a solid view :

Attachment not found



Linuxcnc output :

Attachment not found



Gcode of pipe flange in spoiler :
Warning: Spoiler!


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.

Please Log in to join the conversation.

More
6 years 10 months ago #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.

Please Log in to join the conversation.

More
6 years 10 months ago #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.

Attachment not found

Please Log in to join the conversation.

More
6 years 10 months ago #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..

Attachment not found



The text file can be edited off line. A tool.txt example output :
Warning: Spoiler!


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 !

Please Log in to join the conversation.

More
6 years 10 months ago #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 !

Attachment not found

Please Log in to join the conversation.

More
6 years 9 months ago #153606 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi guy's.

Everyone a good new year !

For the cad/cam program i spent some time in adding dimension features, see the example picture.

If users need a factory drawing, it needs dimension's and it must be printed to paper.. If not, it's useless..

I have read some document's about printing the opengl screen. We can save it as png or bitmap,
but that will result in a very bad output for the printer resolution.

So i am more thinking to output a pdf file (vector style) for printing... The pdf file does not need the opengl parameters. It only needs
the array data... I have to investegate more time about setting up a pdf file from scratch with c++.

So far so good, the dimension class works nice !

Attachment not found

Please Log in to join the conversation.

Time to create page: 0.286 seconds
Powered by Kunena Forum