Repository navigation
Conversation
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.
Note: All modifications are AI-generated code.
Summary
A set of fixes so that DWG/DXF files read/written by ACadSharp open cleanly in
AutoCAD and round-trip (DWG → DWG / DXF) with correct geometry, associations,
and content. The changes are based on the current upstream line (v3.8.16).
This is a fairly large, multi-topic PR. I've grouped the fixes below so they can
be reviewed theme-by-theme.
Dependency: DomCR/CSUtilities
This PR depends on a companion change in DomCR/CSUtilities — a fix to the
Matrix3(Matrix4)constructor. Without it, the transform fixes in this PR(ellipses, text rotation, arc angles) come out mirrored. The
src/CSUtilitiessubmodule is pointed at that commit.
Please merge the CSUtilities change first, or let me know if you'd prefer I
re-point the submodule.
What's fixed
R2007 (AC1021) DWG write
compressed stored data (previously both over compressed data → "Error
decrypting data").
uncompressed for AC1021.
maxPageSize + 32, so large preview data no longer overflows and shifts pages.Tables (AcDbTable)
the whole table (Error 34 eWrongObjectType).
Dimensions & DIMASSOC
(associativity / trans_space / rotated_type / dimension object) — was reversed,
so native files' associations came out misaligned.
SHAPE
doesn't drop it.
"shape number/index <= 0".
Coordinate / transform (ApplyTransform)
series, Spline, TableEntity; Insert scaling/rotation; Ellipse axis vectors +
normal (with the CSUtilities Matrix3 transpose fix).
XDATA / string encoding
Round-trip fidelity
hook line/text width/association, PDFUnderlay scale/rotation, Text/Attrib/Shape
default omission, Wipeout clip close, HatchPattern angle, Spline nodes.
Gradient fill
order, LWDISPLAY header variable.
Object stream / handle alignment
(HardOwnership), UCS/VIEW control-object handle slots, table-style soft pointer.
Verification
geometry, associations, and content match.
AutoCAD reference.
Notes for reviewer