Repository navigation
v1.37.1-beta.7: drawing read tools on SwiftDXF 0.3.0
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.5, and SwiftDXF held on the 0.3 line. A consumer only gets this by naming it. 83 tools in the Swift server.
The drawing read tools support SwiftDXF 0.3.0 (#263).
- A
SPLINEis an entity.list_drawing_entitiesreturns asplinerecord withdegree,closed,periodic,rationaland, as stored in the file,controlPoints,knots,weightsandfitPoints(each left out when the file has none), andsplineis a validtypesfilter. Itsboundsfollow the curve, not its control polygon. measure_drawingmeasures to a spline. When the control data defines a curve it is an exact NURBS edge (rational or not, clamped or unclamped). When it does not (fit points only, a knot vector OCCT refuses, a degree above OCCT's 25, a closed spline whose curve's ends do not meet) it is cut into chords within a stated tolerance and the result says so innotes.read_drawingreports what SwiftDXF skipped from SwiftDXF's own report, so a spline is no longer counted as skipped as well as read.- Every drawing tool's
sourcenow names the SwiftDXF release line (readerVersion,0.3), because entity ids (e<index>) shift when a newer reader models more types.
Why SwiftDXF is held on the 0.3 line. OCCTSwiftIO 2.0.0-beta.5 requires SwiftDXF 0.3.0 but its floor admits 0.4.0 (released 2026-11-12), which adds DXF.Entity.hatch and .leader and stops OCCTSwiftIO's DXFLoader compiling (SecondMouseAU/OCCTSwiftIO#60). Package.swift now declares SwiftDXF directly, .upToNextMinor(from: "0.3.0"), so a resolve gives 0.3.0. A host that embeds OCCTMCPCore gets the same constraint, which would conflict with a host that wants SwiftDXF 0.4 itself. Adopting 0.4.0 (entity handles, hatch and leader, computed dimension values, block expansion) and dropping the cap is #271.
Behaviour changes worth reading.
- In a file with a spline, the ids after it are one higher than before: the spline takes an index.
source.readerVersionand the SHA-256 tell a caller when ids no longer mean what they did. read_drawingnow reports anINSERT'sATTRIBrecords as skipped entities of their own, because that is how SwiftDXF counts them. A title block with 12 attributes shows 13 skipped, where the raw scan counted one.- A spline record has no
length, unlike line, arc and polyline.
Test-only. The slow-observer test no longer times the result against a wall-clock bound, which failed once on a loaded CI runner (#268). The observer is held shut and the result must arrive anyway.
Not in this release. DWG and JWW are still not read (SecondMouseAU/OCCTSwiftIO#53 and #54). The spline support is tested on hand-built DXF fixtures and a hand-written file over stdio; it has not been run against a CAD-written drawing.