Skip to content

Latest commit

 

History

History
68 lines (46 loc) · 8.49 KB

ARTICLE.md

File metadata and controls

68 lines (46 loc) · 8.49 KB

Forging Real-World 3D CAD Models Inside Pascal Editor with SolidCraft GLB Forge

In Short: Browser-based 3D architectural editors usually force an ugly choice between gigabytes of static mesh packs and generic placeholder boxes disconnected from real procurement. By pairing @kruschdev/pascal-plugin-catalog with @kruschdev/solidcraft-glb-forge, I turned Pascal Editor into a live parametric B-Rep CAD ingester: 733 verified real-world manufacturer SKUs across 133 brands and 9 trades, 118 parametric B-Rep families, live supply-house SKU forging, and automatic CSI MasterFormat procurement BOMs inside a 272.9 kB zero-bloat npm package.

Pascal Plugin Catalog Powered by SolidCraft GLB Forge

Why Browser 3D BIM Breaks Down on Real Physical Parts

After building my four-trade MEP suite for Pascal Editor (Structural framing, Plumbing, HVAC, and Electrical), I hit a second problem that every browser-based AECO tool runs into: where do the actual 3D building products come from, and how do you tie them to parts a contractor can actually buy?

Shipping hundreds of static 3D meshes inside an npm package bloats installs to hundreds of megabytes and freezes you on whatever fixed sizes someone happened to model. Generating generic untethered boxes keeps the bundle small, but breaks real takeoffs because a generic placeholder has no manufacturer, no part number, no supply house, and no real dimensions. Worse, real jobsites mix two completely different kinds of objects: manufactured SKUs you buy off a shelf (like a Hoffman steel J-box, a Charlotte Pipe sanitary tee, a Master Flow duct transition, or a Carrier condenser) and site-built assemblies you fabricate from raw lumber, steel, concrete, and hardware.

Two-Part Architecture: SolidCraft GLB Forge + Pascal Plugin Catalog

I split the problem cleanly into two MIT open-source repositories that work together with zero core changes to Pascal Editor:

  • The Parametric CAD Engine (solidcraft-glb-forge): Wraps the open-source SolidCraft B-Rep CAD compiler with 118 declarative parametric recipes (102 manufactured product templates and 16 site-built assemblies) and 733 real-world SKUs across 9 trades and 133 brands. Every compiled asset is a watertight binary glTF 2.0 (.glb) with optional ISO 10303-21 (.step) fabrication export, verified automatically through Three.js GLTFLoader. It exposes a local CORS-enabled HTTP Forge Bridge on port 4895 plus a 7-tool stdio MCP server.
  • The Zero-Bloat Pascal Plugin (pascal-plugin-catalog): Ships only typed SKU and recipe manifests (272.9 kB packed on npm, zero .glb binaries inside the package). At runtime, its editor-free ./render entry resolves .glb files from static folders, Cloudflare R2 or S3 CDNs, or the local Forge Bridge, rendering a grounded (y = 0) dimension-accurate architectural proxy box while the real mesh streams in.

Attaching Real-World MEP Parts to Real Manufacturer SKUs

Every manufactured item in the catalog is anchored to a real Brand, SKU/MPN, supply house, unit price, and CSI MasterFormat division. Ungrounded manufactured generations are explicitly refused (manufactured_sku_required), so your 3D model and your procurement schedule stay locked 1:1:

