QT C++ code samples

More
7 years 4 months ago - 7 years 4 months ago #136417 by Grotius
Replied by Grotius on topic QT C++ code samples
@JT,

How do you determine the direction now?
I look if the dxf go's clockwise or counterclockwise by a c coded structure.

It looks for differnent common patron's, but that could be over a 1000 option's if you want to be 100% sure. My code looks like reverse ingeneering a dxf file. So that is why i was complaining about Autodesk. They are really a mess making company at dxf level. Unbelievable in my opinion to provide nothing about direction within files over a 10.000 lines mostly filled with crap. They missed the point as developer in this case 100% for sure. Or there was another reason to make dust in the wind last 25 years.

Not sure what I want to do in C++ I need to finish up my 7i92 configuration tool first so I'll have all the Mesa Ethernet cards with a simple configuration tool. I know pnccnof does some amazing things but I feel that it is to intimidating for fresh users.

Just an idea to make money. Ethercat is used for Hotel door locking system's and more because it's quite safe.
More and more hotels are fitted with Ethercat solution worldwide, mostly of time 5 star + hotels will use Ethercat solutions.
Hotels need a central user interface gui coded in C++. So maybe in your country you can such a project for your own.

In fact to use the Ethercat with bare C is just fun. It's used in 2 person's deep sea submarine's. So think about your solution.
Maybe you want to make a solared powered suntracker and keep the star's in line with the QT C++ interface.
You have a canvais example over here : blog.qt.io/blog/2015/05/27/introducing-qt-canvas3d/



I wonder what your C++ program will be?
Last edit: 7 years 4 months ago by Grotius.

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

More
7 years 4 months ago #136425 by BigJohnT
Replied by BigJohnT on topic QT C++ code samples
Have you looked at using VTK for the screen rendering?

JT

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

More
7 years 4 months ago - 7 years 4 months ago #136665 by Grotius
Replied by Grotius on topic QT C++ code samples
@JT,

It looks like VTK is huge. Thanks for the tip !

I made a sample QT C++ program for plasma cutting a rectangular shape.
The user input is updating the OpenGL screen output, mouse zoom in and out is working.
The code is so far not tested in Linuxcnc. But is has kerf width offset and a lead in.
I am thinking about making a bevel option now. We can visualize this 3d in OpenGL.


Another view of the output with 2 decimal float value's ;) :



Attached the QT project files. If QT is installed, select the .pro file and you are on the run !
Attached the compiled program, to try it in linux, unzip the untitled.zip and type in terminal : ./untitled

Have fun !!
This is a basic example program that can be expanded to your needs.

Things i like to learn soon is how to program the lead in point by a mouse click !!

Edit, I forgot one line for displaying the lead-in into the g-code output :
Code:
ui->plainTextEdit_3->appendPlainText("G0 X" + QString::number(leadin*-1) + " Y" + QString::number(leadin*-1));
Attachments:
Last edit: 7 years 4 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 4 months ago #136676 by BigJohnT
Replied by BigJohnT on topic QT C++ code samples
When we tested VTK against gremlin VTK was a 100 times faster.

JT

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

More
7 years 4 months ago - 7 years 4 months ago #136834 by Grotius
Replied by Grotius on topic QT C++ code samples
@John Thornton,

That is very good news.
I hope our road's will cross once in software development and deployment.
That linuxcnc will have once a free code C++ cad / cam package is clear.

A cad cam coded top level language is a must to stay as free as a bird.
Ubuntu with linuxcnc, why not? Or is this GPL3? The GLP institute is fooling everybody....

Student's can hack into the provided code samples, below.
They can write their own code to it to get their bachelor's degree in computer science, and the KISGLP2 (keep it simple gpl2) argument is one of the basic's to make progress.

My project can take over 1 to 5 year's. But i have time and like other users over here, we never give up hope.

The provided code QT C++ samples are including at the moment :

1. Use external variables over different file's. (QT project file attachments in previous posts)
2. Draw a line with QT openGL. (QT project file attachments in previous posts)

Number 3 will be a new item, i did not try this item in C++ before, but it has to do with how to keep Cad Cam program's simple and structured.
A perfect way for student's to set up the Cad / Cam program top level logic structure.

It is a combination of Parametric Cad user input and Dxf input displayed into the Screen (openGL) and conversed to (ngc) G-code output.

It can select cut chart's, see picture. I am waiting for official factory approval to include the TD factory parameters and HP parameters.

So i hope to include a bare C++ example soon of how to implement this logic into the program structure.

It will be saved as a .GRO file.

This output structure i have to design. It includes a brand new logic.

It include's the logic for dxf, ngc, tools, and so on in one file.... But this .GRO file output will be better structured then Autodesk has ever done over the past 25 years !!! Autodesk has no GRO file at all. They did not think about a logic file until i post this GRO exension, with a few line's of how to KIS.



Special song for a special forum member who has writed professor style hal code a few year's ago.
Does anyone know's who i mean by this song? It's starting the user name To. Location outside Europe... It's overall close to the Russian border. Soon he will move to a bigger workshop... He has a dog.


Second member is started with a A. Who is this guy?
He has a race motor. I hope he will find real love. He has about 926 youtube subscribers, Master Kenobi+ through double + interest i think over the years. A stay in the line member. A professor in cosinus and sinus, a algoritmic solution expert, His song :


This number is for all the Australian forum member's. They hypnotize us.... Aha. secret powers from the old earth.


Edit, i forgot auto nesting. We pay nothing for autonesting in Linux !!!

Student's will provide a algoritme for this in the future. Autonesting will be a tiny update after all.
So far the signals are provided to update the autonesting process. I think we have done a good job so far.

Like a very, very smart student who has hacked into the code and has a good mention of what GPL2 is all about, and this student will take his course. The student is able to change the world with a few line's off code, Elon Musk is not a programmer. But he will start a new car factory in Europe soon. So maybe i wii mail him about a location in Holland. Tesla Nedcar Holland can take this job. Tesla Fokker or Tesla Philip's can do the job also in Holland. We have space at the Maasvlakte, that is a very big space at the sea location. We can build a very big Tesla factory over there for sure !!! The Chineze have no democration. What about window's in china? Trump has made the solution. No window's licence to China anymore !!!
So China is fucked up at the moment. Only Linux can save China.

In the end... Linus Torvald is saving China !!! But why is Huawai laptop's not going to linux?
I would buy the laptop if it has no Intel Ehetnet spy config, just like PCW has mentioned down before.
Attachments:
Last edit: 7 years 4 months ago by Grotius.

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

More
7 years 4 months ago #136849 by rodw
Replied by rodw on topic QT C++ code samples
There is also one crazy Dutchman here that also does good work.
The following user(s) said Thank You: Grotius

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

Time to create page: 0.698 seconds
Powered by Kunena Forum