Cutting 3D Construction Proposals From 6–9 Months to 10 Minutes With a Bounded Agent Loop

In modular construction, turning a buyer's constraints (budget, number of stories, unit mix, site rules) into a 3D concept and a priced sales proposal usually takes 6 to 9 months of back-and-forth between sales, drafting, and estimating.

We built an automated pipeline that brought that down to about 10 minutes. Sales enters the buyer parameters on one screen, clicks generate, and gets back multi-angle 3D renders, per-floor layouts, database-backed parts pricing, and Google Docs proposals. Because it is a sales tool, the 3D models do not need to be millimeter-exact CAD blueprints. They just need to be structurally valid and good enough to put in front of a buyer.

Why Raw LLM Codegen Failed

The first thing everyone tries on a problem like this is asking an LLM to write Blender Python scripts directly. We tried it, and it was nonsense. You could never get the same result twice.

The generated scripts drifted from run to run, rooms ended up floating outside the building footprint, and small prompt tweaks broke layouts that worked five minutes earlier. You cannot put broken geometry in front of a paying buyer.

I called a stop to raw code generation and moved the team to fixed building blocks in Python instead. We kept the 3D geometry deterministic in real code and restricted Gemini to returning a structured floor-by-floor JSON layout inside a capped validation loop.

How the System Works

[Sales Intake UI: Budget, Stories, Unit Mix, Rules]
                         │
                         ▼
                 [Job Queue / DB]
                         │
                         ▼
┌────────────────────────────────────────────────────────┐
│  Bounded Agent Loop (Max 10 Iterations)                │
│                                                        │
│  [Gemini] ──▶ Structured Floor-by-Floor JSON Layout    │
│     ▲                        │                         │
│     │ (Validation Errors)    ▼                         │
│     └────── [Python Math & Geometry Validator]         │
└──────────────────────────────┬─────────────────────────┘
                               │ (Valid Spec — or Clean Exit)
                               ▼
       [Headless Blender Worker Pool (Up to 10 Concurrent)]
       (Fixed Python Building Blocks → Multi-Angle & Floor Renders)
                               │
                               ▼
       [Parts, BOM & Margin Pricing Engine (DB + Sales Review)]
                               │
                               ▼
       [Google Docs API Proposal Generator]
       (10-Page Brief | ~100-Page Proposal | 1,000-Page Full Spec)
  1. Fixed building blocks in Blender: Core structural units (room types, sizes, materials, colors) live as plain parameterized Python classes. The LLM never touches raw vertices.
  2. Constrained JSON planning: Gemini receives the buyer inputs and hard spatial rules (3-bedroom units go on corners, 2-bedrooms in the middle, elevators and laundry rooms stay centered) and outputs a floor-by-floor JSON layout.
  3. Math checks in a capped loop: Plain Python checks every generated JSON layout against exact math: room counts, bounding boxes, and placement rules. If anything lands outside the footprint or breaks a rule, the exact errors go back to Gemini. Most valid buildings converge in 5 to 10 iterations. If it still fails at iteration 10, the loop stops cleanly and tells sales the requested building is not buildable instead of rendering garbage.
  4. Parallel headless rendering: Valid specs go to a VM worker pool running up to 10 headless Blender instances at once, which assemble the 3D model and grab exterior angles plus per-floor views.
  5. Pricing and proposal docs: Downstream services pull parts counts (down to screws and modules) and unit pricing from the database. Sales sets margins and generates three proposal options through the Google Docs API: a simple 10-page summary, a ~100-page illustrated proposal, and a ~1,000-page full dump. The first two finish in a few minutes; the 1,000-page doc took up to an hour and turned out to be big and rarely needed.

Trade-Offs

DimensionRaw LLM CodegenBounded Loop (JSON + Validator + Fixed Blocks)
Visual consistencyLow; geometry and syntax drift constantlyHigh; checked mathematically before rendering
Failure behaviorSilent broken models or crashesExplicit error loop + clean "not buildable" exit at iteration 10
ThroughputFragile manual retriesParallel VM pool (up to 10 concurrent Blender runs)
Proposal outputManual copy-pasteAutomated 10-page, 100-page, and full-spec Google Docs via API

Where This Pattern Fits (And Where It Doesn't)

Building fixed Python classes and a spatial validator takes more upfront engineering than a single prompt. For throwaway one-off mockups where consistency does not matter, raw code generation is fine. For a commercial sales pipeline where buyers make multi-million-dollar decisions on the output, bounded JSON planning plus deterministic math checks is the only approach I will put in production—until models can guarantee exact spatial geometry on their own.