libredwg icon indicating copy to clipboard operation
libredwg copied to clipboard

prescan objects with -v4

Open rurban opened this issue 2 years ago • 0 comments
trafficstars

In order to display the type and name of each handle, starting with HEADER, we'd need to prescan all objects (HANDLES) at least for the type, for table records even up to its name. Currently we can display it only for back references, not future objects.

e.g.

reactors[0]: (4.1.C) abs:12 [H* 330] => DICTIONARY 
ownerhandle: (12.1.E) abs:381 [H 330] => BLOCK_HEADER bloko
layer: (5.1.8A) abs:138 [H 8] => LAYER Tavolo 3

Benefit: Many ODA errors stem from invalid references. This way we could easier see where they are pointing to.

Cost: Abstract decode_section_handles for all 3 versions. Seperate handles and decode_add_object code for 2000, 2004 and 2007. From 1 phase to 3 phases:

  • 0 for single-pass (-v3),
  • 1 for first pass (allocate objects and skip),
  • 2 for second pass (already allocated, full object from spec).

rurban avatar Jun 30 '23 06:06 rurban