Experimental “Help Layer” support.

Experimental implementation of HelpLayer by the dxf plotF flag, as requested:

request for “Help Layer”

Features of a Help Layer: 1, straight lines on a Help layer is automatically infinite in length; 2, contents of Help Layers are never printed;

Please help testing this new feature in my own repository:


If you find a bug in LibreCAD, or simply want LibreCAD to do more, please file a feature request/bug report at our sourceforge trackers:


Happy holidays and be prepared for LibreCAD in 2012!

The LibreCAD team




First LibreCAD release

Some of you might have noticed, but we released our first version of LibreCAD.
I would have never expected that the QCad fork would have come this far when I startednthe project last year, but I am very happy to see that people picking iup the project, using it and give us feedback on what they like and don’t like about LibreCAD.

LibreCAD 1.0.0 is mostly a fork of the old QCAD codebase but with some changes that solves some licencing issue, some parches we found on the ‘net’ and bugfixes so it will work and compile without problems on at least Linux, OSX and windows machines, both 32 and 64 bit.

So, what’s next?
We want maintain 1.0.0 anyless absolutly necesary, because LibreCAD 2.0.0 is already on it’s way packing with loads of new features, internal changes and ironing out more smaller and bigger items.

I have also giving over the responsibility for the 2.0.0 release to Dongxuli, he has been doing an amazing task already in the math area on LibreCAD and various under-the-hood designs of LibreCAD and organizing 2.0.0 alpha within our github repro, congrats beeing a release manager!

Lastly I wish everybody happy hollidays and a safe and happy 2012!

Ries & LibreCAD team

Complete CJK font support in LibreCAD

Some simple hack to allow using CJK(Chinese-Japanese-Korean) font support.

Since the file size of complete CJK fonts is almost 80MB, I only added a 7-zipped font file to the folder: support/fonts :


To use this font file, you will have to unzip it to generate the wqy-cjk.lff file. To unzip it in Linux:

7z e path/to/wqy-cjk.lff.7z

and add the file to LibreCAD font folder. For example, in my Archlinux,

sudo cp path/to/wqy-cjk.lff to /usr/share/librecad/fonts/

The font handling efficiency still needs more work. Nonetheless, users should be able to use CJK fonts in LibreCAD from now on. We would like to thank the WenQuanYi project for the good font quality and support for free software.

If you find a bug in LibreCAD, or simply want LibreCAD to do more, please file a feature request/bug report at our sourceforge trackers:


The LibreCAD team


PS: The font file is renamed to wqy-unicode, because it covers more than CJK fonts. The font file size is reduced from 80MB to 42MB, and it takes 120MB RAM to load wqy-unicode font file.

Experimental “Offset” support in LibreCAD

I merged initial experimental support into LibreCAD yesterday.

Some basic features of Offset still need to be implemented:

1, loop, self-intersection awareness;

2, Generate a spline fit, if the offset envelop is not in simple entities(straight line, arc, and ellipse);

3, More options to initiate Offset.

If you find a bug in LibreCAD, or simply want LibreCAD to do more, please file a feature request/bug report at our sourceforge trackers:


The LibreCAD team

Morley’s trisector theorem by LibreCAD’s new snap system

Morley's trisector theorem

Morley's trisector theorem

The 2.0.0 series (the master branch on github.com) of LibreCAD uses a new snap system which is designed to be more efficient in use.

For example, snap by middle points is extended to multiple equidistant points on entities. Using this new feature, trisecting an angle is now possible, albeit in LibreCAD.

To demonstrate this new interesting feature, 6 trisecting lines of a triangle are drawn, and Morley’s trisector theorem says the deep blue triangle formed is an equilateral triangle.

The LibreCAD Team

Common tangent line of two ellipses

LibreCAD tangent2

Common tangent line of ellipses

LibreCAD supports isometric grids now.

Also added to LibreCAD (targeting 2.0.0 version), drawing common tangent lines of two ellipses. Again, we use our own quartic equation solver to construct the tangent line. Actually, some cleanup still needed for the equation solver part, nonetheless, the feature is stable enough for general use.

The LibreCAD Team

Initial support for simplified Chinese fonts

LibreCAD Simplified Chinese fonts

LibreCAD Simplified Chinese fonts

