Repository navigation
v1.37.1-beta.10: drawing read tools read a JWW at full size, with source.readerVersions
Pre-releasePre-release. Pinned exactly to OCCTSwift 4.0.0-beta.6, with OCCTSwiftMesh 1.7.6-beta.4, OCCTSwiftScripts 1.7.1-beta.4, OCCTSwiftInteraction 3.0.0-beta.6 and OCCTSwiftIO 2.0.0-beta.10. The pins are unchanged from beta.9 apart from OCCTSwiftIO (beta.6 to beta.10), which resolves SwiftDXF 0.5.0, SwiftDWG 0.2.0 and SwiftJWW 1.5.0. A consumer only gets this by naming it. 83 tools in the Swift server.
The drawing read tools read a JWW at full size, with its dimensions (#274, PR #280). read_drawing, list_drawing_entities, list_drawing_dimensions and measure_drawing read DWG and JWW as well as DXF through OCCTSwiftIO's DrawingLoader; source.format says dxf, dwg or jww. A JWW comes back at full size, each layer group multiplied by its own scale, and the tools report what the reader did that a DXF reader never does:
read_drawingreturnslayerGroupScales(group, layer-name prefix, scale) and arebuiltDimensionscount for a JWW.- A dimension Jw_cad keeps as loose lines and text is rebuilt as a
DIMENSIONand markedrebuilt: trueonlist_drawing_dimensionsandlist_drawing_entities. A dimension the file stores is not marked. - A value no dimension explains stays in the drawing as a loose text, with a warning that names it. Mixed or unstated layer-group scales are warnings.
- A JWW's layers are named
<group>-<layer>in hexadecimal, such as0-E. measure_drawing distanceon a JWW whose groups are at different scales carries a note that the distance is not the sheet distance. Angle and radius do not.- A JWW declares no units, so it has no
valueMmuntilmeasure_drawingis givenmmPerUnit(1, since Jw_cad draws in millimetres).list_drawing_dimensionstakes no such argument, andread_drawingwarns of it.
source.readerVersions (#281, PR #286). source carries an object keyed by reader name with each release line as the value: SwiftDXF for every format, plus SwiftDWG for a DWG or SwiftJWW for a JWW, because those two turn the file into DXF text before SwiftDXF reads it, and a bump of either alone could shift entity ids. readerVersion stays, as the SwiftDXF line alone. One test per reader holds its recorded line to the Package.resolved pin.
Behaviour changes worth reading.
- Entity ids may differ from a beta.9 read of the same file:
readerVersionmoves from 0.4 to 0.5 (SwiftDXF 0.5.0), and TEXT and MTEXT come back decoded, such as%%cas⌀. - The
read_drawingdescription is shorter (1477 characters, down from the 1983 that #280 left it at; #284, PR #288). The limits it dropped are indocs/reference/drawing-read.md. - Tests and docs: twelve JWW fixtures (the new
old-dimension-in-block.jwwamong them) and the program that rebuilds them are in the Fixtures README (#282 and #283, PR #287).
Known limits (stated in the tool descriptions and docs/reference/drawing-read.md).
- A DWG's insert attributes are not read (SecondMouseAU/SwiftDWG#9), so the values in a DWG title block are missing.
- Only the top level of a JWW is scanned for dimensions: loose pieces inside a block are not rebuilt, and an older dimension record (Jw_cad before 4.20) inside a block is not listed. Its line and text stay as entities of the block, with no warning. A stored record in a block is listed.
- A JWW solid fill inside a block is not counted (fixed upstream in SecondMouseAU/OCCTSwiftIO#81, after beta.10).
The Node server has no change.