mapper icon indicating copy to clipboard operation
mapper copied to clipboard

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

Open lpechacek opened this issue 4 years ago • 3 comments

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

lpechacek avatar Nov 09 '21 15:11 lpechacek

Export a course map to .ocd

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

ghost avatar Nov 10 '21 01:11 ghost

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

lpechacek avatar Nov 10 '21 15:11 lpechacek

J

Mojmi avatar Nov 11 '21 19:11 Mojmi