Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to LibreDWG #207

Open
XVilka opened this issue Jan 3, 2019 · 30 comments
Open

Switch to LibreDWG #207

XVilka opened this issue Jan 3, 2019 · 30 comments

Comments

@XVilka
Copy link

XVilka commented Jan 3, 2019

New version of LibreDWG library was released approximately month ago with a few good features
https://github.com/LibreDWG/libredwg/releases/tag/0.7

Your own library didn't update for years, feature difference is huge: https://github.com/LibreCAD/LibreCAD/tree/master/libraries/libdxfrw/src
It would be very beneficial to switch to this library finally.

new API:

  • add dwg_get_OBJECT(dwg) API for all objects in a DWG.
    analog to dwg_get_ENTITY, but including all objects, tables,
    block headers, even if unowned.
    Note that the dwg_api will be revamped from static to dynamic before 1.0.
    field accessors will be by name argument and ... (va_args)
    See the work/dynapi branch Replaced own solvers with Eigen polynomial solvers #59 (in progress).
    dwg_get_OBJECT(dwg) will be renamed to dwg_getall_OBJECT(dwg),
    dwg_get_ENTITY(blkhdr) to dwg_getall_ENTITY(blkhdr).

API breaking changes:

  • Changed BITCODE_RC from signed to unsigned char (Allow different working directory #44)
  • LEADER changes: rename hooklineonxdir to hookline_dir,
    rename unknown_bit_4 to hookline_on,
    endptproj only until r2007. (but still not 100% correct)
  • MULTILEADER changes: rename num_vertex to numpts (analog to LEADER),
    change vertex to points[] (PR Image fole formats support #49 Denis Pryt)
  • Fixed dwg_get_ENTITY(hdr): NULL-terminate the result (Bounding Box #60)

Important bugfixes:

Other newsworthy changes:

  • Check for RUNNING_ON_VALGRIND and call dwg_free then, even
    if previously skipped.
  • Renamed all remaining API "null malloc" error messages to
    "Out of memory"
  • Harmonized in_dxfb with in_dxf, but still WIP
@rvt
Copy link
Member

rvt commented Jan 3, 2019

LibreDWG's support has been very spotty, how is your fork ( is it a fork??) going to change this?

@lordofbikes
Copy link
Member

You missed to copy this from http://git.savannah.gnu.org/cgit/libredwg.git/tree/NEWS:

LibreDWG version 0.7 - released 2018/12/6 - still alpha:

After years of silence LibreDWG has got some attention for half a year now and its releases are marked as still alpha.

@XVilka
Copy link
Author

XVilka commented Jan 4, 2019 via email

@XVilka
Copy link
Author

XVilka commented Jan 4, 2019

@rvt it is not my fork, it is a mainline.

@lordofbikes
Copy link
Member

The point in alpha state code is:

The API is usable but still pretty rough, we might still rename
some functions or names for better consistency and add more encoding API.

So it's just the wrong time now to decide about this step.

@ghost
Copy link

ghost commented Dec 27, 2019

LibreDWG version 0.7 - released 2018/12/6 - still alpha:

After years of silence LibreDWG has got some attention for half a year now and its releases are marked as still alpha.

Propose reactivate this discussion, as there are many changes since LibreDWG v0.7 release (latest stable version now is v0.9.3 marked as beta)

Changes since *LibreDWG* `v0.7`

GNU LibreDWG NEWS -- history of user-visible changes.  -*-indented-text-*-
Copyright (C) 2019 Free Software Foundation, Inc.
See the end for copying conditions.

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)

LibreDWG version 0.9.2 - released 2019/11/08 - beta:

new API:
  * Added the -x,--extnames option to dwglayers for r13-r14 DWGs,
    displaying the extended variants with spaces. Since r2000 only
    those "extended" names are stored. (#167)

Minor bugfixes:
  * Fixed some leaks: SORTENTSTABLE, PROXY_ENTITY.ownerhandle for r13.
  * Add DICTIONARY.itemhandles[] for r13 and r14
  * Fixed some dwglayers null pointer derefs, and flush its output
    for each layer. (#166)

Other newsworthy changes:
  * Add geom utils to some programs: dwg2SVG and dwg2ps to transcode
    points via its OCS (i.e. extrusion vector)
  * Add basic POLYLINE_2D and LWPOLYLINE support to dwg2SVG. no arcs (bulges),
    no other curve_types (spline, bezier), no widths.

LibreDWG version 0.9.1 - released 2019/10/28 - beta:

Minor bugfixes:
  * Fixed bit_read_4BITS, off-by-one for the first bit.
  * Fixed more null pointer dereferences, overflows, hangs and memory leaks
    for fuzzed (i.e. illegal) dwg's.
  * Fixed some more compiler warnings.
  * Workaround stricter CPU's with ALIGNED_ACCESS_REQUIRED.
  * Add -fstack-protector for newer mingw, to link -lssp, which is now mandatory
    for _FORTIFY_SOURCE (a mingw-w64 libc headers bug).
  * Do not use gcc-9.0 - gcc-9.2! This series is seriously broken, not
    just for this project.
  * dwg2SVG: honor TTF font styles => Verdana or Courier (#156)

LibreDWG version 0.9 - released 2019/10/6 - beta:

new API:
  * Added the dxf importer, using the new dynapi and the r2000 encoder.
    Status: experimental. Only for r2000 dxf's yet.
  * Added utf8text conversion functions to the dynapi:
    dwg_dynapi_header_utf8text, dwg_dynapi_entity_utf8text,
    dwg_dynapi_common_utf8text converting unicode strings to UTF-8.
    And it's higher level variants: dwg_{g,s}et_HEADER_utf8text,
    dwg_{g,s}et_{ENTITY,OBJECT}_common,
    dwg_{g,s}et_{ENTITY,OBJECT}_common_utf8text,
    dwg_ent_{g,s}et_UTF8.
  * Added the missing dwg_dynapi_common_set_value.
  * Added dwg_dynapi_handle_name helper.
  * Added to unstable objects: TABLESTYLE, TABLE.
    TABLE r2018+ now includes TABLECONTENT.
  * Added SummaryInfo section.
  * Added 3DSOLID encoder.
  * Added API's to find handles for names, searching in tables and dicts.
  * Added TIMERLL type. raw, unencoded 2xRL julian date, for SummaryInfo.
  * Added signed d variants to some types: BLd, BSd, RLd, ...
    and x formatters: RLx.
  * Added reverse dxf_revcvt_lweight().

API breaking changes:
  * Added an is_utf8 arg to the dynapi setters:
    dwg_dynapi_header_set_value, dwg_dynapi_entity_set_value,
    dwg_dynapi_common_set_value, converting UTF-8 strings to TV or TU.
  * Generalize object handles:
    * Rename common field ownerhandle, esp. not NAME_control 330.
    * Remove various null_handle fields.
    * Rename LTYPE.null_handle to LTYPE.extref_handle
    * Add SORTENTSTABLE.dict_handle (previous called ownerhandle,
      it IS the ownerhandle. ok, there we do have both, the parenthandle
      and the ownerhandle)
    * Remove xrecord,proxy get_ownerhandle API
    * Move ownerhandle to parent Object_Object along reactors and xdicobjhandle.
      This field is common to all objects. (#118)
    * Remove unneeded ownerhandle fields.
    * Renamed STYLE.null_handle to STYLE.extref_handle
  * Changed DIMASSOC spec
  * Minor POLYLINE/VERTEX field fixups for DXF. add COMMON_ENTITY_POLYLINE.has_vertex 66,
    add VERTEX_PFACE_FACE.flag 70.
  * Renamed two LAYOUT fields: pspace_block_record => block_header,
    last_viewport => active_viewport.
  * Harmonize DICTIONARY_NAMED_OBJECT (NOD) names:
      LAYOUTS => LAYOUT, PLOTSTYLES => PLOTSTYLENAME, MATERIALS => MATERIAL,
      COLORS => COLOR.
  * Renamed all linetype* fields to ltype.
  * Removed IMAGE/WIPEOUT boundary_pt{0,1} fields. Use clip_verts[0,1] instead.

Important bugfixes:
  * Fixed all remaining null pointer dereferences and memory leaks. We added
    a smoke with asan, ubsan and lsan. Only the dxf importer is leaking.
  * Fixed dwg_dynapi_common_*
  * Fixed get_next_owned_entity, which omitted the last entity for r13-r2000.
    (#143)
  * Fixed the UCS-2 to utf-8 converter, causing corrupt DXF with unicode names
    and strings. (#143)
  * Fixed wrong object address (#112). handlestream_size is not part of obj->size.
    This fixes the hdlpos += 8 FIXME's and many handles.
  * Fixed FIELDLIST standard handles (#118)
  * Fixed FIELD.childs and objects (#117)
  * Fixed MLINESTYLE.ltype handles (#116)
  * Fixed MULTILEADER content_block (#113)
  * Added many missing handles 2007+ (#115)
    Due to the fixed handle_stream offset, we can now reliably read many
    more handles (#114):
      DIMENSION_ORDINATE
      DIMENSION_LINEAR
      DIMENSION_ALIGNED
      DIMENSION_ANG3PT
      DIMENSION_ANG2LN
      DIMENSION_RADIUS
      DIMENSION_DIAMETER
      MTEXT
      BLOCK_CONTROL
      STYLE
      SORTENTSTABLE
      APPID
      DICTIONARYVAR
      VPORT_ENTITY_HEADER
  * Fixed OLE2FRAME encoder.
  * Fixed EED code 5 as int64 (#110)
  * More stable eed decoder with overflow, e.g. when dat does not advance error earlier.
    Avoid endless loops on eed decoding errors.
  * Various minor improvements in the dxf writer. (#143)
  * Major improvements in the dxf reader. Most r2000 entities and many objects
    can be imported, and read from acad dwg's.
  * Various minor improvements in the dwg writer, esp. calculating the object
    size and bitsize. fixed bit_write_4BITS (for VPORT.VIEWMODE)
  * Protect all sizes from VALUEOUTOFBOUNDS with sensical values.
    (i.e. new size restrictions)

Other newsworthy changes:
  * Restricted the three dat, hdl_dat and str_dat streams in its size and
    offset to the current object to detect every overflow. And report this
    overflow.
  * Read COMMON_ENTITY_HANDLE_DATA earlier, so that we can remove extra 2nd
    handle loops at the end for r2007+ (#85)
  * Support reading uncompressed sections (e.g SummaryInfo)
  * Added -y/--overwrite flag to most programs.
  * Better LOG_TRACE [rcount1], [rcount2] logging, expanded to the actual
    index.
  * Removed the dejagnu based test/testcases, merged with proper
    test/unit-testing
  * With the new dxf importer, a lot of logic had to be added for missing fields,
    calculating them, adding defaults, and support dxfname aliases.
  * Harmonized internal REPEAT macro names.
  * Added decode code to recover from invalid HANDLES handleoff UMC or offset MC.

LibreDWG version 0.8 - released 2019/6/25 - still alpha:

new API:
  * added a new dynamic API, read and write all header and object fields
    by name. Many of the old dwg_api.h field accessors are deprecated.
  * add calculated DIMENSION.flag from flag1 and flag2
  * add BITCODE_UMC type for Object-map section_handles
  * add reverse dwg_find_objectref lookup: linear search, only done for
    entities with subentities to find the ref for the current object.
  * added to stable: UNDERLAY entities, UNDERLAYDEFINITION, CAMERA objects

API breaking changes:
  * rename get_first_owned_object to get_first_owned_entity,
    get_next_owned_object to get_next_owned_entity.
  * Changed these iterators in handling subentites (VERTEX, ATTRIB),
    these are now skipped.
  * rename <TABLE>.entry_name to name (#76)
  * rename VPORT.shade_plot_handle back to sun_handle, dxf 361
  * rename POLYLINE_3D.flag2 to curvetype, dxf 75.
  * rename linewidth fields to linewt (#79)
  * rename DIMENSION_ORDINATE.ucsorigin_pt to def.pt
  * rename parenthandle fields to ownerhandle (#80)
  * rename ent->parent to ent->ownerhandle (#82)
  * replace ENTITY.subentity by ownerhandle 330
  * rename _ent->entity_mode to entmode (as in ODA)

Important bugfixes:
  * dwg.h now always includes stdint.h and inttypes.h, no more
    int vs int32_t confusion
  * Fixed many errors in DXF output:
    * split BLOCKS and ENTITIES (#88)
      esp. in respect to Paper_Space (#81) and Model_Space entities.
    * DICTIONARY: fix hard_owner DXF 350/360.
    * Fix xdata dxf groups: +1000 or XRECORD.
    * Fix block names (#81), take it from its linked BLOCK entity
    * Fix DIMENSION blocknames, ditto (#81).
    * Fix c-quote of strings with different quoting rules than json.
    * Fix _3DSOLID,_3DFACE dxfname and 3DSOLID, BODY subclass names
    * Add missing DIMSTYLE 3 handle
    * Support DXF elevation and extrusion as pt,
    * Add dxf.test to be shell compatible
    * convert CELWEIGHT and linewt values (#79)
    * Support proper 330 ent->parent->handle (#82) which is not always the
      MSPACE record.
    * fix colors a bit
    * print HANDSEED as hex (#71)
  * Fixed JSON output, add tests with jq. just not yet via pipes (NOCOMMA hack).
    make HEADER a hash, better ARRAY, POINTS, VECTORs, c-quote strings.
    Resemble more to the DWG structure, not DXF: Rename ENTITIES to OBJECTS,
    TODO: FILEHEADER sections (#76)
  * Validate decoded and sort DXF output of entities with subentities
    (POLYLINE, INSERT) (#83). In DWG they have different orderings,
    fixup some off-by-one decoding errors (e.g. wrong handle stream offset).
  * Fixed HATCH gradientfill color (#89)
  * decode: set proper ->dxfname from classes.inc, Fixes ACDBDICTIONARYWDFLT
    DXF object and simplifies out_dxf.
  * Fix some CRC checks: RSx vs RS_LE, add unused crc64 code.
  * More overflow and free protections added by Denis Pruchkovsky
  * Extend read/write bit_MC/UMC from 4 to 5 bytes (denis #70, PR #65)
    This is broken in all other dwg libraries.
  * Fix bit_convert_TU for >U+800 (#80)
  * Fixed more memory leaks (denis and rurban)
  * Fixed some double-free's and oob errors in EED (#99, #104)

Other newsworthy changes:
  * add --disable-bindings configure switch (#86)
  * add more codepages to dxf: ANSI_1253, ANSI_1254, ANSI_936, ANSI_949
  * add cirrus FreeBSD smoker
  * rename dxf_example.{lsp,sh} to dxf-allcvt.*
  * add dxf-roundtrip.sh, via TeighaFileConverter

LibreDWG version 0.7 - released 2018/12/6 - still alpha:
...

@rvt
Copy link
Member

rvt commented Dec 27, 2019

We need to think if GPLv3 is compatible with out licence model if we want to use it.

@ghost
Copy link

ghost commented Dec 27, 2019

We need to think if GPLv3 is compatible with our licencse model if we want to use it.

As I understand, LibreDWG is under GPLv3+ (NOT GPLv3-only)

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

And LibreCAD 3.x has same GPLv3+ license

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

So, there are NO any issues.

@rvt
Copy link
Member

rvt commented Dec 27, 2019

Ok, somebody overwrite the licence to be GPLv3, there was never permission to do so : See original https://github.com/LibreCAD/LibreCAD_3/blob/645ac3d971a8c3727de206e16ed110cff6245dfe/LICENSE

I will discuss this because it's been so long ago already, but we never noticed

@XVilka
Copy link
Author

XVilka commented Dec 28, 2019

Isn't this just makes all new code (that was written after that change) to be under the GPLv3+? Since everyone who contributed after it thought the license is GPLv3?

@rvt
Copy link
Member

rvt commented Dec 28, 2019

@XVilka yeaaa, that's a big issue indeed.
I just need to wrap around the implications about what happened.

GPLv3 limites the usage of the source code a lot, and that was never the intention.

@TNick
Copy link

TNick commented Dec 28, 2019

@gaganjyot thoughts?

@liufeijin
Copy link

hope can change to libreDWG

@zhengf312
Copy link

hope can change to libreDWG,too

@gaganjyot
Copy link

This message is regarding licensing. Regarding usage of LibreDWG, Please read my next message

I investigated a lot on this during initial work and there are couple of things I'd like to mention:

And before anything else, I'd like to mention I am not a license expert/Lawyer but I've did from my understanding of licenses.

If you read the License Document it states

https://github.com/LibreCAD/LibreCAD_3/blob/master/LICENSE

LibreCAD 3 consists of several modules and these modules may have
a different license than the application itself.
For specific licenses, check respective folders.
LibreCAD 3 itself is under the GNU GPLv3 or later License.

The current license of the LibreCAD_3 was made to GPL, but if you see, we just ship the application under GPL. That doesn't imply that the whole code needs to be GPL.

If you see the librecad Kernel has BSD3 license

https://github.com/LibreCAD/LibreCAD_3/blob/master/lckernel/LICENSE

And this was supposed to be done for all the code that we have written as a part of LibreCAD_3, we might have missed to add that but at that time everything was a part of LCKernel and hence there was a miss.

We currently depend on multiple Libraries that might have a GPL license, Cairo, Qt, Libdxfrw ( Rallaz ) or even if we think of LibreDWG.

The plan and idea was that completely whole of code written in LibreCAD_3 ( except the main.cpp file ) can be MIT/BSD-3 license.

Since we are dependent on GPL libraries, we could just make the main file as GPL license and ship the whole distributable as GPL.

But the modules ( everything can be a shared library that links to main.cpp ) like LCKernel, LCViewer and all others will be MIT/BSD-3

The reason we are using GPL now is that we don't have all the libraries that are under MIT/BSD ( like UI, DXF/DWG read/write etc. )

But the whole code is BSD-3 so it doesn't limit the usage of sourcecode at all.

If in future we could replace all the libraries with BSD-3/MIT license based ones, If everybody is okay, we can replace the GPL 3 Main file with a MIT/BSD based license and relicense the whole librecad.
Or if the team doesn't agree, the ones who wish, can still fork it and release it as another software itself under MIT/BSD-3 license.

I hope I made things clear. Please let me know if there are any other questions.

In other words:

In all the cases the whole librecad_3 source code written by us is BSD-3/MIT

If we are using any of the GPL libraries like dxf/dwg or even cairo/Qt we ship the software under GPL

If we are not using any of the GPL libraries we can proceed further and ship the software under MIT/BSD-3

I feel this approach of licensing is very much flexible. But still, Please let me know if there are concerns.

The code is completely under MIT/BSD-3 and lesser limiting in terms of usage.

@gaganjyot
Copy link

This message is regarding usage of LibreDWG. Regarding Licensing, Please read my previous message

Glad that people are looking towards usage of LibreDWG, but before we just go further an use LibreDWG:

I think many of us need to understand that if a library is not active that always doesn't means that it was abandoned or is bad to be used.

Sometimes that could also mean that the reason the author developed the library is served for the author.
Might be serving 100% for some others, some might see it serves 50% of their requirement.

Sometimes it could also mean that it is stable enough with respect to scope of development and not much can be added into it.

For an example, Netflix's hystrix has mentioned this in their readme

https://github.com/Netflix/Hystrix/blob/master/README.md

Hystrix is no longer in active development, and is currently in maintenance mode.

Hystrix (at version 1.5.18) is stable enough to meet the needs of Netflix for our existing applications. Meanwhile, our focus has shifted towards more adaptive implementations that react to an application’s real time performance rather than pre-configured settings (for example, through adaptive concurrency limits). For the cases where something like Hystrix makes sense, we intend to continue using Hystrix for existing applications, and to leverage open and active projects like resilience4j for new internal projects. We are beginning to recommend others do the same.

Now if you feel that you need such a library, and if you don't use hystrix just because its in maintainence mode, to me it doesn't seem a real good decession.

Now coming back to usage of LibreDWG in librecad,

We need to see what are the advantages we are getting by using libreDWG instead of LibDXFrw, if the pros of libreDWG outweigh we can definitely look at it.

Personally I think for what we have developed in LibreCAD_3 yet, we can stick to LibDXFrw for the moment until we face enough issues.

  • The development of LibreDWG halted since there was not much motivation to develop as there were no users

  • Last time I saw, there were still memory related issues in libreDWG due to which I'd refrain using libreDWG untill I am sure of them getting fixed.

  • Do we have some benchmarks/comprision on the what versions are supported by both libreDWG and LibDXFrw and in case of each version what is the percentage supported.

  • One more reason I'd refrain is that LibreDWG is more of a in-memory like approach where everything is stored in memory and then we have to copy it to libreCAD_3 structures which will cause higher memory usage where as libDXFrw is more of a parser style approach where it just parses and stores nothing in the memory.

  • Libdxfrw supports well enough for libreCAD2 and hence it has undergone more testing than libreDWG.

  • I am not completely sure but as much I think LibDXFrw implements major part of the ODA specification and there was not much more to be developed. Again thats just my understanding and I am not sure if that's the reason.

And my final 2 cents,

  • We can even contribute to development of LibDXFrw as well.
  • If you're still interested, It won't be much changes to incorporate libreDWG for testing purposes. If should be an interface that needs to be implemented Ries/Fergaon can help more here regarding the interface name.

@liufeijin
Copy link

As an end user, in fact,i am not care on which lib is better. I just want LibreCAD2 can read and write DWG file. If someone can fix the problem on LibreCAD2 , it will be better.

@flywire
Copy link
Contributor

flywire commented Jun 20, 2020

I just want LibreCAD2 can read and write DWG file.

Why? Freely available specialised applications do it very poorly so why should LibreCAD attempt it? It will only lead to more disappointment.

I my view dwg should be stripped out of LibreCAD and supported through plugins. It should be clear people can use plugins but they are not LibreCAD. Plugin support would rest with the plugin developer.

@XVilka
Copy link
Author

XVilka commented Jun 20, 2020

Seems active enough (also now - beta): http://git.savannah.gnu.org/cgit/libredwg.git/tree/NEWS

@XVilka
Copy link
Author

XVilka commented Jun 20, 2020

@flywire the same reason nobody would have used LibreOffice or OpenOffice without MSO formats support.

@flywire
Copy link
Contributor

flywire commented Jun 20, 2020

@XVilka that is a good example but the issue is you are comparing a largely documented XML format with a largely undocumented DWG format.

@ghost
Copy link

ghost commented Jun 21, 2020

comparing a largely documented XML format with a largely undocumented DWG format.

To be honest, "DWG not fully documented yet, but in progress".

@rurban
Copy link

rurban commented Sep 27, 2020

LibreDWG maintainer here.

It is still beta, because there is still no proper CAD application usage, which I would need to fix any missing or bad API's. The gold standard are the existing VBA and partially AutoLISP API's, but there are several issues with them. Recently a new and extremely simple CAD program showed up which wants to use an API similar to AutoCAD's VBA. This is a good test case to write a proper but simple enough API to write DWG's. I wrote the DXF importer which was a good testcase, but it's way too much code. The new JSON importer uses a much simpler and more generic way to write DWG's. This still needs to abstracted into a good enough API.

The above mentioned dynapi is done, and was used for the DXF and JSON importer. Very successfully. The python and perl bindings don't use it yet, the inwork gambas bindings (VBA alike) will use it. All future bindings will use it.

Re licensing: There will be no changes. First the project is owned and defended by the FSF. You have to remember that we are dealing with one of the worst litigious companies here, right after Oracle. They sued OpenDWG for the use of trademarked names in the code, which was needed to be able to write to this format, so that programs could read that format. Only the FSF and the GPLv3 are strong enough to withstand such existential threats.

@DuncanLithgow
Copy link

There continues to be progress on LibreDWG ( https://savannah.gnu.org/news/?group=libredwg ) and LibreDWG is now supported OOTB (for 2D) in FreeCAD 0.19_pre ( https://wiki.freecadweb.org/FreeCAD_and_DWG_Import )

Would it be valuable to have a plugin to allow switching to and testing LibreDWG? If this was made as a plugin would it also work for LibreCAD2?

Remember that LibreDWG also does conversion to SVG and DXF export. So it could provide new and/or improved functions.

What would this take to get done? I we can start robust testing of LibreDWG for 2D CAD this would be great and push an active project forward faster. Over at osarch we are discussing promoting DWG work to the FSF for inclusion again on their High Priority Projects list. https://community.osarch.org/discussion/385/fsf-help-us-set-high-priorities-for-2021-send-input-by-jan-8 feel free to comment there on the general topic of DWG in FOSS.

Opinions on support for DWG differ, but an issue tracker may not be the place for that discussion.

@DuncanLithgow
Copy link

related to LibreCAD/LibreCAD#1239 'Support for DWG format' in LibreCAD2

@nishishailesh
Copy link

nishishailesh commented Dec 12, 2021

I am not sure if this is correct place to write my experience.
System: Debian 11
Problem: Can not open DWG files.
Answer:
Application->Graphics->ODAFileConverter did not work
On commandline it showed error: qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
I ran command: QT_DEBUG_PLUGINS=1 /usr/bin/ODAFileConverter
It gave error: QFactoryLoader::QFactoryLoader() checking directory path "/usr/bin/ODAFileConverter_22.8.0.0/platforms" ...
So I linked as follows:
cp /usr/lib/x86_64-linux-gnu/qt5/plugins/platforms /usr/bin/ODAFileConverter_22.8.0.0 -l

Now Application->Graphics->ODAFileConverter worked
Tried to convert DWG to 2018 binary DXF, file opened but nothing seen
Tried to convert DWG to 2018 ascii DXX, drawing was seen

@ghost
Copy link

ghost commented Dec 12, 2021

I am not sure if this is correct place to write my experience.
System: Debian 11
Problem: Can not open DWG files.

@nishishailesh, are you tried to open DWG in SolveSpace? If so, you should provide SolveSpace version info and, if possible, such DWG file for test.

@DuncanLithgow
Copy link

@nishishailesh thanks for reporting the problem you're having. This is not the right place to add this issue since we're discussing pro/con for a switch to LibreDWG.

Please create a new bug report and as @Symbian9 (hi there) suggests see if it opens in SolveSpace

@GJoe2
Copy link

GJoe2 commented Feb 23, 2022

LibreDWG have support for readind dwg R2018 files (but it only write at R2000) and it is being actively developed. It would be nice to add a new branch for testing purposes. Time will tell which library (libdxfrw or LibreDWG) LibreCAD should focus

@XVilka
Copy link
Author

XVilka commented Feb 23, 2022

Agree, latest release as of now is 0.12.5 with many changes. They also seem to fuzz the implementation as well:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests