Repository navigation
Preserve ACIS modeler data when rewriting DWG files - #1350
Open
jogibear9988 wants to merge 1 commit into
Open
jogibear9988 wants to merge 1 commit into
jogibear9988 wants to merge 1 commit into
Conversation
Port the remaining acad-ts c4ecf35b, 319474b1 and 887fc2bc behavior after upstream's modeler refactor: preserve SAT/SAB and ASM payloads, wireframes, material mappings and revision metadata, and emit R2013+ AcDs geometry. Keep upstream DXF serialization, public Guid/HasWireframeData APIs and hard-ownership history handles. Remove duplicated entity-writer cases. Round-trip imported sample payloads across DWG versions and verify that the public revision GUID survives DWG-to-DXF conversion.
This branch has not been deployed
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.
Description
Rewriting a DWG containing
Solid3D,RegionorCadBodycan lose imported ACIS geometry or its wireframe/revision data. The inline reader returns before consuming the complete modeler record, binary ASM payloads are not recognized, and R2013+ output does not write the AcDs geometry section.This preserves the existing SAT/SAB/ASM payload bytes through DWG conversions, reads the rest of the modeler record at the correct position, and writes the geometry's AcDs data and handle indexes for R2013+. It uses master's public modeler GUID API and modeler templates, retaining material handle references alongside their raw mapping values.
Tasks done in this PR
Related Issues / Pull Requests
Extracted from #1316, source commit
52af836f. This PR contains one implementation commit on currentmaster(90c6f871); it can be reviewed and merged independently. The aggregate PR #1316 remains unchanged and continues to hold the other fixes. Large-payload blob paging is a separate follow-up retained there.The source behavior comes from acad-ts
c4ecf35b,319474b1and887fc2bc.Notes for reviewer
A reproducible case is loading an existing
samples/sample_AC1027.dwg, writing it withDwgWriter, then reading the result and comparing every modeler entity'sAcisDataby handle.ModelerGeometryWriterTests.SamplePayloadsSurviveVersionConversionsperforms this check for 36 source/target combinations. The synthetic tests also verify inline payloads, wireframe coordinates and GUID preservation through a subsequent DXF conversion.Validation on this isolated branch:
dotnet test src/ACadSharp.Tests/ACadSharp.Tests.csproj -f net9.0 --filter FullyQualifiedName~ModelerGeometryWriterTests: 14 passed.ArcTests.CreateFromBulgeTest,ArcTests.GetCenter, and the culture/scientific-format case inDimensionStyleTests.GetLinearMeasurementText.git diff --checkpasses.These are library roundtrip/build results; independent ODA conversion has not been run for this standalone PR. ACIS payload preservation does not provide a modeling engine.
AI-assisted port and extraction, with source comparison, isolated regression testing and review of the resulting diff.