<?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: Anders Kessler</title>
    <description>The latest articles on DEV Community by Anders Kessler (@truedraftcad).</description>
    <link>https://dev.to/truedraftcad</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%2F4272433%2F77a93b63-23b5-4486-b42a-dab8813a3f60.png</url>
      <title>DEV Community: Anders Kessler</title>
      <link>https://dev.to/truedraftcad</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/truedraftcad"/>
    <language>en</language>
    <item>
      <title>Building a Watertight Binary .STL 3D-Print Exporter in Pure TypeScript</title>
      <dc:creator>Anders Kessler</dc:creator>
      <pubDate>Tue, 01 Dec 2026 22:05:20 +0000</pubDate>
      <link>https://dev.to/truedraftcad/building-a-watertight-binary-stl-3d-print-exporter-in-pure-typescript-4jph</link>
      <guid>https://dev.to/truedraftcad/building-a-watertight-binary-stl-3d-print-exporter-in-pure-typescript-4jph</guid>
      <description>&lt;p&gt;A few hours into launching &lt;a href="https://www.truedraftcad.com" rel="noopener noreferrer"&gt;TrueDraft CAD&lt;/a&gt; on Product Hunt today, a maker asked a great question in the comments:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"With the .OBJ export, could you print the house as a little scale model on a Bambu P2S? Split by floor sounds great, you could lift the roof off and look inside."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Exporting a 3D mesh that &lt;em&gt;renders&lt;/em&gt; nicely in Three.js is very different from exporting a mesh that &lt;em&gt;slices and prints cleanly&lt;/em&gt; on an FDM 3D printer. Instead of leaving it on a roadmap, I wrote a zero-dependency binary &lt;code&gt;.STL&lt;/code&gt; architectural compiler in pure TypeScript (&lt;code&gt;src/lib/exporters/stl.ts&lt;/code&gt;) and shipped it in &lt;a href="https://github.com/truedraftcad/truedraft-cad/releases/tag/v1.4.0" rel="noopener noreferrer"&gt;TrueDraft CAD v1.4.0 (AGPL-3.0)&lt;/a&gt;, along with a free interactive &lt;a href="https://www.truedraftcad.com/floor-plan-to-stl" rel="noopener noreferrer"&gt;Floor Plan to STL Scale &amp;amp; Build-Plate Calculator&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here are the four geometric problems you hit immediately when turning a 2D/3D architectural floor plan into an FDM-printable &lt;code&gt;.STL&lt;/code&gt;, and how we solved them in ~800 lines of client-side TypeScript.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Coordinate System, Units, and the 80-Byte Binary &lt;code&gt;.STL&lt;/code&gt; Trap
&lt;/h2&gt;

&lt;p&gt;Architectural web CAD engines typically work in real-world meters with &lt;strong&gt;Y-up&lt;/strong&gt; (matching Three.js). Every major FDM slicer (Bambu Studio, OrcaSlicer, PrusaSlicer, and Cura) expects &lt;strong&gt;millimeters&lt;/strong&gt; with &lt;strong&gt;Z-up&lt;/strong&gt; and the model resting flat on &lt;code&gt;z = 0&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Converting a floor plan at scale &lt;code&gt;1:S&lt;/code&gt; (for example &lt;code&gt;1:100&lt;/code&gt;, where &lt;code&gt;1 m = 10 mm&lt;/code&gt;) maps world &lt;code&gt;(x, y, z)&lt;/code&gt; to slicer millimeters:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;mmPerMeter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;scaleDenominator&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;xMm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;worldX&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;originMinX&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;mmPerMeter&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;yMm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;originMaxY&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;worldY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;mmPerMeter&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// flip 2D canvas Y to preserve right-handed orientation&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;zMm&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;worldZ&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;mmPerMeter&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two subtle details matter in the binary &lt;code&gt;.STL&lt;/code&gt; buffer (&lt;code&gt;84 + 50 * triangleCount&lt;/code&gt; bytes, little-endian &lt;code&gt;DataView&lt;/code&gt;):&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Never start the 80-byte header with &lt;code&gt;"solid "&lt;/code&gt;:&lt;/strong&gt; Many slicers sniff the first 5 bytes to decide whether a file is ASCII or binary &lt;code&gt;.STL&lt;/code&gt;. Starting the header with &lt;code&gt;"TrueDraft CAD Binary STL..."&lt;/code&gt; avoids misdetection.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Enforce exact outward unit normals:&lt;/strong&gt; Every triangle computes &lt;code&gt;(v1 - v0) × (v2 - v0)&lt;/code&gt;, normalizes it, and drops degenerate zero-area triangles before writing so slicers never complain about non-finite normals.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  2. Why Real Drywall Partitions Vanish on a 0.4 mm Nozzle
&lt;/h2&gt;

&lt;p&gt;A standard US interior partition wall is &lt;code&gt;4.5 inches&lt;/code&gt; (&lt;code&gt;0.1143 m&lt;/code&gt;) thick. Look at what happens when you scale it down:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Scale&lt;/th&gt;
&lt;th&gt;6" Exterior Wall&lt;/th&gt;
&lt;th&gt;4.5" Interior Partition&lt;/th&gt;
&lt;th&gt;0.4 mm Nozzle Behavior&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1:50&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;3.05 mm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;2.29 mm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Prints solidly&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1:100&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1.52 mm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1.14 mm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Borderline: thin walls risk gaps&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1:150&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1.02 mm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.76 mm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Interior walls drop or print brittle&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;1:200&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.76 mm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;0.57 mm&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Below 2 perimeters: vanishes in slicer&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Instead of letting slicers silently delete interior rooms, &lt;code&gt;src/lib/exporters/stl.ts&lt;/code&gt; clamps wall thickness &lt;strong&gt;in world meters before extrusion&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;minWallMeters&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;minWallThicknessMm&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;mmPerMeter&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// default 1.2 mm = 3 perimeters on 0.4 mm nozzle&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;effectiveThickness&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;wall&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;thickness&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;minWallMeters&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We also emit solid square corner posts wherever walls meet at L-junctions or T-junctions so mitered corners never leave vertical hairline seams, and we deliberately omit fragile floating door leaves and &lt;code&gt;25 mm&lt;/code&gt; window glass planes while keeping real doorway headers (lintels) and window sills as closed 6-face prisms.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. Solid Bed-Aligned Baseplates (&lt;code&gt;z = 0&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;A raw wall shell floating on thin footprints warps off an FDM build plate. TrueDraft CAD ear-clips every detected room polygon (with a rectangular footprint fallback for open walls) and extrudes a solid &lt;code&gt;1.6 mm&lt;/code&gt; baseplate seated strictly at &lt;code&gt;z = 0.0 mm&lt;/code&gt;. Every wall starts flush on top of that plate (&lt;code&gt;z = baseplateMm&lt;/code&gt;), giving clean first-layer bed adhesion and zero floating overhangs.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Split-by-Floor Multi-Story Exports (Lift-Off Study Models)
&lt;/h2&gt;

&lt;p&gt;Printing a 2-story or 3-story house as one fused solid traps support material inside the ground floor and hides the rooms you actually want to inspect.&lt;/p&gt;

