Opened 16 years ago
Closed 16 years ago
#3571 closed defect (fixed)
[PATCH] orthogonalizing tool do not work proper
Reported by: | Owned by: | bastiK | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | undo orthogonalize | Cc: |
Description
If a closed way has some extra nodes and the way is orthogonalized then undoing fails in at least the attached case. This is the only situation where I've seen this so I can't say if there are other cases.
Simply try the attached case and you will see what I mean.
Stable (r1981) does not have this problem since it refuses to orthogonalize such ways.
Attachments (4)
Change History (19)
by , 16 years ago
Attachment: | undo-error.osm added |
---|
comment:1 by , 16 years ago
Priority: | normal → critical |
---|---|
Summary: | Undo fails after orthogonalizing shape with JOSM r2180 → orthogonalizing tool do not work proper |
by , 16 years ago
Attachment: | ortho-error.osm added |
---|
comment:2 by , 16 years ago
Owner: | changed from | to
---|---|
Priority: | critical → major |
comment:3 by , 16 years ago
bastiK, are you working on this track? I looked into the code and it looks like in r2014 (#3205) the check for bad angles was removed but the edges with bad angles are still there and sometimes produce a way with nonsense values. At least for bug reported by vsandre, not sure about andre68.
Please let me know if you're working on a patch or if I should do that.
comment:4 by , 16 years ago
I'm currently at a rework of the orthogonalizing tool - it's almost done, so no need to fix this.
comment:5 by , 16 years ago
I suppose the rework won't make it into the next tested.
So if you think it's an easy fix - go ahead!
by , 16 years ago
Attachment: | orth.patch added |
---|
comment:7 by , 16 years ago
Summary: | orthogonalizing tool do not work proper → [PATCH] orthogonalizing tool do not work proper |
---|
Remake of the orthogonalize tool.
New:
- No longer required, that the way is closed.
- Multiple ways sharing mulitiple nodes are handled better.
- The two (optional) reference nodes stay fixed.
As a side effect it is now possible to extend a way keeping the exact same direction. (However, it's not very straightforward.)
What it not does: Ignore angles of 45 degrees as requested by the user in #3657. There is a workaround, though: Add an auxilary way on top of the old, covering only the orthogonal parts. Orthogonalize and remove it.
comment:8 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | new → needinfo |
Why do we need a specific menu point for undoing Ortho?
comment:9 by , 16 years ago
Owner: | changed from | to
---|---|
Status: | needinfo → new |
comment:10 by , 16 years ago
What menu point? It shouldn't show up in the menu.
Sometimes the shape contains nodes that are already perfectly well placed.
This could be some imported data or something else. Then it is convenient to take back the orthonalization for certain nodes.
However, I'm not entirely happy with the way this feature is exposed to the user.
The only way to find out about it, is to read the usage dialog (requires, that the user has tried the tool on unsuited selection) or to read the (nonexistent) help in the wiki.
comment:11 by , 16 years ago
Well, ok I misread the patch. What do the changes in MainMenu.java do? You changed the type of the action variable and add another variable which is unused. Why?
Regarding the help --> you can add some info at http://josm.openstreetmap.de/wiki/Help/Action/Orthogonalize?action=edit
comment:12 by , 16 years ago
It's a new JosmAction with it's own shortcut. (Shift-Q, hope this doesn't conflict with plugins.)
I thought this is the place, where all Actions are initialized, so I put it there.
It can be placed in the constructor of OrthogonalizeAction as well, but then you have a "two in one" action.
Don't know, what's less confusing...
I see this would have needed some commenting. :)
by , 16 years ago
Attachment: | orth-2262.patch added |
---|
comment:15 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The problem occurs when the start/end-node of the rectangle is not in an edge but in the middle of two egdes.
I add an other case of a strange behaviour of this function. The left node is the start node of the rectangle.