Commit Graph
10 Commits
Author SHA1 Message Date
Hakan SevenandClaude Opus 5.5 56861aa0bc Escape DGN text in MTEXT and read 3D text by its byte count
Backslashes and braces in a DGN text stay characters in the MTEXT it
becomes instead of turning into formatting codes.

A 3D V8 text is cut at its stored byte count before it is decoded, so a
multi-byte character no longer shifts where the text ends.

Doc comments that had slipped onto the wrong functions are back on
their own, comments describe the behaviour instead of pointing at
another program, and a few lines added in the previous commits are laid
out the way the rest of the code is.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:25:27 +03:00
Hakan SevenandClaude Opus 5.5 11ef1efc43 Keep DGN 3D line strings in 3D and fill filled complex shapes
A line string, shape or complex chain whose points are not all at one z
becomes a 3D polyline instead of a 2D polyline flattened to the first
point's elevation; its arcs then come in as points. Chain vertices are
de-duplicated on all three coordinates, and only arcs in the drawing
plane become bulges.

A filled complex shape gets its solid hatch like a filled simple shape,
following the outline's arcs. The hatch keeps the outline's elevation
and is left out when the outline is not at one z.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:11:49 +03:00
Hakan SevenandClaude Opus 5.5 ed4dc91670 Keep DGN reference attachments and cell instances well-formed
Plain -DGNIMPORT no longer writes drawings next to referenced files on
its own: references are ignored unless the window (or the kept import
settings) asks to translate them or attach them as underlays.

A referenced file named relative to the host is looked up in the host's
folder rather than the working directory. Its translated drawing takes
a file name made from the model name with path separators and other
reserved characters replaced, so it is always written in the
reference's own folder. A reference placed in sub units is scaled by the
same factor as its origin.

Layer, block, text style and reference names read from the file are
made valid symbol names (reserved characters become underscores).

An instance of a cell that has no block (the point display cell, an
empty or missing definition) is dropped instead of inserting a block
that does not exist.

"Prompt to overwrite" still keeps an existing translated drawing; the
code now says so instead of implying a prompt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:11:18 +03:00
ramox81andClaude Opus 5.5 b686d5cbe8 DGNIMPORT: V8 text styles; 3D text ends at its byte count
A V8 file's text style table comes in as text styles (a style the drawing
has keeps its own; Standard stays Standard), and each text or text node
takes the style its text style linkage names. A 3D text's characters end
at the byte count the element gives, so a byte after them is no longer
read as a character.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:52:33 +03:00
ramox81andClaude Opus 5.5 952cc0326d DGNIMPORT: V7 3D files, V7 cells, filled shapes as solid hatches
A 3D V7 design file's points keep their z, ellipses, arcs and text take
their plane from the element's quaternion, and shared cell instances
their 3x3 transformation and z. A V7 cell (type 2) brings its components
in as a block of its own placed at the origin, as a V8 one does. A
filled shape (V7 or V8) comes in as its outline followed by a solid
hatch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 21:20:47 +03:00
ramox81andClaude Opus 5.5 8f20f0aef6 Merge upstream main; follow the boxed MText codec type and the updated palette branch
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:56:46 +03:00
ramox81andClaude Opus 5.5 dca6c9d116 DGNIMPORT: cells inside shared cell definitions are part of the definition; empty cells stay out
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:58:28 +03:00
ramox81andClaude Opus 5.5 6fdff6c515 DGNIMPORT: reference naming, cells, text placement, curves, references
Name clashes, DGNIMPORTMODE and prefixing as the reference names them;
V7 cell copies, unshared cells and mirrored placements as blocks;
justified text and text nodes placed at their justification points with
the reference's MTEXT contents; B-spline curves as splines and 3D arcs and
ellipses in their own planes; every V8 level as a layer; design models
only; reference attachments translated, ignored or attached as underlays.
The colour index palette comes from the codec fix it depends on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:33:07 +03:00
Hakan SevenandClaude Opus 5.5 e4d04ef132 Cargo: codec e023bc3 (acadrust sync), kernel abca4e8, graph c63556f
The codec now holds wide EntityType variants boxed (MText, Helix,
Dimension, Hatch, Viewport, MultiLeader, Surface, Table, Ole2Frame,
Light, Extended). Constructors box their entity; nested patterns reach
a dimension through entities::dimension::as_dimension(_mut). Also
follows BlockAction::action_ids, LineTypeComplexData::source_flags and
the decimal tab stop with an explicit character.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 09:17:01 +03:00
ramox81andClaude Opus 5.5 f29f386148 import: IMPORT window and DGNIMPORT converting DGN models to drawing objects
The DGN V7/V8 readers expose each element (level, symbology, geometry,
complex chains, text nodes, shared cells). DGNIMPORT / -DGNIMPORT convert a
model with the Standard mapping into a new drawing; IMPORT opens the
Import File window and routes PDF and DGN files to their importers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 16:09:12 +03:00