Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Border lines do not match area outlines at inner corners #1602

Closed
ollesmaps opened this issue May 4, 2020 · 4 comments · Fixed by #1606
Closed

Border lines do not match area outlines at inner corners #1602

ollesmaps opened this issue May 4, 2020 · 4 comments · Fixed by #1606
Assignees
Milestone

Comments

@ollesmaps
Copy link

ollesmaps commented May 4, 2020

Steps to reproduce

  1. create in Ocad building symbol with "sunken" border line.
    See rect2.zip
  2. import to OOM
  3. Rectangle is not right

Mapper Version: 0.9.2
Operating System: Win, Adroid

rect3

@lpechacek lpechacek added the bug label May 4, 2020
@lpechacek
Copy link
Member

This one is scary. The outline symbol has zero width and no color assigned. Still, it renders as a 0.2 mm black line!

On a closer look, I can see that 521.2 (Large Building Outline) has no width assigned but it does have a border line. Manual setting of proper width and unchecking the border checkbox can be considered as a workaround in this case.

Aleš, would you be so kind as to share the original .ocd for easier debugging, please?

@lpechacek lpechacek changed the title Left-angled rectangle Non-right-angled rectangle outline May 4, 2020
@dg0yt
Copy link
Member

dg0yt commented May 5, 2020

On a closer look, I can see that 521.2 (Large Building Outline) has no width assigned but it does have a border line. Manual setting of proper width and unchecking the border checkbox can be considered as a workaround in this case.

That's one of the corner cases which isn't handle sufficiently at the moment_ A border line on an otherwise invisible line. I guess this was chosen in order to have the object path be the real boundary, making it easy to work with imported data, e.g. from OSM, or to switch from solid black to gray with outline.

  • We need to fix the offsetting of the border line when the main line width is zero.
    The current implementation uses the sign of the main line do indicate the side of the border. This doesn't work for zero-width main lines.
  • The UI disables configuring borders for zero-size main lines. This is consistent with the current implementation - but it doesn't clear border configuration which is already present.

Once the issue is corrected, we should consider a similar border configuration for our symbol sets. This might need another tweak: taking care of inside and outside for closed paths. At the moment we only have left side and right side.

The corner

@dg0yt
Copy link
Member

dg0yt commented May 5, 2020

In particular, you see errors with the border at "inner" corners.

@dg0yt dg0yt changed the title Non-right-angled rectangle outline Border lines do not match area outlines at inner corners May 5, 2020
@ollesmaps
Copy link
Author

Thank you guys!
Attached is the Ocad file: building.zip

And you are right this definition was chosen in order to have the object path be the real boundary, making it easy to work with imported data.
Especially urban maps would benefit from this tweak.

@dg0yt dg0yt self-assigned this May 10, 2020
@dg0yt dg0yt added this to the v0.9.3 milestone May 10, 2020
dg0yt added a commit that referenced this issue May 10, 2020
The path of a border line is determined by two factors: the main
offset, indicating the edge of the main line, and an explicit
additional offset.
Mapper used to rely on the main offset being non-zero in order to
distinguish left from right by the sign of the main offset.
With this change, Mapper now uses the totat offset to determine left
or right, thus allowing to use border lines with invisible main lines.
Fixes GH-1602 (wrong area border line path).
dg0yt added a commit that referenced this issue May 10, 2020
The path of a border line is determined by two factors: the main
offset, indicating the edge of the main line, and an explicit
additional offset.
Mapper used to rely on the main offset being non-zero in order to
distinguish left from right by the sign of the main offset.
With this change, Mapper now uses the totat offset to determine left
or right, thus allowing to use border lines with invisible main lines.
Fixes GH-1602 (wrong area border line path).
@dg0yt dg0yt mentioned this issue May 12, 2020
dg0yt added a commit that referenced this issue May 13, 2020
The path of a border line is determined by two factors: the main
offset, indicating the edge of the main line, and an explicit
additional offset.
Mapper used to rely on the main offset being non-zero in order to
distinguish left from right by the sign of the main offset.
With this change, Mapper now uses the totat offset to determine left
or right, thus allowing to use border lines with invisible main lines.
Fixes GH-1602 (wrong area border line path).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants