<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: AUTONEST</title>
    <description>The latest articles on DEV Community by AUTONEST (@autonestk).</description>
    <link>https://dev.to/autonestk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4281335%2F4126ed31-3184-43c0-8e09-b107ec220a78.png</url>
      <title>DEV Community: AUTONEST</title>
      <link>https://dev.to/autonestk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/autonestk"/>
    <language>en</language>
    <item>
      <title>An automated engineering calculation should show its chart reading, not just its answer</title>
      <dc:creator>AUTONEST</dc:creator>
      <pubDate>Sat, 05 Dec 2026 02:20:51 +0000</pubDate>
      <link>https://dev.to/autonestk/an-automated-engineering-calculation-should-show-its-chart-reading-not-just-its-answer-4f7i</link>
      <guid>https://dev.to/autonestk/an-automated-engineering-calculation-should-show-its-chart-reading-not-just-its-answer-4f7i</guid>
      <description>&lt;p&gt;Some engineering checks are not a formula you can type into a cell. For vacuum and jacketed pressure vessels, the external pressure check depends on reading values off design charts: you work out a geometry factor, find it on one chart, carry the result to a material chart, and read the allowable value. By hand this means a ruler, a printed chart and a lot of care. It is also where mistakes hide, because a misread line looks exactly like a correct one in the final number.&lt;/p&gt;

&lt;p&gt;We build AUTONEST VC, a Windows program that runs pressure vessel strength calculations to the Korean notice used for Korea Energy Agency inspection and writes the calculation report, drawing (DXF) and bill of materials. Automating the chart step was the easy part to decide. Deciding &lt;strong&gt;what the report shows&lt;/strong&gt; was the important part.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with a correct-looking number
&lt;/h2&gt;

&lt;p&gt;A reviewer, an inspector, or the engineer who signs the report needs to answer one question: &lt;em&gt;can I see how this thickness was reached?&lt;/em&gt; If the software only prints "required thickness: 5 mm — OK", the reviewer has two choices: trust the program, or redo the chart reading by hand. Neither is good. Trusting blindly is not engineering review, and redoing it by hand removes most of the reason to automate.&lt;/p&gt;

&lt;p&gt;So we set a rule for ourselves: &lt;strong&gt;the report has to carry the chart reading itself&lt;/strong&gt;, in a form a person can check at a glance.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the report shows
&lt;/h2&gt;

&lt;p&gt;For every part checked for external pressure, the calculation report includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the input values that decide where you enter the chart (dimensions, thickness, temperature, material);&lt;/li&gt;
&lt;li&gt;the values read from each chart, written out as numbers;&lt;/li&gt;
&lt;li&gt;the chart itself with the reading marked on it, so a reviewer can see the point is where it should be;&lt;/li&gt;
&lt;li&gt;the thickness used for the check — &lt;strong&gt;after&lt;/strong&gt; the corrosion allowance is taken off, because a vessel has to resist collapse at the end of its life, not on day one;&lt;/li&gt;
&lt;li&gt;the result and the margin.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the program searches for the thinnest plate that passes, the report still shows the reading for the thickness it finally chose, not a summary of the search.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why an editable Excel file
&lt;/h2&gt;

&lt;p&gt;The report is delivered as the original Excel workbook, not a locked PDF. That choice follows from the same rule. A reviewer can click a cell and see the value; an engineer can add a note or a support calculation the program does not cover. The drawing and the bill of materials come from the same input, so the numbers in the report, on the drawing and in the material list cannot drift apart.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we learned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Show the intermediate values a human would have written down.&lt;/strong&gt; If a careful engineer would have noted it on paper, the report should show it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Make the hard step the most visible one.&lt;/strong&gt; The chart reading is where review effort should go, so it gets a picture, not just a line of text.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Automation does not move responsibility.&lt;/strong&gt; Review and approval stay with the engineer. The software's job is to make that review fast.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A sample report is public if you want to see what this looks like: &lt;a href="https://autonest.co.kr/en/vc/sample/" rel="noopener noreferrer"&gt;https://autonest.co.kr/en/vc/sample/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Product page: &lt;a href="https://autonest.co.kr/en/vc/" rel="noopener noreferrer"&gt;https://autonest.co.kr/en/vc/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;— AUTONEST&lt;/p&gt;

</description>
      <category>softwareengineering</category>
      <category>productivity</category>
      <category>automation</category>
    </item>
    <item>
      <title>A 4-byte check that stopped DWG files from opening in a WebAssembly build of LibreDWG</title>
      <dc:creator>AUTONEST</dc:creator>
      <pubDate>Thu, 03 Dec 2026 20:03:48 +0000</pubDate>
      <link>https://dev.to/autonestk/a-4-byte-check-that-stopped-dwg-files-from-opening-in-a-webassembly-build-of-libredwg-2b7g</link>
      <guid>https://dev.to/autonestk/a-4-byte-check-that-stopped-dwg-files-from-opening-in-a-webassembly-build-of-libredwg-2b7g</guid>
      <description>&lt;p&gt;We build a free browser viewer for engineering drawings, and one rule shaped every decision: &lt;strong&gt;the drawing never leaves the user's computer.&lt;/strong&gt; Company drawings are often confidential, so opening, converting and printing all happen inside the browser tab. Nothing is uploaded unless the user chooses to send a drawing that would not open, so we can look into it.&lt;/p&gt;

