Let's talk about libredwg support
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Re: Let's talk about libredwg support
@kunda I simple used the same approach as yorik did. This was more a test to see if libredwg would work as replacement for the oda-converter but I didn't get this impression. I guess some more testing is necessary.
Thx @vocx for the explanation. I guess it's time to stop trying to write py2 compatible python. There are really some nice things about py3 and I guess it's time to use them.
Thx @vocx for the explanation. I guess it's time to stop trying to write py2 compatible python. There are really some nice things about py3 and I guess it's time to use them.
Re: Let's talk about libredwg support
My 2 cents:
libreDWG is GPL3, which is incompatible with our LGPL2 license. So in any case, it is better not to try to make the FreeCAD source code depend on libreDWG, otherwise we're in for problems. Fortunately, that's where external addons are handy, because it's the addon that depends on FreeCAD, not the contrary.
So for me the right way would be to code a new DWG importer/exporter as external addon that uses libeDWG and is licensed under GPL3. This would be far more efficient than using a convertor, like the ODAconvertor, as libreDWG certainly has all the tools to navigate through the different entities of a DWG file. It could basically do both the job of the ODA convertor and our DXF importer together at once.
It could be done in C++ (with one or two very simple python functions), but then there is the burden that it must be compiled, and the addon author will need to start furnishing compiled packages for all platforms, etc. Or, it is all done in Python, but it will then requires the user to have a version of libreDWG on their machine. But this is a better way I believe, because if things go well, sooner or later libreDWG should be available in all package systems, same with IfcOpenShell.
Of course, @Kunda1's idea would be a much more simple thing that we can do first...
libreDWG is GPL3, which is incompatible with our LGPL2 license. So in any case, it is better not to try to make the FreeCAD source code depend on libreDWG, otherwise we're in for problems. Fortunately, that's where external addons are handy, because it's the addon that depends on FreeCAD, not the contrary.
So for me the right way would be to code a new DWG importer/exporter as external addon that uses libeDWG and is licensed under GPL3. This would be far more efficient than using a convertor, like the ODAconvertor, as libreDWG certainly has all the tools to navigate through the different entities of a DWG file. It could basically do both the job of the ODA convertor and our DXF importer together at once.
It could be done in C++ (with one or two very simple python functions), but then there is the burden that it must be compiled, and the addon author will need to start furnishing compiled packages for all platforms, etc. Or, it is all done in Python, but it will then requires the user to have a version of libreDWG on their machine. But this is a better way I believe, because if things go well, sooner or later libreDWG should be available in all package systems, same with IfcOpenShell.
Of course, @Kunda1's idea would be a much more simple thing that we can do first...
Re: Let's talk about libredwg support
I've started reaching out to downstream repos to either update or add LibreDWG
I'm also tracking this via https://github.com/luzpaz/FreeCAD-depen ... /issues/36
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
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
Re: Let's talk about libredwg support
Yes I agree with this. Directly importing dwg's is for sure the better solution. But for testing the library I think it would be nice to have the option to choose between libredwg and ODA for now. As far as I know calling libredwg via subprocess doesn't make freecad directly dependent on the source of libredwg.yorik wrote: ↑Mon Oct 14, 2019 7:25 pm So for me the right way would be to code a new DWG importer/exporter as external addon that uses libeDWG and is licensed under GPL3. This would be far more efficient than using a convertor, like the ODAconvertor, as libreDWG certainly has all the tools to navigate through the different entities of a DWG file. It could basically do both the job of the ODA convertor and our DXF importer together at once.
For sure in the long run, a direct importer is better. But for getting some more feedback about libredwg, we could handle libredwg as a replacement to ODA. Don't you think?
Re: Let's talk about libredwg support
Yes, 100% agree.
The "Does using an executable as a subprocess count as a dependency" question is probably highly controversial.. I remember RMS arguing that importing a python lib at runtime is dependency... Some might say this is one too. But in this case, I think 1) No distribution or packaging system ever goes so far, not even debian, and 2) FreeCAD still runs perfectly fine without, so I wouldn't worry much. We all agree FreeCAD doesn't depend on ODA. It just uses it if it happens to be present. Like the users themselves would do anyway.
Re: Let's talk about libredwg support
Kunda1 wrote: ↑Tue Oct 15, 2019 11:52 amI've started reaching out to downstream repos to either update or add LibreDWG
I'm also tracking this via https://github.com/luzpaz/FreeCAD-depen ... /issues/36
Hey man, do you know of any efforts on the topic in regards to ubuntu/debian side of things?kkremitzki wrote:
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
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
LibreDWG 0.9.3 released (Re: Let's talk about libredwg support)
https://github.com/LibreDWG/libredwg/blob/0.9.3/NEWS
LibreDWG version 0.9.3 - released 2019/12/25 - beta:
Minor bugfixes:
* Added several overflow checks from fuzzing (#176)
* Enabled AX_RESTRICT, undefining restrict in broken compilers (#141)
* Fixed AX_ADD_FORTIFY_SOURCE warnings with gcc-9 -Wcpp
* Disallow illegal SPLINE scenarios (#176)
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
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
Re: Let's talk about libredwg support
just re-upping this to see if it's on the your radar, @kkremitzkiKunda1 wrote: ↑Tue Oct 15, 2019 2:55 pmHey man, do you know of any efforts on the topic in regards to ubuntu/debian side of things?kkremitzki wrote:
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
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
Implementation of LibreDWG in FreeCAD
Hi community,
with the beginning of the year 2020, I'd like to inquire how it will be possible to implement LibreDWG in FreeCAD.
Until now, I could only find to basic threads concerning to libreCAD and FreeCAD:
1) LibreDWG revived! https://forum.freecadweb.org/viewtopic.php?f=8&t=30601
2) Let's talk about libredwg support https://forum.freecadweb.org/viewtopic.php?f=8&t=39827
Related to the development the following state was actually achieved, dated Jan 1, 2020, with packages available at github:
https://github.com/LibreDWG/libredwg/re ... 0.9.3.2543
packages for openSUSE are available at:
https://software.opensuse.org//download ... ctopenSUSE
After retrieving the package and installation of
libredwg-0.9.3-lp151.23.1.src.rpm
on e.g. openSUSE leap 15.1 system with the repos:
libredwg0 - A library to handle DWG files
libredwg-devel - Development files for libredwg
libredwg-tools - Command line utilities for handling DWG file
the essential question now is:
what to do to work (Import/ Export data files) with libreDWG in FreeCAD?
with the beginning of the year 2020, I'd like to inquire how it will be possible to implement LibreDWG in FreeCAD.
Until now, I could only find to basic threads concerning to libreCAD and FreeCAD:
1) LibreDWG revived! https://forum.freecadweb.org/viewtopic.php?f=8&t=30601
2) Let's talk about libredwg support https://forum.freecadweb.org/viewtopic.php?f=8&t=39827
Related to the development the following state was actually achieved, dated Jan 1, 2020, with packages available at github:
https://github.com/LibreDWG/libredwg/re ... 0.9.3.2543
packages for openSUSE are available at:
https://software.opensuse.org//download ... ctopenSUSE
After retrieving the package and installation of
libredwg-0.9.3-lp151.23.1.src.rpm
on e.g. openSUSE leap 15.1 system with the repos:
libredwg0 - A library to handle DWG files
libredwg-devel - Development files for libredwg
libredwg-tools - Command line utilities for handling DWG file
the essential question now is:
what to do to work (Import/ Export data files) with libreDWG in FreeCAD?