&lt;p&gt;With &lt;code&gt;compilePlanLevelsToStl()&lt;/code&gt;, every story is compiled to its own &lt;code&gt;.STL&lt;/code&gt; file with two invariants:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Independent &lt;code&gt;z = 0&lt;/code&gt; bed seating:&lt;/strong&gt; Level 1, Level 2, and Basement each start flat at &lt;code&gt;z = 0&lt;/code&gt; with their own &lt;code&gt;1.6 mm&lt;/code&gt; slab baseplate, so zero interior supports are required.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Shared global XY origin:&lt;/strong&gt; Every floor uses the exact same &lt;code&gt;originMinX&lt;/code&gt; / &lt;code&gt;originMaxY&lt;/code&gt; computed across the union of all stories, so when you print Level 1 and Level 2 separately, the upper story stacks cleanly on top of the lower perimeter walls like a real architectural study model.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  Try It Free in Your Browser (AGPL-3.0)
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;3D-Print Build-Plate &amp;amp; Scale Calculator (Bambu Lab, Prusa, Ender presets):&lt;/strong&gt; &lt;a href="https://www.truedraftcad.com/floor-plan-to-stl" rel="noopener noreferrer"&gt;truedraftcad.com/floor-plan-to-stl&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Multi-Story CAD Studio (zero signup):&lt;/strong&gt; &lt;a href="https://www.truedraftcad.com/studio?template=two-story-house-1840" rel="noopener noreferrer"&gt;truedraftcad.com/studio?template=two-story-house-1840&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source Code &amp;amp; v1.4.0 Release (AGPL-3.0):&lt;/strong&gt; &lt;a href="https://github.com/truedraftcad/truedraft-cad/releases/tag/v1.4.0" rel="noopener noreferrer"&gt;github.com/truedraftcad/truedraft-cad/releases/tag/v1.4.0&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you print a floor plan from TrueDraft CAD or have ideas for roof pitches or magnetic alignment lips between stories, drop a comment or open an issue on GitHub!&lt;/p&gt;

</description>
      <category>typescript</category>
      <category>opensource</category>
      <category>3dprinting</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How I Built an Open-Source Multi-Story 2D/3D Floor Plan CAD Engine in TypeScript</title>
      <dc:creator>Anders Kessler</dc:creator>
      <pubDate>Mon, 30 Nov 2026 13:58:22 +0000</pubDate>
      <link>https://dev.to/truedraftcad/how-i-built-an-open-source-multi-story-2d3d-floor-plan-cad-engine-in-typescript-44f</link>
      <guid>https://dev.to/truedraftcad/how-i-built-an-open-source-multi-story-2d3d-floor-plan-cad-engine-in-typescript-44f</guid>
      <description>&lt;p&gt;Homeowners, remodelers, and small contractors run into an annoying split when they need a real floor plan:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Consumer room planners run in the browser, but lock scaled PDFs and CAD files behind $24–$39/month recurring subscriptions.&lt;/li&gt;
&lt;li&gt;Desktop CAD packages (AutoCAD, Revit, Chief Architect) are built for full architectural firms and cost $200+/month.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built &lt;strong&gt;&lt;a href="https://www.truedraftcad.com" rel="noopener noreferrer"&gt;TrueDraft CAD&lt;/a&gt;&lt;/strong&gt; — an AGPL-3.0 open-source browser-native multi-story 2D/3D architectural CAD studio written in TypeScript, Svelte 5, HTML5 Canvas, and Three.js — so anyone can draw rooms to exact imperial (&lt;code&gt;ft-in&lt;/code&gt;) or metric dimensions, import existing &lt;code&gt;.DXF&lt;/code&gt; drawings, inspect a stacked 3D cutaway or WASD walkthrough, and export deterministic scaled Blueprint PDFs, AIA-layered AutoCAD &lt;code&gt;.DXF&lt;/code&gt; files, and 3D &lt;code&gt;.OBJ&lt;/code&gt; meshes.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Live Studio (no login required):&lt;/strong&gt; &lt;a href="https://www.truedraftcad.com/studio" rel="noopener noreferrer"&gt;https://www.truedraftcad.com/studio&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;2-Story Modern House Demo:&lt;/strong&gt; &lt;a href="https://www.truedraftcad.com/studio?template=two-story-house-1840" rel="noopener noreferrer"&gt;https://www.truedraftcad.com/studio?template=two-story-house-1840&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Source Code (AGPL-3.0):&lt;/strong&gt; &lt;a href="https://github.com/truedraftcad/truedraft-cad" rel="noopener noreferrer"&gt;https://github.com/truedraftcad/truedraft-cad&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/UL8NWvUv5Fg" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;39-second walkthrough of TrueDraft CAD v1.3.0 (multi-story 2D/3D drafting, Ghost Below, AutoCAD .DXF, and scaled Blueprint PDF export).&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Here are the four most interesting geometry and compiler problems I had to solve to make browser-native CAD feel crisp and reliable.&lt;/p&gt;