&lt;p&gt;For DWG files that means running a DWG reader in the browser. We use &lt;a href="https://www.gnu.org/software/libredwg/" rel="noopener noreferrer"&gt;LibreDWG&lt;/a&gt; compiled to WebAssembly through &lt;a href="https://github.com/mlightcad/libredwg-web" rel="noopener noreferrer"&gt;libredwg-web&lt;/a&gt; (v0.7.15), convert the DWG to DXF in memory, and render the DXF.&lt;/p&gt;

&lt;p&gt;In the browser build, DWG files whose object handles were longer than 4 bytes could not be read. The reader logged:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Invalid handle-reference, longer than 8 bytes
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But handles of 5 to 8 bytes are valid — the message itself says the limit should be 8.&lt;/p&gt;

&lt;h2&gt;
  
  
  The cause: &lt;code&gt;sizeof (pointer)&lt;/code&gt; on wasm32
&lt;/h2&gt;

&lt;p&gt;In &lt;code&gt;src/bits.c&lt;/code&gt;, &lt;code&gt;bit_read_H&lt;/code&gt; reads an object handle and rejects anything too long:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="c1"&gt;// size must not exceed 8&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;handle&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;sizeof&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;BITCODE_RC&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;handle&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The comment says 8, and on a normal 64-bit build &lt;code&gt;sizeof (BITCODE_RC *)&lt;/code&gt; &lt;em&gt;is&lt;/em&gt; 8. But WebAssembly in the browser is &lt;strong&gt;wasm32&lt;/strong&gt;: pointers are 4 bytes. So in the browser build the limit silently became 4, and every handle of 5–8 bytes was treated as invalid.&lt;/p&gt;

&lt;p&gt;The fix is to say what the comment means:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight c"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;handle&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;size&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;8&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;handle&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;14&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(the same check appears once more for pre-R13 files and got the same change).&lt;/p&gt;

&lt;h2&gt;
  
  
  A second limit in the object map
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;bit_read_UMC&lt;/code&gt; (modular char) read at most 8 bytes. A 64-bit value written 7 bits per byte can need up to 10, so we raised &lt;code&gt;MAX_BYTE_UMC&lt;/code&gt; from 8 to 10 so that 64-bit handle offsets in the object map parse.&lt;/p&gt;

&lt;p&gt;The third and last change only marks the build: the DXF &lt;code&gt;999&lt;/code&gt; comment now says &lt;code&gt;LibreDWG 0.13.3.7825.246_0c9ab+an1&lt;/code&gt;, so a DXF made by our modified engine can be told apart from upstream.&lt;/p&gt;

&lt;p&gt;That is the whole patch — three small edits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building it
&lt;/h2&gt;

&lt;p&gt;The build is the upstream libredwg-web recipe with Emscripten: &lt;code&gt;autogen.sh&lt;/code&gt;, &lt;code&gt;emconfigure ../configure ... --disable-write --disable-json ...&lt;/code&gt;, &lt;code&gt;emmake make&lt;/code&gt;, then link the embind bindings with &lt;code&gt;em++&lt;/code&gt; (&lt;code&gt;-s ALLOW_MEMORY_GROWTH=1 -s MAXIMUM_MEMORY=4GB -s EXPORT_ES6=1 -s MODULARIZE=1&lt;/code&gt;). The only difference from upstream at the link step is &lt;code&gt;emcc&lt;/code&gt; → &lt;code&gt;em++&lt;/code&gt;. Exact commands are in &lt;code&gt;BUILD.txt&lt;/code&gt; in the repository below.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it is used for
&lt;/h2&gt;

&lt;p&gt;The engine powers the DWG step of &lt;strong&gt;AUTONEST MultiViewer&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;open a DWG or DXF in the browser — no install, no sign-up, no upload&lt;/li&gt;
&lt;li&gt;layers and measuring on the drawing&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;title-block batch plot&lt;/strong&gt;: it finds every title block on the sheet and plots them into &lt;strong&gt;one PDF, one page per title block&lt;/strong&gt; (monochrome or with your own CTB plot style) — all in the browser&lt;/li&gt;
&lt;li&gt;several drawings in tabs or a split screen, markups, and meeting minutes written on the drawing in the same workspace&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Limits we are honest about: the DWG is converted to DXF to be displayed, so some entities may be missing or look different, and saving back to DWG is not supported.&lt;/p&gt;

&lt;h2&gt;
  
  
  Source and license
&lt;/h2&gt;

&lt;p&gt;LibreDWG is GPL-3.0-or-later, so the modified engine is too. The patch and build notes are public:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Modified source (patch + BUILD.txt): &lt;a href="https://github.com/autonestk/libredwg-web-an1" rel="noopener noreferrer"&gt;https://github.com/autonestk/libredwg-web-an1&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The viewer: &lt;a href="https://autonest.co.kr/en/tools/viewer/" rel="noopener noreferrer"&gt;https://autonest.co.kr/en/tools/viewer/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you ship LibreDWG to the browser yourself, check for &lt;code&gt;sizeof&lt;/code&gt; of a pointer used as a size limit — on wasm32 it is 4, not 8.&lt;/p&gt;

&lt;p&gt;— AUTONEST&lt;/p&gt;

</description>
      <category>cad</category>
      <category>opensource</category>
      <category>javascript</category>
      <category>webassembly</category>
    </item>
  </channel>
</rss>
