feat(dwg2text): Add MTEXT formatting strip and dimension text extraction - #30
Merged
Merged
Conversation
- Add stripMTextFormatting() function to remove MTEXT formatting codes and extract plain text content (handles \P, \S, font specs, etc.) - Support Japanese yen symbol (U+00A5) as escape character in MTEXT - Add MTEXT entity handling to printText() function - Add dimension entity text extraction (linear, aligned, angular, etc.) - Fix dwg2txt script path to use .libs directory for development builds - Set LD_LIBRARY_PATH for shared library loading - Add .serena to .gitignore Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
rurban
reviewed
Jan 22, 2026
|
|
||
| # Check if dwg2text exists | ||
| DWG2TEXT="${SCRIPT_DIR}/dwg2text" | ||
| DWG2TEXT="${SCRIPT_DIR}/../dwg2text/.libs/dwg2text" |
There was a problem hiding this comment.
This is wrong. The libtool wrapper is there and provides a proper LD search path fix up already. Just portable. This is not
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
Changes Made
MTEXT Formatting Support (
dwg2text/dx_iface.cpp)stripMTextFormatting()function that removes MTEXT formatting codes:\P) converted to newlines\\,\{,\}) converted to literal characters\fFont|...;) stripped\L,\O,\Kfor underline/overline/strikethrough) removed\Snum^denom;) converted tonum/denomformat{ }removedprintText()functionDimension Text Extraction (
dwg2text/dx_iface.cpp)DIMLINEAR- Linear dimensionsDIMALIGNED- Aligned dimensionsDIMANGULAR- Angular dimensions (2 lines)DIMANGULAR3P- Angular dimensions (3 points)DIMRADIAL- Radial dimensionsDIMDIAMETRIC- Diametric dimensionsDIMORDINATE- Ordinate dimensionsBuild Script Fixes (
bin/dwg2txt).libsdirectory for autotools development buildsLD_LIBRARY_PATHexport for shared library loadingMiscellaneous
.serenato.gitignoreTesting
🤖 Generated with Claude Code