Roadmap 0.13, Fixes
FX.748 DetailCraft: an empty header line in an NC1 file no longer shifts the fields after it
What was wrong: the NC1 (DSTV) reader in DetailCraft (readNc1 in nc1.js) dropped blank lines before reading the header. In an NC1 file the header lines are fixed positions, and a shop may leave the drawing or the phase line empty. With one empty line the reader either refused the file (fewer than 20 header lines) or, when the file still had 20 lines, accepted it with every later field moved up by one (profile code, length and sizes in the wrong places) and no error. A report on 14,005 shop files counted 166 files with an empty header line: 149 refused, 17 read with shifted fields.
What changed: header lines are taken by position; a blank line is kept as an empty field until the first block starts. Blank lines inside blocks are still skipped, comment lines (**) are still skipped, a leading blank line before ST is allowed.
Tested: bin/test-detailcraft.mjs 13113 passed, 0 failed, with two new checks (an emptied drawing line keeps piece, quantity, profile, code, length and weight in place; leading blank line and LF line ends).
Not changed here: no screen in DetailCraft uses this reader yet, and it still refuses most shop files for other reasons (rows without a face letter, text on marking rows, bend blocks). Opening NC1 files is being built as a separate reader and writer engine.
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.