OpenOrienteering / mapper

OpenOrienteering Mapper is a software for creating maps for the orienteering sport.
https://www.openorienteering.org/apps/mapper/
GNU General Public License v3.0
400 stars 106 forks source link

Automatic Dash Points (Feature Request) #582

Open arenol opened 8 years ago

arenol commented 8 years ago

I am generally unhappy with the dash point implementation. Generally, I like to draw all lines without dash points, and then set the few dash points needed manually afterwards. However, OOM seem to switch on dash points mode ALLWAYS(?) whenever I select the curve tool in the right-click menu. It is quite annoying.

However, I believe it is possible to have a setting where dash points are added automatically. It should work in the following way:

I don't think this is too difficult to implement, and it would improve the drawing experience a great deal.

Agnar

yevhenmazur commented 8 years ago

Agree with @arenol . Dash points should be turned off by default for all tools except Rectangle.

dg0yt commented 8 years ago

The term "dash point" is little bit overloaded. Which symbols are you referring to?

yevhenmazur commented 8 years ago

Hm, you are right. dashed points turned on by default only for symbol 709.2 'Out-of-bounds area' and for my helper symbol (based on 709.2). Any way, can I turn off this behaviour somewhere in symbol settings?

arenol commented 8 years ago

Dear Kai,

I'm referring to the dash points a long any line (I call lines 'paths' from Adobe Illustrator); those that are marked with a diamond when you select a feature. Automatic dash point generation would be very useful when drawing foot paths, form lines and other dashed features.

I think there's a bug in OOM. For the time beeing, whenever I select the "S" in the right click menu, I allways get dash point mode, meaning that every point I add becomes a dash point. It wasn't like that before, and I don't understand why (I've submitted another ticket for this).

Btw. I experienced a few crashes with 0.57, but 0.6 seems to be stable, although I haven't tested it for a long time.

Kind Regards, Agnar

On 09.01.2016 21:13, Kai Pastor wrote:

The term "dash point" is little bit overloaded. Which symbols are you referring to?

— Reply to this email directly or view it on GitHub https://github.com/OpenOrienteering/mapper/issues/582#issuecomment-170276367.

Agnar Renolen eMap as (www.emap.no) Vegamot 4B. 7049 Trondheim m: 489 50 480

dg0yt commented 8 years ago

Dear Agnar,

I can't reproduce that dash points would always be turned on. As far as I can see, dash points are automatically activated for 516 Powerline (having a "dash point symbol"), but not for 506 Footpath (where the dash point is a particular way of drawing the line). So far the heuristics works as intented.

In addition to the existing behaviour, I understand that you ask for a convenient way for automatically adding junction style dash points at sharp path bends, and when creating a junction by starting a new path.

arenol commented 8 years ago

On 11.01.2016 09:13, Kai Pastor wrote:

Dear Agnar,

I can't reproduce that dash points would /always/ be turned on. As far as I can see, dash points are automatically activated for 516 Powerline (having a "dash point symbol"), but not for 506 Footpath (where the dash point is a particular way of drawing the line). So far the heuristics works as intented.

I did work like that for a while on my computer. But now the logic is completely inverted. It seems that there is variable "toggling" in your code for the dash point mode, and that somehow the variable got inverted, so the code is toggling the variable the wrong way. It persists from session to session.

Maybe you can reproduce the problems by "inverting" the variable in a settings file?

It is really annoying, because I have to press the space bar every time I select the "S".

In addition to the existing behaviour, I understand that you ask for a convenient way for automatically adding junction style dash points at sharp path bends, and when creating a junction by starting a new path.

Yes, on the paths you snap to when starting or ending the new path, or crossing mid way.

Btw. adding dash points on the end of a foot path, will make the path dashing look strange in Ocad if you save to Ocad format.

Agnar

— Reply to this email directly or view it on GitHub https://github.com/OpenOrienteering/mapper/issues/582#issuecomment-170460692.

