C++ CadCam program development with CodeBlocks instead of QT
14 Feb 2020 16:19 - 18 Feb 2020 15:35 #157364
by Grotius
Hi,
As most of the forum members know, i started a C++ QT project Jun 2019. The goal was to make a cam program.
Later on during writing the program, a cad section is included. I have stopped wIth writing the program code in QT because of
QT pricing $5508.00 a year if you wanna be commercial with something in the future. This is not my intention but if i go on this way switching to a other platform will only be more difficult in the future.
A few weeks ago i started with writing C++ code in CodeBlocks. CodeBlocks is free of charge. And can be used cross platform.
To download CodeBlocks : CodeBlocks
The program source code is attached. It's very hard to find a example like this online for Linux. Most of the time there are windows example's written in visual studio and have to be modified to be compatible with linux and finding a nice opengl class is also very difficult.
The program is a template wich can load dxf's from inkscape as example, the source code is included with a very compact algoritme for playing with cubic spline's.
(Use robo master type of spline output in inkscape when saving as dxf file)
Let this be a nice example for student's and beginning c++ programmers that want to have a nice program template..
So far so good..
Inkscape picture converted to dxf. Dxf loaded into the CadCam program. Result looks good.![:woohoo: :woohoo:](/media/kunena/emoticons/w00t.png)
As most of the forum members know, i started a C++ QT project Jun 2019. The goal was to make a cam program.
Later on during writing the program, a cad section is included. I have stopped wIth writing the program code in QT because of
QT pricing $5508.00 a year if you wanna be commercial with something in the future. This is not my intention but if i go on this way switching to a other platform will only be more difficult in the future.
A few weeks ago i started with writing C++ code in CodeBlocks. CodeBlocks is free of charge. And can be used cross platform.
To download CodeBlocks : CodeBlocks
The program source code is attached. It's very hard to find a example like this online for Linux. Most of the time there are windows example's written in visual studio and have to be modified to be compatible with linux and finding a nice opengl class is also very difficult.
The program is a template wich can load dxf's from inkscape as example, the source code is included with a very compact algoritme for playing with cubic spline's.
(Use robo master type of spline output in inkscape when saving as dxf file)
Let this be a nice example for student's and beginning c++ programmers that want to have a nice program template..
So far so good..
Inkscape picture converted to dxf. Dxf loaded into the CadCam program. Result looks good.
![:woohoo: :woohoo:](/media/kunena/emoticons/w00t.png)
Last edit: 18 Feb 2020 15:35 by Grotius.
Please Log in or Create an account to join the conversation.
17 Feb 2020 12:18 #157590
by bbsr_5a
Replied by bbsr_5a on topic C++ CadCam program development with CodeBlocks instead of QT
Sir Black and white tracing is quite Easy on almost every CAD System even Imagemagick
but how on Colored
i added a thing that makes me some headbang not the "dregon" but the knight
but how on Colored
i added a thing that makes me some headbang not the "dregon" but the knight
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1409
17 Feb 2020 20:51 #157656
by Todd Zuercher
Replied by Todd Zuercher on topic C++ CadCam program development with CodeBlocks instead of QT
A multi color image like that, usually works best to use some form of imaging software to vectorize it. (Inkscape does a serviceable job with that image.) Then import the vector image into your CAD program.
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
18 Feb 2020 14:48 #157724
by Grotius
Replied by Grotius on topic C++ CadCam program development with CodeBlocks instead of QT
Hi,
The picture trace conversion done by Inkscape and saved as dxf, then the dxf loaded into the cadcam program :
Inkscape sequence :
1.Path=>trace bitmap
2.Path=>object_to_path
3.Save as dxf R14 (activate use of robo master type spline output, and for base untis, select mm)
Attached is your dxf file.
The picture trace conversion done by Inkscape and saved as dxf, then the dxf loaded into the cadcam program :
Inkscape sequence :
1.Path=>trace bitmap
2.Path=>object_to_path
3.Save as dxf R14 (activate use of robo master type spline output, and for base untis, select mm)
Attached is your dxf file.
Please Log in or Create an account to join the conversation.
18 Feb 2020 15:04 - 18 Feb 2020 15:05 #157725
by Grotius
Replied by Grotius on topic C++ CadCam program development with CodeBlocks instead of QT
I have a Autocad ellipse request.
Can someone draw a dxf ellipse for me? I need it to finish and check the dxf ellipse load in class.
It must not be a Inkscape ellipse, this ellipse is saved as a spline. So i preferr a autocad ellipse.
I need the 3 coordinates to check if my output is oke.
Thank you !
Don't forget to attach the ellipse dxf..
Can someone draw a dxf ellipse for me? I need it to finish and check the dxf ellipse load in class.
It must not be a Inkscape ellipse, this ellipse is saved as a spline. So i preferr a autocad ellipse.
I need the 3 coordinates to check if my output is oke.
Thank you !
Don't forget to attach the ellipse dxf..
Attachments:
Last edit: 18 Feb 2020 15:05 by Grotius.
Please Log in or Create an account to join the conversation.
18 Feb 2020 15:50 - 18 Feb 2020 15:59 #157726
by Clive S
Replied by Clive S on topic C++ CadCam program development with CodeBlocks instead of QT
Is this what you want:
I have set the origin to 0
I have set the origin to 0
Last edit: 18 Feb 2020 15:59 by Clive S.
The following user(s) said Thank You: Grotius
Please Log in or Create an account to join the conversation.
18 Feb 2020 17:39 #157734
by bbsr_5a
Replied by bbsr_5a on topic C++ CadCam program development with CodeBlocks instead of QT
Thak you workflow is ok i know that
the image is bad as you see the Flagg comes out wear as the kiight the Inkscape and cad cam does work best on tiny Black outlines and this is way off
so alot of work to go into the image first then it is all ok
the image is bad as you see the Flagg comes out wear as the kiight the Inkscape and cad cam does work best on tiny Black outlines and this is way off
so alot of work to go into the image first then it is all ok
Please Log in or Create an account to join the conversation.
- Todd Zuercher
-
- Away
- Platinum Member
-
Less
More
- Posts: 5000
- Thank you received: 1409
18 Feb 2020 21:44 - 18 Feb 2020 21:47 #157763
by Todd Zuercher
Replied by Todd Zuercher on topic C++ CadCam program development with CodeBlocks instead of QT
Last edit: 18 Feb 2020 21:47 by Todd Zuercher.
Please Log in or Create an account to join the conversation.
20 Feb 2020 13:50 #158000
by bbsr_5a
Replied by bbsr_5a on topic C++ CadCam program development with CodeBlocks instead of QT
Attachments:
Please Log in or Create an account to join the conversation.
20 Feb 2020 18:44 #158043
by bbsr_5a
Replied by bbsr_5a on topic C++ CadCam program development with CodeBlocks instead of QT
Attachments:
Please Log in or Create an account to join the conversation.
Moderators: Skullworks
Time to create page: 0.360 seconds