Click here to Skip to main content
15,039,149 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all!
I want to write a program in vc++ that will convert a .dxf file to a g-code file. Can anyone help me or point me in the right direction?

What I have tried:

I tried lots of library but none of them is working. please help me
Posted
Updated 18-Sep-17 0:41am
Comments
Richard MacCutchan 18-Sep-17 6:33am
   
Sadly no. This forum is here to answer specific programming questions. Google is the place to find sample code and tutorials.

1 solution

As far as I know the existing converters are working but have their limitations (which are based on the fact that these two formats are so different that you can't handle all conversion cases and some only with user interaction or predefined settings).

Some hints if you still want to do it yourself:

  • Get the DXF and G-code format specifications
  • Understand the structures of the formats
  • Define rules to handle global and block scope data
  • Define conversion rules for the elements (here: DXF element to G-code instructions)
  • If necessary handle version specific cases
  • Implement the rules in code

To get an idea of what you have to do I suggest to have a look at some open source converters. If you have specific requirements, it might be even simpler to implement missing features into one of those.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900