Skip to content

SwiftDWG 0.2.0

Latest

Choose a tag to compare

@gsdali gsdali released this 19 Nov 02:56
f62c11a

R14 lightweight polylines and hatches are read, and a hatch's pattern lines are written with the right DXF group codes (#12).

Fixed

  • R14 (AC1014) lightweight polylines and hatches. An R14 file has no fixed type codes for them: it declares a class for each, and the objects carry the class's number. SwiftDWG only knew the fixed codes, so each such object came through as a record holding only its handle, and nothing counted it as lost. An object whose class is LWPOLYLINE (or LWPLINE) or HATCH is now read with the existing decoders, as ACadSharp does. One that still cannot be read is counted as UNREADABLE_LWPOLYLINE or UNREADABLE_HATCH, so nothing is lost silently.
    • Checked against AutoCAD's own DXF of ACadSharp's R14 sample: 23 of 23 lightweight polylines and 8 of 8 hatches equal by handle, field by field.
    • Checked against acadrust's output on a Jw_cad R14 export: 14 of 14 polylines and 2 of 2 hatches equal by handle.
    • The DXF text of 289 other readable drawings, R2000 to R2018, is byte for byte what 0.1.0 wrote.
  • Hatch pattern lines in DWG.dxfText. A pattern line's base point was written as groups 43/53 and its offset as 45/55; DXF uses 43/44 and 45/46. DWG.read was not affected, since SwiftDXF does not read pattern lines; dxfText used as a DXF converter was. Pattern lines now equal AutoCAD's on every hatch of ACadSharp's R2000 to R2018 samples.

Still open

  • VIEWPORT objects in an R14 file still come through as records with only a handle (#13).
  • Insert attributes are not decoded (#9).

Requires Swift 5.9 and SwiftDXF 0.4.0 or later.