508,287 active members
2,874 visitors online
Register for free
Login
IndustryArena Forum > CAM Software > Uncategorised CAM Discussion > Windows application - from .DXF file to the CNC machine's end product - how?
Results 1 to 12 of 12
  1. #1
    Registered
    Join Date
    Mar 2015
    Posts
    4

    Windows application - from .DXF file to the CNC machine's end product - how?

    Hi all,

    I am totally new in the world of CNC machines, as well in this forum.
    Also, not sure this is a right place to ask my question, but do not know where to start exactly.
    Here is what I need, all suggestions are welcome:

    I need to make a Windows application, which is able:

    - to take arbitrary 2D .DXF file (let user to choose the file he wants)
    - display content of the of chosen file in the user interface
    - for the chosen file, generate appropriate CNC machine G-Code
    - somehow tell CNC machine to run generated G-Code in order to make the final product
    ===

    The machine are controlled by the Leomatic PNC system:
    Leomatic s.r.l. Industrial Automation - via Reggio Emilia, 6 - 40139 Bologna - ITALY

    which uses RS232 to communicate with computer, and this is actually the textile cutting machine
    ===
    Need help about every topic above (well, except the first one):
    A) So: what programming language is best to use (or it has no significance?)

    B)What to use to display .dxf image to the UI?

    C)Regarding topic 3, I know there is tools (converters) which are able to take some .dxf file and generate the G-Code for the machine, so wondering, can I use some of them to do the .DXF-TO-G-CODE conversion? If so, which and how to use? If not, then I suppose I need to write my own converter, so where to start?

    D) Finally, when I somehow have the G-Code, how to tell CNC machine to execute generated code, how to start and stop that process? The PNC system uses RS232, what application exactly should to do?
    ===

    Finally, is there some open-source software for that purpose (just for learning purposes), and commercial one?

    Thanks in advance

  2. #2
    Registered
    Join Date
    Mar 2015
    Posts
    5

    Re: Windows application - from .DXF file to the CNC machine's end product - how?

    You might want to take a look at the Tool Path Language (TPL). It is described at Tool Path Language. It actually comes with a really nice simulator called OpenSCAM (sorry about the name, but since it's free, it will be hard to get scammed.) OpenSCAM provides a 3D simulation of the g-code after it has been generated.

    TPL is a javascript based language that has CNC commands built in. One of the commands is Open(), which opens a dxf file and returns a list of paths. Once open, you can create the g-code for cutting those paths from within TPL. After you create the g-code, you can simulate it in OpenSCAM.

    TPL is pretty new, so the documentation is a bit sketchy. Let me know if you decide to give it a try and I can help you get started.

    Doug

  3. #3
    Gold Member
    Join Date
    Apr 2009
    Posts
    3353

    Re: Windows application - from .DXF file to the CNC machine's end product - how?

    I need to make a Windows application, which is able:

    - to take arbitrary 2D .DXF file (let user to choose the file he wants)
    - display content of the of chosen file in the user interface
    - for the chosen file, generate appropriate CNC machine G-Code
    - somehow tell CNC machine to run generated G-Code in order to make the final product



    Wow,that's a lot to do.Especially if you know nothing about CNC.
    Are you doing this for fun,profit,or necessity ?

  4. #4
    Registered
    Join Date
    Mar 2015
    Posts
    4

    Re: Windows application - from .DXF file to the CNC machine's end product - how?

    Yes, indeed :-)
    Trying to make profit somehow...
    Maybe you could give me some advice, which way I should go, and where to start...?

  5. #5
    Registered
    Join Date
    Mar 2015
    Posts
    4

    Re: Windows application - from .DXF file to the CNC machine's end product - how?

    Thanks a lot for that.
    You mention, the TPL is a javascript based language, does that mean that the application is executed in the browser, is not?

  6. #6
    Registered
    Join Date
    Mar 2015
    Posts
    5

    Re: Windows application - from .DXF file to the CNC machine's end product - how?

    Quote Originally Posted by Cwele View Post
    Thanks a lot for that.
    You mention, the TPL is a javascript based language, does that mean that the application is executed in the browser, is not?
    TPL is based on javascript, but does not execute in a browser. You simply write a program using a text editor and then execute it from the command line. When you execute it, it generates g-code and sends it to the standard output, which normally would be redirected to a file.

    TPL comes with OpenSCAM, which is a simulator. I find OpenSCAM to be invaluable among open source tools because it gives you the opportunity to see what will be cut before sending it to the router. Once OpenSCAM is installed, you will find tplang in the installation directory with openscam.

    Since responding to your post, I have been playing around with the open command in tplang. The open command reads dxf files into a JSON compatible string, which can then be used within TPL. I have noted that the open command does not fully implement dxf and one of the things that is missing is the ability to read text from the dxf file. The good news is that I have been writing an extension to TPL that does exactly that.

    By the way, I have found myself skipping the traditional CAD design altogether and writing TPL programs directly. The combination of TPL and OpenSCAM allows writing the program and continually seeing what will be cut. This is similar to how design works with the open source 3D CAD software known as OpenSCAD. OpenSCAD, however does not generate g-code and additional software is required to for the CAM step.

    Check out the following two web sites: www.openscam.org and www.tplang.org.

    I hope you find this useful. Let me know how it goes.

    Doug

  7. #7
    Registered
    Join Date
    Mar 2015
    Posts
    4

    Re: Windows application - from .DXF file to the CNC machine's end product - how?

    But, there is another question, that bothers me, and whose answer would help to understand the point.
    Namely, with having:

    1. good CAM software (for example, MeshCAM) which is able to generate G-code from .dxf file, AND
    2. good CNC control sofware (for example, Mach3) which sends G-code to the machine

    I wondering, what is the point for asking for any other (custom) application, like this one I have described?
    Because these two components fulfill the same purpose, is not?
    Still, people ask for custom application.

    Wondering, why?

    Anyone?

  8. #8
    Gold Member
    Join Date
    May 2005
    Posts
    162
    Quote Originally Posted by Cwele View Post
    But, there is another question, that bothers me, and whose answer would help to understand the point.
    Namely, with having:

    1. good CAM software (for example, MeshCAM) which is able to generate G-code from .dxf file, AND
    2. good CNC control sofware (for example, Mach3) which sends G-code to the machine

    I wondering, what is the point for asking for any other (custom) application, like this one I have described?
    Because these two components fulfill the same purpose, is not?
    Still, people ask for custom application.

    Wondering, why?

    Anyone?
    It depends on the target application, on what type of machine operator you expect & how you expect the system to run ( automated production or dev / prototype runs ) normally I would associate a single app with a turnkey commercial production system where the same type of components are made all day long, you loose some flexibility to gain ease of use. Single apps cad , cam & controller tend to be more flexible at doing many different types of jobs at the expense of requiring highly trained operators.
    David
    ( never stop learning )
    http://www.steamcastings.co.uk/

  9. #9
    Gold Member
    Join Date
    Jan 2007
    Posts
    1800

    Re: Windows application - from .DXF file to the CNC machine's end product - how?

    if this is a textilecutting machine, that relatively simple.. and a commandset, like plotters are using mightbe sufficient..

    on other hand, around early 90's italy produced door and windows systems..
    i call them system, because they were actually a machine, we can say cnc, but they were indeed a robot ?

    the operator havent had extreme skill, simply selected of a menu the the types, and after types, the sizes..

    it also can be programmed for different types what was not the operators task.. someone in the office made it..

    the machine actually had several ""station"""

    sliding table cut lenghts and mill the parts ends

    profiling,

    glass slat cutting

    it was a very high productive machine.. and again while it was cnc, it was not the cnc what we call.. it had as i remember 3 vertical spindle with toolgroups, several horizontal spindle ...
    at least 12 axis.. but not axis as on this forum we mean..
    ================================================== ============

    otherwise the dxf files are can be read relatively simple... and the datas can be interpreted simply..

    IF, it is ascii, and contain only lines and arcs..

    on other hand the bynary dxf require compilers..
    and beyond interpreting the dxf, also need some type of ""sorting"" cut shapes in order, or rotate them..

    if this dxf file produced in same shop then a header in the file could tell what is in the file, without another interpreter display the vectors..
    those plcs are a very closed system.. and limiting the user to a number of task..

    if this textilecutter designed for reading dxf files, then no need programming,,
    if it is not designed to read dxf files, then theres no simple way to teach, but erase the eprom and rewrite from scratch..

    then just put next a computer , and any program that can open dxf file, will display what is in the actual file..
    just go simple..

    just my 2 cent..

  10. #10
    Registered
    Join Date
    Mar 2015
    Posts
    5

    Re: Windows application - from .DXF file to the CNC machine's end product - how?

    Quote Originally Posted by Cwele View Post
    But, there is another question, that bothers me, and whose answer would help to understand the point.
    Namely, with having:

    1. good CAM software (for example, MeshCAM) which is able to generate G-code from .dxf file, AND
    2. good CNC control sofware (for example, Mach3) which sends G-code to the machine

    I wondering, what is the point for asking for any other (custom) application, like this one I have described?
    Because these two components fulfill the same purpose, is not?
    Still, people ask for custom application.

    Wondering, why?

    Anyone?
    I do CNC routing as a hobby and am most interested in using free, open source tools. I have found that the existing open source tools have a lot of limitations and require different software packages for each type of job. OpenSCAM and TPL have helped me resolve some of these issues.

    Cheers,
    Doug

  11. #11
    Registered
    Join Date
    Dec 2003
    Posts
    407

    Re: Windows application - from .DXF file to the CNC machine's end product - how?

    I used to work for a company that had a textile cutting machine.It was programmed using Alphacam and worked well.The table could also run under HPGL but never needed to.For a beginner it would take a huge amount of time to create and debug software.If you need to be earning money you will do yourself a big favour if you buy a package since it should just work when installed and the supplier is likely to include a period of technical support with the package.There are several packages that can do the job,why not get hold of some demo systems and see how easy they are to use?

  12. #12
    Registered
    Join Date
    Apr 2015
    Posts
    1

    Re: Windows application - from .DXF file to the CNC machine's end product - how?

    There's an open source project I started a while back that may be a good starting point or a good reference for implementation.https://github.com/ajisaacs/OpenNest.git

    There isn't much right now but new features are added often. Programmed in c# and uses winforms for the UI.

Similar Threads

  1. Replies: 6
    Last Post: 02-19-2014, 02:19 PM
  2. HAAS & WINDOWS 7 FILE TRANSFER CORRUPTION
    By gerbster in forum Haas Mills
    Replies: 0
    Last Post: 06-13-2013, 07:47 PM
  3. ATC machine - wide application
    By mornlift in forum News Announcements
    Replies: 0
    Last Post: 04-26-2013, 10:32 AM
  4. Need suggestion on a machine for my application
    By Thor's Hammer in forum Want To Buy...Need help!
    Replies: 7
    Last Post: 04-24-2013, 06:50 PM
  5. PBC Linear Releases New Product Application Booklet
    By Pacific Bearing in forum News Announcements
    Replies: 0
    Last Post: 04-26-2010, 10:04 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •