Repository navigation
Conversation
pt1/pt2 were hardcoded to TS1.dwg sample coordinates. The OLE2FRAME payload starts with a 0x80-byte header: after a 2-byte prefix, four WCS corners as little-endian 3D doubles. DXF groups 10/11 are the first and third corners. * src/decode.c (dwg_decode_ole2): Parse pt1/pt2 from data when data_size >= 98; otherwise zero them.
Contributor
|
We should store the 3rd point also, even if ignorable. But this needs a CLA |
Contributor
|
I'll rewrite it by my own. the 128-byte header are some numbers and the 4 corners. |
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.
Summary
Fixes #1528.
dwg_decode_ole2hardcodedpt1/pt2to TS1.dwg sample coordinates.Change
Parse the four WCS corners from the 0x80-byte OLE2FRAME header (skip 2-byte prefix; DXF 10/11 = first and third corners). Zero them if
data_size < 98.Test plan
dwgread -v3on a drawing with OLE2FRAME and compare DXF 10/11 against AutoCAD/ODA