Menu

#481 Function OFFSET - line disappears on zooming - can't select line

Next release
open-fixed
7
2014-11-02
2014-10-29
Andreas
No

LibreCAD 2.0.6 (Win)

Hello,

when I use function OFFSET as follows:

  1. Draw a horizontal two point line on layer LINE
  2. stay on active layer LINE
  3. Select function OFFSET
  4. Select the line horizontal line
  5. Offset for example 10 or anything else
  6. The selected line is drawn correctly

So when you zoom in an out, you will notice, that the offset line will disappear when you zoom in. Also you can't select that line
--> it's a ghost-line ;-)

Hope you can reproduce the bug (was in 2.0.4. and 2.0.5. exactly same)...

Regards

Andreas

P.S.: Hope you can fix that bug, because OFFSET is a great and often used function!

Related

Bugs: #481

Discussion

  • Dongxu Li

    Dongxu Li - 2014-10-29
    • status: open --> open-accepted
    • assigned_to: Dongxu Li
    • Priority: 5 --> 7
     
    • Andreas

      Andreas - 2014-10-29

      Hello,

      I got this problem only for lines, which I created via OFFSET.

      If you OFFSET the selected line onto another construction layer, it works
      perfect, only if you OFFSET a line onto a non construction layer.

      Regards

      Andreas

      Von: Dongxu Li [mailto:dongxuli@users.sf.net]
      Gesendet: Mittwoch, 29. Oktober 2014 17:29
      An: [librecad:bugs]
      Betreff: [librecad:bugs] #481 Function OFFSET - line disappears on zooming -
      can't select line

      • status: open --> open-accepted
      • assigned_to: Dongxu Li
      • Priority: 5 --> 7
      • Comment:

      weird bug, I can reproduce this one in windows and linux. Therefore, doesn't
      look like platform dependent.

      Need to investigate: is this really related to offset, or having problem for
      all selected lines.


      [bugs:#481] http://sourceforge.net/p/librecad/bugs/481 Function OFFSET -
      line disappears on zooming - can't select line

      Status: open-accepted
      Group: Next release
      Labels: offset ghostline bug
      Created: Wed Oct 29, 2014 03:10 PM UTC by Andreas
      Last Updated: Wed Oct 29, 2014 03:10 PM UTC
      Owner: Dongxu Li

      libreCAD 2.0.6 (Win)

      Hello,

      when I use function OFFSET as follows:

      1. Draw a horizontal two point line on layer LINE
      2. stay on active layer LINE
      3. Select function OFFSET
      4. Select the line horizontal line
      5. Offset for example 10 or anything else
      6. The slected line is drawed correctly

      So when you zoom in an out, you will notice, that the offseted line will
      disappear when you zoom in. Also you can't select that line
      --> it's a ghost-line ;-)

      Hope you can reproduce the bug (was in 2.0.4. and 2.0.5. exactly same)...

      Regards

      Andreas

      P.S.: Hope you can fix that bug, because OFFSET is a great and often used
      funftion!


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/librecad/bugs/481/
      https://sourceforge.net/p/librecad/bugs/481

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/
      https://sourceforge.net/auth/subscriptions

       

      Related

      Bugs: #481

  • Dongxu Li

    Dongxu Li - 2014-10-29

    weird bug, I can reproduce this one in windows and linux. Therefore, doesn't look like platform dependent.

    Need to investigate: is this really related to offset, or having problem for all selected lines.

     
  • Dongxu Li

    Dongxu Li - 2014-10-29

    fixed in master branch, https://github.com/LibreCAD/LibreCAD/commit/222d8adf19c9a7bf8e1179c00af313449ee9296b

    the problem is due to buggy getNearestPoint for entity type line. It's amazing that this bug was not triggered in most cases, and for so long.

     

    Last edit: Dongxu Li 2014-10-29
  • LordOfBikes

    LordOfBikes - 2014-10-29

    I've checked the fix, the ghost-line issue is solved, but the offset line still disappears when zooming.
    In the screen shot left you see the line from 20,20 to 80,20 and the marked offset line from 20,30 to 80,30. On the right screen shot, which is next zoom level with mouse wheel, the offset line is gone. Zooming back to previous level brings back the offset line.

     
  • Dongxu Li

    Dongxu Li - 2014-10-30

    Hi Armin,

    I can not get the line disappearing, using the attached dxf.

    I am still wondering whether there's something to do with "offset". Have to review the RS_Modification::offset();

     
  • LordOfBikes

    LordOfBikes - 2014-10-30

    Dongxu,

    the attached file works for me too.
    Only when I start the drawing from scratch, I can reproduce this issue. Even when I save the file, the offset line disappears.
    But after close and reopen, the offset line stays visible to highest zoom level.

    Seems to be an initialisation issue when the offset line is created. Maybe, when read from DXF, the offset line initialised different.

    As I can reproduce it, I will have a look at it.

     
  • LordOfBikes

    LordOfBikes - 2014-10-31

    Dongxu,

    I fixed the disappearing issue. After moving the start and end point of the line, the vMin and vMax vectors was moved twice the offset.
    For my example line the vMin/vMax vectors was from 20/40 to 80/40.
    So at some point, the entity was inside the viewing area, but the borders, kept in vMin/vMax, are outside.

     
    • Dongxu Li

      Dongxu Li - 2014-11-01

      great!

      looks like this bug has been in offset for a while.

      We will try to release a stable 2.0.7 this time, not before doing more QA

       
  • LordOfBikes

    LordOfBikes - 2014-10-31
    • status: open-accepted --> open-fixed
     
  • LordOfBikes

    LordOfBikes - 2014-10-31
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,4 @@
    -libreCAD 2.0.6 (Win)
    +LibreCAD 2.0.6 (Win)
    
     Hello,
    
    @@ -9,9 +9,9 @@
     3. Select function OFFSET
     4. Select the line horizontal line
     5. Offset for example 10 or anything else
    -6. The slected line is drawed correctly
    +6. The selected line is drawn correctly
    
    -So when you zoom in an out, you will notice, that the offseted line will disappear when you zoom in. Also you can't select that line
    +So when you zoom in an out, you will notice, that the offset line will disappear when you zoom in. Also you can't select that line
     --> it's a ghost-line ;-)
    
     Hope you can reproduce the bug (was in 2.0.4. and 2.0.5. exactly same)...
    @@ -20,5 +20,5 @@
    
     Andreas
    
    -P.S.: Hope you can fix that bug, because OFFSET is a great and often used funftion!
    +P.S.: Hope you can fix that bug, because OFFSET is a great and often used function!
    
     
  • LordOfBikes

    LordOfBikes - 2014-11-02

    Please, find a Windows installer from latest source in the files area:
    LibreCAD-Installer-2.0.6-22-gd4e4d9b.exe in NightlyBuilds

     

Log in to post a comment.