OpenOrienteering / mapper

OpenOrienteering Mapper is a software for creating maps for the orienteering sport.
https://www.openorienteering.org/apps/mapper/
GNU General Public License v3.0
400 stars 106 forks source link

Cut control circles are imported as full circles (.ocd) #2003

Open lpechacek opened 2 years ago

lpechacek commented 2 years ago

Steps to reproduce

  1. Set a course in OCAD, cut circles for better detail visibility
  2. Export a course map to .ocd
  3. Open the map in Mapper

Actual behaviour

Circles that were cut come up as full circles again, without any import warning. image

Expected behaviour

Either circles should be cut, or there should be a warning about an unsupported feature.

Discussion

Merely for the record here. This is not a hint that we should implement circle cutting.

Control point circle cutting is an undocumented feature in the .ocd format documentation. However, it turns out that there might be more than one record in the Poly array of the TOcadObject structure. The first coordinate is the point object placement. The second and following records are the circle cut angles as pairs of 32-bit signed integers in the case of cut circles. The pairs encode the cut start angle and end angle in tenths of degrees. The angles are in the range <-180.0; 180.0> degrees with zero on the right and positive angles going counter-clockwise. Mind that these angles are combined with the whole point object rotation (the TOcadObject.Ang value).

These cuts apply to all (hollow) circles in the symbol regardless of their position within the point symbol definition itself.

Configuration

Mapper Version: 0.9.5 Operating System: Linux

ghost commented 2 years ago

Export a course map to .ocd

May you provide sample of such .ocd file for testing?

lpechacek commented 2 years ago

Here's the sample. The file structure can be analyzed in detail using lpechacek/ocd-dump and/or Kaitai Struct web IDE.

Correct rendering: vystrizene-kolecko

Archive with info: vystrizene-kolecko.zip

Mojmi commented 2 years ago

J