V4: 2D DXF Support

When I was asking my resellers for requests for V4, one of the guys in Japan asked for the ability to load 2D DXF files and machine them.  In the past I have always stayed away from 2D stuff because MeshCAM was never made to do it.  In the past couple of years the waterline and pencil have gotten good enough that I think the feature would be useful.  If you try to load a 2D dxf file you will get the following dialog:

2derror

If you click yes, a new 2D dxf loader will try to interpret the file and extrude the curves to a full 3d object.  A before and after:

2dbefore 2dafter

I add the word “try” above because I have now been reminded of why I dislike DXF files- they’re a minefield of compatibility problems.  Thankfully, several forum members uploaded DXF files a few months ago for me to test with.  Some of the uploaded files showed a amazing amount of insight into what might crash a program- there must have been a few fellow programmers out there.

Gerry gave a short explanation at that time of the various DXF versions and what changed in between- that was very helpful to get a starting point.  I think I have V12 almost done and I’ll have to see how far I need to go forward in the specs to get it working for as many people as possible without growing the code to the point that it is unmaintainable.

I mention that this is a new DXF reader because the original 3D one was made to read the triangles only without getting caught up in the other details about 2D and the visual representation that change from version to version.  The new loader in is Lua so I can quickly modify it without restarting MeshCAM. 

Extruding 2D files may not be too useful to everyone but I promise that the 2D DXF code will be put to good use for other new features.

5 Comments

  1. Thomas

    Hallo Robert!

    its amazing to see what gets implented in V4, alot of useful things, but i think there are a lot of good 2D CAM Systems already on the market..
    The machinigtime an the adaptive stepover are great features!

    My Opinion is to stay on 3D machining and forwarding new functions for that.

    CAM Systems that can do 2D and 3D toolpathes are a lot more expensive, and i like the stand of MeshCAM on the market..
    Easy to use, good in price and for Hobbyists that want to do first 3D Milling perfect!

    I like MeshCAM and i don´t want to stop anything that other users find usefull, but i think its better to stay on 3D..

    greeting from Germany, Thomas

  2. Thanks for the feedback Thomas. In general, I agree with you- I do not plan on making MeshCAM a 2D CAM program. I do find more and more people who end up using MeshCAM for 2D/2.5D so it’s a nice feature that took about 8 hours to write. The DXF code will take much more time but I have other uses in mind that the 3D users will benefit from.

    After I get the DXF code to a point that I’m happy, I’ll move back to adaptive waterline code.

    -Robert

  3. I thought I was going to see pocketing and other cool stuff. So, you take the extrusion, and use the standard machining methods?

    How about allowing 2D geometry along with the mesh for pockets or profile cuts. You could use layer names to specify the operation.

    Say I had a circle along with the mesh. MeshCAM would pocket the circle to the desired depth, and it would be awesome if it could generate a check surface above the pocket, so that area wouldn’t be machined again. :)

  4. I just read Thomas’ post and do agree. It’s a bit frustrating to see all the problems that people have when trying to use MeshCAM as a 2D CAM program. That’s NOT what it’s for.

    While what I suggested above is somewhat 2D, I think it would really reduce machining time for a lot of 3D work that MeshCAM is used for.

  5. The (future) benefit of this extrusion feature is that I can mark the geometry as coming from a 2D file and guide the user to pick the right machine settings. I think this may help reduce the number of problems that users have when trying to do 2D machining in MeshCAM.

    -Robert