&lt;h2&gt;
  
  
  1. Automatic Room Detection with a Planar Half-Edge Cycle Solver (&lt;code&gt;src/lib/cad/geometry.ts&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;In a real floor plan editor, users draw individual wall segments — often crossing through other walls to form T-junctions or interior partitions. Nobody wants to manually trace closed room polygons after moving a wall by 6 inches.&lt;/p&gt;

&lt;p&gt;Every time a wall changes, &lt;code&gt;computePlan()&lt;/code&gt; builds a planar graph in four deterministic passes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Intersection &amp;amp; T-junction splitting:&lt;/strong&gt; Every wall segment is checked against all other wall segments (plus endpoints within a 2 cm weld tolerance) and split at intersection points so every crossing becomes an explicit shared graph vertex.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Vertex clustering &amp;amp; pruning:&lt;/strong&gt; Endpoints within snap tolerance are welded into canonical vertices, and dangling degree-1 wall stubs are pruned cleanly from cycle detection while remaining intact in rendering and takeoff.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Half-edge minimal face traversal:&lt;/strong&gt; Each undirected edge becomes two directed half-edges sorted counter-clockwise by angle at each vertex. Walking the next rightmost turn (&lt;code&gt;next(u→v) = prevCCW(v→u)&lt;/code&gt;) traces every minimal cycle in &lt;code&gt;O(E log E)&lt;/code&gt; time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Signed area filtering:&lt;/strong&gt; The shoelace formula computes each face's signed area. Negative/outer boundary cycles are dropped, and valid interior cycles become live rooms with automatic net square footage, perimeter, and material takeoff estimates (4×8 drywall sheets, 2-coat paint gallons, baseboard linear feet, and flooring +10% waste).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Because all geometry is stored internally in meters (and formatted into architectural feet-inches to the 1/16" or metric on demand), floating-point drift stays tiny and imperial/metric switching is lossless.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. Client-Side AutoCAD &lt;code&gt;.DXF&lt;/code&gt; R12–R2018 Importer (&lt;code&gt;src/lib/cad/dxfImport.ts&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;Importing real architectural &lt;code&gt;.DXF&lt;/code&gt; files is trickier than parsing &lt;code&gt;LINE&lt;/code&gt; and &lt;code&gt;LWPOLYLINE&lt;/code&gt; entities: real architects almost always draft walls as &lt;strong&gt;parallel double lines&lt;/strong&gt; (two lines 4.5" or 6" apart representing both faces of drywall).&lt;/p&gt;

&lt;p&gt;To convert raw DXF linework into TrueDraft's parametric centerline wall model without uploading user files to a server, &lt;code&gt;dxfImport.ts&lt;/code&gt; runs entirely client-side:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Automatic unit inference:&lt;/strong&gt; Reads &lt;code&gt;$INSUNITS&lt;/code&gt; from the &lt;code&gt;HEADER&lt;/code&gt; section when present (&lt;code&gt;1 = inches&lt;/code&gt;, &lt;code&gt;2 = feet&lt;/code&gt;, &lt;code&gt;4 = mm&lt;/code&gt;, &lt;code&gt;6 = meters&lt;/code&gt;), and falls back to bounding-box span heuristics when legacy DXF files omit &lt;code&gt;$INSUNITS&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AIA wall-layer filtering:&lt;/strong&gt; Prioritizes architectural wall layers (&lt;code&gt;A-WALL*&lt;/code&gt;, &lt;code&gt;WALL*&lt;/code&gt;, &lt;code&gt;0&lt;/code&gt;) while ignoring dimension lines, hatch grids, and title-block borders.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Double-line wall shell collapse:&lt;/strong&gt; Detects parallel opposing segments separated by 3.5"–14" with significant longitudinal overlap and collapses each pair into a single parametric wall centerline preserving exact thickness.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Collinear merging &amp;amp; &lt;code&gt;TEXT&lt;/code&gt;/&lt;code&gt;MTEXT&lt;/code&gt; room labels:&lt;/strong&gt; Merges fragmented collinear segments and maps &lt;code&gt;TEXT&lt;/code&gt;/&lt;code&gt;MTEXT&lt;/code&gt; labels inside closed faces into room overrides automatically.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For export (&lt;code&gt;src/lib/exporters/dxf.ts&lt;/code&gt;), TrueDraft writes valid AutoCAD DXF R12 (&lt;code&gt;AC1009&lt;/code&gt;) organized cleanly onto standard AIA layers (&lt;code&gt;A-WALL&lt;/code&gt;, &lt;code&gt;A-WALL-INTR&lt;/code&gt;, &lt;code&gt;A-DOOR&lt;/code&gt;, &lt;code&gt;A-GLAZ&lt;/code&gt;, &lt;code&gt;A-ELEC&lt;/code&gt;, &lt;code&gt;A-PLMB&lt;/code&gt;, &lt;code&gt;A-FURN&lt;/code&gt;, &lt;code&gt;A-AREA&lt;/code&gt;, &lt;code&gt;A-ANNO-DIMS&lt;/code&gt;) so contractors and draftsmen can open the output directly in AutoCAD, LibreCAD, QCAD, Revit, or SketchUp.&lt;/p&gt;




&lt;h2&gt;
  
  
  3. True Physical-Scale Vector Blueprint PDF Compiler (&lt;code&gt;src/lib/exporters/pdf.ts&lt;/code&gt;)
&lt;/h2&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%2F39x3yr32ldk653evb46p.png" 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%2F39x3yr32ldk653evb46p.png" alt="True-to-Scale Architectural Blueprint Sheet A1.0 on Tabloid 11x17" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many browser floor plan tools "export PDF" by screenshotting a &lt;code&gt;&amp;lt;canvas&amp;gt;&lt;/code&gt; bitmap and pasting it onto a page — which produces fuzzy lines and breaks physical scale.&lt;/p&gt;

&lt;p&gt;TrueDraft compiles floor plans directly into &lt;strong&gt;pure vector PDF drawing commands&lt;/strong&gt; via &lt;code&gt;jsPDF&lt;/code&gt; using exact physical point geometry (&lt;code&gt;1 inch = 72 pt&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At &lt;code&gt;1/4" = 1'-0"&lt;/code&gt;, every 1 foot of real-world wall length is rendered at exactly &lt;code&gt;18.0 pt&lt;/code&gt; (&lt;code&gt;0.25 in&lt;/code&gt;) on Letter (&lt;code&gt;8.5×11&lt;/code&gt;), Tabloid (&lt;code&gt;11×17&lt;/code&gt;), or Arch D (&lt;code&gt;24×36&lt;/code&gt;) paper. Print at 100% and an architect's scale ruler matches wall-to-wall.&lt;/li&gt;
&lt;li&gt;Multi-story buildings compile into a complete architectural packet: one scaled plan sheet per floor (&lt;code&gt;A1.1 Level 1 · Ground&lt;/code&gt;, &lt;code&gt;A1.2 Level 2 · Upper&lt;/code&gt;, …) followed by &lt;strong&gt;Sheet A2.0&lt;/strong&gt; containing combined Door Schedules, Window Schedules, Room Area tables, and Material Takeoffs.&lt;/li&gt;
&lt;li&gt;Title blocks support live editing of Project Name, Firm/Studio, Drawn By, Address, Sheet #, and Revision with a synchronized vector preview.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  4. Multi-Story Onion-Skin Alignment &amp;amp; Stacked 3D WebGL (&lt;code&gt;src/lib/cad/levels.ts&lt;/code&gt;, &lt;code&gt;Viewport3D.svelte&lt;/code&gt;)
&lt;/h2&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%2Fj4v5j0qoo00tjn8wrrxs.png" 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%2Fj4v5j0qoo00tjn8wrrxs.png" alt="Level 2 Upper Floor with Ghost Below Alignment and Live Material Takeoff" width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In v1.3.0, I added full multi-story support (up to 6 floors plus a Basement below grade) without breaking single-floor simplicity or backward compatibility with saved JSON plans:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;2D Onion-Skin Ghosting (&lt;code&gt;Canvas2D.svelte&lt;/code&gt;):&lt;/strong&gt; When editing an upper floor, toggling &lt;code&gt;Ghost Below&lt;/code&gt; overlays the floor directly underneath as dashed blueprint reference walls plus highlighted &lt;code&gt;STAIRS (BELOW)&lt;/code&gt; callout outlines so stairwells, bearing walls, and plumbing chases line up vertically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Stacked 3D Cutaway &amp;amp; Inter-Story Slabs (&lt;code&gt;Viewport3D.svelte&lt;/code&gt; &amp;amp; &lt;code&gt;obj.ts&lt;/code&gt;):&lt;/strong&gt; Every level extrudes walls with real geometric door/window cutouts (no alpha hacks), sits at its true elevation (&lt;code&gt;ceilingHeight + slabThickness&lt;/code&gt;), and generates thick structural floor slabs between stories. In &lt;code&gt;Cutaway&lt;/code&gt; mode, lower stories render full-height while the topmost floor cuts away like an architectural dollhouse model — and first-person WASD walkthrough automatically sets camera eye-height to &lt;code&gt;activeLevel.elevationM + 1.68m&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Watertight Stacked 3D &lt;code&gt;.OBJ&lt;/code&gt; Export (&lt;code&gt;src/lib/exporters/obj.ts&lt;/code&gt;):&lt;/strong&gt; Exports clean triangulated meshes grouped by story (&lt;code&gt;Level_1_Exterior_Walls&lt;/code&gt;, &lt;code&gt;Level_2_Floor_Slabs&lt;/code&gt;, etc.) ready for Blender, SketchUp, or Rhino.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Open Source &amp;amp; Business Model
&lt;/h2&gt;

&lt;p&gt;The entire codebase — CAD engine, DXF parser/writer, PDF/OBJ/SVG/CSV compilers, 76 architectural &amp;amp; MEP symbols, and 10 starter templates — is public under &lt;strong&gt;AGPL-3.0&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;On &lt;a href="https://www.truedraftcad.com" rel="noopener noreferrer"&gt;truedraftcad.com&lt;/a&gt;, the hosted studio is free to use on your own floor plan with zero signup (including 2D/3D drafting, &lt;code&gt;.DXF&lt;/code&gt; import, 1 free AI sketch trace, live material takeoff, and watermarked blueprint preview). When someone wants clean, unwatermarked production files or multi-story packets without self-hosting, they pay once ($9 Single Project, $29 Pro Lifetime, $79 Studio 5-seat — zero subscriptions, 14-day easy refunds).&lt;/p&gt;

&lt;p&gt;If you build CAD, computational geometry, WebGL, or AEC tools, I'd love feedback on the geometry engine, DXF parser edge cases, or what architectural features would make this most useful in real workflows!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/truedraftcad/truedraft-cad" rel="noopener noreferrer"&gt;https://github.com/truedraftcad/truedraft-cad&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Live Studio:&lt;/strong&gt; &lt;a href="https://www.truedraftcad.com/studio" rel="noopener noreferrer"&gt;https://www.truedraftcad.com/studio&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;strong&gt;Update (Dec 1, 2026):&lt;/strong&gt; TrueDraft CAD is featured live on Product Hunt today, and we just shipped 14 live SVG starter templates at &lt;a href="https://www.truedraftcad.com/templates" rel="noopener noreferrer"&gt;truedraftcad.com/templates&lt;/a&gt;. If you test the multi-story engine or AutoCAD &lt;code&gt;.DXF&lt;/code&gt; importer and have technical feedback or feature requests, join the maker Q&amp;amp;A thread here: &lt;a href="https://www.producthunt.com/posts/truedraft-cad" rel="noopener noreferrer"&gt;TrueDraft CAD on Product Hunt&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>showdev</category>
      <category>typescript</category>
      <category>svelte</category>
    </item>
  </channel>
</rss>
