<?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: cadprobs cadprobs</title>
    <description>The latest articles on DEV Community by cadprobs cadprobs (@cadprobs_cadprobs_5df0024).</description>
    <link>https://dev.to/cadprobs_cadprobs_5df0024</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%2F4161690%2F750d6900-f1fe-4faf-9812-50c43835f99e.png</url>
      <title>DEV Community: cadprobs cadprobs</title>
      <link>https://dev.to/cadprobs_cadprobs_5df0024</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cadprobs_cadprobs_5df0024"/>
    <language>en</language>
    <item>
      <title>Reading a STEP file's volume and weight in the browser: what actually happens</title>
      <dc:creator>cadprobs cadprobs</dc:creator>
      <pubDate>Tue, 13 Oct 2026 12:50:32 +0000</pubDate>
      <link>https://dev.to/cadprobs_cadprobs_5df0024/reading-a-step-files-volume-and-weight-in-the-browser-what-actually-happens-46o4</link>
      <guid>https://dev.to/cadprobs_cadprobs_5df0024/reading-a-step-files-volume-and-weight-in-the-browser-what-actually-happens-46o4</guid>
      <description>&lt;p&gt;STEP (ISO 10303) files don't contain triangles. They describe exact B-rep surfaces. So "how much does this part weigh?" is a geometry question before it's a math question.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Parse and tessellate.&lt;/strong&gt; In the browser, the usual route is OpenCascade compiled to WebAssembly (e.g. occt-import-js). It reads the B-rep and triangulates each face. Finer tessellation means more accurate volume and more memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Integrate the volume.&lt;/strong&gt; For a closed, consistently-oriented mesh, volume = Σ signed tetrahedra from the origin: &lt;code&gt;V = Σ (v1 · (v2 × v3)) / 6&lt;/code&gt;. Open shells give garbage, so check watertightness first.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Multiply by density.&lt;/strong&gt; Steel ≈ 7.85 g/cm³, aluminium ≈ 2.70, PLA ≈ 1.24. Watch units: most STEP files are mm, so mm³ → cm³ is /1000.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Gotchas.&lt;/strong&gt; Assemblies with overlapping bodies double-count; surface-only IGES/STEP has no volume; unit headers are sometimes wrong (an inch file read as mm is off by 16.4³).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu795q2msclmwox4fsogq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fu795q2msclmwox4fsogq.jpg" alt="CADProps guest workflow showing a three-step Choose, Check, Finish panel for checking a file's units, scope and warnings" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you want to try it without writing code, FreeCAD (&lt;code&gt;Shape.Volume&lt;/code&gt;) is the desktop reference. Disclosure: I work on CADProps, a free browser tool built this way: the &lt;a href="https://www.cadprops.com/tools/cad-weight-calculator/" rel="noopener noreferrer"&gt;STEP weight calculator&lt;/a&gt; and a plain &lt;a href="https://www.cadprops.com/tools/step-viewer/" rel="noopener noreferrer"&gt;STEP viewer&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>engineering</category>
      <category>webdev</category>
      <category>cad</category>
      <category>3dprinting</category>
    </item>
  </channel>
</rss>