Trade Real-World Examples & Verified SKUs Recipe ID Supplier / CSI
Electrical nVent Hoffman 8"×10"×4" NEMA-1 Steel J-Box (HOF-A1084SC, $42), 12.6"×15.7" Pull Box (HOF-A16126SC), Halex LB EMT Conduit Body (HLX-58607-LB34), Leviton/RACO 1-Gang Box (LEV-5320-BOX), Square D / Siemens 100A–200A Panels electrical-nema-box, electrical-emt-conduit-body, electrical-breaker-panel-200a Home Depot Pro / Graybar (26 05 33, 26 24 16)
Plumbing Charlotte Pipe 1-1/2"–4" PVC SCH 40 DWV Sanitary Tees & Long-Sweep 90°s (CHR-PVC-STEE-3, CHR-PVC-LS90-2), Sioux Chief 6/8-Port Copper PEX Manifolds (SC-PEX-MAN8, $62), NIBCO Forged Brass Ball Valves (NIB-T585-70-1IN), Anvil Class 150 ANSI Steel Flanges (ANV-FLG-150-3) plumbing-sanitary-tee, plumbing-long-sweep-90, plumbing-pex-manifold, plumbing-ansi-flange Ferguson / Home Depot (22 11 16, 22 13 16)
HVAC Master Flow 10"×6"→6" & 14"×8"→8" Galvanized Duct Transitions (MF-TR-14X8-8, $28.98), Imperial 6"–8" Inline Volume Dampers (IMP-DMP-8IN, $18.48), Hart & Cooley Registers (HC-672-12X6), Carrier 3-Ton Inverter Condenser (CAR-24ACC636, $2,290), Zehnder ComfoAir Q350 TR HRV (ZEH-CA-Q350TR, $4,690) hvac-duct-transition, hvac-volume-damper, hvac-condenser-unit, hvac-hrv-ventilator Pro HVAC Supply / Zehnder / Home Depot (23 31 13, 23 72 00, 23 81 26)
Windows & Doors Pella 250 Series 30"×48" Double-Hung Window (PEL-250-DH-3048, $370), Therma-Tru 36"×80" Mahogany 3-Lite Craftsman Entry Door (TT-CC-CRF-3680, $949), Clopay Carriage Garage Door + LiftMaster Opener + UL 325 Sensors (26 fenestration families) window-double-hung, door-craftsman-entry, door-garage-sectional Home Depot / Pro Fenestration (08 51 13, 08 14 16)
Kitchen & Bath Cabinetry KraftMaid 24" 3-Drawer Dovetail Soft-Close Shaker Base Cabinet (KM-3DB24-SHK, $785), Hampton Bay 36"×84" Double-Door Tall Pantry (HB-WP3684-SHK, $769), plus 71 total cabinetry SKUs across Thomasville, American Woodmark & Diamond cabinet-drawer-base, cabinet-tall-pantry, cabinet-sink-base, cabinet-island Home Depot / Kitchen Pro (12 35 30)

Need a specific Trane, Lennox, or Carrier furnace, a specialty Graybar enclosure, or a Ferguson valve that is not in the 733 built-in SKUs? Open the + Real SKU tab inside Pascal (or call the catalog_register_real_sku agent tool), pick one of the 118 parametric B-Rep families, dial in exact millimeter parameters, enter the real Brand, MPN, and supply house, and click Save SKU, Forge & Place:

await registerRealWorldSkuOnBridge({
  recipeId: 'electrical-nema-box',
  sku: 'HOF-A1084SC',
  brand: 'nVent Hoffman',
  supplier: 'Home Depot Pro / Graybar',
  csiDivision: '26 05 33',
  estUnitPriceUsd: 42.0,
  params: { width_mm: 203, height_mm: 254, depth_mm: 102 },
})

Behind the scenes, POST /api/skus/register compiles the watertight B-Rep solid transactionally, runs Three.js GLTFLoader verification before persisting to data/skus/user-skus.json (so a failed forge never leaves a ghost SKU), and streams the finished 3D mesh directly into Pascal.

Site-Built Assemblies and Automatic Raw Material Explosion

Sixteen of the 118 parametric families are site-built construction assemblies: heavy-timber cedar pergolas, composite decks, deck railings, privacy fences, 2x4 and 2x6 stud wall bays, LVL beams, stair flights, drywall and insulation wall cutaways, stone counter slabs, and bolted W-beam splices.

Drag the millimeter width, depth, height, or rafter sliders in Pascal's Site-Built (16) tab, and the takeoff engine recomputes every real raw-material line item in real time (6x6 cedar posts, 2x10 carrier beams, 2x8 rafters, Simpson Strong-Tie ABA66Z post bases, H2.5A hurricane ties, and GRK structural screws) and rolls them alongside your manufactured MEP SKUs into one formula-safe CSI MasterFormat BOM with one-click CSV export.

Verified Boundaries and Agent Tooling

  • @kruschdev/pascal-plugin-catalog (v0.2.0): 36/36 unit, audit, and regression tests (598 assertions), 4/4 runtime entrypoint purity gates (./render editor-free, ./catalog framework-free, ./agent-tools pure Zod, ./agent-operations headless), 272.9 kB packed npm tarball, and 8 agent tools (catalog_search_skus, catalog_place_sku, catalog_swap_sku, catalog_schedule_bom, catalog_configure_source, catalog_list_recipes, catalog_register_real_sku, catalog_forge_custom_item).
  • @kruschdev/solidcraft-glb-forge (v0.2.0): 35/35 tests covering all 118 recipes, 733 SKUs, HTTP Forge Bridge atomic staging and symlink/SSRF guards, CSV importer, offline HTML SKU Explorer, and 7-tool MCP server.

Try It Locally

# Install the Pascal plugin
bun add @kruschdev/pascal-plugin-catalog

# Start the local SolidCraft GLB Forge HTTP Bridge (http://127.0.0.1:4895)
git clone https://github.com/kruschdev/solidcraft-glb-forge.git
cd solidcraft-glb-forge && npm install && npm run serve