Skip to content

Releases: arbaev/dxf-kit

dxf-vuer@2.2.0

13 Mar 13:57

Choose a tag to compare

Features

  • Touch support: touch-action: none on .dxf-viewer container for correct mobile touch handling
  • GIS origin offset: uses originOffset from dxf-render instead of group.position shift for correct large-coordinate handling

Refactored

  • Import useControls instead of deprecated useOrbitControls

Dependencies

  • Requires dxf-render ≥ 1.2.0

Install

npm install dxf-vuer@2.2.0

Full changelog: https://github.com/arbaev/dxf-kit/blob/main/packages/dxf-vuer/CHANGELOG.md

dxf-render@1.2.0

13 Mar 13:57

Choose a tag to compare

Features

  • Variable-width polylines: POLYLINE/LWPOLYLINE per-vertex startWidth/endWidth tapering with triangle-strip mesh geometry and miter joins
  • GIS origin translation: $EXTMIN/$EXTMAX center subtracted from coordinates before Float32Array to prevent precision loss at large GIS coordinates (UTM, state plane); originOffset returned from createThreeObjectsFromDXF()
  • Touch support: switched from OrbitControls to MapControls for native one-finger pan on mobile devices

Refactored

  • useOrbitControls renamed to useControls (old name kept as deprecated alias)

Examples

  • New examples/leaflet-dxf/ — overlay DXF on OpenStreetMap with geo-referencing (parser-only, DXF → GeoJSON)
  • New examples/dxf-to-pdf/ — export DXF drawings to PDF via Three.js offscreen rendering + jsPDF
  • New "Line Types & Widths" showcase sample on demo landing page
  • Examples section added to demo landing page with StackBlitz links

Install

npm install dxf-render@1.2.0

Full changelog: https://github.com/arbaev/dxf-kit/blob/main/packages/dxf-render/CHANGELOG.md

dxf-vuer@2.1.0

12 Mar 16:39

Choose a tag to compare

Features

  • Theme-adaptive layer colors: layer panel now correctly inverts ACI 250-251 gray colors in dark mode via resolveThemeColor().

Bug Fixes

  • sRGB color output: added OutputPass to the post-processing pipeline for correct linear→sRGB color conversion.
  • Three.js addon imports: updated import paths from three/examples/jsm/ to three/addons/ for Three.js 0.182 compatibility.

Dependencies

  • Requires dxf-render ≥ 1.1.0 (new resolveThemeColor export).

npm: https://www.npmjs.com/package/dxf-vuer/v/2.1.0

dxf-render@1.1.0

12 Mar 16:39

Choose a tag to compare

Features

  • Theme-adaptive ACI 250-251: dark gray colors (ACI 250, 251) now invert to light grays in dark mode, keeping them visible against dark backgrounds. New exports: isThemeAdaptiveColor(), resolveThemeColor().

Bug Fixes

  • Single-point polyline: polylines with a single vertex are now rendered as points instead of being silently skipped.
  • Layer default visibility: layers now default to visible: true, frozen: false, locked: false when flags are not explicitly set in the DXF file.
  • Three.js addon imports: updated import paths from three/examples/jsm/ to three/addons/ for Three.js 0.182 compatibility.

npm: https://www.npmjs.com/package/dxf-render/v/1.1.0

v1.5.0

10 Mar 14:20

Choose a tag to compare

Legacy release. This is from the single-package era (dxf-vuer v1.x). The project has since been split into two packages: dxf-render and dxf-vuer v2.x. See latest releases.

Highlights

  • TAA anti-aliasing — thin crisp lines during interaction, smooth text and edges after idle accumulation (32 frames, ~0.5s)
  • Instant dark mode — theme switching without re-render via material-level color sentinel
  • Overlay rendering — text and dimension arrows always render on top of drawing geometry
  • Major refactoring — monolithic 2622-line file replaced by 15 modular entity collectors

Added

  • TAA anti-aliasing via EffectComposer + TAARenderPass: hardware MSAA disabled (thin lines), 32 jittered frames accumulated when idle for smooth text and edges
  • Instant dark mode switching — MaterialCacheStore.switchTheme() updates theme-dependent materials in-place, no re-parsing needed
  • Overlay mesh buffer in GeometryCollector for text glyphs and dimension/leader arrows, rendered last
  • Hatch style support (code 75): Normal (even-odd), Outer (level 0+1), Ignore (level 0 only)
  • Leader arrow size from XDATA DSTYLE override

Fixed

  • Hatch: CW arc edges angle inversion for proper boundary connectivity
  • Hatch: nearly-full-circle arcs from incorrect ccw flag clamped to short arc
  • Hatch: polygon centroid for even-odd nesting test instead of first vertex
  • Dimension text angle: while loop for normalization fixes upside-down text >270°
  • Dimension arrows: DIMSTYLE DIMTSZ=0 now correctly overrides header $DIMBLK=ARCHTICK
  • Leader arrow angle computed from spline at arrowSize distance
  • MTEXT word wrap: width/height ratio threshold filters artifact micro-widths

Changed

  • Architecture: useDXFGeometry.ts (2622 lines) → 15 entity collector modules in geometry/collectors/
  • Color resolution uses ACI7_COLOR sentinel for deferred dark/light theme resolution
  • Three separate material Map caches → MaterialCacheStore with switchTheme(), disposeAll()
  • useThreeScene manages EffectComposer lifecycle for TAA
  • 841 tests across 36 files

