Modify

Opened 9 years ago

Last modified 8 years ago

#10286 new defect

extruder: problem with shared nodes

Reported by: skyper Owned by: team
Priority: normal Milestone:
Component: Core Version: latest
Keywords: template_report extruder shared node Cc: Hojoe

Description (last modified by skyper)

What steps will reproduce the problem?

  1. Draw two rectified rectangle closed ways with one overlapping segment and two nodes in common.
  2. extrude (single align) on side with one shared node of one area to the inside

What is the expected result?

The shared node remains only part of the untouched area and a new shared node is created at the new corner or the opposite considerering ids (new <-> old).

What happens instead?

The shared node remains shared and a new node only connected to the changed area is created.

Please provide any additional information below. Attach a screenshot if possible.

I changed the settings for "ignore-shared-nodes" but it did not change anything.

Have a look at attached example file.

screenshot

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2014-07-20 01:36:10
Last Changed Author: stoecker
Revision: 7318
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2014-07-19 21:12:28 +0200 (Sat, 19 Jul 2014)
Last Changed Rev: 7318

Identification: JOSM/1.5 (7318 en) Linux Debian GNU/Linux 7.6 (wheezy)
Memory Usage: 259 MB / 882 MB (126 MB allocated, but free)
Java version: 1.7.0_55, Oracle Corporation, OpenJDK 64-Bit Server VM
Java package: openjdk-7-jre:amd64-7u55-2.4.7-1~deb7u1
VM arguments: [-Djosm.home=/tmp/.josm]
Program arguments: [--language=en, extrude_ex2.osm]
Dataset consistency test: No problems found

Attachments (5)

extrude_ex3.osm (4.1 KB) - added by skyper 9 years ago.
sample file
extrude_ex3.png (34.2 KB) - added by skyper 9 years ago.
screenshot
V6XgIG67[1] (57.7 KB) - added by akks 9 years ago.
2014-07-21 19_33_39-_ Java OpenStreetMap Editor.png (10.8 KB) - added by akks 9 years ago.
correct attachement
ExtrudeAction.java.patch (2.5 KB) - added by Hojoe 9 years ago.

Download all attachments as: .zip

Change History (19)

Changed 9 years ago by skyper

Attachment: extrude_ex3.osm added

sample file

comment:1 Changed 9 years ago by skyper

Description: modified (diff)

Changed 9 years ago by skyper

Attachment: extrude_ex3.png added

screenshot

comment:2 Changed 9 years ago by akks

I got another result from "before" part of example osm-file:

Last edited 9 years ago by akks (previous) (diff)

Changed 9 years ago by akks

Attachment: V6XgIG67[1] added

Changed 9 years ago by akks

correct attachement

comment:3 Changed 9 years ago by akks

Is this result correct? (or the node ids should be checked?)

comment:4 in reply to:  3 Changed 9 years ago by skyper

Replying to akks:

Is this result correct? (or the node ids should be checked?)

I did not check the node ids, so far. Would be the next step.

Your example is about extruding to the outside while I am talking about extruding to the inside, e.g. smaller size.

comment:5 Changed 9 years ago by akks

Oh, sorry. Looking again...

comment:6 Changed 9 years ago by akks

Reproduced and located the code: https://josm.openstreetmap.de/browser/josm/trunk/src/org/openstreetmap/josm/actions/mapmode/ExtrudeAction.java#L633

Looking for fix...

P.S. It is not so easy and certainly incorrect (after ctrl-z the result changes sometimes).

Last edited 9 years ago by akks (previous) (diff)

comment:7 Changed 9 years ago by Hojoe

That's a rounding problem. If the epsilon is larger, then it seems to work. I add a small patch with a epsion of 1e-2. I hope this helps.

Changed 9 years ago by Hojoe

Attachment: ExtrudeAction.java.patch added

comment:8 Changed 9 years ago by Hojoe

Summary: extruder: problem with shared nodes[Patch]extruder: problem with shared nodes

comment:9 Changed 9 years ago by Hojoe

Cc: Hojoe added

comment:10 Changed 8 years ago by bastiK

In 7791/josm:

see #10286 - add test for Geometry class

comment:11 Changed 8 years ago by bastiK

1e-2 is 5 degrees. That's too large and probably has unwanted consequences.

The rounding error comes from Geometry.getLineLineIntersection as the test in [7791] demonstrates.

comment:12 Changed 8 years ago by bastiK

In 7792/josm:

see #10286 - fix numerical rounding problems

comment:13 Changed 8 years ago by bastiK

Rounding error is fixed, but the original problem remains for me.

comment:14 Changed 8 years ago by skyper

Summary: [Patch]extruder: problem with shared nodesextruder: problem with shared nodes

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to skyper
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.