Repository navigation
Pin the 3D polyline closed-flag round trip with a test (W4-2) - #657
Merged
Merged
Conversation
The D016 packet-4 census of the tutorials' Surface-1A.dwg reported the built _EG-BNDY 3D polyline (192 vertices, the EG surface boundary) as open while the oracle's is closed. The writer carries the flag: the loss was in the corpus builder, which never set the typed field (fixed on the parity/corpus-roundtrip branch). Pin the behavior the packet depends on with a DWG round-trip test: a closed 3D polyline reads back closed with its vertices bit-exact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cites the D016 packet-4 finding W4-2: "the writer dropped a 3d polyline's closed flag" (tutorials' Surface-1A.dwg,
_EG-BNDYboundary, 192 vertices — closed in the oracle, open in the rebuilt file, the only RAW diff).Root cause (investigated to the wire)
The 3D-polyline writer does carry the typed flag:
write_polyline3dwrites byte 2 frome.flags.closed, and the builder maps it back (dwg_document_builder.rs,closed_flag & 1). A synthetic closed-polyline DWG round trip already keptclosed=truewith bit-exact vertices. The loss was in the corpus builder (examples/corpus_roundtrip.rs on the parity/corpus-roundtrip branch), which constructedPolyline3Dfrom the manifest without settingp.flags.closed— the lwpolyline builder already sets its flag. That fix went to the corpus branch (schoeller/cadcodecbranchparity/w4-2-plines-closed, offdd184638); the rebuilt Surface-1A now matches: closed flags[false, false, true]and compare_verify all BIT-EXACT.This PR
No behavior change — it pins the behavior the packet depends on with a DWG round-trip test: a closed 3D polyline reads back closed, still 3D, with its vertices bit-exact. Full suite green on this tip (3302 passed / 0 failed).