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

12 thoughts on “Experimental “Offset” support in LibreCAD

  1. Ciao,
    If/when I get my voronoi-diagram code working it should allow for fast and robust offset-generation. If you do it segment-by-segment you need to check for intersections which, at least naively implemented, is an O(n^2) operation if you have n points/lines/arcs. The voronoi diagram approach is n*log(n) so should be way faster for complex input geometry.

    • Hi anders,

      is your voronoi cell part based on fortune algorithm?

      If you can license it to GPL2+ (version 2 or later), we would love to include it in LibreCAD. It would be a feature by itself (to generate voronoi cells), aside from a fast contour classifying algorithm.

      To identify cells starting from points(vertices) is the definition of voronoi cells.

      To identify cells starting from lines requires generating of the points (vertices) from lines, and the vertices can be generated by reflection of a point by the given lines.

      Please tell me more about the arc part.

      After this, we still get the problem of self-intersecting spline to handle.


      Dongxu Li

  2. My goal is something like this (from a 2009 paper by Held):

    Right now I can calculate diagrams for point-sites and for line-sites. Like this:
    (input line-segments in yellow, diagram in shades of blue)

    Next I need to extend this code for polygons, and write a class that traverses the diagram and generates offset. Code is c++ with python bindings. https://github.com/aewallin/openvoronoi
    gpl3 or gpl2 is OK with me.

    • 当前只有最简单的Offset支持。接下来需要将Anders的算法添加到LibreCAD,Anders的算法能快速确定offset的拓朴结构。如果时间允许,我将协助Anders调试相关Voronoi算法。然后,添加Voronoi功能本身到LibreCAD。



        • There are several things we can do together:

          1, algorithm/engine level:

          Offset, spline, hatch, and Voronoi cells. Most likely, in collaboration with Anders.

          Also, feel free to propose other things we would like LibreCAD to do. Ries wants more 2.5D and CAM support, for example.

          2, GUI/Qt

          The GUI/painter/printer all need more work and cleanup.

          have a look at our trackers at sf:


          3, Translation/wiki




Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.