DWG/DXF support in FOSS

13»

Comments

  • @duncan the last link does not seem to be libdxfrw. That's one less to consider :) The good news is that there doesn't seem to be too many forks: https://github.com/search?q=libdxfrw - the first three you've highlighted certainly look like good contenders for a new "upstream".

    The sourceforge seems very dead to me, and there are three authors. dongxuli, rallaz, and rvt. dongxuli seems to no longer be involved. Interestingly, rallaz seems to be the originator of the codelibs and LibreCAD repos. So both of those sound like likely contenders for a new "central upstream". rvt is of course a main dev of LibreCAD ... so ... the LibreCAD repo sounds more promising, but interestingly the codelibs repo seems to perhaps had more activity? Not sure, post a bugreport on either one of those repos and ask them - that should help clarify.

  • Do we agree that this is against the terms of the GPLv2+: https://qcad.org/en/90-dxflib

    Licensing
    GPLv2 or greater (for open source projects)
    Commercial License (for proprietary projects)

  • I don't think so, you may release code under whatever license you want.

  • But @stephen_l you can't enforce a second commercial license if you use the GPL license. That contradicts the freedoms granted by the GPL. They contradict each other. I've read a bit of the commercial license, and it says for example you can't use the library in a competing product. That goes against the GPL freedom to use the software for any purpose.

  • @duncan the gpl grants permission to use and distribute the software under certain conditions. This doesn't prevent the author granting permission to use and distribute the software under other conditions at the same time. However this only works if there is a single author, or they have asked all contributors to give them ownership.

    You couldn't do this with blender, for example, there are contributors who can't be traced, even if you could persuade them. Qcad I believe have been careful to get contributor license agreements from everybody who has ever contributed.

  • @duncan: The way I see it is that, yes, you can use the open-source license to create your version, which you can always charge to distribute a copy, although the source code must be available free-of-charge as well.
    If you do not want to release your code then you can use the commercial license and pay for it.

  • On a different note, the writing capability of this library is very low at the moment (I see DXF R15 (2000)), a good point would be support for at least DXF 2010 or 2013. I wonder if the awesome ezdxf python library could be used to pump this library up.

  • @duncan as GPLv2 requires sources to be made available, it is therefore not conflicting to offer an additional "proprietary license". This is similar to how Qt works.

    Bedson
  • Now I understand. The dual licensing is not for the use of end users but for projects that want to include the library in their proprietary solution without sharing their work. Correct me if I'm wrong.

  • edited April 2021

    @Jesusbill I've added ezdxf to https://wiki.osarch.org/index.php?title=Drawing_Exchange_Format_(DXF)#Libraries_for_Software_Development do you know what projects use that library? Are there other libraries missing from that page? Does FreeCAD use ezdxf @baswein @yorik or what is the python importer the use?

    I'd love some help working on or comments to https://wiki.osarch.org/index.php?title=Drawing_Exchange_Format_(DXF) . There seem to be quite a few holes in DXF 2D support and as for 3D I'm not sure if anyone is supporting it?

  • @duncan I don't know any project that uses ezdxf. I remember this comment by @stephen_l on a similar thread.
    PS: By the way the search function works good for me, just typed dxfgrabber and I immediately got the associated thread

  • FreeCAD has two different DXF importers: One is derived from the old DXF importer of Blender 2.5x, is python-only and lives at https://github.com/yorikvanhavre/Draft-dxf-importer . It's slowly being deprecated, because it's a bit slow and annoying to maintain/upgrade.. The other is adapted from HeeksCNC, is coded in C++ and lives at https://github.com/FreeCAD/FreeCAD/tree/master/src/Mod/Import/App it's much simpler, but has the advantage to be decoupled (a "base" structure with a very simple reimplementation layer that could be done in other apps too). It is pretty barebone but is very fast and speaks OpenCasCade.

    Jesusbillpaullee
  • FYI this experimental dxf2ifc script uses ezdxf :)

  • Reini Urban is now working with Solvespace devs to implement LibreDWG for DXF/DWG support!
    https://github.com/solvespace/solvespace/issues/326

    Moult
  • @Moult said:
    IFC supports 2D.

    By 2D, do you mean vertex, edges, and faces?
    I did some testing and did not find a method to export pre-cast objects like: lines, polylines, points, hatches, and other equivalent to vertices, edges and faces.
    I tried with AutoCAD and FreeCAD, no luck. not sure if Blender have those objects.
    Could you please share us a simple file to test where you exported the traditional 2D object and explain how to do it?

  • @jtm2020hyo Here is an example of a single 2D square annotation exported in IFC. Yes, it has support for lines, curves, polylines, circles, points, hatches, etc. You can import it in the BlenderBIM Add-on and see it as a 2D shape.

  • edited June 2021

    I did the same with your file. Your polyline closed was converted to Wire Object or Edges-Merged Objects in FreeCAD.

    as I mentioned what happened here was the 2D lines turned into 3D objects, in this case, Edge objects. This problem could break any workflow.

    its there any suggestions?

  • The element itself has a position in 3D space, but the representation (i.e. geometry) is 2D, so the behaviour you see is expected. What workflow are you referring to?

    In the BlenderBIM Add-on, the representation retains its 2D status throughout editing. I'm not sure about FreeCAD. Maybe @yorik will know?

Sign In or Register to comment.