After Rallaz and and zxq9 added font support for Japanese. Rallaz and I added some support for simplified Chinese fonts.

Full CJK font support is planned, but we need to figure out a more efficient way to to handle the 30,000+ characters.

If you find a bug in LibreCAD, or simply want LibreCAD to do more, please file a feature request/bug report at our sourceforge trackers:


The LibreCAD team

1.0.0-rc4 released


Today we have released 1.0.0-rc4 of LibeCAD, no we didn’t skip rc3 but at that moment we got a message from Ribbonsoft that we are not allowed to include the fonts and documentation into LibreCAD. Apparently the fonts and documentation were not released as GPLv2 and we were asked to remove that from our distribution. We included the qCAD fonts and docs previously, because Ubuntu, Debian, Red Hat, openSuse and many other distributions and QCad forms have (had?) that included.

I personally strongly believe I was in my right to use the qCAD docs and fonts because no exception was made in the open source CE download section of the Ribbonsoft site and no exception was made in any of the license files and readme within the tarball, therefore, I just included it, I am not a lawyer so, there we go…

So with 1.0.0-rc4 we have removed all fonts and docs from qCAD and have created our own font format called LFF, this was done by one of the developers, Rallaz, who did an awesome job here. LibreCAD is still backwards compatible with QCad’s original CXF fonts, so in case you created your own CXF fonts you can still use them, from now on all LibreCAD fonts are releases as GPLv2 or higher.

Unfortunately, we don’t have new documentation but we are working on to organize this as a new project within LibreCAD. I am afraid though we will not be able to make this for our first 1.0.0 release, as all our developers are busy working on other exciting development areas.

Have fun using LibreCAD!

Draw Inscribed circles and ellipses

While the spline/text speed has improved substantially, more work is still needed on them, and a code review is undergoing.

Aside from the text insertion speed, there’s an independent long-term goal of adding C++11 support. We will do more than simply making it look like C++11, instead, performance, code readability and correctness of implementation should be among our goals.

Now, some new features implemented in the master branch. Please help testing them!

Several new drawing methods for ellipses/circles:

  • Ellipse inscribed in a convex quadrilateral, i.e., the ellipse tangential to four given lines;
  • Ellipse with given foci, a point on ellipse or the total distance to foci;
  • Ellipse with given center, three points on ellipse;
  • Ellipse with major axis in x-/y-directions with given center, and two points on ellipse;
  • Ellipse with major axis in x-/y-directions and four given points on ellipse;
  • Circle inscribed in a triangle, i.e., tangential to three given lines.

Please note the complexity of these new construction algorithms, so, we do expect bugs for certain drawing conditions.

If you find a bug in LibreCAD or you would like LibreCAD to do more, please file your report/request at our tracker on sourceforge:


The LibreCAD team

Tweaking for speed of text insertion in LibreCAD

I should write something about what we are doing now. At least to assure users that we are working hard to make LibreCAD better.

While doing the never ending task of testing, Claude, our quality control master from Quebec,  exposed the issue of text insertion speed in LibreCAD, and it turned out to be a bug hard to fix.

We have made some progress, but the battle is not over yet.

First, I did a code review for math functions, rewrote many math functions, and many core math functions are now at least 100% faster, and 400% faster in some cases by my own benchmarking. I enabled using of 2D vectors, instead of 3D vectors for our core vector class, in hope of processing one third less of data. Still, the speed improvement is not enough.

Then, there was a turning point. Rallaz  identified excessive creation of new preview for text in the drawing part, and fixed it in a simple and elegant patch. For a while, we celebrated the catch, and called it a win.

To our surprise, Claude reported speed trouble once again. It turned out the previous fast text insertion in testing of Rallaz’s patch was coincident with an error in container’s move() function (bug#3420260). After we fixed the bug#3420260, the speed issue resurfaced again. Rallaz fixed a serious speed bug, but it’s still not enough.

Performance tweaking is going on for the spline class, which is used heavily in text processing.

Ries wants LibreCAD to be fast and lite, and that’s exaclty what we are doing now!

If you would like to help, please join the team!

UPDATE: spline/text draw() methods updated, preview procedure also updated. The speed of text/spline handling has improved significantly. Code review is still going on.