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

Losing "Hatch/Structure oriented to north when rotating the map" symbol property in Ocad files. #1677

Open
andzs opened this issue Jul 13, 2020 · 4 comments
Assignees
Labels
Milestone

Comments

@andzs
Copy link

andzs commented Jul 13, 2020

Steps to reproduce

  1. Open attached Ocad12 Sample.ocd file in OOM. Sample.zip

  2. Rotate map (Map->Rotate) in OOM for 15 degrees for example. In OOM everything works fine. Appearance of symbols on map
    is correct after rotation.

  3. Save this map back in Ocad 12 format as Sample_rotated.ocd

  4. Open map Sample_rotated.ocd in Ocad12 and rotate it back (Map->Transform->Rotate Map) by -15 degreees and uncheck "Rotate objects with symbols oriented to North".

Actual behaviour

Resulting map is oriented back, but symbol appearance is wrong. Pattern of marshes and vegetation symbols is rotated because
symbol definitions are lacking "Hatch/Structure oriented to north when rotating the map" property.

Expected behaviour

Editing Ocad files in OOM and saving back in ocd format should retain "Hatch/Structure oriented to north when rotating the map" property of symbols.

Configuration

Mapper Version: 0.9.3
Operating System: OS Name: Microsoft Windows 10 Pro OS Version: 10.0.18362 N/A Build 18362

@lpechacek lpechacek added the bug label Jul 27, 2020
@lpechacek
Copy link
Member

Confirmed. Mapper makes objects rotatable. This is a bug in the importer routines. Thanks for the report!

@lpechacek
Copy link
Member

I've got a fix and now I'm investigating why the defect was not caught by automated testing.

For the record, simplified test routine:

  1. Open the attached Ocad12 Sample.ocd file in OOM.
  2. Select one of the objects and try to rotate its pattern with Rotate pattern tool

Actual behavior:
The pattern happily rotates.

Expected behavior:
The Rotate pattern tool is disabled and no pattern rotation is possible.

lpechacek added a commit to lpechacek/mapper that referenced this issue Jul 28, 2020
Area fill pattern north orientation must be respected in .ocd import.

Closes OpenOrienteeringGH-1677
@dg0yt dg0yt self-assigned this Aug 15, 2020
@dg0yt dg0yt added this to the v0.9.4 milestone Aug 15, 2020
dg0yt added a commit that referenced this issue Aug 16, 2020
Find corresponding symbols in actual and expected map, and compare
key properties.
Covers GH-1677 (OCD format losing hatch/structure oriented to north).
dg0yt added a commit that referenced this issue Aug 16, 2020
Find corresponding symbols in actual and expected map, and compare
key properties.
Covers GH-1677 (OCD format losing hatch/structure oriented to north).
@dg0yt dg0yt closed this as completed in 918dd9b Aug 24, 2020
@lpechacek
Copy link
Member

I'm reopening the issue as my original fix was wrong. The explanation is in #1926 (comment).

@lpechacek lpechacek reopened this Mar 31, 2021
@lpechacek
Copy link
Member

My thoughts on this issue as of today.

  • The "area pattern rotation" means two different things. The Mapper interpretation is "the angle between the pattern and the magnetic north shall be ZERO".
  • The alternate interpretation is "the angle between the pattern and the magnetic north shall be CONSTANT."

I always read ISOM with the first interpretation in mind. The second one feels awkward to me. That said, I propose that we set the "pattern oriented to the north" flag when the imported symbol has a north orientation and all the objects using this symbol have zero rotation. If there is an object with non-zero rotation using a north-oriented symbol, we will reset the symbol pattern flags and issue an import warning.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants