Temple LLM-RAG CAD Generator (vTempleCFG_2.0)
Wickerson Studios — Temple LLM-RAG CAD Generator (vTempleCFG_2.0)
README.txt (generated 2026-01-07)
HIGHLIGHT: ANALYSIS + REALISM (WHY THIS SERIES IS DIFFERENT)
This isn’t just “temple-looking” geometry — it is a realism-first CAD assembly that stays stable in Grasshopper,
then layers physically meaningful analysis and engineering narratives ON TOP of the architecture.
REALISM BUILT-IN (STEP_TEMPLE_02 + STEP_TEMPLE_03)
- Pediments + roof are not “approximate”: they are aligned and spanned in the correct axis with deterministic placement.
- Roof ornamentation is not dropped by bounding box guesses: tiles are projected to real roof faces and oriented by face frames.
- High-LOD detailing is CAD-stable: the series favors clean extrusions, capped booleans, and time-budget cutoffs for recompute reliability.
ANALYSIS BUILT-IN (STEP_TEMPLE_04)
STEP_TEMPLE_04 generates a mathematically and physically grounded “Nth derivative” overlay layer:
- Golden ratio grids (classical proportion system) to validate layout logic
- Fourier harmonic frieze (wave-based ornament) to encode rhythmic architectural intent
- Catenary thrust lines (funicular logic) to express masonry load paths
- Entasis sleeves (optical/mechanical correction) to relate classical columns to structural/visual truth
- Roof→column load-flow field (vectors + curves + optional pipes) to visualize force routing
- Modal ridge standing-wave curves to suggest resonance/structural response as an engineered reading of the temple
These overlays aren’t random decoration — they are a reusable engineering “instrument panel” for ancient geometry.
OVERVIEW
This Grasshopper C# node series builds an Ancient/Classical temple massing from a compact CFG/SFG text spec,
then escalates detail (“POP7”) and finally generates an “Nth derivative” layer of advanced math/physics/
engineering overlays rooted in ancient architectural ideas (proportion, thrust, entasis, resonance, force flow).
Core concept:
- CFG = hard geometry parameters (dimensions, counts, toggles, caps).
- SFG = style/meta parameters (ornament/ruin/material/lighting).
- STATE_OUT = persistent JSON state blob that carries cfg/sfg/meta/logs downstream.
You can:
- Drive geometry deterministically from CFG/SFG (stable recompute).
- Iterate seeds + sliders to get many variants.
- Bake final solids + overlays or export downstream.
WHAT YOU GET (AT A GLANCE)
STEP_TEMPLE_02 — CORE ASSEMBLY
- Stylobate steps (stacked step platforms)
- Cella volume
- Perimeter colonnade (cylinders)
- Entablature block
- Pediments (aligned on X ends, correctly extruded + positioned)
- Roof as a planar wedge solid that spans pediment extremes perfectly (no loft drift)
STEP_TEMPLE_03_POP7 — “7th POP derivative” DETAILING
- Bases + capitals + abaci on columns
- Optional fluting cutters with budgeted boolean carving (stable caps)
- Dentils + triglyph rhythm blocks
- ROOF REALISM FIX: roof ornaments adhere to the roof surface
- tiles are projected to roof slope faces and oriented by face tangent frames
- Pediment relief plaques
- Micro fasteners + optional ruin cracks (capped)
STEP_TEMPLE_04_NTH_MATH_PHYS — ADVANCED MATH/PHYS/ENGINEERING DERIVATIVE LAYER
- Golden-ratio proportion grids (classical)
- Fourier “frieze” harmonic ornament curve (+ optional piped molding)
- Catenary thrust lines (funicular logic for masonry)
- Entasis “sleeves” (optical/mechanical correction overlay)
- Roof→column load-flow field: vectors + flow curves (+ optional pipes)
- Modal ridge “standing wave” curves (+ optional pipes)
- Extra “nth derivative” phase curves (controlled; doesn’t explode object count)
REQUIREMENTS
- Rhino 8 + Grasshopper
- C# Script component (RhinoCode / GH Script)
- Units: meters (recommended), but works in any units if CFG values match your document scale.
NODE ORDER + WIRING (IMPORTANT)
This series is designed to be wired in a strict downstream chain:
1) STEP_TEMPLE_02 (CORE BUILD)
Inputs:
- STATE_IN (string) [optional: upstream JSON or raw cfg string]
- CFG_Override_In (string) [optional]
- SFG_Override_In (string) [optional]
- Url_Override_In (string) [optional]
- Debug (bool or string "true"/"false")
Outputs:
- StylobateBrepsOut
- CellaBrepOut
- ColumnBrepsOut
- EntablatureBrepsOut
- PedimentBrepsOut
- RoofBrepsOut
- ColumnPtsOut
- FootprintCrvsOut
- MetaTextOut
- STATE_OUT
2) STEP_TEMPLE_03_POP7 (DETAIL ESCALATION)
Inputs (wire from STEP_TEMPLE_02):
- STATE_IN <- STEP_TEMPLE_02 STATE_OUT
- StylobateBrepsIn <- StylobateBrepsOut
- CellaBrepIn <- CellaBrepOut
- ColumnBrepsIn <- ColumnBrepsOut
- EntablatureBrepsIn <- EntablatureBrepsOut
- PedimentBrepsIn <- PedimentBrepsOut
- RoofBrepsIn <- RoofBrepsOut
- ColumnPtsIn <- ColumnPtsOut
- Debug <- panel "true"/"false" or boolean
Outputs:
- DetailedBrepsOut (original assembly + applied replacements + ornaments)
- OrnamentBrepsOut (all added detail pieces)
- CutterBrepsOut (fluting cutters + any future cutters)
- DetailCurvesOut (axes, ridge, relief outlines, crack lines, etc.)
- DebugTextOut
- STATE_OUT (updated logs + step id)
3) STEP_TEMPLE_04_NTH_MATH_PHYS (MATH/PHYS/ENGINEERING DERIVATIVE LAYER)
Inputs (wire from STEP_TEMPLE_03_POP7):
- STATE_IN <- STEP_03 STATE_OUT
- DetailedBrepsIn <- STEP_03 DetailedBrepsOut
- OrnamentBrepsIn <- STEP_03 OrnamentBrepsOut
- DetailCurvesIn <- STEP_03 DetailCurvesOut
- Debug <- panel "true"/"false" or boolean
Outputs:
- MathPhysBrepsOut (pipes/sleeves/frieze solids, etc.)
- FieldCurvesOut (grids, catenary, flow lines, modal ridge, etc.)
- FieldPtsOut (vector field sample points)
- FieldVecsOut (vector field directions)
- AnalysisTextOut (summary of what was generated)
- STATE_OUT
CFG / SFG (HOW TO DRIVE IT)
CFG is typically a semicolon-separated string:
brand=Wick; stepId=STEP_TEMPLE_02; seed=4; siteW=60; siteD=38; steps=4; stepRise=0.45; stepRun=0.55;
colFront=10; colSide=6; colRadius=1.1; colHeight=10.5; colInset=2.4;
entH=2.2; entOver=1.3; pedH=4.5; roofPitch=22; roofThk=0.35;
cellaInset=6.5; cellaH=9.0; detail=2;
imageUrl=...; archPrompt=...;
SFG is usually:
style=ancient; beauty=0.85; ornament=0.65; ruin=0.05; material=limestone; lighting=soft; order=IONIC; detail=2;
PERFORMANCE + STABILITY NOTES
- POP7 (STEP_03) is designed to be safe:
- Booleans are capped (maxBooleans), and many details are additive (cheap).
- timeBudgetSec provides a hard cutoff so recompute stays stable.
- The roof ornament fix uses face projection + frame alignment for realism and accuracy.
- If your model feels too heavy:
- reduce: maxTiles, maxDentils, maxTriglyph, maxMicro
- reduce: maxBooleans, fluteCount
- reduce: timeBudgetSec
TROUBLESHOOTING
1) “ParamConvertException Debug GH_String to bool”
- Use a Boolean Toggle for Debug, OR type: true / false / 1 / 0 / on / off.
2) “Argument 1 cannot convert Brep to IEnumerable<Brep>”
- Boolean operations require collections. Scripts wrap single breps as new List<Brep>{target}.
3) Roof ornaments don’t stick to the slope
- Ensure updated STEP_TEMPLE_03_POP7 is used (tiles projected to slope faces via ClosestPoint + FrameAt).
— End README