Repository navigation
Decode HATCH, DIMENSION_*, LEADER, ATTRIB/ATTDEF and CAD Unicode escapes - #79
Merged
Merged
Conversation
…ch-dimensions-and-attribs
…ch-dimensions-and-attribs
mahach666
changed the base branch from
feat/blocks-sheets-and-viewer2d
to
main
December 2, 2026 21:03
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
\U+XXXXUnicode escapes (e.g.\U+043C->м) and%%d/%%p/%%c/%%%sequences inDwgEntity.PlainTextandStripMTextFormatting.ATTRIB/ATTDEF+ block markers (Decode TEXT, MTEXT, ATTRIB and ATTDEF entities #24, Decode block references and definitions: INSERT, MINSERT, BLOCK, ENDBLK and SEQEND #25):DwgAttribDataand binary decoders forATTRIB(0x02) andATTDEF(0x03, R2007+ lock flag and R2018+ embedded MTEXT handling).BLOCK(0x04),ENDBLK(0x05),SEQEND(0x06) sodwgio inspectno longer counts structural block markers asUnknown.!IsInvisible) and constant visibleATTDEFs intoDwgSceneReaderannotations andDwgSvgExporter.DIMENSION_*(all 7 subtypes0x14–0x1A) (Decode more geometry: polylines, curves, solids, hatches, dimensions and leaders #28):DwgDimensionData(UserText,ActualMeasurement,TextMidPoint,DefinitionPoint,XLine1Point,XLine2Point) and read the trailing*DanonymousBlockHeaderHandle.*Ddimension graphics viaFlattenBlockinDwgSceneReader(with fallback extension/text rendering when no block is attached).HATCH(0x4E) &LEADER(0x2D) (Decode more geometry: polylines, curves, solids, hatches, dimensions and leaders #28):HATCHR2004+ gradient header, boundary polyline paths (with bulges), and edge paths (lines, circular/elliptical arcs, splines) intoDwgHatchData/DwgHatchLoop, rendering outlines inSceneTopology.Lines, solid fills via 2D ear-clipping (SceneTopology.Trianglesslightly offset to prevent z-fighting), SVG paths, and JSON metadata.IsFlat2DSceneso flat 2D hatches keep--mode autoin 2D mode.LEADERpath vertices intoDwgSceneReaderandDwgSvgExporter.Verification
dotnet test DwgIO.slnx -c Release --no-restore(includingHatchDimensionAttribTests): 301 passed, 0 failed, 1 skipped (AppInfoHistory_PreservesTheRawSection) onnet8.0andnet10.0.dwgio inspecton sample Revit DWG exports (0Unknownentities onLevel 1,0diagnostics,40hatches,8dimensions) and Playwright visual inspection of rendered HTML output.