Full Changelog: https://github.com/arbaev/dxf-vuer/blob/main/CHANGELOG.md

dxf-vuer@2.0.1

10 Mar 17:30

Choose a tag to compare

Changed

  • Repository renamed from dxf-vuer to dxf-kit
  • Updated all repository links, homepage, and documentation

No code changes.

📦 npm

dxf-vuer@2.0.0

10 Mar 17:30

Choose a tag to compare

dxf-vuer 2.0.0 — Monorepo Split

Vue 3 wrapper extracted into a thin layer on top of dxf-render.

Breaking Changes

  • New peer dependency: dxf-render >= 1.0.0 required
  • Parser entry moved: dxf-vuer/parserdxf-render/parser

Backward Compatibility

All existing imports from dxf-vuer continue to work — the package re-exports everything from dxf-render:

import { parseDxf, DXFViewer } from 'dxf-vuer'  // still works

Install

npm install dxf-vuer dxf-render three

📦 npm | 📖 README

dxf-render@1.0.1

10 Mar 17:30

Choose a tag to compare

Changed

  • Repository renamed from dxf-vuer to dxf-kit
  • Updated all repository links, homepage, and documentation

No code changes.

📦 npm

dxf-render@1.0.0

10 Mar 17:30

Choose a tag to compare

dxf-render 1.0.0 — Initial Release

Framework-agnostic DXF parser + Three.js renderer, extracted from dxf-vuer v1.5.0 into a standalone package.

Highlights

  • Custom DXF parser — 25 entity handlers, zero external dependencies
  • Three.js renderer — 21 rendered entity types with geometry merging, block template caching, time-sliced rendering
  • Two entry points: dxf-render (full API) and dxf-render/parser (parser only, zero deps)
  • parseDxfAsync() — Web Worker parsing with automatic fallback
  • Vector text — opentype.js triangulated glyphs, Liberation Sans/Serif fonts
  • Linetype & hatch — geometric pattern splitting, 25 built-in AutoCAD hatch patterns
  • TAA anti-aliasing, instant dark mode, overlay rendering
  • Full TypeScript declarations

Install

npm install dxf-render three    # full renderer
npm install dxf-render           # parser only

📦 npm | 📖 README

v1.4.0

09 Mar 18:40

Choose a tag to compare

Legacy release. This is from the single-package era (dxf-vuer v1.x). The project has since been split into two packages: dxf-render and dxf-vuer v2.x. See latest releases.

What's New

New Entity Types (+5 rendered)

  • MLINE — multiline entities with multiple parallel line elements
  • XLINE — construction lines (infinite in both directions), clipped to drawing extents
  • RAY — rays (infinite in one direction), clipped to drawing extents
  • HELIX — parsed as SPLINE, rendered through the existing spline pipeline
  • ATTDEF — attribute definitions now rendered as text (previously parse-only)

Total rendered: 21 types (was 16), plus ATTRIB within INSERT blocks.

New Features

  • DIMSTYLE table — 40+ dimension variables fully parsed (DIMBLK, DIMSCALE, DIMTXT, etc.)
  • Architectural units — dimension text in feet-inches notation (DIMLUNIT=4) with fractions
  • Architectural ticks — oblique tick marks for dimension lines (DIMTSZ > 0)
  • Text underline — MTEXT \L...\l formatting rendered as line segments
  • Tab support — MTEXT tab characters rendered with 4×textHeight tab stops
  • 3D polygon mesh — POLYLINE with is3dPolygonMesh as wireframe grids
  • PDMODE 34 — cross-in-circle point symbols
  • $MIRRTEXT — mirrored text in blocks with negative X scale
  • INSUNITS$INSUNITS header + getInsUnitsScale() utility
  • 3DSOLID parser — parsed (not rendered), data stored for future use
  • BLOCK_RECORD table — handle-to-name mapping

Bug Fixes (30+)

  • Dimension lines: rotated, angular, overshoot, text gap, radial/diametric placement
  • Text: height from DIMSTYLE, leading spaces, \H format, textSize parameter
  • Hatch: solid fill 86× faster on large files, spline edges, donut shapes
  • MTEXT: O(n) word wrapping, tab indentation
  • Polyline: bulge=1 arcs, closed LWPOLYLINE, polyface mesh
  • Ellipse: arc sweep direction, OCS transform
  • Linetype: pattern scaling, auto-LTSCALE
  • Leader: path type, tick marks, arrow sizing
  • 3D entities: parsing robustness
  • DXF files without TABLES section

Changed

  • Fonts: Noto Sans/Serif Light → Liberation Sans/Serif Regular (Arial/Times New Roman metrically compatible)
  • Entity parsers: 22 → 25 handlers (mline, xline, 3dsolid)
  • Tests: 648 → 789 cases across 34 files

Bundle Sizes

Chunk v1.3.0 v1.4.0
Main (includes font + opentype.js) ~790 KB ~1000 KB
Parser chunk ~43 KB ~49 KB
Serif font (lazy) ~646 KB ~525 KB

Full changelog: CHANGELOG.md