C++ CadCam program development with CodeBlocks instead of QT

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
24 Feb 2020 21:39 #158423 by Grotius
Hi,

@bbsr_5a,
nice work !

@Clive,
Thanks for your dxf ellipse drawing. The ellipse read in and display works!
I mentioned, Freecad saves an ellipse as a spline to dxf output. Inkscape does the same. I am wondering what would
be the reason of doing this?

@forum readers,
The Cadcam program written in C++ Codeblocks goes steady forward. Using Codeblocks is a learning process.
I have updated some snap buttons with led style. Managed to show a child dialog when the right mouse button is clicked.
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
03 Mar 2020 04:03 #159064 by Reinhard
Hi Grotius,

I loosely followed your postings.

When I read about your changes from Qt to Codeblocks, I wonder about the benefit you expect from codeblocks.

Afaik codeblocks is "just" an IDE, so you can compare codeblocks with QT Creator, but not with Qt. Qt is mainly known as UI-library (at least I understand it as that), whereas codeblocks works with Qt, wxWindows and many more.
For me, codeblocks is by far the slowest IDE I ever tried. Even eclipse, which is considered very slow is faster than codeblocks. Moreover the official codeblock seems to be abandoned and only a few hardliners keep on working on codeblocks.

So if you changed your UI-library from Qt to wxWindows, you can continue without codeblocks. wxFormBuilder is available as standalone application and wxLua is a fast scriping UI.

Cheers Reinhard

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

  • BeagleBrainz
  • BeagleBrainz's Avatar
  • Visitor
  • Visitor
03 Mar 2020 09:56 #159068 by BeagleBrainz
I used to like codeblocks, I really haven't used it since I stopped programming in windows using the win32asm packages and tutorials. It's a shame to hear of it falling by the wayside.

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

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
16 May 2020 20:57 #168001 by Grotius
Hi Reinhard,

When I read about your changes from Qt to Codeblocks, I wonder about the benefit you expect from codeblocks.

This has mainly to do with the Qt licence. If you don't contribute to Qt, you have to purchase a licence.
Codeblocks has a different licence. For open source application's QT is free. For commercial program's you have to purchage
a Qt licence one day..

When you program in Qt without using the actual Qt libraries, but using std libraries, you can converse a Qt program to a Codeblocks program in short time.

Hi BeagleBrainz,

It's a shame to hear of it falling by the wayside.
I find out Codeblocks is difficulter to program than Qt. Qt has a powerfull compile debug output. Codeblocks also crashes a few times a day. When you have a expensive piece of software like Autocad, it can save you much money if ported from Qt to Codeblocks.

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

More
19 May 2021 20:42 #209545 by Joco

...
This has mainly to do with the Qt licence. If you don't contribute to Qt, you have to purchase a licence.
Codeblocks has a different licence. For open source application's QT is free. For commercial program's you have to purchage
a Qt licence one day..


Just wanted to check on a couple of things ....

[1] Are you continuing down the codeblocks path or sticking with QT? Just wondering as I have been tinkering with dxf2gcode and while its not a bad little tool you have taken things to the next level and for 2d oriented work (i.e. pretty much anything you are doing plasma and probably the bulk of laser and water-jet machines) what I have been seeing rocks. Heck I would be prepared to brush off some very crusty C and even crustier C++ skills to try and help. Or even just test.

[2] I have been looking at the QT FAQs on the opensource license and from what I can see they only time you are require to contribute is if you modify their libraries. Pretty standard in opensource licenses. Otherwise if you are just creating application code that uses their opensource libs as-is then you are fine so long as you support the opensource license obligations to anyone you "sell" your application to.

From what I can read there are even circumstances you could have closed source plugins that are paid for in a more classic manner. I think so long as the way these hook into the app is completely dynamic (i.e. no need to compile them in) you would be ok.

If I am wrong that's cool but would be interested to see/read the material that shows why my interpretation is off the mark.

Oh, and just to be clear ... AWESOME piece of dev work. Reading through the various threads and how you built up you knowledge was impressive. Keep it up!

Cheers - J.

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

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
20 May 2021 07:28 - 20 May 2021 07:35 #209618 by Grotius
Hi Joco,

Thank you for being interested.

