Repository navigation
v0.5.0
0.5 is the deliberate breaking release that settles the API: later 0.5.x releases only add.
See "Migrating from 0.4" below.
Added
- 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, typed
Error::SchemaVersionfor other versions, and an optionalschemarsfeature on
cadkit-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
- 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,ValidationOptions
andProfileIssueare#[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
- Struct literals of the types above no longer compile outside cadkit. Use the
constructors and setters, or start fromDefault::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.