Repository navigation
DXF reader: an omitted material map source means a file map (#906) - #907
Merged
HakanSeven12 merged 2 commits intoDec 3, 2026
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AutoCAD writes the map source codes only for scene (0) and procedural (2) sources. Reading them as 0 lost the source, and the DWG writer then dropped the map file names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
acsgh
marked this pull request as ready for review
December 3, 2026 20:59
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.
Closes #906
Commits:
530fdec5Red tests (tests/dxf_material_map_source_default.rs): a minimal AC1032 DXF with one MATERIAL. With no source codes, all six maps (diffuse, specular, reflection, opacity, bump, refraction) must read as source 1; with explicit 0, 1 or 2 the written value must win; and a diffuse file name with no 72 must survive saving as DWG. Onmain,an_omitted_map_source_reads_as_a_file(diffuse source 0) anda_map_file_name_without_a_source_survives_saving_as_dwg(source 0, file name dropped) fail; the explicit-source test passes.2b6675feFix:read_materialsets the six map sources to 1 before reading the group codes, so an omitted code means "file" as in AutoCAD's DXF, and a written one still wins. The three tests pass.Red commit confirmed in CI (run 47190590094: the two tests above fail; nothing else fails).
Ran on the last commit:
cargo test: 3722 passed, 0 failedCloses #Nis aboveBug: red-tests commit first, fix commit second, same PR
cargo testpasses on the last commit (say what you ran)No formatting-only or unrelated changes
🤖 Generated with Claude Code