[1]
Are you continuing down the codeblocks path or sticking with QT?
99% of my work is done in Qt. But i am always aware that Qt could change policy in the future.
With that in mind i write code that could be ported to another framework, like Codeblocks quite easy.

Codeblock's is quite buggy, it crashes quite often. Qt is very stable.
Qt has a very informative debug output, wich is nice.

you have taken things to the next level and for 2d oriented work
If you don't look at the lead-in-out function's, rotary and tangential, it's capable doing the same as Sheetcam for 2d work.
That was also my goal.

[2]
I have been looking at the QT FAQs on the opensource license and from what I can see they only time you are require to contribute is if you modify their libraries.
Yes, that's correct.
In the past i asked about when you have to pay for Qt, on the Qt forum, and why Qt it's Sooo Expensive.
I don't trust company's like Qt for a cent. Why? Because they have shareholders. The shareholders will tell Qt what to do.
stock market

[3]
Oh, and just to be clear ... AWESOME piece of dev work. Reading through the various threads and how you built up you knowledge was impressive. Keep it up!
Thank you for mentioning it !

If you want to contribute, you are welcome.

You could start with using the linux-pro edition. Then you are working with the same config as me.
And if you open a github channel, i could contribute code or do some examples etc.

Then there are 2 important libs to use :

- Opencascade cad, this replaces the opengl code. use this template
- Cavalier contours. This guy has solved the contour offset's with amazing performance. link to readme
On my github channel i have integrated the cavaliercontours in my c++ code. You will find these examples.

One thing i had problem's with is using a existing dxf import library. You mentioned it already importing dxf's with my app was like crap.
It would be a nice idea to start with integrating this lib into a tiny c++ program.
Then you could set it up like :

struct primitive {
std::string primitive_name;
double xs,ys,zs,xe,ye,ze;
// control points, etc.
};
std::vector<primitive> primitivevec;

So if you read in the dxf, you have filled up the primitive vector.
When this works. The next step is easy.
Working with the opencascade lib is also very easy. I have plenty examples for line's arc's etc. 2d and 3d.
Last edit: 20 May 2021 07:35 by Grotius.

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

More
20 May 2021 08:08 - 20 May 2021 08:08 #209624 by aleksamc
Grotius, you have started so interesting project, really.
As for me I'm only start to study c++ as hobby and use Code::Blocks, as for me it's very good program.

Have you looked for using wxWidgets instead of Qt graphics for example?
Last edit: 20 May 2021 08:08 by aleksamc.

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

More
20 May 2021 08:56 #209627 by Joco
I think on the dxf import front it would be worth having a hard looking at existing libs. There are a number of java, python dxf reader libs and probably something in the c++ space as well if I looked harder.

I will start pocking about in the code base. It has been decades since I did anything serious in C++. My last serious play in that space was building some iOS apps in Objective-C.

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

More
20 May 2021 09:03 #209629 by Joco
Grotius - just a quick check as I can see a few repo versions. Is this the correct repo to be tinkering with?

[1] github.com/grotius-cnc/QT_cadcam

or

[2] github.com/grotius-cnc/QT_CadCam_rev0

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

  • Grotius
  • Grotius's Avatar Topic Author
  • Offline
  • Platinum Member
  • Platinum Member
More
20 May 2021 10:07 - 20 May 2021 10:10 #209631 by Grotius
Hi,

[2] This one has the cavalier contours inside.

I preffer to start a new clean project. And use my previous github projects as a infocenter.

If you pick one of the old projects to test out the dxf lib. It's okey to do so. We have to use the opencascade lib instead of raw opengl.

This should be a nice starting point for the project : link

Try to run this library for example : github.com/codelibs/libdxfrw

If you start a empty qt project. Then you try add the library. And then you try to read a dxf file. And then you try to
store the dxf primitives into an struct or array. Then we upload this qt program as qt project example. This would be
a nice first step.

If this succeeds, i can help with displaying it in the opencascade cad screen.
After that we can set up the contour offsets.


Have you looked for using wxWidgets instead of Qt graphics for example?

Yes, i used wxWidgets with one of the github projects. I find Qt is easyer to use. And for me it was more stable.
But if there are more votes for codeblocks, i am fine with that. B)
Last edit: 20 May 2021 10:10 by Grotius.

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

Time to create page: 0.116 seconds
Powered by Kunena Forum