Let's talk about libredwg support

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
openBrain
Veteran
Posts: 9034
Joined: Fri Nov 09, 2018 5:38 pm
Contact:

Re: Implementation of LibreDWG in FreeCAD

Post by openBrain »

Hmmm... What makes you think that it deserves a new thread in addition to this one ?
maker
Posts: 192
Joined: Sun Apr 01, 2018 10:25 am

Re: Implementation of LibreDWG in FreeCAD

Post by maker »

openBrain wrote: Thu Jan 02, 2020 10:59 am Hmmm... What makes you think that it deserves a new thread in addition to this one ?
The above mentioned threads deal with the specific development of libreDWG.
Not with the use of it...
User avatar
saso
Veteran
Posts: 1920
Joined: Fri May 16, 2014 1:14 pm
Contact:

Re: Implementation of LibreDWG in FreeCAD

Post by saso »

Everything would be much easier if they would change from the GPL to an LGPL License... I have talked about this already with Reini Urban, he said that this is up to fsf.org, I understand and support that some projects go for the more restrictive GPL, but in such cases like this a more permissive LGPL license would IMO be much better for everyone...
maker
Posts: 192
Joined: Sun Apr 01, 2018 10:25 am

Re: Implementation of LibreDWG in FreeCAD

Post by maker »

@saso
Thank you for reminding that GPL Lincense subject.
.
I honestly didn't think of that anymore. That was already mentionend in the above mentioned thread https://forum.freecadweb.org/viewtopic. ... 20#p297750 by yorik on Fri Mar 29, 2019 3:00 pm.
I thought, that this had been solved.

And I see the packages I named above are under GPL-3.0-or-later.

I hope that the legal problems will not lead to the death of the integration into FC or the disappearance of the technical possibilities for FC users.
Nevertheless, this should be clarified at the hopeful beginning...
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Let's talk about libredwg support

Post by Kunda1 »

Merged in to previous open discussion thread. @maker please only open similiar topics if they are merited. This way the discussion remains concentrated and less diffuse between several different threads. Thank you.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Implementation of LibreDWG in FreeCAD

Post by vocx »

maker wrote: Thu Jan 02, 2020 11:04 am The above mentioned threads deal with the specific development of libreDWG.
Not with the use of it...
This thread, to which your own thread was merged, is not meant to discuss development of libreDWG; we are precisely discussing how to use it inside FreeCAD.

We already outlined the types of code additions that must be done to implement this, it just so happen that nobody has done the work yet.

https://forum.freecadweb.org/viewtopic. ... 27#p338505
https://forum.freecadweb.org/viewtopic. ... 27#p338554
vocx wrote: Fri Oct 04, 2019 8:53 pm Something like this

Code: Select all

if libredwg:
    command = "dwg2dxf"
    dxf = subprocess.popen(command, filename)
    # or if the program is available as a Python module
    # dxf = libredwg.dwg2dxf(filename)
else:
    # ODA or Teigha
    dxf = convertToDxf(filename)

if dxf:
    import importDXF
    doc = importDXF.open(dxf)
    return doc
So, right now, you cannot use libreDWG in FreeCAD. We need to test the libreDWG executables, or libraries, write a few lines of code in FreeCAD, test import and export, see that it works okay, and maybe that's all. Who will do it? Whoever takes initiative. It's free software.
Last edited by vocx on Fri Jan 03, 2020 8:14 am, edited 1 time in total.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Let's talk about libredwg support

Post by looo »

vocx wrote: Thu Jan 02, 2020 4:21 pm So, right now, you cannot use libreDWG in FreeCAD. We need to test the libreDWG executables, or libraries, write a few lines of code in FreeCAD, test import and export, see that it works okay, and that maybe that's done. Who will do it? Whoever takes initiative. It's free software.
I guess we simply should have added the changes back then. Anyway, let's do it now: https://github.com/FreeCAD/FreeCAD/pull/2856
Importing seems to work for basic geometry, but exporting a dwg and afterwards importing again with FreeCAD doesn't work for me.
Testing with libredwg 0.9.3.2543.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Let's talk about libredwg support

Post by carlopav »

looo wrote: Thu Jan 02, 2020 7:39 pm Importing seems to work for basic geometry, but exporting a dwg and afterwards importing again with FreeCAD doesn't work for me.
Testing with libredwg 0.9.3.2543.
I went through the topic but didn't get the conclusions... Is libredwg now supported?
If so, can we update the wiki page? https://www.freecadweb.org/wiki/FreeCAD_and_DWG_Import
Thx!
follow my experiments on BIM modelling for architecture design
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Let's talk about libredwg support

Post by looo »

carlopav wrote: Sat Feb 29, 2020 7:53 am I went through the topic but didn't get the conclusions... Is libredwg now supported?
If so, can we update the wiki page? https://www.freecadweb.org/wiki/FreeCAD_and_DWG_Import
Thx!
Yes libredwg is used if available. Currently we ship libredwg with the appimage and dmg (0.19_pre). There was not much feedback about the libredwg-support until now. My testing showed that import works (not all geometry) but export does not.

I created an issue [1] but haven't checked if it was resolved until now. I will try to do so as soon as possible [2]. Or if you want you can test it in one of the upcoming appimages / dmgs or via conda-packages.

[1] https://github.com/LibreDWG/libredwg/issues/195
[2] https://github.com/conda-forge/libredwg ... ck/pull/18
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: Let's talk about libredwg support

Post by carlopav »

looo wrote: Sat Feb 29, 2020 8:36 am Currently we ship libredwg with the appimage and dmg (0.19_pre).
Thanks for the quick explanation... so no chance to test it for me on windows, right?
I'll keep watching the thread since i'm really interested. Let me know if there's something i can help doing.
follow my experiments on BIM modelling for architecture design
Post Reply