Re: How to use libdxfrw?

Posted by R. van Twisk on
URL: https://forum.librecad.org/How-to-use-libdxfrw-tp5713395p5713416.html

Mandeep,

As you can see here : https://github.com/LibreCAD/LibreCAD/blob/master/libraries/libdxfrw/src/drw_interface.h DRW_Interface is an abstract class. I this was was a design decision from Rallaz to ensure that when you overwrite DRW_Interface it ensures that the developer realises what methods are available for overriding.
Don't forget that making a DXF also requires a special order of operation. You cannot 'just' write a line to DXF and forget about the rest, some specific items in the dxf need to come in a specific order. Using this abstract class ensures this order can be maintained and at the some time you can modify the DXF.
There are other ways to accomplish the same, this is just one of the ways.

Ries