Roadmap 0.13, From GitHub (to review)
GH.26 LandXML alignment import silently moves a disconnected segment start
## What happened
On upstream CivilCraft main, a LandXML alignment with two line elements separated by a 0.20 m join mismatch is accepted. The second line’s supplied start (E 100.00, N 0.20) is replaced by the first line’s end (E 100.00, N 0.00). It rebuilds as the same continuous 200 m alignment as the connected control, with no alignment note. This is a geometry change, not a displayed station or unit conversion.
**Expected:** Flag the conflicting join by alignment name and location. For a gap this large relative to the source coordinate precision (0.01 m), skip/refuse the affected alignment rather than quietly replacing the coordinate. The connected control should still import.
## Steps to reproduce
1. Save the synthetic example below as `join-test.landxml` and open it as a project in CivilCraft.
2. Inspect the alignment geometry and import report. The second tangent starts at E 100.00, N 0.00 rather than E 100.00, N 0.20, and no alignment warning is reported.
3. As a control, change the second `Start` to `0.00 100.00`. The importer builds the same geometry.
## Version and verification
- Unmodified [upstream main, `f4cbad7`](https://github.com/getcadcraft/civilcraft/commit/f4cbad769f30b8dbdb6a47884d472bc4e98fd63c).
- Headless Node 22.23.2 on Windows: exercised the production `readLandXml` → `buildAlignment` pipeline. Both the connected control and the conflict returned one alignment, length 200 m, and an empty alignment notes list. This is a source-level repro, not a native Civil 3D test.
## Files
Synthetic LandXML 1.2; coordinate order is northing, easting.
```xml
<LandXML xmlns="http://www.landxml.org/schema/LandXML-1.2" version="1.2" date="2026-12-01" time="…
Opened on GitHub by a Discord member: https://github.com/getcadcraft/civilcraft/issues/10
gh-triage 2026-12-03: reproduced on main f4cbad7 (the start is moved, no note). The contributor's draft pull request civilcraft#11 fixes it (their 46 checks pass; no new failing test file) but is NOT merged: (1) it refuses files earlier CivilCraft releases wrote on curves of radius about 2,000 m and up (186 of 1,140 generated; exact case R 7006.52, residual 1.58e-5 against a 2.5e-6 tolerance); (2) with coordinates rounded to 2 or 4 decimals it refused 12 to 15 of 62 that main opens (the refinement gate bound <= 3e-6), and 6-decimal coordinates with 4-decimal lengths every time; (3) malformed staStart/length now refuse instead of reading 0; (4) small points. A suggested fix for (1) is pushed as branch pr-11-followup on getcadcraft/civilcraft (commit 8fe60882: our own writer's stamp accepts up to 5 mm, still noted; fixture + 3 checks). The Apache 2.0 box on the pull request is unticked and it is still a draft. Review posted on the pull request; the issue civilcraft#10 stays open. civil-13 need not reproduce it again; when the contributor answers, re-run their test and the follow-up test, then merge and repo-sync in. Not checked: real third-party LandXML, files in feet.
lead 0.13 2026-12-04 (civil-13): fixed in the lab. landxml.js: a gap over 0.02 m between two elements now refuses that one alignment with a note (name, element, size, place); the others still import. Reproduced on 0.12.1 and a Discord member first. bin/test-civilcraft-landxml-join.mjs 17/0 (9/8 on 0.12.1). Contributor pull request civilcraft#11 not used and will conflict with this hunk.
Community comments
No comments yet
Add detail as we go: how you would use it, files or steps that show the problem, what other programs do. The team reads every comment.
Sign in or create a free account to add a comment.