Skip to content

SPLINE R2013+: the DWG holds the fit form of two splines, the export holds their control form with no fit points #393

Open

Description

@DrunkOnJava

Spec: §20.4.40 SPLINE (scenario 2, fit points only; "in 2013 the meaning is somewhat more sophisticated").

The DXF value oracle (examples/dxf_oracle, #99) scores SPLINE against AutoCAD's export. Of the two splines per release in ACadSharp's saves, the second (handle 0x434 on sample_AC1027.dwg and sample_AC1032.dwg) differs on R2013 and R2018 only:

file handle decoded (DWG) export (DXF)
sample_AC1027.dwg 0x434 scenario 2, 2 fit points, degree 3 70=1160, 71=3, 72=8, 73=4, 74=0: control form, 4 control points, no fit points
sample_AC1032.dwg 0x434 same same

On R2000 to R2010 the same spline is stored as its control form (8 knots, 4 control points) and every value equals the export. From R2013 the record holds the fit form only (the spec: the scenario is 2 when the spline has fit data and a non-custom knot parameter); the export writes the curve as the NURBS AutoCAD evaluates from it and no fit data (group 74 is 0). The decoder closes on the record's boundary and its values are plausible (a degree-3 spline through two fit points has four control points), so this is not a decode error: the export carries no fit data to compare, and the control form it carries is not in the R2013+ record.

The oracle scores the fit point count (74: DWG 2, DXF 0) as different and leaves the fit tolerance (44), the tangents (12, 13) and the fit points (11) as DWG-only: nothing in the export can verify them. The export's control form for those two records is listed as not decoded.

Decision

  • Keep these two values different as the record that R2013+ fit-form splines cannot be checked against the export, or verify the fit form some other way (evaluate the NURBS from the fit points with the knot parameter and compare it with the export's control points; the knot parameter and the tolerance would have to be modelled).

Reproduce

cargo run --release --features dxf-reader --example dxf_oracle -- <corpus-dir> --details

and read the SPLINE ... fit point count lines under "Disagreements".

Activity

  1. added
    type:spec
    area:entities
    area:oracle
    release:R2013
    release:R2018
    priority:P3
    on Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:entitiesarea:oraclepriority:P3release:R2013release:R2018type:spec

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions