QT C++ code samples

More
7 years 3 months ago #140057 by Mike_Eitel
Replied by Mike_Eitel on topic QT C++ code samples
Hi Grotius
I'm no more in coding but remember strange results by "compiler optimization".
All sorts of.
M5C
Mike

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

More
7 years 3 months ago - 7 years 3 months ago #140209 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi Mike,

Thanks for your reply.

I'm no more in coding but remember strange results by "compiler optimization".

I solved it by making the formula outside of OpenGl. No complex issue. It can be a compiler problem. Short after my post
i got a QT update message. Maybe they spotted the same thing... If the problem still exist's it's not my problem anymore.
So i was a bit fast to publish this mathematical behavioure.

3d view (rotate) is implemented, was not hard, but i trapped myself... again .. Have to solve another thing.. I know what i did wrong...

My worst fault this week is to make visualisation's based on the sort array instead of the base array....
The base array has all the raw incoming data. This base array is the holy grail of the program. Without trusting the base array
the program is worth nothing...

So my vision is to alway's view first the raw dxf data (base array) to the user with OpenGL... This is very important.
In other word's... Show the base (auto)cad input to the user screen without any code manipulation.

Hmmm...

My stupid thing... Always the stupid tiny things...

I will change the code to fully 3d (it is already, but the array view has to change) and to base input code class again. ( tiny operation )

After that the classes (plasma or 3d milling) are free to use the code....

So you see Mike, every day we are learning about our code. You are a respected member over here !!
Last edit: 7 years 3 months ago by Grotius.
The following user(s) said Thank You: tommylight

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

More
7 years 3 months ago - 7 years 3 months ago #140565 by Grotius
Replied by Grotius on topic QT C++ code samples
Little project update :

Added 3d rotate zoom, now this works we can connect it to the right mouse button. Mouse rotate for x and z seem's good enough.


Added 3d path direction arrow's and start points.


Learned more about openGL this day. I started with line arrow's, but a cone looks nicer.
1. Draw a cone with the opengl triangle-strip
2. Move the cone to the position in the middle of the line
3. Rotate the cone within the direction of the line
4. Fabricate the next cone in the array for loop.

A raw code example for making a cone, it places the cone where you want, and it set's the cone direction :

Warning: Spoiler!


The axis gui :


I am thinking adapting cad function's into the cam program. To drawing lines, arc and circles. To make some fun with cad - cam !
And finally write a exiting file output for the users.
A clean dxf output combined with a ngc output. More languages and data pressed into one exiting file...
No one does this, because their program's are not written to read in multi levels. No one thought about it.
Last edit: 7 years 3 months ago by Grotius.
The following user(s) said Thank You: sivaraj, chimeno, tommylight

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

More
7 years 3 months ago #140631 by sivaraj
Replied by sivaraj on topic QT C++ code samples
Nice work.
Have you noticed with one tool path arrow direction are in both direction

The following user(s) said Thank You: Grotius

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

More
7 years 3 months ago - 7 years 3 months ago #140692 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi Sivaraj,

I did not see that. But i know where to find this problem. It's in the contour recognize class.
The problem has to do with swapping the direction of the little arc at your red arrow line.
Later on i will improve this class.

The blue direction lines are telling the truth. :lol: Thanks for your spot !

Today i added :
- dimensions, see left corner at bottom. It's called the statusbar. This statusbar is useless at this moment.
This statusbar must be hacked up into several useful pieces.
It works with zoom, movement's etc. This was a hard piece to understand.
If you click on the screen, it will give you the actual cad coordinates. And later on it will give you actual line lenght.
Something that draftsight is not doing... When you draw a line in drafsight, you don't see the lenght at your mouse point...

- click the line near the start point (can be expanded to more item's like endpoint or window select) and the line is selected,
see the color change to orange. ( now we have the basics of a interactive opengl screen )

- changed line thickness in opengl, this was easy.

- added the 3d rotate to the right mouse button, this was more difficult, but works very nice.

DxfDecoder gui :


For the rest i spotted a G41.1 / G42.1 issue. At least, that is a issue for me for this moment.
Later on i will post more about this.

The inner circle is with G41.1 D0, tool diameter 0 no offset. This goes perfect !!
The outher circle is with G41.1 D1, tool diameter 1 offset left of path.



The problem is with the outher circle. At lead in and lead out, the product is not finisched. Is there a overcut G code command?

At the fire spot.. This material will stay on the cutted product (circle). That is a problem. This non cutted material is between the start radius lead in and the end radius lead out, wich is in this case 0.
Last edit: 7 years 3 months ago by Grotius.
The following user(s) said Thank You: tommylight, bkt

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

More
7 years 3 months ago - 7 years 3 months ago #140764 by Grotius
Replied by Grotius on topic QT C++ code samples
Hi dear liinuxcnc users..

We have a little project update today.

Added button's to the toolbar. It are dockable toolbars, splitted up into more little movable toolbar's just like in cad.
Added the axis origin arrow's for xyz. You can disable them with a toolbar select button.



To test this release :
we.tl/t-Km5u0JAgJE

To start, unzip and type in terminal : ./DxfDecoder

I think this release will work now on a standard debian installation. It's no longer depending of QT open libraries.
Not tested this on standard debian, ubuntu or wathever, but i expect this release is going to work for linux.

No longer needed dependencies :
<QOpenGLWidget>
<QtOpenGL>
Last edit: 7 years 3 months ago by Grotius.
The following user(s) said Thank You: tommylight

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

Time to create page: 0.179 seconds
Powered by Kunena Forum