mirror of
https://github.com/storytold/cadcraft.git
synced 2026-11-10 04:19:59 -06:00
ZWCAD writes every paper-space VIEWPORT with id (69) -1. The reader cast it to u32, so no viewport was the sheet (id 1); on save paper_views() added a second sheet viewport ahead of the real one, which DWG readers then numbered 2: a model viewport showing the whole sheet, inflating the layout's extents. A non-positive 69 now reads as 0, and a layout whose viewports all have id 0 gets them numbered in file order, the first being the sheet. A layout mixing known ids with -1 is left as before (pinned by a test). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>