Agnar Renolen eMap as (www.emap.no) Vegamot 4B. 7049 Trondheim m: 489 50 480

dg0yt commented 8 years ago

I can't see how it could be inverted: dash points are set in src/tool_draw_path.cpp, when a particular flag is set:

    if (draw_dash_points)
        coord.setDashPoint(true);

This flag is activated when the symbol is a line symbol and it has a dash symbol (and it is toggled by the space key):

void DrawPathTool::updateDashPointDrawing()
{
    if (is_helper_tool)
        return;

    Symbol* symbol = editor->activeSymbol();
    if (symbol && symbol->getType() == Symbol::Line)
    {
        // Auto-activate dash points depending on if the selected symbol has a dash symbol.
        // TODO: instead of just looking if it is a line symbol with dash points,
        // could also check for combined symbols containing lines with dash points
        draw_dash_points = (symbol->asLine()->getDashSymbol() != NULL);

        updateStatusText();
    }
    else if (symbol &&
        (symbol->getType() == Symbol::Area ||
         symbol->getType() == Symbol::Combined))
    {
        draw_dash_points = false;
    }
}

So there is no setting involved...

dg0yt commented 8 years ago

The above code probably doesn't take properly into account the case that a dash symbol might be defined (!= NULL) but invisible: If I modify one of the 506 Footpath dash symbol dimensions, I end up with dash point mode defaulting to being activated. We need to clear the dash symbol when it is invisible.

arenol commented 8 years ago

Makes sense...

Agnar

On 12.01.2016 08:39, Kai Pastor wrote:

The above code probably doesn't take properly into account the case that a dash symbol might be defined (|!= NULL|) but invisible: If I modify one of the 506 Footpath dash symbol dimensions, I end up with dash point mode defaulting to being activated. We need to clear the dash symbol when it is invisible.

— Reply to this email directly or view it on GitHub https://github.com/OpenOrienteering/mapper/issues/582#issuecomment-170825804.

Agnar Renolen eMap as (www.emap.no) Vegamot 4B. 7049 Trondheim m: 489 50 480

dg0yt commented 8 years ago

You may now test the unstable build if it solves the problem with unwanted dash points for 709.2 and other line symbols. There are no dangerous changes since 0.6.1 in yesterday's build.

I edited the original post to reflect sub-issues. It will need more consideration: The new automatism could be unwanted for some other symbols. In the end, we could need additional settings.

arenol commented 8 years ago

I'll look into it late this evening.

Agnar

Agnar Renolen eMap as (www.emap.no) Vegamot 4B, 7049 Trondheim tlf: 489 50 480 (dir)

On 14.01.2016 07:26, Kai Pastor wrote:

You may now test the unstable build if it solves the problem with unwanted dash points for 709.2 and other line symbols. There are no dangerous changes since 0.6.1 in yesterday's build.

I edited the original post to reflect sub-issues. It will need more consideration: The new automatism could be unwanted for some other symbols. In the end, we could need additional settings.

— Reply to this email directly or view it on GitHub https://github.com/OpenOrienteering/mapper/issues/582#issuecomment-171546798.

arenol commented 8 years ago

That's better :-)

Agnar

On 14.01.2016 07:26, Kai Pastor wrote:

You may now test the unstable build if it solves the problem with unwanted dash points for 709.2 and other line symbols. There are no dangerous changes since 0.6.1 in yesterday's build.

I edited the original post to reflect sub-issues. It will need more consideration: The new automatism could be unwanted for some other symbols. In the end, we could need additional settings.

— Reply to this email directly or view it on GitHub https://github.com/OpenOrienteering/mapper/issues/582#issuecomment-171546798.

ollesmaps commented 6 years ago

I would welcome automatic dash points also on elipses. On the first point of input and also on the opposite side of elipse. As it is now - I must add dash points in these places anyway afterwards.

ollesmaps commented 3 years ago

Symbols (with mid symbols) and with many possible acute angles (fences, walls) would also benefit from automatic dash points.