#435 Polyline linepatterns don't continue over nodes

master branch

The attached file makes it obvious. There are two polylines:

  • The left one consists of a 90° arc and a straight line.
  • The right one uses 10 segments to approximate that arc in addition to the vertical straight.
  • The line type of the whole layer is set to dash-dot.
  • But the right one doesn't really show that, because the pattern restarts after every single node.

That's a behaviour I would expect from independent line segments. But a polyline IMHO is supposed to show such pattern continuously.

1 Attachments


  • Dongxu Li
    Dongxu Li

    • status: open --> open-accepted
  • takenname

    Could you please make sure that the dropdown menu from the toolbar is set to "By Layer".
    In the following image
    Pen Selection
    it is marked as "Pen Selection" and then "Line type".
    I this problem still does exist please tell the steps to reproduce it because I can not reproduce this. thanks

  • sven-de


    1. New Document in 2.0.0rc3
    2. Set linestyle of layer '0' to dash
    3. Draw some independent horizontal polylines in that layer, each 100 units long in total.
      1. The first one consists just of a single segment, 100 units long, between two nodes.
      2. The second polyline has a node every 10 units, so there are 11 nodes with 10 segments in between.
      3. The third gets a node every 20 units, resulting in 5 segments between 6 nodes.
      4. Continue increasing the length of the segments, ie. the spacing betwenn nodes
      5. draw one final polyline with extremely narrow node spacing (eg. 1 unit)
    4. This gives you several parallel lines of the same length (see attachment) but because of the different node placement their dashing looks completely different. In case of the short spacing the line will look solid, without any dashing. In my opinion all those lines should look the same. As long as they are polylines the dashing should not restart at every node.
  • LordOfBikes

    Please find attached a screen shot from your test file in Autodesk TrueView 2014. Regarding the dashed lines it looks very similar to the view in LibreCAD.
    So the AutoCAD company has the same approach to handle this.

    My assumption is, if we would realize such a feature, it will come with a serious loss in drawing performance. For each node the distance to the first node has to be computed and painting of each dashed segment must start with the pattern at the distance in a continuous dashed line. Where segments can be lines or circle arcs.

    The bottom line is, that a polyline is a collection of connected lines and arcs. The object of the polyline is to handle the collection as one unit and simplify dealing with it.
    The drawing engine doesn't see the polyline as each segment is drawn separate, not in the context of a polyline.

    Possible solutions, to get a better result, are deleting unnecessary nodes or to try another scaling factor.

  • sven-de

    Thank you for the input on this, which made me open feature request 153 on this issue. So this bug report may be closed.

  • LordOfBikes

    • status: open-accepted --> closed