Skip to content
cadkithome

Changelog

All notable changes are recorded here. The format follows Keep a Changelog; versions follow Semantic Versioning once 1.0 is reached (0.x releases may break).

  • Project website at https://cadkit.org (source in site/, Astro + Starlight): guides for Rust, Python, JavaScript, C and the CLI, the repository docs as reference pages, format pages, an in-browser demo built on cadkit-wasm (files never leave the browser), public project statistics collected daily by cadkit-stats, and community, security, privacy, trademark and brand pages.
  • CODE_OF_CONDUCT.md (Contributor Covenant 2.1), GOVERNANCE.md, SUPPORT.md and TRADEMARKS.md; issue template contact links. Role addresses: security@, conduct@, hello@ and maintainers@cadkit.org.
  • cadkit-capi is published to crates.io with a README; prebuilt C/C++ archives stay on GitHub Releases. 0.5.3 was published from the v0.5.3 sources.
  • Package metadata: homepage https://cadkit.org and authors cadkit maintainers <maintainers@cadkit.org> for every crate, pycadkit and cadkit-wasm (visible on the registries from the next release). SECURITY.md lists security@cadkit.org next to GitHub private vulnerability reporting.
  • New logo: the “C” drawn as a selected CAD arc with grips.
  • WASM CadDocument.pickEntityBounded caps inspection metadata before copying and JSON conversion, reports shortened previews, omits raw properties and rejects exhausted output/work budgets. Legacy pickEntity remains compatible and now copies metadata only after selecting the winning entity.
  • cadkit_dgn::check_structure (also native::structure, and cadkit::dgn::check_structure through the facade) returns a StructureReport of a DGN V8 file without the write feature: sibling trees that are ordered red-black trees and that have the writer’s top-down shape, unused directory slots outside the MS-CFB free form, the writer’s slot order, pages with a page number or population, records without a time and split dictionary pages, with the stable warning codes dgn.cfb_tree_unordered, dgn.cfb_tree_unbalanced, dgn.cfb_tree_shared (a sibling tree reaching entries another storage’s tree holds; analysed once, so the work stays proportional to the directory), dgn.cfb_free_entry, dgn.record_time, dgn.dictionary_page_split and dgn.model_page_counter. CLI: cadkit check-dgn file.dgn prints it as JSON (exit 1 when it has warnings). Not exposed in Python, WASM or C.
  • cadkit_dgn::strip_seed_v8 (facade cadkit::strip_dgn_seed) copies a single-model DGN V8 seed without the drawing content of its model and without the document properties that name people or organisations, for use as the seed of write_v8: graphic records and their XAttributes go, so do by default the model’s control records (model settings, model-level tag sets, raster groups) and every property set stream, replaced by a \u{5}SummaryInformation with code page, application and times only and a \u{5}DocumentSummaryInformation with the code page only. The dictionary (levels, fonts, colour table, tag sets, text styles, views, settings, cell definitions), units and undecoded streams stay byte for byte; the file header and model times are normalised from StripSeedOptions::timestamp_ms and the container is built anew (storages carry that time, the root entry its modification time only, as MS-CFB 2.6.1 requires), so no byte of a removed stream stays in free space. The application name is written as VT_LPSTR, the type MS-OLEPS 2.25.1 gives PIDSI_APPNAME (the observed files store VT_LPWSTR; the reader reads both). StripSeedOptions (keep_controls, keep_raster_template, keep_cell_definitions, model_name, timestamp_ms, application; JSON with defaults, unknown fields rejected) and the returned StrippedSeed / StripSeedReport, which counts what was removed and what remains that may identify the source (named levels, tag sets, cell definitions, model name and description, kept controls, raster file references, undecoded streams). The result is not anonymous: names in the kept tables remain and must be reviewed. Equal input and options give equal bytes; stripping a result again changes nothing. Bindings: CLI cadkit strip-seed in.dgn out.dgn [--keep-controls] [--keep-raster-template] [--drop-cell-definitions] [--model-name NAME] [--timestamp-ms MS] [--application NAME] [--report] (refuses to overwrite its input, also through a symbolic link or, on Unix, a hard link), Python cadkit.strip_dgn_seed(seed, **options) -> (bytes, dict), WASM stripDgnSeed(seed, options?, readOptions?) -> { seed, report }, C cadkit_dgn_strip_seed (seed bytes via cadkit_bytes_free, report JSON via cadkit_string_free) and C++ cadkit::strip_dgn_seed. No stripped seed has been opened in another application.
  • Attribute::color and Attribute::lineweight (optional, with with_color / with_lineweight): the attribute record’s own symbology when it differs from the owning entity’s; None means the owner’s. The DGN reader resolves a tag element’s color through the file color table (or the default palette) and its weight as it does for entities, keeping dgn.color_index / dgn.weight; the SVG renderer draws a displayed attribute in its own color; the DGN writer uses them when the attribute has no explicit dgn.color_index / dgn.weight (the explicit index still wins; a typed color must exist in the seed palette, as for entities); Document::explode_inserts and the DXF writer’s ATTRIB records use them too (ByBlock and None take the insert’s). Both fields are omitted from JSON when unset, so schema_version stays 1 and older JSON reads unchanged (#30).
  • DGN type 11 curves carry their end conditions as dgn.curve_start_tangent / dgn.curve_end_tangent (GDAL dgnlib’s slope at the first and last fit points, not normalised); the DXF writer emits them, normalised, as SPLINE groups 12/13 of fit-point splines (#28). Entity::transformed keeps them under a translation and positive uniform scale only and drops them otherwise (they would describe the untransformed curve).
  • cadkit_dgn::native::TagData::display_rotation interprets the orientation doubles of a tag element by its 3D flag, and reads the quaternions cadkit up to 0.5.2 wrote into 2D tags as such.
  • Warning dgn.complex_count: a complex chain or shape declared more components than it stores and was closed by the next chain or shape header that is itself a component (the pattern reported in #27).
  • cadkit_dgn::palette::exact_index (the writer’s palette match) and nearest_index (the match V8Seed::prepare_document uses for off-palette colors).
  • V8Seed::font_entries (the seed’s font table in stored order, repeated names included) and V8Seed::font_number (exact name, then trimmed ASCII case-insensitive; absent and ambiguous names are distinct Unsupported errors).
  • dgn.text_length_source = "range" on DGN text whose length comes from its element range (V7, and V8 as under Changed).
  • dgn.level_weight_raw / dgn.level_style_raw on layers read from 240-byte level entries: the two fields that presumably hold the level’s weight (0x44) and style (0x40), kept raw; they set no lineweight or linetype.
  • DGN acceptance kit: cargo run -p cadkit --example interchange -- SEED [DIR] writes small synthetic DGN V8 files into a public seed (repacked and stripped seed, every supported geometry kind on new levels, justified, Turkish UTF-16 and windows-1254 and rotated text, a tag set with displayed, rotated and hidden tags, a hidden element, a 2D document in a 3D seed, large coordinates, a new raster attachment with a synthetic 1-bit TIFF beside it, a chained write, ByLayer colour), each read back and compared, checked with check_structure and opened with cfb in strict mode before it is written, plus MANIFEST.json and README.md. docs/dgn/ACCEPTANCE.md is the protocol for opening them in another application; no external acceptance is claimed. The example replaces the former three-file output (01-repacked.dgn, 02-new-geometry.dgn, 03-moved-and-tagged.dgn); synthetic.gml stays.
  • docs/dgn/FORMAT_NOTES.md (“Built-in blank seed”) and tests/blank_seed_evidence.rs record why cadkit ships no built-in blank seed: Dgn~H and Dgn~Mh hold undecoded fields whose values differ between the public writers.
  • DGN flat ellipses and arcs (smaller semi-axis at most 1e-9 of the larger one) are read as Line (the segment the sweep covers along the non-zero axis) or Point (both axes zero) instead of Ellipse { ratio: 0 }, which broke the documented (0, 1] range. The element data stays in dgn.degenerate_ellipse, dgn.primary_axis, dgn.secondary_axis, dgn.center, dgn.start_angle, dgn.sweep_angle and dgn.rotation / dgn.quaternion; the DGN writer writes such an entity back as a line (#24).
  • DGN V8 graphic elements with property bit 0x0080 are read with Entity::visible = false instead of true, following the report in #25 that other readers do not draw them; the raw word stays in dgn.properties. In the corpora only TreeText’s tags carry the bit, so graphics are covered by synthetic records only. V7 elements are unchanged. Written tags take their hidden bit from Attribute::invisible only, so a displayed tag of a hidden entity stays displayed in the file (SVG output skips it with its owner).
  • A complex chain or shape header that follows an unfinished chain or shape closes it instead of becoming its component, so chains in cells no longer nest into each other when a chain declares more components than it stores, the cause of the nesting reported in #27 (the reporter’s files were not available; every chain and shape of the corpora declares exactly the components it stores; the pattern is reproduced synthetically).
  • The bytes of every DGN file write_v8 writes change: the first dword of the model header stream prefix (Dgn~Mh) is the number of graphic and control pages the output holds with records, the relation observed in 552 of 567 private and 3 of 3 public V8 files (it was the seed’s value); a page without records is its 16-byte header (no empty zlib stream). write_v8 and repack_v8 write unused directory slots in the MS-CFB 2.6.3 free form (the cfb crate’s form had a name length of 2). Slot order and the page headers of unchanged seed pages are unchanged.
  • The DGN writer gives a ByLayer entity without its own dgn.color_index the layer’s dgn.color_index (0–255) before trying the layer color, as it does for dgn.weight. Documents read from a file write the same bytes as before (their elements carry their own index); a new ByLayer entity on a colored level is written with that level’s index instead of 0, also into a seed whose palette lacks the layer’s RGB.
  • DGN V8 layers read from 240-byte level entries (the only layout of the private corpus; the three public V8 samples use 104-byte entries) carry the level color: Layer.color is the file palette color of the entry’s color index (0x48), kept in the layer’s dgn.color_index (before, Layer.color stayed ByLayer), so ByLayer entities on them resolve to it (Entity::resolved_color, SVG). Layers from 104-byte entries are unchanged. Evidence: 807 of 853 by-level colored elements of the private corpus sit on the 2.7 % of levels with a nonzero index.
  • DGN V8 text without a stored length (0x80 zero) takes its length from the element range when it is unrotated, not empty, has property bit 0x1000 clear and its range starts at the origin (as V7 text already did), instead of characters × character width; it is no longer marked dgn.text_length_estimated. MicroStation’s stored lengths equal the range width within 1e-3 on 303 of 303 such texts of the private corpus; the change affects test_dgnv8’s three ODA texts (no private text: the unmeasured ones are empty), and a rewrite stores the range-derived length.
  • A text style naming a font that the seed’s font table stores with two different numbers is rejected (“text font style is ambiguous in seed”) unless dgn.font_number picks one; before, the last entry won silently. The writer now knows the numbers of every entry of a repeated name, not only the last. prepare_document drops such a style like an unknown one.
  • A non-integer dgn.style is rejected instead of being ignored.
  • WriteOptions::preserve_seed_controls (default on) drops a seed control record only when a dependency linkage of it names a seed graphic as a root. Before, every 8-byte window of the record equal to a graphic id dropped it; on the observed files such windows only hit field values (the exponent bytes of doubles, small constants), so writes that replace the model lost TreeText’s and Water’s model settings record and 83 of the 5,018 non-raster control records of the private corpus, among them 6 type 99 components of type 100 groups whose header stayed. Writes into a seed whose model holds no graphic are unchanged. Raster control groups keep their rules.
  • DGN V8 names stored as UTF-16LE after an ff fe byte-order mark (string linkages: level, model, cell and tag set names, descriptions, unit labels; UTF-16 model index and font names) are decoded as UTF-16 instead of byte-wise "ÿþ…" text cut at the first NUL byte. ff fe 01 00 keeps its meaning (8-bit text follows) (#26).
  • DGN 2D tag elements store their display rotation as an angle at 0x100, as reported in #29 (the reporter’s files were not available; the only 2D tags of the corpora, TreeText’s, are unrotated); it was read as a quaternion, so [π, 0, 0, 0] came out unrotated. 3D tags keep the quaternion, and the writer now stores an angle for tags written into a 2D seed. The 2D tags cadkit up to 0.5.2 wrote hold a quaternion and still read with their rotation: a 2D tag storing exactly (-1, 0, 0, 0) or (w, 0, 0, z) with z ≠ 0 and w² + z² = 1 (within 1e-9) is read as a quaternion, so only a 2D angle of exactly −1 rad would be misread. A non-finite stored angle reads as 0 instead of failing a later export.
  • Documents read from DGN files whose elements take color or weight from their level (dgn.color_index / dgn.weight 0xFFFFFFFF, style 0x7FFFFFFF) are written back with those values instead of failing with “extended DGN color table entries” or a weight above 31 (51 of 54 such private files failed; 52 now write back, the other two fail on unrelated content). prepare_document keeps them on elements and tags.
  • Mesh faces written by write_v8 inherit the mesh’s line style, lineweight, visibility and dgn.style / dgn.weight / dgn.color_index, as polygon rings do (they kept level and color only).
  • The writer’s raw CFB directory walk stops at the header’s FAT sector count and at a repeated DIFAT sector, and walks a sibling subtree that several storages share once.
  • write_v8 and repack_v8 order rebuilt sibling trees as the cfb crate does (MS-CFB 2.6.4 simple case conversion: a character maps to its uppercase only when that is one character, ᾀ-type Greek letters to their titlecase form, supplementary characters by code point). Before, the first character of the full uppercase was compared per UTF-16 unit, so a seed with a stream named, say, ß… beside T… was rewritten into a file the cfb crate rejects. ASCII names order as before.
  • write_v8 on a version 4 seed (4096-byte sectors) no longer corrupts the FAT. The directory rebalancing added in 0.3.6 placed sector n at 512 + n * 4096 instead of (n + 1) * 4096 (a version 4 header fills a whole sector), so it read FAT entries as directory entries, wrote colour flags into the FAT and left the real directory unbalanced. The output could not be opened again as a seed (“Malformed FAT”).
  • cadkit::to_svg_bounded, cadkit_core::svg::render_bounded and WASM CadDocument.toSvgBounded reject SVG output or work-budget exhaustion without returning a partial drawing. The UTF-8 output cap covers XML, layer names, definitions, intermediate SVG strings and final assembly. Existing SVG entry points retain their truncation behavior.
  • Present cadkit as a modular CAD engine, with a module map, document operations, geometry/scene/rendering boundaries and clearer supported file input/output.
  • Align package descriptions and READMEs with the current APIs, document the scene bridge and CPU handoff, and clarify 0.5 migration and the untested DWG R13 scope.

0.5 is the deliberate breaking release that settles the API: later 0.5.x releases only add. See “Migrating from 0.4” below.

  • Constructors and with_* setters for every model and option type (Layer::new, Block::new, Model::new, Linetype::new, TextStyle::new, Attribute::new, AttributeDisplay::new, Warning::new, SourceInfo::new, Units::new, Limits::new, WalkOptions::new, BBoxOptions::new and new() on the reader/writer options).
  • Document::schema_version (SchemaVersion, currently 1) in the document JSON, typed Error::SchemaVersion for other versions, and an optional schemars feature on cadkit-core with the committed schema docs/schema/document-v1.schema.json.
  • LimitKind on Error::LimitExceeded, naming the Limits field, a work or output budget, or a format capacity overflow.
  • cadkit_dgn::Symbology with the dgn.level_id / dgn.color_index / dgn.weight / dgn.style key constants, and V8Seed::palette, levels, fonts and timestamp_ms.
  • cadkit_gml::tkgm::Severity for profile findings.
  • New cadkit-scene crate (GPU-free, WASM-compatible): Plan2d, a chunked 2D store of lines, polylines, arcs and circles with documented GPU instance encoding, per-frame f32 error budget checks, overlay cut-outs and CPU fallback; Mesh3d / MeshScene / MeshBudget and the error-checked relative_positions f64 to f32 conversion.
  • New cadkit-gpu crate on wgpu 30 (re-exported): PlanRenderer for Plan2d frames (analytic antialiased lines and arcs, mitred corners, hairline fading, premultiplied blending, per-generation chunk uploads), MeshRenderer with OrbitCamera and incremental mesh/camera updates, RenderTargetCache, render_texture, render_offscreen, mesh_budget, typed GpuErrors and a block_on helper. CI runs its rendering tests on Mesa lavapipe.
  • cadkit-scene feature document: document::plan_document turns the visible entities of a Document model (blocks and arrays expanded) into plan items with resolved colors, lineweight widths, layer groups and SVG-like contrast against the background; curves that do not stay circular are flattened. A DocumentPlanReport counts what is not drawn (text, hatches, points, images, unknown records, dashes drawn solid). cadkit-gpu/examples/render_png.rs renders a DWG, DXF or DGN file to PNG with it.
  • cadkit_core::svg::with_contrast, the stroke contrast rule of the SVG export.
  • Breaking: Document, SourceInfo, Units, Layer, Linetype, TextStyle, Block, Model, Entity, Attribute, AttributeDisplay, Warning, the enums EntityKind, Value, Format, ModelKind and GroupKind, and the option structs Limits, ReadOptions, SvgOptions, BBoxOptions, WalkOptions, cadkit_dgn::WriteOptions, SeedPrepareOptions, cadkit_gml::ExportOptions, ImportOptions, ValidationOptions and ProfileIssue are #[non_exhaustive]. Color, Lineweight, HatchEdge, DimensionType and LengthUnit mirror closed sets of the formats and stay exhaustive.
  • Breaking: Error::LimitExceeded(String) is now Error::LimitExceeded { limit, message }; the error text is unchanged.
  • Breaking: ProfileIssue::severity is a Severity; its JSON stays "error" / "review".
  • Document JSON written by this version starts with "schema_version": 1. JSON without the field still reads.
  • CI runs cargo-semver-checks, so 0.5.x releases stay additive.
  • Struct literals of the types above no longer compile outside cadkit. Use the constructors and setters, or start from Default::default() / new() and assign fields: Layer { name, color, ..Layer::default() } becomes Layer::new(name).with_color(color). Layer::new makes a visible, plottable layer; Layer::default() keeps every flag false. TextStyle::new sets a width factor of 1.
  • match on EntityKind, Value, Format, ModelKind or GroupKind needs a _ arm.
  • Replace Error::LimitExceeded(message) patterns with Error::LimitExceeded { message, .. }.
  • Compare ProfileIssue::severity with Severity::Error / Severity::Review (or severity.as_str()).
  • The C ABI, the Python and WASM APIs and the JSON of the options are unchanged.
  • Independent cadkit-geom crate with analytic curves, polygon booleans and source provenance, calibration, trim/offset, and certified NURBS evaluation, tessellation and nearest-point search.
  • Optional schemars feature, unconditional serde support, explicit numerical budgets, English API documentation and synthetic extreme-input regressions.
  • Raise the workspace MSRV from Rust 1.85 to 1.88 for the pinned i_overlay 9.0.0 geometry dependency.
  • Update existing workspace code to the lint spelling enabled by Rust 1.88 (let chains, fixed-size chunk iteration and divisibility checks), without changing the format or binding contracts.

Header inspection, CAD document operations and binding/CLI parity, with additional format coverage and explicit export controls. Existing 0.3.x option-struct layouts are retained.

  • Header-only inspection and stream-oriented facade helpers, feature selection, and a prelude.
  • Document transformations, unit conversion, block expansion, geometry utilities and reusable DGN V8 seed preparation with explicit unit/dimension/symbology conversion.
  • Additional SVG hatch/dimension/linetype handling, binary DXF and CAD entity support, CityGML curve/geometry handling, and legacy OEM code-page decoding/byte export.
  • Python inspection, reusable V8Seed, immutable document operations and updated typing; additive C/C++ entry points with immutable result handles and CMake/pkg-config installation.
  • CLI JSON summaries, bounded stdin/stdout conversion, output code pages, geometry filters and shell completion scripts without extra Cargo dependencies.
  • WASM option/result types and object options, document operations and geometric picking; viewer code-page, visibility, coordinate, selection and GML export controls.
  • GML shell diagnostics handle extreme finite coordinates without integer-overflow panics.
  • Reader/export bounds, encoding, geometry and cross-format fidelity edge cases, backed by synthetic regressions. Reader/export paths also avoid several temporary allocations.
  • Circular viewer picking uses analytic XY distance; display-hidden layers are excluded from selection. GML export requires an explicit CRS and explicit metadata-only opt-in.
  • C ABI struct layouts and existing entry points remain unchanged; failed operations reset outputs and immutable block expansion reports exhausted work limits instead of a partial copy.
  • English repository documentation/public messages, contribution and security guidance, issue/PR templates, deterministic fuzz seeding and release checks.
  • Expanded API and architecture documentation and C++ contract testing in CI.

DGN CFB directory trees, page header counters, and default element timestamps match MicroStation V8 output.

  • write_v8 orders the CFB directory with Dgn~H at slot 1, Dgn~S at slot 2, and Dgn-Md at slot 3 (each storage before its child streams, ^AH before $1 in Dgn^GA/Dgn^CA), and rebalances every storage’s child sibling tree in place using top-down 2-3-4 red-black insertion in directory slot order. The cfb crate wrote storages first and left sibling trees as unbalanced all-black chains.
  • All DGN $ page streams (Dgn^G, Dgn^C, Dgn^GA, Dgn^CA, Dgn^Nm, Dgn^NmA) write (page_number, population) == (0, 0) at bytes 8..16 of the 16-byte page header, and Dgn-Md/#000000/Dgn^CA/^AH is preserved when preserve_seed_controls is enabled.
  • When WriteOptions::timestamp_ms is 0.0, write_v8 defaults element timestamps to the seed’s Dgn~H timestamp at offset 0x130.

DGN dictionary pages keep the seed’s layout, so a level table is no longer split across pages.

  • write_v8 no longer joins the seed’s dictionary records (Dgn^Nm) and re-splits them into new 256 KiB pages. A level table split over two pages is not loaded as one table by MicroStation: every element showed on “Default”. Every seed page now keeps its number and record order; a page whose records did not change keeps its stream byte for byte (empty pages included), a changed page is rewritten in place, and new tables and tag sets share one new page after the seed’s last page. No table or complex element crosses a page; only max_decompressed_bytes bounds a page (exceeding it is a LimitExceeded error, nothing is split silently).
  • Dictionary and XAttribute page headers write page number and population 0, as on every surveyed file. XAttribute records move with their elements.
  • A new level entry is appended to the level table’s page with the seed entries’ flags and a fresh level code (+0x5C), instead of the first level’s code. Seeds written by earlier cadkit versions (split tables) are repaired on write.
  • The workspace builds with its declared MSRV (Rust 1.85) again: the DGN writer no longer uses let chains (since 0.3.2).

DGN raster attachments can name a file beside the DGN instead of a machine path.

  • A new raster attachment whose path is relative and names a file beside the DGN stores no machine-specific location: a bare file name writes the name and an empty full path, .\name (or ./name) is stored as given. Absolute paths still write the file:// URL. Relative paths into other folders are rejected.
  • An empty raster full path or file name reads as absent: the image path falls back to the file name and no empty dgn.raster_path is reported.

DGN raster attachments can be written into seeds that hold none.

  • New raster attachments no longer need a seed attachment to clone: a seed without one gets a built-in attachment group made of the bytes every surveyed attachment shares, with a bitonal display (white foreground, black background) and 200 DPI unless dgn.raster_dpi is set. seed_has_raster_template still tells whether the seed’s own group is used.

DGN seeds with a second level table no longer move new elements to the wrong level.

  • Some seeds (most 3D files a CityMax-style post-processor wrote) hold a second level table whose level codes repeat those of the first table. Elements store the code only, so elements written on a first-table level read back, and displayed, on the second table’s level of the same code. The writer now keeps the first definition of each code, moves later definitions to free codes above the highest one and keeps a single level table header with the total count.

DGN raster attachments: frames are placed the way MicroStation stores them, and new attachments can be written by cloning one from the seed.

  • DGN raster frames read 0x108/0x110 as the edge lengths along the image axes (width·|a|, height·|b|), not as an XY extent: u_vector = â·ext_x, v_vector = b̂·ext_y. Rotated and sheared frames no longer fall back to their range; dgn.raster_outside_range and dgn.raster_range_placement no longer occur on any frame of the private corpus.
  • DGN raster frames report size_px (edge lengths over the pixel axis lengths) and the props dgn.raster_dpi (dgn.raster_dpi_y when it differs), dgn.raster_rotation and dgn.raster_skew (radians).
  • write_v8 writes an Image without an id (with path and size_px) as a new raster attachment cloned from a complete attachment of the seed, rewriting only ids, cross links, the file name and file:// path, placement, resolution and level. Optional props: dgn.raster_file, dgn.raster_dpi, dgn.raster_dpi_y.
  • seed_has_raster_template(seed, &ReadOptions) tells whether a seed can receive new raster attachments.

DGN V8 output that MicroStation draws: element ranges, string lengths and displayed tags now follow the layout of MicroStation and ODA files.

  • Attribute gains layer, display (AttributeDisplay: height, width, style, alignment, rotation) and props; struct literals need the new fields or ..Default::default(). Serialized documents omit them when empty.
  • DGN reading returns each tag’s own level, the presentation of displayed tags and the tag symbology that differs from its target.
  • Raster frames are placed from their stored extent relative to the transform origin; the dgn.raster_extent_shared warning, an artifact of reading that extent as a corner, is gone.
  • DGN V8 element ranges store the low corner and the extent for every graphic type, not an absolute high corner; MicroStation skipped elements below zero, which read as negative extents. The reader resolves ranges the same way.
  • DGN text payloads and string linkages no longer count a terminating NUL, which MicroStation drew as an extra glyph; tag values keep their counted NUL.
  • The DGN code page linkage on text matches MicroStation byte for byte; tags no longer carry it.
  • DGN text without a style or font number uses font 0 instead of the alphabetically first seed font.
  • DGN cell headers write 1 at 0x6C and absolute body bounds, as ODA and MicroStation cells do.
  • DGN displayed tags in MicroStation’s layout: own level, origin at the owner’s first vertex with an offset to the display point, size, font, justification, text-box range and the 56-byte tag target dependency.
  • WriteOptions::preserve_seed_controls (default on) keeps seed control records such as the coordinate system and model settings, with their auxiliary data.
  • DGN writing reproduces graphic groups and MicroStation’s undecoded 0x0600 property and 0x00C0 type-word flags carried in entity props.
  • DGN V8 measured text range spans and absolute model/cell bounds, including rotated text and nonzero seed origins.
  • Seed font validation rejects foreign indexes and name/index mismatches while retaining external resource fonts actually referenced by seed graphics.
  • ByLayer lineweight resolves explicit native layer indexes; millimetre-only, unresolved ByBlock and out-of-range native weights require explicit conversion.

CityGML export reports, GML circles and an optional local TKGM preflight. Closed CAD polylines now stay curves in generic GML export (see Changed).

  • Reported generic CityGML export with explicit metadata-only handling for unsupported geometry, available in Rust, CLI, Python, WASM and C/C++.
  • Exact GML Circle export/import, synthetic new/edit/reopen checks, and bounded local TKGM preflight with required city-model tender / Digital Building registration profile selection and explicit unchecked rules. Neither establishes official acceptance; contract-specific tender-year conditions remain unchecked.
  • Closed CAD polylines remain curves in generic GML export instead of being implicitly reclassified as polygons; explicit surfaces remain strictly checked.

First release. Packages: cadkit and its format crates on crates.io, pycadkit on PyPI (imports as cadkit), cadkit-wasm on npm, and CLI and C API archives on GitHub Releases.

  • Readers for DXF (ASCII and binary, R12 to 2018), DWG (AC1014 to AC1032, including 2007), DGN V7 and DGN V8 (including tags) and CityGML 2.0, all into one format-neutral document model. Readers treat input as untrusted: no panics, configurable limits, recoverable problems become warnings.
  • Writers: JSON, SVG and ASCII DXF (R12 to 2018); seed-based DGN V8 geometry and tag export with stream-preserving CFB repacking; CityGML 2.0 native read/write with explicit generic geometry export, bounded XML and reference handling, geometry diagnostics and independent official-schema tests.
  • DGN V8 writer coverage: all 15 documented text justification codes, exact zero-width bulged-polyline decomposition and retention of unchanged seed raster attachments (preserve_seed_rasters). See docs/dgn/FORMAT_NOTES.md for the supported subset; external application acceptance is pending.
  • Format-neutral polygons with interior rings, SVG even-odd fill and DXF hatch boundaries; a separate polygon planarity tolerance (planarity_tolerance, CLI --planarity-tolerance, default 0.01 coordinate units) for CityGML validation and DGN output, while intersection checks keep 1e-6.
  • Bindings: the cadkit CLI (info, layers, convert, dump, validate-gml, repack-dgn), Python (pycadkit), JavaScript/WebAssembly (cadkit-wasm, browser and Node entry points) and a stable C ABI with a header-only C++17 wrapper.
  • Fuzz targets for every reader and for the DXF, DGN and CityGML writers, run in CI.
  • CI on Linux, Windows and macOS (fmt, clippy, tests, MSRV 1.85, cargo-deny, wasm, Python, C API, official CityGML XSD validation, fuzz smoke) and a release workflow that publishes all packages from one tag after approval (docs/RELEASING.md).

Fixed during development, before this first release:

  • DGN writer on Windows: seed streams were matched by a \-separated path, so seed graphics were kept and colliding new pages were dropped. Undecodable seed pages are now an error instead of being dropped silently.
  • DGN V8 reader: a final CFB sector cut short by the end of the file no longer drops the stream when the bytes it needs are present.
  • DGN writer: integer tags beyond the signed 32-bit range are written as doubles instead of failing; stored 3D quaternions are conjugated so rotated text, ellipses and tilted geometry keep their orientation; unnamed tag sets stay unnamed and standalone type-37 tags are written without an invented owner.
  • DGN reader and writer share deterministic level names, preserving membership and IDs for duplicate or unnamed seed levels.
  • No DWG or DGN V7 writer. Full DGN V8 coverage and acceptance by external applications remain open.
  • No automatic TKGM/CityMax building inference or receiving-system acceptance.
  • DWG R13 (AC1012) is untested; entity coverage of all readers is still growing.