Zoning Envelope 3D
A Claude Code skill that generates interactive 3D zoning envelope viewers as self-contained HTML files — exact lot polygons from GIS data, extruded buildable volumes, setback zones, height caps, and orbit controls.
What it does
Run /zoning-envelope after a zoning analysis to generate an interactive 3D viewer of the buildable envelope. The output is a self-contained HTML file — no server, no dependencies, opens in any browser.
Demo above: 250 Hudson Street, Manhattan — M1-6 / HSQ (C6-4A equivalent). Base volume (0–85 ft) + tower volume (85–290 ft) on the exact tax lot polygon from NYC MapPLUTO.
Workflow
/zoning-analysis-nyc 250 Hudson St, New York NY ← analysis (markdown report)
/zoning-envelope ← 3D viewer (HTML file)
The analysis skill produces a structured report with an Envelope Data JSON block containing the lot polygon, setbacks, volumes, and parameters. The envelope skill reads that block and renders it in 3D.
Install
Claude Desktop:
- Open Customize → Browse plugins
- Click + → Add marketplace from GitHub
- Enter
AlpacaLabsLLC/skills-for-architects - Install the Zoning Analysis plugin
Claude Code (terminal):
claude plugin marketplace add AlpacaLabsLLC/skills-for-architects
claude plugin install 02-zoning-analysis@skills-for-architects
Or symlink just this skill:
git clone https://github.com/AlpacaLabsLLC/skills-for-architects.git
ln -s $(pwd)/skills-for-architects/plugins/02-zoning-analysis/skills/zoning-envelope ~/.claude/skills/zoning-envelope
Usage
Point it at a zoning analysis report:
/zoning-envelope path/to/zoning-analysis-250-hudson-st.md
Search by keyword:
/zoning-envelope 250 hudson
Auto-detect the most recent report:
/zoning-envelope
What it renders
- Exact lot polygon from GIS data — the real cadastral boundary, not a simplified rectangle
- Setback zones as colored ground overlays with dashed inset lines
- Buildable volumes — base, tower, galibo — extruded from the polygon at correct heights
- Height cap at maximum building height
- Edge-length labels on the lot boundary
- Parameters panel — FAR, floor area, height limits, setbacks
- Interactive controls — orbit, zoom, pan
How it handles different districts
| District type | Envelope shape |
|---|---|
| Height-factor (R7, C6-1) | Base box + sky exposure plane wedge |
| Contextual (R7A, C6-4A) | Streetwall base + setback tower |
| TONE (Uruguay) | Full lot with setback zones + flat height cap |
| Multi-scenario | Toggle buttons comparing individual, party-wall, and unified envelopes |
Technical details
The viewer is a single HTML file (~300 lines) with:
- Three.js 0.170 loaded from CDN via import map
- OrbitControls for interactive navigation
- Ear-clipping polygon triangulation for arbitrary lot shapes
- Self-correcting polygon inset (handles both CW and CCW winding from different GIS sources)
- Self-intersection clipping for concave lot shapes (L-shapes, T-shapes)
- Polygon simplification to remove degenerate edges from inset offsets
- Built-in watertightness validation overlay (green = pass, red = fail, dismissable)
- Canvas-textured sprites for 3D labels
- Responsive — works on desktop, tablet, and mobile
NYC examples
Interactive 3D envelopes generated from real NYC zoning analyses. Each viewer is a self-contained HTML file — drag to orbit, scroll to zoom, right-drag to pan.
Contextual districts (base + tower)
| Property | Zoning | Lot | Envelope | |
|---|---|---|---|---|
| 250 Hudson Street | M1-6 / HSQ (C6-4A equiv.) | 21,862 SF | Base 0–85 ft + Tower 85–290 ft | View 3D → |
| 195 Broadway | C5-5 | 36,775 SF | Base 0–85 ft + Tower 85–400 ft | View 3D → |
| 161 Maiden Lane | C5-3 | 4,836 SF | Base 0–85 ft + Tower 85–400 ft | View 3D → |
| 233 Broadway | C5-3 | 29,411 SF | Base 0–85 ft + Tower 85–450 ft | View 3D → |
| 100 Church Street | C5-3 | 53,354 SF | Base 0–85 ft + Tower 85–400 ft | View 3D → |
| 29-37 41st Ave, Queens | M1-6/R10 | 4,471 SF | Base 0–65 ft + Tower 65–175 ft | View 3D → |
Single-volume districts
| Property | Zoning | Lot | Max Height | |
|---|---|---|---|---|
| 60 East 11th Street | C6-1 | 4,019 SF | 120 ft | View 3D → |
| 1 Wall Street | C5-5 | 42,178 SF | 500 ft | View 3D → |
| 120 Broadway | C5-5 | 49,614 SF | 500 ft | View 3D → |
| 2 Gold Street | C5-5 | 24,128 SF | 500 ft | View 3D → |
| 500 Waverly Ave, Brooklyn | R7A | 11,923 SF | 80 ft | View 3D → |
Testing and validation
The 3D geometry is validated with an automated test suite that checks every generated envelope for watertightness. The test fetches real lot polygons from NYC MapPLUTO, runs the geometry pipeline, and verifies each mesh.
What the test checks
For each extruded volume (base, tower, height cap):
- Boundary edges — every edge must be shared by exactly 2 triangles (no holes)
- Non-manifold edges — no edge shared by more than 2 triangles
- Degenerate triangles — no zero-area faces from collapsed vertices
- Self-intersecting inset polygons — the setback offset must not create bowtie crossings
- Winding consistency — all face normals point outward
Test results
10 sites tested across Manhattan, Brooklyn, and Queens — diverse lot shapes (4 to 19 vertices), zoning districts (R7A to C5-5), and envelope types (single volume and base+tower). All 10 pass.
Known issues fixed (March 2026)
Three geometry bugs were identified and fixed through this testing process:
-
Self-intersecting inset polygons on concave lots. On L-shaped and T-shaped lots, the vertex-offset inset algorithm produced bowtie self-intersections when the setback was large relative to narrow parts of the lot. Fixed by adding
cleanInsetPolygon()— detects edge-edge crossings and clips the invalid loop — followed bysimplifyPolygon()which removes micro-edges, near-collinear vertices, and tiny concave dents left by the offset. -
Ear-clipping triangulation stalling on near-collinear edges. The triangulator’s convexity check used
<= 0, rejecting valid ears with near-zero cross products from simplified polygons. Changed to< -1e-6. -
Side face normals pointing inward. The side face index winding
(i, j, j+n)produced inward-facing normals for CCW polygons. Fixed to(j, i, j+n)for correct outward normals.
Dependency
This skill requires a zoning analysis report as input. Run /zoning-analysis-nyc first — then /zoning-envelope reads the output.
Related skills
Zoning Analysis: New York City, NY
Buildable envelope analysis for lots in New York City
Zoning Analysis: Maldonado, UY
Buildable envelope analysis for lots in Maldonado, Uruguay
Color Palette Generator
Harmonious color palettes from a description, image, or hex code