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 oncadkit-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.mdandTRADEMARKS.md; issue template contact links. Role addresses: security@, conduct@, hello@ and maintainers@cadkit.org.
Changed
Section titled “Changed”cadkit-capiis 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.organd authorscadkit maintainers <maintainers@cadkit.org>for every crate,pycadkitandcadkit-wasm(visible on the registries from the next release).SECURITY.mdlists security@cadkit.org next to GitHub private vulnerability reporting. - New logo: the “C” drawn as a selected CAD arc with grips.
0.5.3 - 2026-11-16
Section titled “0.5.3 - 2026-11-16”- WASM
CadDocument.pickEntityBoundedcaps inspection metadata before copying and JSON conversion, reports shortened previews, omits raw properties and rejects exhausted output/work budgets. LegacypickEntityremains compatible and now copies metadata only after selecting the winning entity. cadkit_dgn::check_structure(alsonative::structure, andcadkit::dgn::check_structurethrough the facade) returns aStructureReportof a DGN V8 file without thewritefeature: 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 codesdgn.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_splitanddgn.model_page_counter. CLI:cadkit check-dgn file.dgnprints it as JSON (exit 1 when it has warnings). Not exposed in Python, WASM or C.cadkit_dgn::strip_seed_v8(facadecadkit::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 ofwrite_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}SummaryInformationwith code page, application and times only and a\u{5}DocumentSummaryInformationwith 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 fromStripSeedOptions::timestamp_msand 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 asVT_LPSTR, the type MS-OLEPS 2.25.1 givesPIDSI_APPNAME(the observed files storeVT_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 returnedStrippedSeed/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: CLIcadkit 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), Pythoncadkit.strip_dgn_seed(seed, **options) -> (bytes, dict), WASMstripDgnSeed(seed, options?, readOptions?) -> { seed, report }, Ccadkit_dgn_strip_seed(seed bytes viacadkit_bytes_free, report JSON viacadkit_string_free) and C++cadkit::strip_dgn_seed. No stripped seed has been opened in another application.Attribute::colorandAttribute::lineweight(optional, withwith_color/with_lineweight): the attribute record’s own symbology when it differs from the owning entity’s;Nonemeans 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, keepingdgn.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 explicitdgn.color_index/dgn.weight(the explicit index still wins; a typed color must exist in the seed palette, as for entities);Document::explode_insertsand the DXF writer’s ATTRIB records use them too (ByBlockandNonetake the insert’s). Both fields are omitted from JSON when unset, soschema_versionstays 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::transformedkeeps them under a translation and positive uniform scale only and drops them otherwise (they would describe the untransformed curve). cadkit_dgn::native::TagData::display_rotationinterprets 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) andnearest_index(the matchV8Seed::prepare_documentuses for off-palette colors).V8Seed::font_entries(the seed’s font table in stored order, repeated names included) andV8Seed::font_number(exact name, then trimmed ASCII case-insensitive; absent and ambiguous names are distinctUnsupportederrors).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_rawon 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 withcheck_structureand opened withcfbin strict mode before it is written, plusMANIFEST.jsonandREADME.md.docs/dgn/ACCEPTANCE.mdis 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.gmlstays. docs/dgn/FORMAT_NOTES.md(“Built-in blank seed”) andtests/blank_seed_evidence.rsrecord why cadkit ships no built-in blank seed:Dgn~HandDgn~Mhhold undecoded fields whose values differ between the public writers.
Changed
Section titled “Changed”- 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) orPoint(both axes zero) instead ofEllipse { ratio: 0 }, which broke the documented(0, 1]range. The element data stays indgn.degenerate_ellipse,dgn.primary_axis,dgn.secondary_axis,dgn.center,dgn.start_angle,dgn.sweep_angleanddgn.rotation/dgn.quaternion; the DGN writer writes such an entity back as a line (#24). - DGN V8 graphic elements with property bit
0x0080are read withEntity::visible = falseinstead oftrue, following the report in #25 that other readers do not draw them; the raw word stays indgn.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 fromAttribute::invisibleonly, 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_v8writes 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_v8andrepack_v8write unused directory slots in the MS-CFB 2.6.3 free form (thecfbcrate’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
ByLayerentity without its owndgn.color_indexthe layer’sdgn.color_index(0–255) before trying the layer color, as it does fordgn.weight. Documents read from a file write the same bytes as before (their elements carry their own index); a newByLayerentity 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.coloris the file palette color of the entry’s color index (0x48), kept in the layer’sdgn.color_index(before,Layer.colorstayedByLayer), soByLayerentities 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 (
0x80zero) takes its length from the element range when it is unrotated, not empty, has property bit0x1000clear and its range starts at the origin (as V7 text already did), instead ofcharacters × character width; it is no longer markeddgn.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_numberpicks 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_documentdrops such a style like an unknown one. - A non-integer
dgn.styleis 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 febyte-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 00keeps 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)withz ≠ 0andw² + 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.weight0xFFFFFFFF, style0x7FFFFFFF) 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_documentkeeps them on elements and tags. - Mesh faces written by
write_v8inherit the mesh’s line style, lineweight, visibility anddgn.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_v8andrepack_v8order rebuilt sibling trees as thecfbcrate 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,ß…besideT…was rewritten into a file thecfbcrate rejects. ASCII names order as before.write_v8on a version 4 seed (4096-byte sectors) no longer corrupts the FAT. The directory rebalancing added in 0.3.6 placed sectornat512 + n * 4096instead 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”).
0.5.2 - 2026-11-01
Section titled “0.5.2 - 2026-11-01”cadkit::to_svg_bounded,cadkit_core::svg::render_boundedand WASMCadDocument.toSvgBoundedreject 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.
0.5.1 - 2026-10-25
Section titled “0.5.1 - 2026-10-25”Documentation
Section titled “Documentation”- 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.0 - 2026-10-24
Section titled “0.5.0 - 2026-10-24”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::newandnew()on the reader/writer options). Document::schema_version(SchemaVersion, currently 1) in the document JSON, typedError::SchemaVersionfor other versions, and an optionalschemarsfeature oncadkit-corewith the committed schemadocs/schema/document-v1.schema.json.LimitKindonError::LimitExceeded, naming theLimitsfield, a work or output budget, or a format capacity overflow.cadkit_dgn::Symbologywith thedgn.level_id/dgn.color_index/dgn.weight/dgn.stylekey constants, andV8Seed::palette,levels,fontsandtimestamp_ms.cadkit_gml::tkgm::Severityfor profile findings.- New
cadkit-scenecrate (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/MeshBudgetand the error-checkedrelative_positionsf64 to f32 conversion. - New
cadkit-gpucrate onwgpu30 (re-exported):PlanRendererforPlan2dframes (analytic antialiased lines and arcs, mitred corners, hairline fading, premultiplied blending, per-generation chunk uploads),MeshRendererwithOrbitCameraand incremental mesh/camera updates,RenderTargetCache,render_texture,render_offscreen,mesh_budget, typedGpuErrors and ablock_onhelper. CI runs its rendering tests on Mesa lavapipe. cadkit-scenefeaturedocument:document::plan_documentturns the visible entities of aDocumentmodel (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. ADocumentPlanReportcounts what is not drawn (text, hatches, points, images, unknown records, dashes drawn solid).cadkit-gpu/examples/render_png.rsrenders a DWG, DXF or DGN file to PNG with it.cadkit_core::svg::with_contrast, the stroke contrast rule of the SVG export.
Changed
Section titled “Changed”- Breaking:
Document,SourceInfo,Units,Layer,Linetype,TextStyle,Block,Model,Entity,Attribute,AttributeDisplay,Warning, the enumsEntityKind,Value,Format,ModelKindandGroupKind, and the option structsLimits,ReadOptions,SvgOptions,BBoxOptions,WalkOptions,cadkit_dgn::WriteOptions,SeedPrepareOptions,cadkit_gml::ExportOptions,ImportOptions,ValidationOptionsandProfileIssueare#[non_exhaustive].Color,Lineweight,HatchEdge,DimensionTypeandLengthUnitmirror closed sets of the formats and stay exhaustive. - Breaking:
Error::LimitExceeded(String)is nowError::LimitExceeded { limit, message }; the error text is unchanged. - Breaking:
ProfileIssue::severityis aSeverity; 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.
Migrating from 0.4
Section titled “Migrating from 0.4”- 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() }becomesLayer::new(name).with_color(color).Layer::newmakes a visible, plottable layer;Layer::default()keeps every flagfalse.TextStyle::newsets a width factor of 1. matchonEntityKind,Value,Format,ModelKindorGroupKindneeds a_arm.- Replace
Error::LimitExceeded(message)patterns withError::LimitExceeded { message, .. }. - Compare
ProfileIssue::severitywithSeverity::Error/Severity::Review(orseverity.as_str()). - The C ABI, the Python and WASM APIs and the JSON of the options are unchanged.
0.4.0 - 2026-10-23
Section titled “0.4.0 - 2026-10-23”- Independent
cadkit-geomcrate with analytic curves, polygon booleans and source provenance, calibration, trim/offset, and certified NURBS evaluation, tessellation and nearest-point search. - Optional
schemarsfeature, unconditional serde support, explicit numerical budgets, English API documentation and synthetic extreme-input regressions.
Changed
Section titled “Changed”- Raise the workspace MSRV from Rust 1.85 to 1.88 for the pinned
i_overlay9.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.
0.3.7 - 2026-10-23
Section titled “0.3.7 - 2026-10-23”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.
Changed
Section titled “Changed”- 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.
0.3.6 - 2026-10-23
Section titled “0.3.6 - 2026-10-23”DGN CFB directory trees, page header counters, and default element timestamps match MicroStation V8 output.
write_v8orders the CFB directory withDgn~Hat slot 1,Dgn~Sat slot 2, andDgn-Mdat slot 3 (each storage before its child streams,^AHbefore$1inDgn^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. Thecfbcrate 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 bytes8..16of the 16-byte page header, andDgn-Md/#000000/Dgn^CA/^AHis preserved whenpreserve_seed_controlsis enabled. - When
WriteOptions::timestamp_msis0.0,write_v8defaults element timestamps to the seed’sDgn~Htimestamp at offset0x130.
0.3.5 - 2026-10-19
Section titled “0.3.5 - 2026-10-19”DGN dictionary pages keep the seed’s layout, so a level table is no longer split across pages.
write_v8no 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; onlymax_decompressed_bytesbounds a page (exceeding it is aLimitExceedederror, 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
letchains (since 0.3.2).
0.3.4 - 2026-10-19
Section titled “0.3.4 - 2026-10-19”DGN raster attachments can name a file beside the DGN instead of a machine path.
- A new raster attachment whose
pathis 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 thefile://URL. Relative paths into other folders are rejected.
- An empty raster full path or file name reads as absent: the image
pathfalls back to the file name and no emptydgn.raster_pathis reported.
0.3.3 - 2026-10-16
Section titled “0.3.3 - 2026-10-16”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_dpiis set.seed_has_raster_templatestill tells whether the seed’s own group is used.
0.3.2 - 2026-10-16
Section titled “0.3.2 - 2026-10-16”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.
0.3.1 - 2026-10-16
Section titled “0.3.1 - 2026-10-16”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/0x110as 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_rangeanddgn.raster_range_placementno longer occur on any frame of the private corpus.
- DGN raster frames report
size_px(edge lengths over the pixel axis lengths) and the propsdgn.raster_dpi(dgn.raster_dpi_ywhen it differs),dgn.raster_rotationanddgn.raster_skew(radians). write_v8writes anImagewithout anid(withpathandsize_px) as a new raster attachment cloned from a complete attachment of the seed, rewriting only ids, cross links, the file name andfile://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.
0.3.0 - 2026-10-09
Section titled “0.3.0 - 2026-10-09”DGN V8 output that MicroStation draws: element ranges, string lengths and displayed tags now follow the layout of MicroStation and ODA files.
Changed
Section titled “Changed”Attributegainslayer,display(AttributeDisplay: height, width, style, alignment, rotation) andprops; 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_sharedwarning, 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
1at0x6Cand 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
0x0600property and0x00C0type-word flags carried in entity props.
0.2.1 - 2026-10-05
Section titled “0.2.1 - 2026-10-05”- 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.
0.2.0 - 2026-10-02
Section titled “0.2.0 - 2026-10-02”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.
Changed
Section titled “Changed”- Closed CAD polylines remain curves in generic GML export instead of being implicitly reclassified as polygons; explicit surfaces remain strictly checked.
0.1.0 - 2026-10-01
Section titled “0.1.0 - 2026-10-01”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). Seedocs/dgn/FORMAT_NOTES.mdfor 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
cadkitCLI (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.
Known limitations
Section titled “Known limitations”- 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.