#18847 closed defect (fixed)
[Patch RFC] Circle Arc tool creates unconnected nodes
Reported by: | Hb--- | Owned by: | GerdP |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Plugin utilsplugin2 | Version: | |
Keywords: | arc node | Cc: |
Description (last modified by )
What steps will reproduce the problem?
- Draw a way with some nodes.
- Select non-adjacent nodes like 2, 4 and 5 and the way.
- Invoke Circle Arc tool (Shift+C)
What is the expected result?
A circle arc formed between the segments 2, 3 and 4.
What happens instead?
Some free nodes gets created (under node 3 in the screenshot).
The current behavior does not fit to the "Method 3" from the help and not to the authors comments in the class header.
URL:https://josm.openstreetmap.de/svn/trunk Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b Last:Changed Date: 2020-02-29 00:28:12 +0100 (Sat, 29 Feb 2020) Build-Date:2020-02-29 02:31:03 Revision:15958 Relative:URL: ^/trunk Identification: JOSM/1.5 (15958 en) Windows 7 64-Bit OS Build number: Windows 7 Professional (7601) Memory Usage: 1450 MB / 3604 MB (1269 MB allocated, but free) Java version: 1.8.0_212-b03, AdoptOpenJDK, OpenJDK 64-Bit Server VM Screen: \Display0 1280x1024 Maximum Screen Size: 1280x1024 VM arguments: [-Djosm.home=testrun] Program arguments: [--language=en] Dataset consistency test: No problems found Plugins: + utilsplugin2 (35334) Last errors/warnings: - W: Failed to parse external taginfo data at https://josm.openstreetmap.de/remote/geofabrik-index-v1-nogeom.json: Invalid token=EOF at (line no=6119, column no=2252, offset=359085). Expected tokens are: [CURLYOPEN, SQUAREOPEN, STRING, NUMBER, TRUE, FALSE, NULL] - E: Failed to locate image 'https://josm.openstreetmap.de/browser/trunk/images/copy.svg?format=raw'
Attachments (4)
Change History (17)
by , 5 years ago
Attachment: | unconnected-nodes.png added |
---|
comment:1 by , 5 years ago
Description: | modified (diff) |
---|---|
Keywords: | arc node added |
comment:2 by , 5 years ago
follow-up: 4 comment:3 by , 5 years ago
IIGTR the action should just show a notification saying e.g. "select three consecutive way nodes" in this case?
comment:4 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Replying to GerdP:
IIGTR the action should just show a notification saying e.g. "select three consecutive way nodes" in this case?
Forget that. The help clearly states what should happen.
by , 5 years ago
Attachment: | circle-arcs.osm added |
---|
comment:5 by , 5 years ago
Looking at the code I don't think that it ever worked as described in the pictures for "One way and three of its nodes selected"
I wonder what to do when other ways are connected to the selected nodes. Try my modified example and watch how way w2 changes its position.
What should happen when a way is connected to a node which is not selected but between the selected nodes?
comment:6 by , 5 years ago
It should be similar to complete circles. Have a look at roundabouts. There the nodes with other parents are moved as less as possible and the nodes without another parent are squeezed around them. Better even change the order of the nodes in the way than moving nodes with additional parents a lot.
by , 5 years ago
Attachment: | 18847.1.patch added |
---|
follow-up: 10 comment:8 by , 5 years ago
The patch changes the code to work similar to "Align Nodes in Circle" but it adds nodes to produce a circle.
The patched code still uses preference circlearc.angle-separation
which has a default of 20 while actions like "Create Circle" calculate a value near 4 for large circles and much higher value for small circles (see #10777)
I think it would be better to use the same calculation and ignore circlearc.angle-separation
.
by , 5 years ago
Attachment: | 18847.2.patch added |
---|
comment:9 by , 5 years ago
Summary: | Circle Arc tool creates unconnected nodes → [Patch RFC] Circle Arc tool creates unconnected nodes |
---|
18847.2.patch removes the evaluation of circlearc.angle-separation
as suggested in comment:8
A lot of the code is a copy of CreateCircleAction or AlignInCircleAction.
If nobody complains I'll commit this tomorrow.
comment:10 by , 5 years ago
Replying to GerdP:
I think it would be better to use the same calculation and ignore
circlearc.angle-separation
.
+1
Seems the algo calculates the points at the right place but fails to join the way to them.