Open-source Revit MCP server: let Claude and other AI assistants read and edit BIM models, with human approval on every change.
Python aecai-agentsautodeskautomationbimclaudeifcmcpmcp-servermodel-context-protocolnavisworksrevitrevit-addinrevit-apirhino
chore: remove build artifacts and orphaned scratch files
sammohammad578eb4df09c0250
diff --git a/deploy_pbi.ps1 b/deploy_pbi.ps1deleted file mode 100644index c617119..0000000--- a/deploy_pbi.ps1+++ /dev/null@@ -1,8 +0,0 @@-$pbiExternalToolsDir = 'C:\Program Files (x86)\Common Files\Microsoft Shared\Power BI Desktop\External Tools'-if (-not (Test-Path $pbiExternalToolsDir)) {- New-Item -ItemType Directory -Force -Path $pbiExternalToolsDir | Out-Null-}--$exeDir = Join-Path $PSScriptRoot 'packages\powerbi-bridge-tool\bin\Release\net8.0-windows'-$template = Get-Content (Join-Path $PSScriptRoot 'packages\powerbi-bridge-tool\AECModelBridge.pbitool.json') -Raw-$template.Replace('%PBITOOL_PATH%', $exeDir) | Set-Content (Join-Path $pbiExternalToolsDir 'AECModelBridge.pbitool.json')diff --git a/scratch/copy_files.py b/scratch/copy_files.pydeleted file mode 100644index 93bf895..0000000--- a/scratch/copy_files.py+++ /dev/null@@ -1,49 +0,0 @@-import shutil-from pathlib import Path--worktrees_dir = Path("C:/Users/sammo/worktrees/aec")-main_dir = Path("C:/Users/sammo/OneDrive/Documenten/GitHub/Autodesk-Revit-MCP-Server")--# 1. Copy Task A1 files-shutil.copy2(- worktrees_dir / "task-a1/packages/mcp-server-revit/src/revit_mcp_server/providers/cloud.py",- main_dir / "packages/mcp-server-revit/src/revit_mcp_server/providers/cloud.py"-)-shutil.copy2(- worktrees_dir / "task-a1/packages/mcp-server-revit/tests/test_cloud_providers.py",- main_dir / "packages/mcp-server-revit/tests/test_cloud_providers.py"-)-shutil.copy2(- worktrees_dir / "task-a1/AGENT-TASK.md",- main_dir / "AGENT-TASK-A1.md"-)--# 2. Copy Task A3 files-shutil.copy2(- worktrees_dir / "task-a3/packages/mcp-server-revit/src/revit_mcp_server/providers/proxy.py",- main_dir / "packages/mcp-server-revit/src/revit_mcp_server/providers/proxy.py"-)-shutil.copy2(- worktrees_dir / "task-a3/packages/mcp-server-revit/src/revit_mcp_server/providers/__init__.py",- main_dir / "packages/mcp-server-revit/src/revit_mcp_server/providers/__init__.py"-)-shutil.copy2(- worktrees_dir / "task-a3/packages/mcp-server-revit/tests/test_proxy.py",- main_dir / "packages/mcp-server-revit/tests/test_proxy.py"-)-shutil.copy2(- worktrees_dir / "task-a3/AGENT-TASK.md",- main_dir / "AGENT-TASK-A3.md"-)--# 3. Copy other AGENT-TASK.md files-shutil.copy2(- worktrees_dir / "task-a5/AGENT-TASK.md",- main_dir / "AGENT-TASK-A5.md"-)-shutil.copy2(- worktrees_dir / "task-a8/AGENT-TASK.md",- main_dir / "AGENT-TASK-A8.md"-)--print("Copy completed successfully!")diff --git a/scratch/detailed_facade.py b/scratch/detailed_facade.pydeleted file mode 100644index 4c89e5d..0000000--- a/scratch/detailed_facade.py+++ /dev/null@@ -1,510 +0,0 @@-# =============================================================================-# DETAILED FAÇADE SYSTEM — Stick Curtain Wall Generator (Engineered Portfolio)-# AEC Omni-Bridge MCP | Run via bridge or Rhino PythonEdit (F5)-# =============================================================================--import math-import Rhino-import Rhino.Geometry as rg-import Rhino.DocObjects as rdo-import Rhino.Display as rdp-import scriptcontext as sc-import System.Drawing as sd--doc = sc.doc-tol = doc.ModelAbsoluteTolerance-S = Rhino.RhinoMath.UnitScale(Rhino.UnitSystem.Meters, doc.ModelUnitSystem)--# =============================================================================-# PARAMETERS (all values in Metres, auto-scaled)-# =============================================================================-NUM_BAYS = 3 # Number of vertical bays-NUM_FLOORS = 2 # Number of floors-BAY_WIDTH = 1.50 # Horizontal bay spacing (m)-FLOOR_HEIGHT = 3.50 # Floor-to-floor height (m)--# Mullion & Transom Profile Dimensions-MULLION_W = 0.060 # Sightline width (60 mm - upgraded for 15mm glass bite)-MULLION_D = 0.150 # Mullion depth (150 mm)-MULLION_T = 0.003 # Extrusion wall thickness (3 mm)--TRANSOM_W = 0.060 # Sightline width (60 mm - upgraded for consistency)-TRANSOM_D = 0.120 # Transom depth (120 mm)-TRANSOM_T = 0.003 # Extrusion wall thickness (3 mm)--# Double Glazing (IGU) Parameters-GLASS_OUTER_T = 0.006 # Outer pane thickness (6 mm)-GLASS_INNER_T = 0.006 # Inner pane thickness (6 mm)-GLASS_GAP_T = 0.016 # Argon gas spacer gap (16 mm)-GLASS_REVEAL = 0.015 # Expansion joint gap from gridline (15 mm)-GLASS_SETBACK = 0.040 # Setback from mullion front face (40 mm)--# Gasket & Pressure Plate Parameters-GASKET_T = 0.004 # Gasket thickness (4 mm)-GASKET_W = 0.012 # Gasket width (12 mm)-ISOLATOR_W = 0.012 # Thermal break width (12 mm)-PRESSURE_PLATE_T = 0.006 # Clamping plate thickness (6 mm)-COVER_CAP_D = 0.020 # Snap cover cap depth (20 mm)--# Structural Concrete Slab Parameters-SLAB_T = 0.30 # Concrete slab thickness (300 mm)-SLAB_DEPTH = 1.50 # Depth of floor slab extension inward (1.5 m)-SLAB_INSET = 0.010 # Air clearance between slab edge and mullion back (10 mm)--# Slab Anchor Bracket Parameters-BRACKET_W = 0.080 # Width of bracket flanking the mullion (80 mm)-BRACKET_L1 = 0.150 # Length of bracket leg on concrete slab (150 mm)-BRACKET_L2 = 0.120 # Length of bracket leg on mullion side (120 mm)-BRACKET_T = 0.008 # Steel bracket thickness (8 mm)--CLEAR_BEFORE = True--# =============================================================================-# SCALE PARAMETERS TO DOCUMENT UNITS-# =============================================================================-BAY_WIDTH *= S; FLOOR_HEIGHT *= S-MULLION_W *= S; MULLION_D *= S; MULLION_T *= S-TRANSOM_W *= S; TRANSOM_D *= S; TRANSOM_T *= S-GLASS_OUTER_T *= S; GLASS_INNER_T *= S; GLASS_GAP_T *= S-GLASS_REVEAL *= S; GLASS_SETBACK *= S-GASKET_T *= S; GASKET_W *= S; ISOLATOR_W *= S-PRESSURE_PLATE_T *= S; COVER_CAP_D *= S-SLAB_T *= S; SLAB_DEPTH *= S; SLAB_INSET *= S-BRACKET_W *= S; BRACKET_L1 *= S; BRACKET_L2 *= S; BRACKET_T *= S--TOTAL_HEIGHT = NUM_FLOORS * FLOOR_HEIGHT--# =============================================================================-# MATERIALS & LAYERS-# =============================================================================-def add_mat(name, base_c4f, metallic, roughness, diffuse_rgb, transp=0.0, refl=0.0, shine=0.5, opacity=1.0, ior=1.5):- existing = doc.Materials.Find(name, True)- if existing >= 0:- m = doc.Materials[existing]- else:- m = rdo.Material()- m.Name = name- try:- m.ToPhysicallyBased()- pb = m.PhysicallyBased- pb.BaseColor = rdp.Color4f(*base_c4f)- pb.Metallic = metallic- pb.Roughness = roughness- try: pb.Opacity = opacity- except: pass- try: pb.OpacityIOR = ior- except: pass- except: pass- m.DiffuseColor = sd.Color.FromArgb(*diffuse_rgb)- m.Transparency = transp- m.Reflectivity = refl- m.FresnelReflections = True- m.Shine = int(shine * rdo.Material.MaxShine)- if existing >= 0:- doc.Materials.Modify(m, existing, True)- return existing- return doc.Materials.Add(m)--# Create/Get Materials-m_alu = add_mat("AluAnodized", (0.05, 0.05, 0.06, 1.0), 0.95, 0.18, (35, 38, 46), refl=0.88, shine=0.75)-m_glass_ot = add_mat("GlassOuter", (0.02, 0.08, 0.12, 1.0), 0.00, 0.01, (15, 68, 90), transp=0.88, refl=0.92, shine=0.98, opacity=0.12, ior=1.52)-m_glass_in = add_mat("GlassInner", (0.95, 0.95, 0.95, 1.0), 0.00, 0.01, (220, 225, 220), transp=0.92, refl=0.90, shine=0.98, opacity=0.08, ior=1.52)-m_rubber = add_mat("RubberEPDM", (0.04, 0.04, 0.04, 1.0), 0.00, 0.82, (20, 20, 20), refl=0.05, shine=0.05)-m_thermal = add_mat("ThermalBreakStrut", (0.08, 0.08, 0.08, 1.0), 0.00, 0.65, (30, 30, 30), refl=0.06, shine=0.08)-m_steel = add_mat("GalvanizedSteel", (0.55, 0.55, 0.56, 1.0), 0.85, 0.38, (140, 140, 145), refl=0.55, shine=0.60)-m_concrete = add_mat("SlabConcrete", (0.33, 0.33, 0.31, 1.0), 0.00, 0.85, (120, 120, 115), refl=0.05, shine=0.02)-m_screw = add_mat("BrightScrew", (0.75, 0.75, 0.75, 1.0), 0.95, 0.10, (190, 190, 195), refl=0.90, shine=0.85)-m_firestop = add_mat("FireStopWool", (0.70, 0.62, 0.38, 1.0), 0.00, 0.92, (180, 160, 100), refl=0.02, shine=0.01)--def get_layer(name, rgb):- idx = doc.Layers.FindByFullPath(name, -1)- if idx < 0:- lyr = rdo.Layer()- lyr.Name = name- lyr.Color = sd.Color.FromArgb(*rgb)- idx = doc.Layers.Add(lyr)- else:- doc.Layers[idx].Color = sd.Color.FromArgb(*rgb)- if CLEAR_BEFORE:- objs = doc.Objects.FindByLayer(name)- if objs:- for o in objs: doc.Objects.Delete(o, True)- return idx--def make_attr(layer_idx, mat_idx):- a = rdo.ObjectAttributes()- a.LayerIndex = layer_idx- a.MaterialIndex = mat_idx- a.MaterialSource = rdo.ObjectMaterialSource.MaterialFromObject- return a--# Sub-layers tree-l_mullion = get_layer("Facade::Mullions", (35, 38, 46))-l_transom = get_layer("Facade::Transoms", (50, 55, 65))-l_gl_out = get_layer("Facade::Glazing::GlassOuter", (60, 140, 210))-l_gl_in = get_layer("Facade::Glazing::GlassInner", (170, 210, 240))-l_spacer = get_layer("Facade::Glazing::Spacer", (50, 50, 50))-l_sealant = get_layer("Facade::Glazing::Sealant", (10, 10, 10))-l_gasket = get_layer("Facade::Gaskets", (20, 20, 20))-l_thermal = get_layer("Facade::ThermalIsolator", (30, 30, 30))-l_press = get_layer("Facade::PressurePlates", (100, 105, 115))-l_caps = get_layer("Facade::CoverCaps", (35, 38, 46))-l_fixings = get_layer("Facade::Fixings", (190, 190, 195))-l_bracket = get_layer("Facade::SlabBrackets", (120, 120, 125))-l_firestop = get_layer("Facade::FireSafing", (180, 160, 100))-l_slabs = get_layer("Structure::Slabs", (140, 136, 126))--a_mullion = make_attr(l_mullion, m_alu)-a_transom = make_attr(l_transom, m_alu)-a_gl_out = make_attr(l_gl_out, m_glass_ot)-a_gl_in = make_attr(l_gl_in, m_glass_in)-a_spacer = make_attr(l_spacer, m_alu)-a_sealant = make_attr(l_sealant, m_rubber)-a_gasket = make_attr(l_gasket, m_rubber)-a_thermal = make_attr(l_thermal, m_thermal)-a_press = make_attr(l_press, m_alu)-a_caps = make_attr(l_caps, m_alu)-a_fixings = make_attr(l_fixings, m_screw)-a_bracket = make_attr(l_bracket, m_steel)-a_firestop = make_attr(l_firestop, m_firestop)-a_slabs = make_attr(l_slabs, m_concrete)--# =============================================================================-# PROFILE EXTRUSION HELPERS-# =============================================================================-def make_hollow_tube(plane, w, y_min, y_max, length):- # Generates a solid bounding profile to minimize CAD computation overhead- rect = rg.Rectangle3d(rg.Plane.WorldXY, rg.Interval(-w*0.5, w*0.5), rg.Interval(y_min, y_max))- ext = rg.Extrusion.Create(rect.ToNurbsCurve(), length, True).ToBrep()- if ext:- xf = rg.Transform.PlaneToPlane(rg.Plane.WorldXY, plane)- ext.Transform(xf)- return ext- return None--# 1. Grid coordinates-X_grid = [i * BAY_WIDTH for i in range(NUM_BAYS + 1)]--# Define transom elevations (Bottom, intermediate head/sill at slab levels, and top boundaries)-Z_grid = []-Z_grid.append(0.0) # Bottom boundary (Sill)-for f in range(1, NUM_FLOORS):- fz = f * FLOOR_HEIGHT- Z_grid.append(fz - 0.15 * S) # Head transom: 150mm below slab level- Z_grid.append(fz + 0.85 * S) # Sill transom: 850mm above slab level-Z_grid.append(TOTAL_HEIGHT) # Top boundary (Head)--Z_grid = sorted(list(set(Z_grid)))---print("Generating detailed engineered curtain wall façade...")-n_mullions = 0-n_transoms = 0-n_glass = 0--# 2. Vertical Mullions (with structural central noses)-for x in X_grid:- m_plane = rg.Plane(rg.Point3d(x, 0.0, 0.0), rg.Vector3d.XAxis, rg.Vector3d.YAxis)-- # Main structural chamber (Y = -GLASS_SETBACK + GASKET_T to y_mullion_back)- y_front = -GLASS_SETBACK + GASKET_T- y_back = y_front + MULLION_D- m_brep = make_hollow_tube(m_plane, MULLION_W, y_front, y_back, TOTAL_HEIGHT)- if m_brep:- doc.Objects.AddBrep(m_brep, a_mullion)- n_mullions += 1-- # Central nose extrusion (Y = -GLASS_SETBACK - GLASS_INNER_T to -GLASS_SETBACK + GASKET_T)- nose_w = 0.024 * S- y_nose_min = -GLASS_SETBACK - GLASS_INNER_T- y_nose_max = -GLASS_SETBACK + GASKET_T- m_nose_brep = make_hollow_tube(m_plane, nose_w, y_nose_min, y_nose_max, TOTAL_HEIGHT)- if m_nose_brep:- doc.Objects.AddBrep(m_nose_brep, a_mullion)--# 3. Horizontal Transoms (placed at all Z_grid levels)-for k in range(len(Z_grid)):- z = Z_grid[k]-- for i in range(NUM_BAYS):- x_start = X_grid[i] + MULLION_W*0.5- x_end = X_grid[i+1] - MULLION_W*0.5- length = x_end - x_start- if length <= 0: continue-- t_plane = rg.Plane(rg.Point3d(x_start, 0.0, z), -rg.Vector3d.ZAxis, rg.Vector3d.YAxis)-- # Main transom profile- y_front = -GLASS_SETBACK + GASKET_T- y_back = y_front + TRANSOM_D- t_brep = make_hollow_tube(t_plane, TRANSOM_W, y_front, y_back, length)- if t_brep:- doc.Objects.AddBrep(t_brep, a_transom)- n_transoms += 1-- # Central nose extrusion- nose_w = 0.024 * S- y_nose_min = -GLASS_SETBACK - GLASS_INNER_T- y_nose_max = -GLASS_SETBACK + GASKET_T- t_nose_brep = make_hollow_tube(t_plane, nose_w, y_nose_min, y_nose_max, length)- if t_nose_brep:- doc.Objects.AddBrep(t_nose_brep, a_transom)---# 4. Concrete Floor Slabs & Perimeter Fire Safing-for f in range(1, NUM_FLOORS):- z_floor = f * FLOOR_HEIGHT- y_mullion_back = -GLASS_SETBACK + GASKET_T + MULLION_D- slab_edge_y = y_mullion_back + SLAB_INSET-- # Floor slab- slab = rg.Box(- rg.Plane.WorldXY,- rg.Interval(0.0, NUM_BAYS * BAY_WIDTH),- rg.Interval(slab_edge_y, slab_edge_y + SLAB_DEPTH),- rg.Interval(z_floor - SLAB_T, z_floor)- ).ToBrep()- if slab:- doc.Objects.AddBrep(slab, a_slabs)-- # Perimeter Fire Stop (Mineral wool filling the joint)- firestop_wool = rg.Box(- rg.Plane.WorldXY,- rg.Interval(0.0, NUM_BAYS * BAY_WIDTH),- rg.Interval(y_mullion_back, slab_edge_y),- rg.Interval(z_floor - SLAB_T, z_floor)- ).ToBrep()- if firestop_wool:- doc.Objects.AddBrep(firestop_wool, a_firestop)-- # Galvanized Smoke Cover Sheet (2mm sheet overlapping the concrete slab by 50mm)- smoke_sheet = rg.Box(- rg.Plane.WorldXY,- rg.Interval(0.0, NUM_BAYS * BAY_WIDTH),- rg.Interval(y_mullion_back, slab_edge_y + 0.050*S),- rg.Interval(z_floor, z_floor + 0.002*S)- ).ToBrep()- if smoke_sheet:- doc.Objects.AddBrep(smoke_sheet, a_bracket)--# 5. Slab Anchor Brackets (flanking the mullions inside the spandrel zone, clearing transoms)-for f in range(1, NUM_FLOORS):- z_floor = f * FLOOR_HEIGHT- y_mullion_back = -GLASS_SETBACK + GASKET_T + MULLION_D- slab_edge_y = y_mullion_back + SLAB_INSET- for x in X_grid:- # Left flanking bracket legs (attached to slab and side of mullion)- leg1_l = rg.Box(rg.Plane.WorldXY, rg.Interval(x - MULLION_W*0.5 - BRACKET_T, x - MULLION_W*0.5), rg.Interval(slab_edge_y, slab_edge_y + BRACKET_L1), rg.Interval(z_floor, z_floor + BRACKET_T)).ToBrep()- leg2_l = rg.Box(rg.Plane.WorldXY, rg.Interval(x - MULLION_W*0.5 - BRACKET_T, x - MULLION_W*0.5), rg.Interval(y_mullion_back - BRACKET_W, slab_edge_y), rg.Interval(z_floor, z_floor + BRACKET_L2)).ToBrep()- if leg1_l: doc.Objects.AddBrep(leg1_l, a_bracket)- if leg2_l: doc.Objects.AddBrep(leg2_l, a_bracket)-- # Right flanking bracket legs (attached to slab and side of mullion)- leg1_r = rg.Box(rg.Plane.WorldXY, rg.Interval(x + MULLION_W*0.5, x + MULLION_W*0.5 + BRACKET_T), rg.Interval(slab_edge_y, slab_edge_y + BRACKET_L1), rg.Interval(z_floor, z_floor + BRACKET_T)).ToBrep()- leg2_r = rg.Box(rg.Plane.WorldXY, rg.Interval(x + MULLION_W*0.5, x + MULLION_W*0.5 + BRACKET_T), rg.Interval(y_mullion_back - BRACKET_W, slab_edge_y), rg.Interval(z_floor, z_floor + BRACKET_L2)).ToBrep()- if leg1_r: doc.Objects.AddBrep(leg1_r, a_bracket)- if leg2_r: doc.Objects.AddBrep(leg2_r, a_bracket)--# 6. EPDM Gaskets, Thermal Breaks, Pressure Plates, Cover Caps, and Fixings-# Centered on Vertical Mullions-g_w_m = MULLION_W * 0.5 - GLASS_REVEAL # Dynamic gasket width matching mullion shoulders--for x in X_grid:- # Inner gaskets sized strictly to glass reveal & dynamic gasket width (Y = -GLASS_SETBACK to -GLASS_SETBACK + GASKET_T)- g_l = rg.Box(rg.Plane.WorldXY, rg.Interval(x - GLASS_REVEAL - g_w_m, x - GLASS_REVEAL), rg.Interval(-GLASS_SETBACK, -GLASS_SETBACK + GASKET_T), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- g_r = rg.Box(rg.Plane.WorldXY, rg.Interval(x + GLASS_REVEAL, x + GLASS_REVEAL + g_w_m), rg.Interval(-GLASS_SETBACK, -GLASS_SETBACK + GASKET_T), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- if g_l: doc.Objects.AddBrep(g_l, a_gasket)- if g_r: doc.Objects.AddBrep(g_r, a_gasket)-- # Outer gaskets flanking the thermal break under the pressure plate- gy_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T - GASKET_T- gy_max = gy_min + GASKET_T- og_l = rg.Box(rg.Plane.WorldXY, rg.Interval(x - GLASS_REVEAL - g_w_m, x - GLASS_REVEAL), rg.Interval(gy_min, gy_max), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- og_r = rg.Box(rg.Plane.WorldXY, rg.Interval(x + GLASS_REVEAL, x + GLASS_REVEAL + g_w_m), rg.Interval(gy_min, gy_max), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- if og_l: doc.Objects.AddBrep(og_l, a_gasket)- if og_r: doc.Objects.AddBrep(og_r, a_gasket)--- # Thermal Break Isolator (filling the central gap between glass edges)- iy_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T- iy_max = -GLASS_SETBACK - GLASS_INNER_T- ti = rg.Box(rg.Plane.WorldXY, rg.Interval(x - ISOLATOR_W*0.5, x + ISOLATOR_W*0.5), rg.Interval(iy_min, iy_max), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- if ti: doc.Objects.AddBrep(ti, a_thermal)-- # Pressure Plate (clamping the glazing units)- py_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T - GASKET_T - PRESSURE_PLATE_T- py_max = py_min + PRESSURE_PLATE_T- pp = rg.Box(rg.Plane.WorldXY, rg.Interval(x - MULLION_W*0.5, x + MULLION_W*0.5), rg.Interval(py_min, py_max), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- if pp: doc.Objects.AddBrep(pp, a_press)-- # Snap-on Cover Cap- pts_c = [- rg.Point3d(-MULLION_W*0.5, 0.0, 0.0),- rg.Point3d(-MULLION_W*0.5, -COVER_CAP_D + 0.006*S, 0.0),- rg.Point3d(-MULLION_W*0.5 + 0.006*S, -COVER_CAP_D, 0.0),- rg.Point3d(MULLION_W*0.5 - 0.006*S, -COVER_CAP_D, 0.0),- rg.Point3d(MULLION_W*0.5, -COVER_CAP_D + 0.006*S, 0.0),- rg.Point3d(MULLION_W*0.5, 0.0, 0.0),- rg.Point3d(-MULLION_W*0.5, 0.0, 0.0)- ]- pl = rg.Polyline(pts_c).ToNurbsCurve()- ext = rg.Extrusion.Create(pl, TOTAL_HEIGHT, True).ToBrep()- if ext:- ext.Transform(rg.Transform.PlaneToPlane(rg.Plane.WorldXY, rg.Plane(rg.Point3d(x, py_min, 0.0), rg.Vector3d.XAxis, rg.Vector3d.YAxis)))- doc.Objects.AddBrep(ext, a_caps)-- # Screws (90mm long to pass through pressure plate, thermal break, and anchor into structural mullion nose)- screw_spacing = 0.35 * S- screw_rad = 0.004 * S- screw_len = 0.090 * S- cur_z = 0.1 * S- while cur_z < TOTAL_HEIGHT:- cyl_plane = rg.Plane(rg.Point3d(x, py_min, cur_z), rg.Vector3d.YAxis)- cyl = rg.Cylinder(rg.Circle(cyl_plane, screw_rad), screw_len).ToBrep(True, True)- if cyl: doc.Objects.AddBrep(cyl, a_fixings)- cur_z += screw_spacing--# Centered on Horizontal Transoms-g_w_t = TRANSOM_W * 0.5 - GLASS_REVEAL # Dynamic gasket width matching transom shoulders--for k in range(len(Z_grid)):- z = Z_grid[k]-- for i in range(NUM_BAYS):- x_start = X_grid[i] + MULLION_W*0.5- x_end = X_grid[i+1] - MULLION_W*0.5- length = x_end - x_start- if length <= 0: continue-- gy_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T - GASKET_T- gy_max = gy_min + GASKET_T-- # Top Gaskets (seal the glass above the transom) - skip if this is the top boundary- if k < len(Z_grid) - 1:- g_t = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(-GLASS_SETBACK, -GLASS_SETBACK + GASKET_T), rg.Interval(z + GLASS_REVEAL, z + GLASS_REVEAL + g_w_t)).ToBrep()- if g_t: doc.Objects.AddBrep(g_t, a_gasket)-- og_t = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(gy_min, gy_max), rg.Interval(z + GLASS_REVEAL, z + GLASS_REVEAL + g_w_t)).ToBrep()- if og_t: doc.Objects.AddBrep(og_t, a_gasket)-- # Bottom Gaskets (seal the glass below the transom) - skip if this is the bottom boundary- if k > 0:- g_b = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(-GLASS_SETBACK, -GLASS_SETBACK + GASKET_T), rg.Interval(z - GLASS_REVEAL - g_w_t, z - GLASS_REVEAL)).ToBrep()- if g_b: doc.Objects.AddBrep(g_b, a_gasket)-- og_b = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(gy_min, gy_max), rg.Interval(z - GLASS_REVEAL - g_w_t, z - GLASS_REVEAL)).ToBrep()- if og_b: doc.Objects.AddBrep(og_b, a_gasket)--- # Thermal break- iy_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T- iy_max = -GLASS_SETBACK - GLASS_INNER_T- ti = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(iy_min, iy_max), rg.Interval(z - ISOLATOR_W*0.5, z + ISOLATOR_W*0.5)).ToBrep()- if ti: doc.Objects.AddBrep(ti, a_thermal)-- # Pressure plate- py_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T - GASKET_T - PRESSURE_PLATE_T- py_max = py_min + PRESSURE_PLATE_T- pp = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(py_min, py_max), rg.Interval(z - TRANSOM_W*0.5, z + TRANSOM_W*0.5)).ToBrep()- if pp: doc.Objects.AddBrep(pp, a_press)-- # Snap-on cover cap- pts_c = [- rg.Point3d(-TRANSOM_W*0.5, 0.0, 0.0),- rg.Point3d(-TRANSOM_W*0.5, -COVER_CAP_D + 0.006*S, 0.0),- rg.Point3d(-TRANSOM_W*0.5 + 0.006*S, -COVER_CAP_D, 0.0),- rg.Point3d(TRANSOM_W*0.5 - 0.006*S, -COVER_CAP_D, 0.0),- rg.Point3d(TRANSOM_W*0.5, -COVER_CAP_D + 0.006*S, 0.0),- rg.Point3d(TRANSOM_W*0.5, 0.0, 0.0),- rg.Point3d(-TRANSOM_W*0.5, 0.0, 0.0)- ]- pl = rg.Polyline(pts_c).ToNurbsCurve()- ext = rg.Extrusion.Create(pl, length, True).ToBrep()- if ext:- ext.Transform(rg.Transform.PlaneToPlane(rg.Plane.WorldXY, rg.Plane(rg.Point3d(x_start, py_min, z), -rg.Vector3d.ZAxis, rg.Vector3d.YAxis)))- doc.Objects.AddBrep(ext, a_caps)-- # Screws (90mm long, penetrating horizontal transom nose)- screw_spacing = 0.35 * S- screw_rad = 0.004 * S- screw_len = 0.090 * S- cur_x = x_start + 0.1 * S- while cur_x < x_end:- cyl_plane = rg.Plane(rg.Point3d(cur_x, py_min, z), rg.Vector3d.YAxis)- cyl = rg.Cylinder(rg.Circle(cyl_plane, screw_rad), screw_len).ToBrep(True, True)- if cyl: doc.Objects.AddBrep(cyl, a_fixings)- cur_x += screw_spacing---# 7. Insulated Glass Units (IGUs) - Glass, Spacers, and Sealants-for k in range(len(Z_grid) - 1):- z_start = Z_grid[k]- z_end = Z_grid[k+1]-- for i in range(NUM_BAYS):- x_start = X_grid[i]- x_end = X_grid[i+1]-- # Glazing coordinates with reveal offsets- x1 = x_start + GLASS_REVEAL- x2 = x_end - GLASS_REVEAL- z1 = z_start + GLASS_REVEAL- z2 = z_end - GLASS_REVEAL-- if x2 - x1 <= 0 or z2 - z1 <= 0: continue-- # Inner Glass Pane (Y = -GLASS_SETBACK - GLASS_INNER_T to -GLASS_SETBACK)- y_in_min = -GLASS_SETBACK - GLASS_INNER_T- y_in_max = -GLASS_SETBACK- glass_in = rg.Box(rg.Plane.WorldXY, rg.Interval(x1, x2), rg.Interval(y_in_min, y_in_max), rg.Interval(z1, z2)).ToBrep()- if glass_in: doc.Objects.AddBrep(glass_in, a_gl_in)-- # Outer Glass Pane (Y = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T to y_ot_max)- y_ot_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T- y_ot_max = y_ot_min + GLASS_OUTER_T- glass_ot = rg.Box(rg.Plane.WorldXY, rg.Interval(x1, x2), rg.Interval(y_ot_min, y_ot_max), rg.Interval(z1, z2)).ToBrep()- if glass_ot: doc.Objects.AddBrep(glass_ot, a_gl_out)-- # Spacer Frame (4 individual boxes flanking inner edges)- sp_offset = 0.015 * S- sp_width = 0.012 * S- sx1 = x1 + sp_offset- sx2 = x2 - sp_offset- sz1 = z1 + sp_offset- sz2 = z2 - sp_offset- sy_min = y_in_max - GLASS_GAP_T # Wait, y_in_max is -GLASS_SETBACK, but spacer is between inner and outer glass panes.- # Outer face of inner glass is at y_in_min (-GLASS_SETBACK - GLASS_INNER_T).- # Inner face of outer glass is at y_ot_max (-GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T).- # So the spacer goes from Y = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T to Y = -GLASS_SETBACK - GLASS_INNER_T.- sy_min_spacer = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T- sy_max_spacer = -GLASS_SETBACK - GLASS_INNER_T-- if sx2 - sx1 > 0 and sz2 - sz1 > 0:- sp_l = rg.Box(rg.Plane.WorldXY, rg.Interval(sx1, sx1 + sp_width), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(sz1, sz2)).ToBrep()- sp_r = rg.Box(rg.Plane.WorldXY, rg.Interval(sx2 - sp_width, sx2), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(sz1, sz2)).ToBrep()- sp_b = rg.Box(rg.Plane.WorldXY, rg.Interval(sx1 + sp_width, sx2 - sp_width), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(sz1, sz1 + sp_width)).ToBrep()- sp_t = rg.Box(rg.Plane.WorldXY, rg.Interval(sx1 + sp_width, sx2 - sp_width), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(sz2 - sp_width, sz2)).ToBrep()- for sp in (sp_l, sp_r, sp_b, sp_t):- if sp: doc.Objects.AddBrep(sp, a_spacer)-- # Secondary Sealant Pocket (4 outer sealant bars filling outer cavity)- se_l = rg.Box(rg.Plane.WorldXY, rg.Interval(x1, sx1), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(z1, z2)).ToBrep()- se_r = rg.Box(rg.Plane.WorldXY, rg.Interval(sx2, x2), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(z1, z2)).ToBrep()- se_b = rg.Box(rg.Plane.WorldXY, rg.Interval(sx1, sx2), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(z1, sz1)).ToBrep()- se_t = rg.Box(rg.Plane.WorldXY, rg.Interval(sx1, sx2), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(sz2, z2)).ToBrep()- for se in (se_l, se_r, se_b, se_t):- if se: doc.Objects.AddBrep(se, a_sealant)-- n_glass += 1--doc.Views.Redraw()--print("")-print("=" * 60)-print("STICK CURTAIN WALL SYSTEM - Refined Engineered Edition")-print(" Vertical Mullions : %d (continuous profiles + central noses)" % n_mullions)-print(" Horizontal Transoms : %d (butted profiles + central noses)" % n_transoms)-print(" Glazed Panels (IGUs): %d (double panes + spacers + sealants)" % n_glass)-print("=" * 60)-print("Visualisation Tip: Set viewport display mode to Rendered / Arctic")-print("============================================================")diff --git a/scratch/diag.py b/scratch/diag.pydeleted file mode 100644index 4ca3d56..0000000--- a/scratch/diag.py+++ /dev/null@@ -1,51 +0,0 @@-import scriptcontext as sc, Rhino, Rhino.Geometry as rg--BASE_R=22.0; WAIST_R=13.5; TOP_R=19.0; HEIGHT=200.0-U_DIVS=20; V_DIVS=36-scale = Rhino.RhinoMath.UnitScale(Rhino.UnitSystem.Meters, sc.doc.ModelUnitSystem)--def smooth_r(a,b,c,t):- if t<=0.5: s=t*2.0; return a+(b-a)*(s*s*(3-2*s))- s=(t-0.5)*2.0; return b+(c-b)*(s*s*(3-2*s))--crvs=[]-for i in range(12):- t=float(i)/11; r=smooth_r(BASE_R,WAIST_R,TOP_R,t)*scale; z=t*HEIGHT*scale- crvs.append(rg.Circle(rg.Plane(rg.Point3d(0,0,z),rg.Vector3d.ZAxis),r).ToNurbsCurve())-breps=rg.Brep.CreateFromLoft(crvs,rg.Point3d.Unset,rg.Point3d.Unset,rg.LoftType.Normal,False)-face=breps[0].Faces[0]-face.SetDomain(0,rg.Interval(0,1)); face.SetDomain(1,rg.Interval(0,1))--print("Brep faces:", breps[0].Faces.Count)-p0=face.PointAt(0.0, 0.5)-p1=face.PointAt(1.0, 0.5)-print("PointAt(0,0.5): %.3f %.3f %.3f" % (p0.X, p0.Y, p0.Z))-print("PointAt(1,0.5): %.3f %.3f %.3f" % (p1.X, p1.Y, p1.Z))-print("U seam distance: %.4f" % p0.DistanceTo(p1))-print("IsClosed U:", face.IsClosed(0))-print("IsPeriodic U:", face.IsPeriodic(0))--def gpt(i,j): return face.PointAt(float(i%U_DIVS)/U_DIVS, float(j)/V_DIVS)-def cc(i,j): return face.PointAt(((i+0.5)/float(U_DIVS))%1.0, (j+0.5)/float(V_DIVS))--import math-cell_w = 2*math.pi*22*scale/U_DIVS-print("Expected cell width ~: %.2f" % cell_w)--# Check bounding box of each seam panel type-print("--- TypeB seam panels (i=19) ---")-for j in [0,17,35]:- A=cc(19,j); B=gpt(20,j); C=cc(0,j); D=gpt(20,j+1)- bb=rg.BoundingBox([A,B,C,D])- print(" j=%d diag=%.2f" % (j, bb.Diagonal.Length))--print("--- TypeA seam panels (i=19) ---")-for j in [0,17,34]:- A=cc(19,j); B=gpt(20,j+1); C=cc(19,j+1); D=gpt(19,j+1)- bb=rg.BoundingBox([A,B,C,D])- print(" j=%d diag=%.2f" % (j, bb.Diagonal.Length))--print("--- Normal TypeB (i=10) ---")-A=cc(10,18); B=gpt(11,18); C=cc(11,18); D=gpt(11,19)-bb=rg.BoundingBox([A,B,C,D])-print(" diag=%.2f" % bb.Diagonal.Length)diff --git a/scratch/diagrid_tower_hd.py b/scratch/diagrid_tower_hd.pydeleted file mode 100644index 005acfe..0000000--- a/scratch/diagrid_tower_hd.py+++ /dev/null@@ -1,106 +0,0 @@-"""-High-fidelity diagrid skyscraper generator via Rhino MCP bridge.--Sends a single command to http://127.0.0.1:3004/execute which triggers:- - Smooth hyperboloid tower surface (waisted profile, 11 loft rings)- - Properly-oriented 150x300mm rectangular mullion sweeps (depth axis = surface normal)- - Volumetric glass panel solids inset within the frame grid- - PBR materials: dark anodised aluminium + highly-reflective tinted green glass--Switch to Rendered Mode in Rhino after running to see the photorealistic result.-"""--import json-import sys--try:- import requests-except ImportError:- sys.exit("Install requests first: pip install requests")--BRIDGE = "http://127.0.0.1:3004"-EXECUTE = f"{BRIDGE}/execute"-HEALTH = f"{BRIDGE}/health"---def post(payload: dict) -> dict:- r = requests.post(EXECUTE, json=payload, timeout=300) # generous timeout for heavy geometry- r.raise_for_status()- return r.json()---def main() -> None:- # ── Health check ────────────────────────────────────────────────────────────- try:- health = requests.get(HEALTH, timeout=5).json()- print(f"Bridge: {health.get('bridge', '?')} | status: {health.get('status', '?')}")- except Exception as e:- sys.exit(f"Rhino bridge not reachable at {BRIDGE} — is the addin running?\n{e}")-- print()-- # ── Tower parameters ────────────────────────────────────────────────────────- # Sizes are in metres; the C# handler converts to the document unit automatically.- #- # Topology tip: u_divs controls the diagrid panel count around the perimeter;- # v_divs controls the vertical rhythm. 16×28 gives elegant ~8×6m panels on a- # 180m tower — increase both for a denser facade on a faster machine.-- command = {- "command": "generate_diagrid_tower",-- # Form — waisted hyperboloid- "base_radius": 22.0, # m — ground-floor footprint radius- "waist_radius": 14.0, # m — narrowest point at mid-height- "top_radius": 19.0, # m — crown radius (slightly flared)- "height": 180.0, # m — total tower height-- # Diagrid density- "u_divs": 16, # panels around circumference- "v_divs": 28, # panels up the height-- # Mullion cross-section (metres)- "mullion_width": 0.15, # 150 mm — visible face width- "mullion_depth": 0.30, # 300 mm — structural depth (aligns to surface normal)-- # Glass panel (metres)- "glass_thickness": 0.024, # 24 mm — IGU depth (realistic double-glazing unit)- "inset_ratio": 0.12, # 12 % — pull each glass corner in toward cell centroid- }-- # ── Execute ─────────────────────────────────────────────────────────────────- print("Generating high-fidelity diagrid tower…")- print(f" {command['u_divs']} × {command['v_divs']} cell grid | "- f"{command['u_divs'] * command['v_divs'] * 2} mullion members | "- f"{command['u_divs'] * command['v_divs']} glass panels")- print()-- try:- result = post(command)- except requests.exceptions.ReadTimeout:- sys.exit("Request timed out — the geometry is heavy; try reducing u_divs/v_divs and retry.")- except Exception as e:- sys.exit(f"HTTP error: {e}")-- # ── Result ──────────────────────────────────────────────────────────────────- print(json.dumps(result, indent=2))-- if result.get("success"):- data = result.get("data", {})- print()- print(f" Mullion sweeps : {data.get('mullionCount', '?')}")- print(f" Glass solids : {data.get('glassCount', '?')}")- print()- print("Done. Switch Rhino to Rendered Mode (V → Rendered) to see the PBR result.")- print("Apply a HDRI sky in Rhino's Rendering panel for maximum realism.")- else:- err = result.get("error", "unknown error")- tb = result.get("stackTrace", "")- print(f"\nERROR: {err}")- if tb:- print(f"\nStack trace:\n{tb}")- sys.exit(1)---if __name__ == "__main__":- main()diff --git a/scratch/diagrid_tower_python.py b/scratch/diagrid_tower_python.pydeleted file mode 100644index 927da5d..0000000--- a/scratch/diagrid_tower_python.py+++ /dev/null@@ -1,99 +0,0 @@-"""-diagrid_tower_python.py-------------------------MCP client: reads rhino_diagrid_tower.py and sends it to the Rhino bridge.--USAGE- python scratch/diagrid_tower_python.py--The geometry script (rhino_diagrid_tower.py) runs INSIDE Rhino's IronPython-engine — no C# recompile ever needed for geometry changes.--ITERATION WORKFLOW- - Edit the PARAMETERS block in rhino_diagrid_tower.py- - Run this file again → new tower appears in Rhino within seconds- - Or open rhino_diagrid_tower.py directly in Rhino's PythonEdit editor- and press F5 to run without the bridge at all.--BRIDGE SETUP (one-time after C# compile)- 1. Close Rhino- 2. dotnet build -c Release (in packages/rhino-bridge-addin)- 3. Open Rhino — plugin loads, prints "AEC Model Bridge for Rhino started on port 3004"- 4. Run this script-"""--import os-import sys--try:- import requests-except ImportError:- sys.exit("pip install requests")--BRIDGE = "http://127.0.0.1:3004"-EXECUTE_URL = BRIDGE + "/execute"--# The geometry script lives next to this file-TOWER_SCRIPT = os.path.join(os.path.dirname(__file__), "rhino_diagrid_tower.py")---def load_tower_script() -> str:- if not os.path.exists(TOWER_SCRIPT):- sys.exit("Cannot find rhino_diagrid_tower.py next to this file: " + TOWER_SCRIPT)- with open(TOWER_SCRIPT, encoding="utf-8") as f:- return f.read()---def check_bridge() -> None:- try:- h = requests.get(BRIDGE + "/health", timeout=5).json()- status = h.get("status", "?")- bridge = h.get("bridge", "?")- print("Bridge: {0} | status: {1}".format(bridge, status))- except Exception as e:- print("")- print("ERROR: Rhino bridge not reachable at " + BRIDGE)- print(" Make sure Rhino is open and the RhinoBridge plugin is loaded.")- print(" Rhino command line should show: 'AEC Model Bridge for Rhino started on port 3004'")- print(" If not, run: PlugInManager -> drag-drop RhinoBridge.rhp -> restart Rhino")- print("")- sys.exit(str(e))---def run_tower() -> None:- code = load_tower_script()-- print("Sending tower script to Rhino ({0} lines)...".format(len(code.splitlines())))- print("")-- try:- r = requests.post(- EXECUTE_URL,- json={"command": "run_python", "code": code},- timeout=300- )- r.raise_for_status()- result = r.json()- except requests.exceptions.ReadTimeout:- sys.exit("Timed out — reduce U_DIVS/V_DIVS in rhino_diagrid_tower.py and retry.")- except Exception as e:- sys.exit("HTTP error: " + str(e))-- if result.get("success"):- output = (result.get("output") or "").strip()- if output:- print("Rhino output:")- for line in output.splitlines():- print(" " + line)- else:- err = result.get("error", "unknown error")- tb = result.get("stackTrace", "")- print("ERROR: " + err)- if tb:- print(tb)- sys.exit(1)---if __name__ == "__main__":- check_bridge()- run_tower()diff --git a/scratch/facade_dyn_builder.py b/scratch/facade_dyn_builder.pydeleted file mode 100644index 22000bc..0000000--- a/scratch/facade_dyn_builder.py+++ /dev/null@@ -1,1095 +0,0 @@-import json-import uuid--# Define slider parameters-SLIDER_SPECS = [- # A. Grid & Bays- ("num_bays", 1, 10, 3, "Integer", "IntegerSlider"),- ("num_floors", 1, 5, 2, "Integer", "IntegerSlider"),- ("bay_width", 0.8, 3.0, 1.50, "Double", "DoubleSlider"),- ("floor_height", 2.5, 5.0, 3.50, "Double", "DoubleSlider"),- # B. Profiles- ("mullion_w", 0.03, 0.10, 0.060, "Double", "DoubleSlider"),- ("mullion_d", 0.08, 0.25, 0.150, "Double", "DoubleSlider"),- ("mullion_t", 0.002,0.008,0.003, "Double", "DoubleSlider"),- ("transom_w", 0.03, 0.10, 0.060, "Double", "DoubleSlider"),- ("transom_d", 0.06, 0.20, 0.120, "Double", "DoubleSlider"),- ("transom_t", 0.002,0.008,0.003, "Double", "DoubleSlider"),- # C. Glazing- ("glass_outer_t", 0.004, 0.015, 0.006, "Double", "DoubleSlider"),- ("glass_inner_t", 0.004, 0.015, 0.006, "Double", "DoubleSlider"),- ("glass_gap_t", 0.008, 0.024, 0.016, "Double", "DoubleSlider"),- ("glass_reveal", 0.005, 0.025, 0.015, "Double", "DoubleSlider"),- ("glass_setback", 0.020, 0.080, 0.040, "Double", "DoubleSlider"),- # D. Seals/Plates- ("gasket_t", 0.002, 0.010, 0.004, "Double", "DoubleSlider"),- ("gasket_w", 0.005, 0.020, 0.012, "Double", "DoubleSlider"),- ("isolator_w", 0.006, 0.024, 0.012, "Double", "DoubleSlider"),- ("pressure_plate_t", 0.004, 0.015, 0.006, "Double", "DoubleSlider"),- ("cover_cap_d", 0.010, 0.050, 0.020, "Double", "DoubleSlider"),- # E. Slab/Anchors- ("slab_t", 0.15, 0.50, 0.30, "Double", "DoubleSlider"),- ("slab_depth", 0.50, 2.50, 1.50, "Double", "DoubleSlider"),- ("slab_inset", 0.005, 0.050, 0.010, "Double", "DoubleSlider"),- ("bracket_w", 0.040, 0.150, 0.080, "Double", "DoubleSlider"),- ("bracket_l1", 0.080, 0.300, 0.150, "Double", "DoubleSlider"),- ("bracket_l2", 0.060, 0.250, 0.120, "Double", "DoubleSlider"),- ("bracket_t", 0.004, 0.016, 0.008, "Double", "DoubleSlider"),-]--# Slider group mappings-GROUPS_METADATA = [- {- "key": "A",- "title": "A: GRID & BAYS",- "color": "#2D508737", # transparent blue- "sliders": ["num_bays", "num_floors", "bay_width", "floor_height"]- },- {- "key": "B",- "title": "B: STRUCTURAL PROFILES",- "color": "#87502D37", # transparent purple- "sliders": ["mullion_w", "mullion_d", "mullion_t", "transom_w", "transom_d", "transom_t"]- },- {- "key": "C",- "title": "C: INSULATED GLAZING (IGU)",- "color": "#2D875037", # transparent green- "sliders": ["glass_outer_t", "glass_inner_t", "glass_gap_t", "glass_reveal", "glass_setback"]- },- {- "key": "D",- "title": "D: GASKETS & PRESSURE PLATES",- "color": "#87782837", # transparent orange- "sliders": ["gasket_t", "gasket_w", "isolator_w", "pressure_plate_t", "cover_cap_d"]- },- {- "key": "E",- "title": "E: SLAB & ANCHOR BRACKETS",- "color": "#50505037", # transparent grey- "sliders": ["slab_t", "slab_depth", "slab_inset", "bracket_w", "bracket_l1", "bracket_l2", "bracket_t"]- }-]--# Track Y starting offsets for each group-GROUP_Y_STARTS = {- "A": 0.0,- "B": 280.0,- "C": 640.0,- "D": 1000.0,- "E": 1360.0-}--# Generate unique IDs for all elements-graph_uuid = str(uuid.uuid4())-python_node_id = str(uuid.uuid4()).replace("-", "")-python_out_port_id = str(uuid.uuid4()).replace("-", "")-code_block_extract_id = str(uuid.uuid4()).replace("-", "")-code_block_colors_id = str(uuid.uuid4()).replace("-", "")--# Build Slider lists and connections-nodes = []-node_views = []-connectors = []-inputs = []--# Port mappings for Python script inputs-py_inputs = []--# Map slider outports to connect to the Performance Calculator-slider_out_ports = {}--# Group nodes collection for annotations-group_nodes = {- "A": [],- "B": [],- "C": [],- "D": [],- "E": []-}--# Generate Sliders using grouped Y positions-for idx, (name, mn, mx, val, num_type, concrete_type) in enumerate(SLIDER_SPECS):- slider_id = str(uuid.uuid4()).replace("-", "")- out_port_id = str(uuid.uuid4()).replace("-", "")- slider_out_ports[name] = out_port_id-- # Identify group key- gkey = "A"- for g in GROUPS_METADATA:- if name in g["sliders"]:- gkey = g["key"]- break-- # Append to group nodes- group_nodes[gkey].append(slider_id)-- # Calculate grid position inside group- g_sliders = next(g["sliders"] for g in GROUPS_METADATA if g["key"] == gkey)- local_idx = g_sliders.index(name)- col = local_idx % 2- row = local_idx // 2-- pos_x = -750.0 + col * 230.0- pos_y = GROUP_Y_STARTS[gkey] + row * 90.0-- # Input definition for the root "Inputs" block- inputs.append({- "Id": slider_id,- "Name": name.upper().replace("_", " "),- "Type": "number",- "Type2": "number",- "Value": str(val),- "MaximumValue": float(mx),- "MinimumValue": float(mn),- "StepValue": 1.0 if num_type == "Integer" else 0.001 if name.startswith("bracket") or name.startswith("glass") or name.startswith("mullion") or name.startswith("transom") or name.startswith("gasket") or name.startswith("isolator") or name.startswith("pressure") or name.startswith("cover") else 0.1,- "NumberType": num_type,- "Description": "Produces numeric values" if num_type == "Double" else "Produces integer values"- })-- # Node definition (Python booleans used here, serialized dynamically to lowercase in JSON)- concrete_full_type = "CoreNodeModels.Input.IntegerSlider, CoreNodeModels" if concrete_type == "IntegerSlider" else "CoreNodeModels.Input.DoubleSlider, CoreNodeModels"- nodes.append({- "ConcreteType": concrete_full_type,- "NumberType": num_type,- "MaximumValue": int(mx) if num_type == "Integer" else float(mx),- "MinimumValue": int(mn) if num_type == "Integer" else float(mn),- "StepValue": 1 if num_type == "Integer" else 0.001 if name.startswith("bracket") or name.startswith("glass") or name.startswith("mullion") or name.startswith("transom") or name.startswith("gasket") or name.startswith("isolator") or name.startswith("pressure") or name.startswith("cover") else 0.1,- "Id": slider_id,- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": out_port_id,- "Name": "",- "Description": name.upper().replace("_", " "),- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values" if num_type == "Double" else "Produces integer values",- "InputValue": int(val) if num_type == "Integer" else float(val)- })-- # Node view position- node_views.append({- "Id": slider_id,- "Name": name.upper().replace("_", " "),- "IsSetAsInput": True,- "IsSetAsOutput": False,- "Excluded": False,- "ShowGeometry": False,- "X": pos_x,- "Y": pos_y- })-- # Python input port definition- in_port_id = str(uuid.uuid4()).replace("-", "")- py_inputs.append({- "Id": in_port_id,- "Name": "in_{0}".format(idx),- "Description": "Input #{0}".format(idx),- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- })-- # Connect slider output to python input- connectors.append({- "Start": out_port_id,- "End": in_port_id,- "Id": str(uuid.uuid4()).replace("-", ""),- "IsHidden": "False"- })--# Embedded python geometry code for Dynamo-DYNAMO_PY_CODE = r'''import clr-clr.AddReference('ProtoGeometry')-from Autodesk.DesignScript.Geometry import *-import math--# Map inputs from IN list-num_bays = int(IN[0]) if IN[0] is not None else 3-num_floors = int(IN[1]) if IN[1] is not None else 2-bay_width = float(IN[2]) if IN[2] is not None else 1.50-floor_height = float(IN[3]) if IN[3] is not None else 3.50--mullion_w = float(IN[4]) if IN[4] is not None else 0.060-mullion_d = float(IN[5]) if IN[5] is not None else 0.150-mullion_t = float(IN[6]) if IN[6] is not None else 0.003--transom_w = float(IN[7]) if IN[7] is not None else 0.060-transom_d = float(IN[8]) if IN[8] is not None else 0.120-transom_t = float(IN[9]) if IN[9] is not None else 0.003--glass_outer_t = float(IN[10]) if IN[10] is not None else 0.006-glass_inner_t = float(IN[11]) if IN[11] is not None else 0.006-glass_gap_t = float(IN[12]) if IN[12] is not None else 0.016-glass_reveal = float(IN[13]) if IN[13] is not None else 0.015-glass_setback = float(IN[14]) if IN[14] is not None else 0.040--gasket_t = float(IN[15]) if IN[15] is not None else 0.004-gasket_w = float(IN[16]) if IN[16] is not None else 0.012-isolator_w = float(IN[17]) if IN[17] is not None else 0.012-pressure_plate_t = float(IN[18]) if IN[18] is not None else 0.006-cover_cap_d = float(IN[19]) if IN[19] is not None else 0.020--slab_t = float(IN[20]) if IN[20] is not None else 0.30-slab_depth = float(IN[21]) if IN[21] is not None else 1.50-slab_inset = float(IN[22]) if IN[22] is not None else 0.010--bracket_w = float(IN[23]) if IN[23] is not None else 0.080-bracket_l1 = float(IN[24]) if IN[24] is not None else 0.150-bracket_l2 = float(IN[25]) if IN[25] is not None else 0.120-bracket_t = float(IN[26]) if IN[26] is not None else 0.008--TOTAL_HEIGHT = num_floors * floor_height--def make_box(x_min, x_max, y_min, y_max, z_min, z_max):- try:- pt1 = Point.ByCoordinates(x_min, y_min, z_min)- pt2 = Point.ByCoordinates(x_max, y_max, z_max)- return Cuboid.ByCorners(pt1, pt2)- except:- return None--# Coords grid-X_grid = [i * bay_width for i in range(num_bays + 1)]--# Define transom elevations-Z_grid = []-Z_grid.append(0.0) # Bottom boundary-for f in range(1, num_floors):- fz = f * floor_height- Z_grid.append(fz - 0.15) # Head transom- Z_grid.append(fz + 0.85) # Sill transom-Z_grid.append(TOTAL_HEIGHT) # Top boundary-Z_grid = sorted(list(set(Z_grid)))--m_list = []-t_list = []-go_list = []-gi_list = []-g_list = []-b_list = []-s_list = []-fs_list = []-fx_list = []--# Mullions with Noses-for x in X_grid:- # Main chamber- y_front = -glass_setback + gasket_t- y_back = y_front + mullion_d- m_brep = make_box(x - mullion_w*0.5, x + mullion_w*0.5, y_front, y_back, 0.0, TOTAL_HEIGHT)- if m_brep: m_list.append(m_brep)-- # Nose- nose_w = 0.024- y_nose_min = -glass_setback - glass_inner_t- y_nose_max = -glass_setback + gasket_t- m_nose_brep = make_box(x - nose_w*0.5, x + nose_w*0.5, y_nose_min, y_nose_max, 0.0, TOTAL_HEIGHT)- if m_nose_brep: m_list.append(m_nose_brep)--# Transoms with Noses (placed at all Z_grid levels)-for k in range(len(Z_grid)):- z = Z_grid[k]-- for i in range(num_bays):- x_start = X_grid[i] + mullion_w*0.5- x_end = X_grid[i+1] - mullion_w*0.5- length = x_end - x_start- if length <= 0: continue-- # Main transom profile- y_front = -glass_setback + gasket_t- y_back = y_front + transom_d- t_brep = make_box(x_start, x_end, y_front, y_back, z - transom_w*0.5, z + transom_w*0.5)- if t_brep: t_list.append(t_brep)-- # Central nose- nose_w = 0.024- y_nose_min = -glass_setback - glass_inner_t- y_nose_max = -glass_setback + gasket_t- t_nose_brep = make_box(x_start, x_end, y_nose_min, y_nose_max, z - transom_w*0.5, z + transom_w*0.5)- if t_nose_brep: t_list.append(t_nose_brep)--# Floor slabs and Fire Stop containment (intermediate slab levels only)-for f in range(1, num_floors):- z_floor = f * floor_height- y_mullion_back = -glass_setback + gasket_t + mullion_d- slab_edge_y = y_mullion_back + slab_inset-- # Slab- slab = make_box(0.0, num_bays * bay_width, slab_edge_y, slab_edge_y + slab_depth, z_floor - slab_t, z_floor)- if slab: s_list.append(slab)-- # Fire wool- firestop_wool = make_box(0.0, num_bays * bay_width, y_mullion_back, slab_edge_y, z_floor - slab_t, z_floor)- if firestop_wool: fs_list.append(firestop_wool)-- # Galvanized sheet- smoke_sheet = make_box(0.0, num_bays * bay_width, y_mullion_back, slab_edge_y + 0.050, z_floor, z_floor + 0.002)- if smoke_sheet: b_list.append(smoke_sheet)--# Slab brackets (intermediate levels only)-for f in range(1, num_floors):- z_floor = f * floor_height- y_mullion_back = -glass_setback + gasket_t + mullion_d- slab_edge_y = y_mullion_back + slab_inset- for x in X_grid:- leg1_l = make_box(x - mullion_w*0.5 - bracket_t, x - mullion_w*0.5, slab_edge_y, slab_edge_y + bracket_l1, z_floor, z_floor + bracket_t)- leg2_l = make_box(x - mullion_w*0.5 - bracket_t, x - mullion_w*0.5, y_mullion_back - bracket_w, slab_edge_y, z_floor, z_floor + bracket_l2)- if leg1_l: b_list.append(leg1_l)- if leg2_l: b_list.append(leg2_l)- leg1_r = make_box(x + mullion_w*0.5, x + mullion_w*0.5 + bracket_t, slab_edge_y, slab_edge_y + bracket_l1, z_floor, z_floor + bracket_t)- leg2_r = make_box(x + mullion_w*0.5, x + mullion_w*0.5 + bracket_t, y_mullion_back - bracket_w, slab_edge_y, z_floor, z_floor + bracket_l2)- if leg1_r: b_list.append(leg1_r)- if leg2_r: b_list.append(leg2_r)--# Gaskets and pressure plates on Mullions-g_w_m = mullion_w * 0.5 - glass_reveal-for x in X_grid:- g_l = make_box(x - glass_reveal - g_w_m, x - glass_reveal, -glass_setback, -glass_setback + gasket_t, 0.0, TOTAL_HEIGHT)- g_r = make_box(x + glass_reveal, x + glass_reveal + g_w_m, -glass_setback, -glass_setback + gasket_t, 0.0, TOTAL_HEIGHT)- if g_l: g_list.append(g_l)- if g_r: g_list.append(g_r)-- gy_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t - gasket_t- gy_max = gy_min + gasket_t- og_l = make_box(x - glass_reveal - g_w_m, x - glass_reveal, gy_min, gy_max, 0.0, TOTAL_HEIGHT)- og_r = make_box(x + glass_reveal, x + glass_reveal + g_w_m, gy_min, gy_max, 0.0, TOTAL_HEIGHT)- if og_l: g_list.append(og_l)- if og_r: g_list.append(og_r)-- iy_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t- iy_max = -glass_setback - glass_inner_t- ti = make_box(x - isolator_w*0.5, x + isolator_w*0.5, iy_min, iy_max, 0.0, TOTAL_HEIGHT)- if ti: t_list.append(ti)-- py_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t - gasket_t - pressure_plate_t- py_max = py_min + pressure_plate_t- pp = make_box(x - mullion_w*0.5, x + mullion_w*0.5, py_min, py_max, 0.0, TOTAL_HEIGHT)- if pp: t_list.append(pp)-- # Detailed Snap-on Cover Cap (chamfered polygon)- try:- pts_c = [- Point.ByCoordinates(x - mullion_w*0.5, py_min, 0.0),- Point.ByCoordinates(x - mullion_w*0.5, py_min - cover_cap_d + 0.006, 0.0),- Point.ByCoordinates(x - mullion_w*0.5 + 0.006, py_min - cover_cap_d, 0.0),- Point.ByCoordinates(x + mullion_w*0.5 - 0.006, py_min - cover_cap_d, 0.0),- Point.ByCoordinates(x + mullion_w*0.5, py_min - cover_cap_d + 0.006, 0.0),- Point.ByCoordinates(x + mullion_w*0.5, py_min, 0.0),- Point.ByCoordinates(x - mullion_w*0.5, py_min, 0.0)- ]- cap = PolyCurve.ByPoints(pts_c).ExtrudeAsSolid(Vector.ByCoordinates(0, 0, 1), TOTAL_HEIGHT)- if cap: t_list.append(cap)- except:- # Fallback to simple box representation- cap = make_box(x - mullion_w*0.5, x + mullion_w*0.5, py_min - cover_cap_d, py_min, 0.0, TOTAL_HEIGHT)- if cap: t_list.append(cap)-- # Screws as cylinders- screw_spacing = 0.35; screw_rad = 0.004; screw_len = 0.090- cur_z = 0.1- while cur_z < TOTAL_HEIGHT:- pt1 = Point.ByCoordinates(x, py_min, cur_z)- pt2 = Point.ByCoordinates(x, py_min + screw_len, cur_z)- cyl = Cylinder.ByPointsRadius(pt1, pt2, screw_rad)- if cyl: fx_list.append(cyl)- cur_z += screw_spacing--# Gaskets and accessories on Transoms-g_w_t = transom_w * 0.5 - glass_reveal-for k in range(len(Z_grid)):- z = Z_grid[k]-- for i in range(num_bays):- x_start = X_grid[i] + mullion_w*0.5- x_end = X_grid[i+1] - mullion_w*0.5- length = x_end - x_start- if length <= 0: continue-- gy_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t - gasket_t- gy_max = gy_min + gasket_t-- # Top Gaskets - skip if top boundary- if k < len(Z_grid) - 1:- g_t = make_box(x_start, x_end, -glass_setback, -glass_setback + gasket_t, z + glass_reveal, z + glass_reveal + g_w_t)- if g_t: g_list.append(g_t)-- og_t = make_box(x_start, x_end, gy_min, gy_max, z + glass_reveal, z + glass_reveal + g_w_t)- if og_t: g_list.append(og_t)-- # Bottom Gaskets - skip if bottom boundary- if k > 0:- g_b = make_box(x_start, x_end, -glass_setback, -glass_setback + gasket_t, z - glass_reveal - g_w_t, z - glass_reveal)- if g_b: g_list.append(g_b)-- og_b = make_box(x_start, x_end, gy_min, gy_max, z - glass_reveal - g_w_t, z - glass_reveal)- if og_b: g_list.append(og_b)-- iy_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t- iy_max = -glass_setback - glass_inner_t- ti = make_box(x_start, x_end, iy_min, iy_max, z - isolator_w*0.5, z + isolator_w*0.5)- if ti: t_list.append(ti)-- py_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t - gasket_t - pressure_plate_t- py_max = py_min + pressure_plate_t- pp = make_box(x_start, x_end, py_min, py_max, z - transom_w*0.5, z + transom_w*0.5)- if pp: t_list.append(pp)-- # Snap-on Transom Cover Cap (chamfered polygon in YZ plane extruded along X)- try:- pts_c = [- Point.ByCoordinates(x_start, py_min, z + transom_w*0.5),- Point.ByCoordinates(x_start, py_min - cover_cap_d + 0.006, z + transom_w*0.5),- Point.ByCoordinates(x_start, py_min - cover_cap_d, z + transom_w*0.5 - 0.006),- Point.ByCoordinates(x_start, py_min - cover_cap_d, z - transom_w*0.5 + 0.006),- Point.ByCoordinates(x_start, py_min - cover_cap_d + 0.006, z - transom_w*0.5),- Point.ByCoordinates(x_start, py_min, z - transom_w*0.5),- Point.ByCoordinates(x_start, py_min, z + transom_w*0.5)- ]- cap = PolyCurve.ByPoints(pts_c).ExtrudeAsSolid(Vector.ByCoordinates(1, 0, 0), length)- if cap: t_list.append(cap)- except:- # Fallback to simple box representation- cap = make_box(x_start, x_end, py_min - cover_cap_d, py_min, z - transom_w*0.5, z + transom_w*0.5)- if cap: t_list.append(cap)-- # Screws- screw_spacing = 0.35; screw_rad = 0.004; screw_len = 0.090- cur_x = x_start + 0.1- while cur_x < x_end:- pt1 = Point.ByCoordinates(cur_x, py_min, z)- pt2 = Point.ByCoordinates(cur_x, py_min + screw_len, z)- cyl = Cylinder.ByPointsRadius(pt1, pt2, screw_rad)- if cyl: fx_list.append(cyl)- cur_x += screw_spacing--# IGUs-for k in range(len(Z_grid) - 1):- z_start = Z_grid[k]- z_end = Z_grid[k+1]- for i in range(num_bays):- x_start = X_grid[i]; x_end = X_grid[i+1]- x1 = x_start + glass_reveal; x2 = x_end - glass_reveal- z1 = z_start + glass_reveal; z2 = z_end - glass_reveal- if x2 - x1 <= 0 or z2 - z1 <= 0: continue-- # Inner Glass- y_in_min = -glass_setback - glass_inner_t- y_in_max = -glass_setback- glass_in = make_box(x1, x2, y_in_min, y_in_max, z1, z2)- if glass_in: gi_list.append(glass_in)-- # Outer Glass- y_ot_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t- y_ot_max = y_ot_min + glass_outer_t- glass_ot = make_box(x1, x2, y_ot_min, y_ot_max, z1, z2)- if glass_ot: go_list.append(glass_ot)-- # Spacers and sealant- sp_offset = 0.015; sp_width = 0.012- sx1 = x1 + sp_offset; sx2 = x2 - sp_offset- sz1 = z1 + sp_offset; sz2 = z2 - sp_offset- sy_min_spacer = -glass_setback - glass_inner_t - glass_gap_t- sy_max_spacer = -glass_setback - glass_inner_t- if sx2 - sx1 > 0 and sz2 - sz1 > 0:- sp_l = make_box(sx1, sx1 + sp_width, sy_min_spacer, sy_max_spacer, sz1, sz2)- sp_r = make_box(sx2 - sp_width, sx2, sy_min_spacer, sy_max_spacer, sz1, sz2)- sp_b = make_box(sx1 + sp_width, sx2 - sp_width, sy_min_spacer, sy_max_spacer, sz1, sz1 + sp_width)- sp_t = make_box(sx1 + sp_width, sx2 - sp_width, sy_min_spacer, sy_max_spacer, sz2 - sp_width, sz2)- for sp in (sp_l, sp_r, sp_b, sp_t):- if sp: t_list.append(sp)-- se_l = make_box(x1, sx1, sy_min_spacer, sy_max_spacer, z1, z2)- se_r = make_box(sx2, x2, sy_min_spacer, sy_max_spacer, z1, z2)- se_b = make_box(sx1, sx2, sy_min_spacer, sy_max_spacer, z1, sz1)- se_t = make_box(sx1, sx2, sy_min_spacer, sy_max_spacer, sz2, z2)- for se in (se_l, se_r, se_b, se_t):- if se: t_list.append(se)--OUT = [m_list, t_list, go_list, gi_list, g_list, b_list, s_list, fs_list, fx_list]-'''--# 2. Add Python Node-nodes.append({- "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",- "Code": DYNAMO_PY_CODE,- "Engine": "PythonNet3",- "VariableInputPorts": True,- "Id": python_node_id,- "NodeType": "PythonScriptNode",- "Inputs": py_inputs,- "Outputs": [- {- "Id": python_out_port_id,- "Name": "OUT",- "Description": "Engine Output",- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- }- ],- "Replication": "Disabled",- "Description": "Runs the detailed parametric facade script."-})--node_views.append({- "Id": python_node_id,- "Name": "KINETIC CURTAIN WALL ENGINE",- "IsSetAsInput": False,- "IsSetAsOutput": False,- "Excluded": False,- "ShowGeometry": False,- "X": 150.0,- "Y": 350.0-})--# 3. Code Block: EXTRACT CHANNELS-extract_code = """-mullions = data[0];-transoms = data[1];-glass_outer = data[2];-glass_inner = data[3];-gaskets = data[4];-brackets = data[5];-slabs = data[6];-firestops = data[7];-fixings = data[8];-"""--extract_out_ports = []-extract_outputs = []-channel_names = ["mullions", "transoms", "glass_outer", "glass_inner", "gaskets", "brackets", "slabs", "firestops", "fixings"]-for idx, cname in enumerate(channel_names):- port_id = str(uuid.uuid4()).replace("-", "")- extract_out_ports.append(port_id)- extract_outputs.append({- "Id": port_id,- "Name": cname,- "Description": cname,- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- })--nodes.append({- "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",- "Id": code_block_extract_id,- "NodeType": "CodeBlockNode",- "Inputs": [- {- "Id": str(uuid.uuid4()).replace("-", ""),- "Name": "data",- "Description": "data",- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- }- ],- "Outputs": extract_outputs,- "Replication": "Disabled",- "Description": "Extracts the geometry channels.",- "Code": extract_code.strip()-})--node_views.append({- "Id": code_block_extract_id,- "Name": "EXTRACT GEOMETRY CHANNELS",- "IsSetAsInput": False,- "IsSetAsOutput": False,- "Excluded": False,- "ShowGeometry": False,- "X": 550.0,- "Y": 100.0-})--# Wire Python OUT -> Code Block "data" input-connectors.append({- "Start": python_out_port_id,- "End": nodes[-1]["Inputs"][0]["Id"],- "Id": str(uuid.uuid4()).replace("-", ""),- "IsHidden": "False"-})--# 4. Code Block: COLOR SWATCHES-colors_code = """-c_mullion = DSCore.Color.ByARGB(255, 35, 38, 46);-c_transom = DSCore.Color.ByARGB(255, 50, 55, 65);-c_glass_ot = DSCore.Color.ByARGB(120, 60, 140, 210);-c_glass_in = DSCore.Color.ByARGB(60, 170, 210, 240);-c_gaskets = DSCore.Color.ByARGB(255, 20, 20, 20);-c_brackets = DSCore.Color.ByARGB(255, 120, 120, 125);-c_slabs = DSCore.Color.ByARGB(255, 160, 155, 145);-c_firestops = DSCore.Color.ByARGB(255, 180, 160, 100);-c_fixings = DSCore.Color.ByARGB(255, 220, 220, 225);-"""--colors_out_ports = []-colors_outputs = []-color_names = ["c_mullion", "c_transom", "c_glass_ot", "c_glass_in", "c_gaskets", "c_brackets", "c_slabs", "c_firestops", "c_fixings"]-for idx, cname in enumerate(color_names):- port_id = str(uuid.uuid4()).replace("-", "")- colors_out_ports.append(port_id)- colors_outputs.append({- "Id": port_id,- "Name": cname,- "Description": cname,- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- })--nodes.append({- "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",- "Id": code_block_colors_id,- "NodeType": "CodeBlockNode",- "Inputs": [],- "Outputs": colors_outputs,- "Replication": "Disabled",- "Description": "Defines colors for visual representation.",- "Code": colors_code.strip()-})--node_views.append({- "Id": code_block_colors_id,- "Name": "MATERIAL COLOR SWATCHES",- "IsSetAsInput": False,- "IsSetAsOutput": False,- "Excluded": False,- "ShowGeometry": False,- "X": 550.0,- "Y": 600.0-})--# 5. RENDER PIPELINE: GeometryColor Nodes-render_node_ids = []-for idx, cname in enumerate(channel_names):- render_id = str(uuid.uuid4()).replace("-", "")- render_node_ids.append(render_id)- geom_in_id = str(uuid.uuid4()).replace("-", "")- color_in_id = str(uuid.uuid4()).replace("-", "")- render_out_id = str(uuid.uuid4()).replace("-", "")-- nodes.append({- "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",- "Id": render_id,- "NodeType": "FunctionNode",- "Inputs": [- {- "Id": geom_in_id,- "Name": "geometry",- "Description": "The geometry to apply color to.",- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- },- {- "Id": color_in_id,- "Name": "color",- "Description": "The display color.",- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- }- ],- "Outputs": [- {- "Id": render_out_id,- "Name": "GeometryColor",- "Description": "Display object.",- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- }- ],- "FunctionSignature": "Modifiers.GeometryColor.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color",- "Replication": "Auto",- "Description": "Display geometry using a color."- })-- node_views.append({- "Id": render_id,- "Name": "RENDER: " + cname.upper(),- "IsSetAsInput": False,- "IsSetAsOutput": False,- "Excluded": False,- "ShowGeometry": True,- "X": 1050.0,- "Y": float(idx * 160)- })-- # Connect Extract CodeBlock channel output -> GeometryColor input geometry- connectors.append({- "Start": extract_out_ports[idx],- "End": geom_in_id,- "Id": str(uuid.uuid4()).replace("-", ""),- "IsHidden": "False"- })-- # Connect Color CodeBlock swatch output -> GeometryColor input color- connectors.append({- "Start": colors_out_ports[idx],- "End": color_in_id,- "Id": str(uuid.uuid4()).replace("-", ""),- "IsHidden": "False"- })--# 6. PERFORMANCE CALCULATOR: Native CodeBlock & Watch Nodes-calc_node_id = str(uuid.uuid4()).replace("-", "")-calc_inputs = []-calc_input_names = ["num_bays", "bay_width", "num_floors", "floor_height"]-calc_input_guids = {}-for iname in calc_input_names:- p_guid = str(uuid.uuid4()).replace("-", "")- calc_input_guids[iname] = p_guid- calc_inputs.append({- "Id": p_guid,- "Name": iname,- "Description": iname,- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- })--calc_outputs = []-calc_output_names = ["area", "cost"]-calc_output_guids = {}-for oname in calc_output_names:- p_guid = str(uuid.uuid4()).replace("-", "")- calc_output_guids[oname] = p_guid- calc_outputs.append({- "Id": p_guid,- "Name": oname,- "Description": oname,- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- })--nodes.append({- "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",- "Id": calc_node_id,- "NodeType": "CodeBlockNode",- "Inputs": calc_inputs,- "Outputs": calc_outputs,- "Replication": "Disabled",- "Description": "Calculates facade area and cost dynamically.",- "Code": "area = (num_bays * bay_width) * (num_floors * floor_height);\ncost = area * 650.0;"-})--# Connect sliders to calculator inputs-for iname in calc_input_names:- connectors.append({- "Start": slider_out_ports[iname],- "End": calc_input_guids[iname],- "Id": str(uuid.uuid4()).replace("-", ""),- "IsHidden": "False"- })--# Watch nodes-watch_area_id = str(uuid.uuid4()).replace("-", "")-watch_area_in = str(uuid.uuid4()).replace("-", "")-watch_area_out = str(uuid.uuid4()).replace("-", "")-nodes.append({- "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels",- "Id": watch_area_id,- "NodeType": "ExtensionNode",- "Inputs": [- {- "Id": watch_area_in,- "Name": "",- "Description": "Incoming data.",- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- }- ],- "Outputs": [- {- "Id": watch_area_out,- "Name": "",- "Description": "Watch contents.",- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- }- ],- "Replication": "Disabled",- "Description": "Visualize the output of node."-})--watch_cost_id = str(uuid.uuid4()).replace("-", "")-watch_cost_in = str(uuid.uuid4()).replace("-", "")-watch_cost_out = str(uuid.uuid4()).replace("-", "")-nodes.append({- "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels",- "Id": watch_cost_id,- "NodeType": "ExtensionNode",- "Inputs": [- {- "Id": watch_cost_in,- "Name": "",- "Description": "Incoming data.",- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- }- ],- "Outputs": [- {- "Id": watch_cost_out,- "Name": "",- "Description": "Watch contents.",- "UsingDefaultValue": False,- "Level": 2,- "UseLevels": False,- "KeepListStructure": False- }- ],- "Replication": "Disabled",- "Description": "Visualize the output of node."-})--# Wire calculator outputs to Watch nodes-connectors.append({- "Start": calc_output_guids["area"],- "End": watch_area_in,- "Id": str(uuid.uuid4()).replace("-", ""),- "IsHidden": "False"-})-connectors.append({- "Start": calc_output_guids["cost"],- "End": watch_cost_in,- "Id": str(uuid.uuid4()).replace("-", ""),- "IsHidden": "False"-})--node_views.append({- "Id": calc_node_id,- "Name": "PERFORMANCE CALCULATOR",- "IsSetAsInput": False,- "IsSetAsOutput": False,- "Excluded": False,- "ShowGeometry": False,- "X": -750.0,- "Y": 1720.0-})-node_views.append({- "Id": watch_area_id,- "Name": "Watch: TOTAL AREA (m²)",- "IsSetAsInput": False,- "IsSetAsOutput": False,- "Excluded": False,- "ShowGeometry": False,- "X": -400.0,- "Y": 1700.0-})-node_views.append({- "Id": watch_cost_id,- "Name": "Watch: ESTIMATED COST ($)",- "IsSetAsInput": False,- "IsSetAsOutput": False,- "Excluded": False,- "ShowGeometry": False,- "X": -400.0,- "Y": 1820.0-})--# 7. VISUAL GROUP ANNOTATIONS-annotations = []-# Slider groups-for g in GROUPS_METADATA:- gkey = g["key"]- gtitle = g["title"]- gcolor = g["color"]- nodes_in_group = group_nodes[gkey]- if not nodes_in_group: continue-- rows = (len(g["sliders"]) + 1) // 2- y_start = GROUP_Y_STARTS[gkey]- height = rows * 90.0 + 60.0-- annotations.append({- "Id": str(uuid.uuid4()).replace("-", ""),- "Title": gtitle,- "Nodes": nodes_in_group,- "Left": -780.0,- "Top": y_start - 50.0,- "Width": 490.0,- "Height": height,- "Background": gcolor,- "FontSize": 14.0,- "InitialTop": y_start - 50.0,- "InitialLeft": -780.0- })--# Engine node group-annotations.append({- "Id": str(uuid.uuid4()).replace("-", ""),- "Title": "KINETIC CURTAIN WALL ENGINE",- "Nodes": [python_node_id],- "Left": 100.0,- "Top": 300.0,- "Width": 320.0,- "Height": 250.0,- "Background": "#FF333333",- "FontSize": 14.0,- "InitialTop": 300.0,- "InitialLeft": 100.0-})--# Extract channels node group-annotations.append({- "Id": str(uuid.uuid4()).replace("-", ""),- "Title": "EXTRACT GEOMETRY CHANNELS",- "Nodes": [code_block_extract_id],- "Left": 500.0,- "Top": 50.0,- "Width": 380.0,- "Height": 450.0,- "Background": "#FF505050",- "FontSize": 14.0,- "InitialTop": 50.0,- "InitialLeft": 500.0-})--# Material Color Swatches node group-annotations.append({- "Id": str(uuid.uuid4()).replace("-", ""),- "Title": "MATERIAL COLOR SWATCHES",- "Nodes": [code_block_colors_id],- "Left": 500.0,- "Top": 550.0,- "Width": 380.0,- "Height": 450.0,- "Background": "#FF505050",- "FontSize": 14.0,- "InitialTop": 550.0,- "InitialLeft": 500.0-})--# Render pipeline node group-annotations.append({- "Id": str(uuid.uuid4()).replace("-", ""),- "Title": "RENDER PIPELINE",- "Nodes": render_node_ids,- "Left": 1000.0,- "Top": -50.0,- "Width": 350.0,- "Height": 9 * 160.0 + 80.0,- "Background": "#FF4B6C3F",- "FontSize": 14.0,- "InitialTop": -50.0,- "InitialLeft": 1000.0-})--# Performance Calculator node group-annotations.append({- "Id": str(uuid.uuid4()).replace("-", ""),- "Title": "PERFORMANCE CALCULATOR (NATIVE GRAPH)",- "Nodes": [calc_node_id, watch_area_id, watch_cost_id],- "Left": -780.0,- "Top": 1670.0,- "Width": 620.0,- "Height": 260.0,- "Background": "#FFA36423",- "FontSize": 14.0,- "InitialTop": 1670.0,- "InitialLeft": -780.0-})--# Formulate complete DYN JSON representation-dyn_data = {- "Uuid": graph_uuid,- "IsCustomNode": False,- "Description": "Detailed Parametric Curtain Wall Façade System. Generated dynamically to match Rhino Grasshopper workflow.",- "Name": "ParametricCurtainWallFacade",- "ElementResolver": {- "ResolutionMap": {- "DSCore.Color": {- "Key": "DSCore.Color",- "Value": "DSCoreNodes.dll"- }- }- },- "Inputs": inputs,- "Outputs": [],- "Nodes": nodes,- "Connectors": connectors,- "Dependencies": [],- "NodeLibraryDependencies": [],- "EnableLegacyPolyCurveBehavior": False,- "Thumbnail": "",- "GraphDocumentationURL": None,- "ExtensionWorkspaceData": [],- "Author": "AEC Computational Designer",- "Linting": {- "activeLinter": "None",- "activeLinterId": "7b75fb44-43fd-4631-a878-29f4d5d8399a",- "warningCount": 0,- "errorCount": 0- },- "Bindings": [],- "View": {- "Dynamo": {- "ScaleFactor": 1.0,- "HasRunWithoutCrash": True,- "IsVisibleInDynamoLibrary": True,- "Version": "4.1.0.4676",- "RunType": "Automatic",- "RunPeriod": "1000"- },- "Camera": {- "Name": "_Background Preview",- "EyeX": 10.0,- "EyeY": 15.0,- "EyeZ": -25.0,- "LookX": 0.0,- "LookY": -5.0,- "LookZ": 20.0,- "UpX": 0.0,- "UpY": 1.0,- "UpZ": 0.0- },- "ConnectorPins": [],- "NodeViews": node_views,- "Annotations": annotations,- "X": 450.0,- "Y": 150.0,- "Zoom": 0.45- }-}--# Save DYN to scratch-scratch_path = r"c:\Users\sammo\OneDrive\Documenten\GitHub\Autodesk-Revit-MCP-Server\scratch\facade_system.dyn"-with open(scratch_path, "w", encoding="utf-8") as f:- json.dump(dyn_data, f, indent=2)--# Copy to user Downloads folder for easy load-downloads_path = r"C:\Users\sammo\Downloads\facade_system.dyn"-try:- with open(downloads_path, "w", encoding="utf-8") as f:- json.dump(dyn_data, f, indent=2)- print("Saved Dynamo definition successfully to scratch and Downloads folder!")-except Exception as e:- print("Warning: failed to save to Downloads: {0}".format(e))diff --git a/scratch/facade_gh_builder.py b/scratch/facade_gh_builder.pydeleted file mode 100644index 8dcaab5..0000000--- a/scratch/facade_gh_builder.py+++ /dev/null@@ -1,793 +0,0 @@-# =============================================================================-# DETAILED FAÇADE SYSTEM — Grasshopper Canvas Builder-# AEC Omni-Bridge MCP | Runs inside Rhino (Grasshopper must be open)-# =============================================================================--import clr, System, System.Drawing as sd-import System.Reflection as rf-clr.AddReference("Grasshopper")-import Grasshopper as gh-from Grasshopper.Kernel import GH_Document-from Grasshopper.Kernel.Special import GH_NumberSlider, GH_Group, GH_Panel, GH_Scribble--# ── Document ──────────────────────────────────────────────────────────────────-canvas = gh.Instances.ActiveCanvas-if canvas is None:- print("ERROR: Grasshopper is not open. Run _Grasshopper in Rhino first.")- raise SystemExit("GH canvas not found")--gd = canvas.Document-if gd is None:- gd = GH_Document()- canvas.Document = gd-gd.Objects.Clear()-gd.Enabled = False-print("Canvas ready — cleared previous objects")--# ── Helpers ───────────────────────────────────────────────────────────────────-def sl(name, mn, mx, val, x, y, dec=2):- s = GH_NumberSlider()- s.CreateAttributes()- s.Name = name- s.NickName = name- s.Slider.Minimum = System.Decimal(mn)- s.Slider.Maximum = System.Decimal(mx)- s.Slider.Value = System.Decimal(val)- s.Slider.DecimalPlaces = dec- s.Attributes.Pivot = sd.PointF(float(x), float(y))- gd.AddObject(s, False)- return s--def grp(title, rgba, objs):- g = GH_Group()- g.NickName = title- g.Colour = sd.Color.FromArgb(*rgba)- for o in objs:- g.AddObject(o.InstanceGuid)- gd.AddObject(g, False)- return g--def pan(text, x, y):- p = GH_Panel()- p.CreateAttributes()- p.UserText = text- p.Attributes.Pivot = sd.PointF(float(x), float(y))- gd.AddObject(p, False)- return p--def scribble(text, x, y, size=18):- s = GH_Scribble()- s.CreateAttributes()- s.Text = text- try:- s.Font = sd.Font("Outfit", float(size), sd.FontStyle.Bold)- except:- s.Font = sd.Font("Arial", float(size), sd.FontStyle.Bold)- s.Attributes.Pivot = sd.PointF(float(x), float(y))- gd.AddObject(s, False)- return s--def build_performance_calculator():- mult_proxy = None- for proxy in server.ObjectProxies:- try:- # Target exact GUIDs of the Math Multiplication component to avoid matching Color Multiplication- if proxy.Guid == System.Guid("b8963bb1-aa57-476e-a20e-ed6cf635a49c") or proxy.Guid == System.Guid("ce46b74e-00c9-43c4-805a-193b69ea4a11"):- mult_proxy = proxy- break- except: pass--- if not mult_proxy:- print("Warning: Multiplication component proxy not found")- return-- scribble("II. FAÇADE PERFORMANCE CALCULATOR", PX, 680, 12)-- mw = mult_proxy.CreateInstance()- mw.CreateAttributes()- mw.Attributes.Pivot = sd.PointF(float(PX), float(730))- gd.AddObject(mw, False)- mw.Params.Input[0].AddSource(sliders["num_bays"])- mw.Params.Input[1].AddSource(sliders["bay_width"])-- mh = mult_proxy.CreateInstance()- mh.CreateAttributes()- mh.Attributes.Pivot = sd.PointF(float(PX), float(810))- gd.AddObject(mh, False)- mh.Params.Input[0].AddSource(sliders["num_floors"])- mh.Params.Input[1].AddSource(sliders["floor_height"])-- ma = mult_proxy.CreateInstance()- ma.CreateAttributes()- ma.Attributes.Pivot = sd.PointF(float(PX + 120), float(770))- gd.AddObject(ma, False)- ma.Params.Input[0].AddSource(mw.Params.Output[0])- ma.Params.Input[1].AddSource(mh.Params.Output[0])-- mc = mult_proxy.CreateInstance()- mc.CreateAttributes()- mc.Attributes.Pivot = sd.PointF(float(PX + 240), float(770))- gd.AddObject(mc, False)- mc.Params.Input[0].AddSource(ma.Params.Output[0])- try:- mc.Params.Input[1].PersistentData.Clear()- mc.Params.Input[1].PersistentData.Append(gh.Kernel.Types.GH_Number(650.0))- except: pass-- pa = GH_Panel()- pa.CreateAttributes()- pa.Attributes.Pivot = sd.PointF(float(PX + 360), float(740))- gd.AddObject(pa, False)- pa.AddSource(ma.Params.Output[0])-- pc = GH_Panel()- pc.CreateAttributes()- pc.Attributes.Pivot = sd.PointF(float(PX + 360), float(810))- gd.AddObject(pc, False)- pc.AddSource(mc.Params.Output[0])-- scribble("Total Area (m²)", PX + 360, 725, 9)- scribble("Est. Cost ($)", PX + 360, 795, 9)-- grp("PERFORMANCE CALCULATOR (NATIVE GRAPH)", (200, 100, 50, 50), [mw, mh, ma, mc, pa, pc])--# ── Slider layout constants ───────────────────────────────────────────────────-A = 80; B = 290; H = 32; GP = 24-sliders = {}; y = 80--# ── Title Scribbles ───────────────────────────────────────────────────────────-scribble("PARAMETRIC CURTAIN WALL FAÇADE SYSTEM", A, 10, 18)-scribble("AEC Omni-Bridge Model Engine — Refined Façade Engineering Definition", A, 38, 9)--specs = [- ("A GRID & BAYS", (45, 80, 135, 55), [- ("num_bays", 1, 10, 3, A, 0, 0),- ("num_floors", 1, 5, 2, B, 0, 0),- ("bay_width", 0.8, 3.0, 1.50, A, 1, 2),- ("floor_height", 2.5, 5.0, 3.50, B, 1, 2),- ]),- ("B STRUCTURAL PROFILES", (135, 80, 45, 55), [- ("mullion_w", 0.03, 0.10, 0.060, A, 0, 3),- ("mullion_d", 0.08, 0.25, 0.150, B, 0, 3),- ("mullion_t", 0.002,0.008,0.003, A, 1, 3),- ("transom_w", 0.03, 0.10, 0.060, B, 1, 3),- ("transom_d", 0.06, 0.20, 0.120, A, 2, 3),- ("transom_t", 0.002,0.008,0.003, B, 2, 3),- ]),- ("C INSULATED GLAZING (IGU)", (45, 135, 80, 55), [- ("glass_outer_t", 0.004, 0.015, 0.006, A, 0, 3),- ("glass_inner_t", 0.004, 0.015, 0.006, B, 0, 3),- ("glass_gap_t", 0.008, 0.024, 0.016, A, 1, 3),- ("glass_reveal", 0.005, 0.025, 0.010, B, 1, 3),- ("glass_setback", 0.020, 0.080, 0.040, A, 2, 3),- ]),- ("D GASKETS & PRESSURE PLATES", (135, 120, 40, 55), [- ("gasket_t", 0.002, 0.010, 0.004, A, 0, 3),- ("gasket_w", 0.005, 0.020, 0.012, B, 0, 3),- ("isolator_w", 0.006, 0.024, 0.012, A, 1, 3),- ("pressure_plate_t", 0.004, 0.015, 0.006, B, 1, 3),- ("cover_cap_d", 0.010, 0.050, 0.020, A, 2, 3),- ]),- ("E SLAB & ANCHOR BRACKETS", (80, 80, 80, 55), [- ("slab_t", 0.15, 0.50, 0.30, A, 0, 2),- ("slab_depth", 0.50, 2.50, 1.50, B, 0, 2),- ("slab_inset", 0.005, 0.050, 0.010, A, 1, 3),- ("bracket_w", 0.040, 0.150, 0.080, B, 1, 3),- ("bracket_l1", 0.080, 0.300, 0.150, A, 2, 3),- ("bracket_l2", 0.060, 0.250, 0.120, B, 2, 3),- ("bracket_t", 0.004, 0.016, 0.008, A, 3, 3),- ]),-]--for grp_title, grp_rgba, items in specs:- scribble(grp_title[3:], A, y - 22, 11)- g_objs = []- rows = max(r for _, _, _, _, _, r, _ in items)- for name, mn, mx, val, col, row, dec in items:- s = sl(name, mn, mx, val, col, y + row * H, dec)- g_objs.append(s)- sliders[name] = s- grp(grp_title, grp_rgba, g_objs)- y += (rows + 1) * H + GP + 15--print("Sliders created: %d" % len(sliders))--# ── Python Script component ───────────────────────────────────────────────────-PX = 580; PY_COMP_Y = 60-GHPY_GUID = System.Guid("719467e6-7cf5-4848-99b0-c5dd57e5442c") # New Python 3 Script component--server = gh.Instances.ComponentServer-py_proxy = None-for proxy in server.ObjectProxies:- try:- if proxy.Guid == GHPY_GUID:- py_proxy = proxy- break- except: pass-if py_proxy is None:- for proxy in server.ObjectProxies:- try:- nm = proxy.Desc.Name.lower()- if "python 3" in nm or "ghpython" in nm or "ironpython 2" in nm:- py_proxy = proxy- break- except: pass--if py_proxy:- py_comp = py_proxy.CreateInstance()- py_comp.CreateAttributes()- py_comp.Attributes.Pivot = sd.PointF(float(PX), float(PY_COMP_Y))- gd.AddObject(py_comp, False)- print("Python component instantiated: %s" % py_proxy.Desc.Name)-- SLIDER_ORDER = [- "num_bays", "num_floors", "bay_width", "floor_height",- "mullion_w", "mullion_d", "mullion_t", "transom_w", "transom_d", "transom_t",- "glass_outer_t", "glass_inner_t", "glass_gap_t", "glass_reveal", "glass_setback",- "gasket_t", "gasket_w", "isolator_w", "pressure_plate_t", "cover_cap_d",- "slab_t", "slab_depth", "slab_inset",- "bracket_w", "bracket_l1", "bracket_l2", "bracket_t"- ]-- FACADE_CODE = r'''# =============================================================================-# DETAILED FAÇADE SYSTEM — Grasshopper Python Runtime Engine (Refined & Corrected)-# =============================================================================-import math-import Rhino-import Rhino.Geometry as rg-import scriptcontext as sc-import System-from System.Collections.Generic import List--# Redirect scriptcontext to Rhino Document (so we bake directly into the active Rhino scene if requested)-try:- ghdoc = sc.doc- sc.doc = Rhino.RhinoDoc.ActiveDoc-except:- pass--doc = sc.doc-tol = doc.ModelAbsoluteTolerance-S = Rhino.RhinoMath.UnitScale(Rhino.UnitSystem.Meters, doc.ModelUnitSystem)--# Sliders utility-def _f(v, default):- try: return float(v) if v is not None else default- except: return default-def _i(v, default):- try: return int(v) if v is not None else default- except: return default--# Map inputs-NUM_BAYS = _i(num_bays, 3)-NUM_FLOORS = _i(num_floors, 2)-BAY_WIDTH = _f(bay_width, 1.50)-FLOOR_HEIGHT = _f(floor_height, 3.50)--MULLION_W = _f(mullion_w, 0.060)-MULLION_D = _f(mullion_d, 0.150)-MULLION_T = _f(mullion_t, 0.003)--TRANSOM_W = _f(transom_w, 0.060)-TRANSOM_D = _f(transom_d, 0.120)-TRANSOM_T = _f(transom_t, 0.003)--GLASS_OUTER_T = _f(glass_outer_t, 0.006)-GLASS_INNER_T = _f(glass_inner_t, 0.006)-GLASS_GAP_T = _f(glass_gap_t, 0.016)-GLASS_REVEAL = _f(glass_reveal, 0.015)-GLASS_SETBACK = _f(glass_setback, 0.040)--GASKET_T = _f(gasket_t, 0.004)-GASKET_W = _f(gasket_w, 0.012)-ISOLATOR_W = _f(isolator_w, 0.012)-PRESSURE_PLATE_T = _f(pressure_plate_t, 0.006)-COVER_CAP_D = _f(cover_cap_d, 0.020)--SLAB_T = _f(slab_t, 0.30)-SLAB_DEPTH = _f(slab_depth, 1.50)-SLAB_INSET = _f(slab_inset, 0.010)--BRACKET_W = _f(bracket_w, 0.080)-BRACKET_L1 = _f(bracket_l1, 0.150)-BRACKET_L2 = _f(bracket_l2, 0.120)-BRACKET_T = _f(bracket_t, 0.008)--# Scale to active units-BAY_WIDTH *= S; FLOOR_HEIGHT *= S-MULLION_W *= S; MULLION_D *= S; MULLION_T *= S-TRANSOM_W *= S; TRANSOM_D *= S; TRANSOM_T *= S-GLASS_OUTER_T *= S; GLASS_INNER_T *= S; GLASS_GAP_T *= S-GLASS_REVEAL *= S; GLASS_SETBACK *= S-GASKET_T *= S; GASKET_W *= S; ISOLATOR_W *= S-PRESSURE_PLATE_T *= S; COVER_CAP_D *= S-SLAB_T *= S; SLAB_DEPTH *= S; SLAB_INSET *= S-BRACKET_W *= S; BRACKET_L1 *= S; BRACKET_L2 *= S; BRACKET_T *= S--TOTAL_HEIGHT = NUM_FLOORS * FLOOR_HEIGHT--def make_hollow_tube(plane, w, y_min, y_max, length):- rect = rg.Rectangle3d(rg.Plane.WorldXY, rg.Interval(-w*0.5, w*0.5), rg.Interval(y_min, y_max))- ext = rg.Extrusion.Create(rect.ToNurbsCurve(), length, True).ToBrep()- if ext:- xf = rg.Transform.PlaneToPlane(rg.Plane.WorldXY, plane)- ext.Transform(xf)- return ext- return None--# Coords grid-X_grid = [i * BAY_WIDTH for i in range(NUM_BAYS + 1)]--# Define transom elevations-Z_grid = []-Z_grid.append(0.0) # Bottom boundary (Sill)-for f in range(1, NUM_FLOORS):- fz = f * FLOOR_HEIGHT- Z_grid.append(fz - 0.15 * S) # Head transom: 150mm below slab level- Z_grid.append(fz + 0.85 * S) # Sill transom: 850mm above slab level-Z_grid.append(TOTAL_HEIGHT) # Top boundary (Head)-Z_grid = sorted(list(set(Z_grid)))--m_list = List[rg.Brep]()-t_list = List[rg.Brep]()-go_list = List[rg.Brep]()-gi_list = List[rg.Brep]()-g_list = List[rg.Brep]()-b_list = List[rg.Brep]()-fs_list = List[rg.Brep]()-fx_list = List[rg.Brep]()-s_list = List[rg.Brep]()-n_glass = 0--# Mullions with Noses-for x in X_grid:- m_plane = rg.Plane(rg.Point3d(x, 0.0, 0.0), rg.Vector3d.XAxis, rg.Vector3d.YAxis)- y_front = -GLASS_SETBACK + GASKET_T- y_back = y_front + MULLION_D- m_brep = make_hollow_tube(m_plane, MULLION_W, y_front, y_back, TOTAL_HEIGHT)- if m_brep: m_list.Add(m_brep)-- nose_w = 0.024 * S- y_nose_min = -GLASS_SETBACK - GLASS_INNER_T- y_nose_max = -GLASS_SETBACK + GASKET_T- m_nose_brep = make_hollow_tube(m_plane, nose_w, y_nose_min, y_nose_max, TOTAL_HEIGHT)- if m_nose_brep: m_list.Add(m_nose_brep)--# Transoms with Noses (placed at all Z_grid levels)-for k in range(len(Z_grid)):- z = Z_grid[k]-- for i in range(NUM_BAYS):- x_start = X_grid[i] + MULLION_W*0.5- x_end = X_grid[i+1] - MULLION_W*0.5- length = x_end - x_start- if length <= 0: continue-- t_plane = rg.Plane(rg.Point3d(x_start, 0.0, z), -rg.Vector3d.ZAxis, rg.Vector3d.YAxis)- y_front = -GLASS_SETBACK + GASKET_T- y_back = y_front + TRANSOM_D- t_brep = make_hollow_tube(t_plane, TRANSOM_W, y_front, y_back, length)- if t_brep: t_list.Add(t_brep)-- nose_w = 0.024 * S- y_nose_min = -GLASS_SETBACK - GLASS_INNER_T- y_nose_max = -GLASS_SETBACK + GASKET_T- t_nose_brep = make_hollow_tube(t_plane, nose_w, y_nose_min, y_nose_max, length)- if t_nose_brep: t_list.Add(t_nose_brep)--# Floor slabs and Fire Stop containment (intermediate levels only)-for f in range(1, NUM_FLOORS):- z_floor = f * FLOOR_HEIGHT- y_mullion_back = -GLASS_SETBACK + GASKET_T + MULLION_D- slab_edge_y = y_mullion_back + SLAB_INSET-- # Slab- slab = rg.Box(rg.Plane.WorldXY, rg.Interval(0.0, NUM_BAYS * BAY_WIDTH), rg.Interval(slab_edge_y, slab_edge_y + SLAB_DEPTH), rg.Interval(z_floor - SLAB_T, z_floor)).ToBrep()- if slab: s_list.Add(slab)-- # Fire wool- firestop_wool = rg.Box(rg.Plane.WorldXY, rg.Interval(0.0, NUM_BAYS * BAY_WIDTH), rg.Interval(y_mullion_back, slab_edge_y), rg.Interval(z_floor - SLAB_T, z_floor)).ToBrep()- if firestop_wool: fs_list.Add(firestop_wool)-- # Galvanized sheet- smoke_sheet = rg.Box(rg.Plane.WorldXY, rg.Interval(0.0, NUM_BAYS * BAY_WIDTH), rg.Interval(y_mullion_back, slab_edge_y + 0.050*S), rg.Interval(z_floor, z_floor + 0.002*S)).ToBrep()- if smoke_sheet: b_list.Add(smoke_sheet)--# Slab brackets (intermediate levels only)-for f in range(1, NUM_FLOORS):- z_floor = f * FLOOR_HEIGHT- y_mullion_back = -GLASS_SETBACK + GASKET_T + MULLION_D- slab_edge_y = y_mullion_back + SLAB_INSET- for x in X_grid:- leg1_l = rg.Box(rg.Plane.WorldXY, rg.Interval(x - MULLION_W*0.5 - BRACKET_T, x - MULLION_W*0.5), rg.Interval(slab_edge_y, slab_edge_y + BRACKET_L1), rg.Interval(z_floor, z_floor + BRACKET_T)).ToBrep()- leg2_l = rg.Box(rg.Plane.WorldXY, rg.Interval(x - MULLION_W*0.5 - BRACKET_T, x - MULLION_W*0.5), rg.Interval(y_mullion_back - BRACKET_W, slab_edge_y), rg.Interval(z_floor, z_floor + BRACKET_L2)).ToBrep()- if leg1_l: b_list.Add(leg1_l)- if leg2_l: b_list.Add(leg2_l)- leg1_r = rg.Box(rg.Plane.WorldXY, rg.Interval(x + MULLION_W*0.5, x + MULLION_W*0.5 + BRACKET_T), rg.Interval(slab_edge_y, slab_edge_y + BRACKET_L1), rg.Interval(z_floor, z_floor + BRACKET_T)).ToBrep()- leg2_r = rg.Box(rg.Plane.WorldXY, rg.Interval(x + MULLION_W*0.5, x + MULLION_W*0.5 + BRACKET_T), rg.Interval(y_mullion_back - BRACKET_W, slab_edge_y), rg.Interval(z_floor, z_floor + BRACKET_L2)).ToBrep()- if leg1_r: b_list.Add(leg1_r)- if leg2_r: b_list.Add(leg2_r)--# Gaskets and pressure plates on Mullions-g_w_m = MULLION_W * 0.5 - GLASS_REVEAL # Dynamic gasket width matching mullion shoulders--for x in X_grid:- g_l = rg.Box(rg.Plane.WorldXY, rg.Interval(x - GLASS_REVEAL - g_w_m, x - GLASS_REVEAL), rg.Interval(-GLASS_SETBACK, -GLASS_SETBACK + GASKET_T), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- g_r = rg.Box(rg.Plane.WorldXY, rg.Interval(x + GLASS_REVEAL, x + GLASS_REVEAL + g_w_m), rg.Interval(-GLASS_SETBACK, -GLASS_SETBACK + GASKET_T), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- if g_l: g_list.Add(g_l)- if g_r: g_list.Add(g_r)-- gy_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T - GASKET_T- gy_max = gy_min + GASKET_T- og_l = rg.Box(rg.Plane.WorldXY, rg.Interval(x - GLASS_REVEAL - g_w_m, x - GLASS_REVEAL), rg.Interval(gy_min, gy_max), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- og_r = rg.Box(rg.Plane.WorldXY, rg.Interval(x + GLASS_REVEAL, x + GLASS_REVEAL + g_w_m), rg.Interval(gy_min, gy_max), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- if og_l: g_list.Add(og_l)- if og_r: g_list.Add(og_r)--- iy_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T- iy_max = -GLASS_SETBACK - GLASS_INNER_T- ti = rg.Box(rg.Plane.WorldXY, rg.Interval(x - ISOLATOR_W*0.5, x + ISOLATOR_W*0.5), rg.Interval(iy_min, iy_max), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- if ti: t_list.Add(ti)-- py_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T - GASKET_T - PRESSURE_PLATE_T- py_max = py_min + PRESSURE_PLATE_T- pp = rg.Box(rg.Plane.WorldXY, rg.Interval(x - MULLION_W*0.5, x + MULLION_W*0.5), rg.Interval(py_min, py_max), rg.Interval(0.0, TOTAL_HEIGHT)).ToBrep()- if pp: t_list.Add(pp)-- # Caps- pts_c = [- rg.Point3d(-MULLION_W*0.5, 0.0, 0.0),- rg.Point3d(-MULLION_W*0.5, -COVER_CAP_D + 0.006*S, 0.0),- rg.Point3d(-MULLION_W*0.5 + 0.006*S, -COVER_CAP_D, 0.0),- rg.Point3d(MULLION_W*0.5 - 0.006*S, -COVER_CAP_D, 0.0),- rg.Point3d(MULLION_W*0.5, -COVER_CAP_D + 0.006*S, 0.0),- rg.Point3d(MULLION_W*0.5, 0.0, 0.0),- rg.Point3d(-MULLION_W*0.5, 0.0, 0.0)- ]- pl = rg.Polyline(pts_c).ToNurbsCurve()- ext = rg.Extrusion.Create(pl, TOTAL_HEIGHT, True).ToBrep()- if ext:- ext.Transform(rg.Transform.PlaneToPlane(rg.Plane.WorldXY, rg.Plane(rg.Point3d(x, py_min, 0.0), rg.Vector3d.XAxis, rg.Vector3d.YAxis)))- t_list.Add(ext)-- # Screws- screw_spacing = 0.35 * S; screw_rad = 0.004 * S; screw_len = 0.090 * S- cur_z = 0.1 * S- while cur_z < TOTAL_HEIGHT:- cyl_plane = rg.Plane(rg.Point3d(x, py_min, cur_z), rg.Vector3d.YAxis)- cyl = rg.Cylinder(rg.Circle(cyl_plane, screw_rad), screw_len).ToBrep(True, True)- if cyl: fx_list.Add(cyl)- cur_z += screw_spacing--# Gaskets and accessories on Transoms-g_w_t = TRANSOM_W * 0.5 - GLASS_REVEAL # Dynamic gasket width matching transom shoulders--for k in range(len(Z_grid)):- z = Z_grid[k]-- for i in range(NUM_BAYS):- x_start = X_grid[i] + MULLION_W*0.5- x_end = X_grid[i+1] - MULLION_W*0.5- length = x_end - x_start- if length <= 0: continue-- gy_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T - GASKET_T- gy_max = gy_min + GASKET_T-- # Top Gaskets (seal the glass above the transom) - skip if top boundary- if k < len(Z_grid) - 1:- g_t = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(-GLASS_SETBACK, -GLASS_SETBACK + GASKET_T), rg.Interval(z + GLASS_REVEAL, z + GLASS_REVEAL + g_w_t)).ToBrep()- if g_t: g_list.Add(g_t)-- og_t = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(gy_min, gy_max), rg.Interval(z + GLASS_REVEAL, z + GLASS_REVEAL + g_w_t)).ToBrep()- if og_t: g_list.Add(og_t)-- # Bottom Gaskets (seal the glass below the transom) - skip if bottom boundary- if k > 0:- g_b = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(-GLASS_SETBACK, -GLASS_SETBACK + GASKET_T), rg.Interval(z - GLASS_REVEAL - g_w_t, z - GLASS_REVEAL)).ToBrep()- if g_b: g_list.Add(g_b)-- og_b = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(gy_min, gy_max), rg.Interval(z - GLASS_REVEAL - g_w_t, z - GLASS_REVEAL)).ToBrep()- if og_b: g_list.Add(og_b)--- iy_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T- iy_max = -GLASS_SETBACK - GLASS_INNER_T- ti = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(iy_min, iy_max), rg.Interval(z - ISOLATOR_W*0.5, z + ISOLATOR_W*0.5)).ToBrep()- if ti: t_list.Add(ti)-- py_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T - GASKET_T - PRESSURE_PLATE_T- py_max = py_min + PRESSURE_PLATE_T- pp = rg.Box(rg.Plane.WorldXY, rg.Interval(x_start, x_end), rg.Interval(py_min, py_max), rg.Interval(z - TRANSOM_W*0.5, z + TRANSOM_W*0.5)).ToBrep()- if pp: t_list.Add(pp)-- # Transom cap- pts_c = [- rg.Point3d(-TRANSOM_W*0.5, 0.0, 0.0),- rg.Point3d(-TRANSOM_W*0.5, -COVER_CAP_D + 0.006*S, 0.0),- rg.Point3d(-TRANSOM_W*0.5 + 0.006*S, -COVER_CAP_D, 0.0),- rg.Point3d(TRANSOM_W*0.5 - 0.006*S, -COVER_CAP_D, 0.0),- rg.Point3d(TRANSOM_W*0.5, -COVER_CAP_D + 0.006*S, 0.0),- rg.Point3d(TRANSOM_W*0.5, 0.0, 0.0),- rg.Point3d(-TRANSOM_W*0.5, 0.0, 0.0)- ]- pl = rg.Polyline(pts_c).ToNurbsCurve()- ext = rg.Extrusion.Create(pl, length, True).ToBrep()- if ext:- ext.Transform(rg.Transform.PlaneToPlane(rg.Plane.WorldXY, rg.Plane(rg.Point3d(x_start, py_min, z), -rg.Vector3d.ZAxis, rg.Vector3d.YAxis)))- t_list.Add(ext)-- # Screws- screw_spacing = 0.35 * S; screw_rad = 0.004 * S; screw_len = 0.090 * S- cur_x = x_start + 0.1 * S- while cur_x < x_end:- cyl_plane = rg.Plane(rg.Point3d(cur_x, py_min, z), rg.Vector3d.YAxis)- cyl = rg.Cylinder(rg.Circle(cyl_plane, screw_rad), screw_len).ToBrep(True, True)- if cyl: fx_list.Add(cyl)- cur_x += screw_spacing--# IGUs-for k in range(len(Z_grid) - 1):- z_start = Z_grid[k]- z_end = Z_grid[k+1]- for i in range(NUM_BAYS):- x_start = X_grid[i]; x_end = X_grid[i+1]- x1 = x_start + GLASS_REVEAL; x2 = x_end - GLASS_REVEAL- z1 = z_start + GLASS_REVEAL; z2 = z_end - GLASS_REVEAL- if x2 - x1 <= 0 or z2 - z1 <= 0: continue-- # Inner Glass- y_in_min = -GLASS_SETBACK - GLASS_INNER_T- y_in_max = -GLASS_SETBACK- glass_in = rg.Box(rg.Plane.WorldXY, rg.Interval(x1, x2), rg.Interval(y_in_min, y_in_max), rg.Interval(z1, z2)).ToBrep()- if glass_in: gi_list.Add(glass_in)-- # Outer Glass- y_ot_min = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T - GLASS_OUTER_T- y_ot_max = y_ot_min + GLASS_OUTER_T- glass_ot = rg.Box(rg.Plane.WorldXY, rg.Interval(x1, x2), rg.Interval(y_ot_min, y_ot_max), rg.Interval(z1, z2)).ToBrep()- if glass_ot: go_list.Add(glass_ot)-- # Spacers and sealant- sp_offset = 0.015 * S; sp_width = 0.012 * S- sx1 = x1 + sp_offset; sx2 = x2 - sp_offset- sz1 = z1 + sp_offset; sz2 = z2 - sp_offset- sy_min_spacer = -GLASS_SETBACK - GLASS_INNER_T - GLASS_GAP_T- sy_max_spacer = -GLASS_SETBACK - GLASS_INNER_T- if sx2 - sx1 > 0 and sz2 - sz1 > 0:- sp_l = rg.Box(rg.Plane.WorldXY, rg.Interval(sx1, sx1 + sp_width), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(sz1, sz2)).ToBrep()- sp_r = rg.Box(rg.Plane.WorldXY, rg.Interval(sx2 - sp_width, sx2), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(sz1, sz2)).ToBrep()- sp_b = rg.Box(rg.Plane.WorldXY, rg.Interval(sx1 + sp_width, sx2 - sp_width), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(sz1, sz1 + sp_width)).ToBrep()- sp_t = rg.Box(rg.Plane.WorldXY, rg.Interval(sx1 + sp_width, sx2 - sp_width), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(sz2 - sp_width, sz2)).ToBrep()- for sp in (sp_l, sp_r, sp_b, sp_t):- if sp: t_list.Add(sp)-- se_l = rg.Box(rg.Plane.WorldXY, rg.Interval(x1, sx1), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(z1, z2)).ToBrep()- se_r = rg.Box(rg.Plane.WorldXY, rg.Interval(sx2, x2), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(z1, z2)).ToBrep()- se_b = rg.Box(rg.Plane.WorldXY, rg.Interval(sx1, sx2), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(z1, sz1)).ToBrep()- se_t = rg.Box(rg.Plane.WorldXY, rg.Interval(sx1, sx2), rg.Interval(sy_min_spacer, sy_max_spacer), rg.Interval(sz2, z2)).ToBrep()- for se in (se_l, se_r, se_b, se_t):- if se: t_list.Add(se)- n_glass += 1--mullions = m_list-transoms = t_list-glass_outer = go_list-glass_inner = gi_list-gaskets = g_list-brackets = b_list-firestops = fs_list-fixings = fx_list-slabs = s_list-# Restore Grasshopper scriptcontext-try:- sc.doc = ghdoc-except:- pass-'''-- # Try setting code via SetSource (Python 3) or property reflection (GhPython)- code_set = False- if hasattr(py_comp, "SetSource"):- try:- py_comp.SetSource(FACADE_CODE)- code_set = True- print("Code embedded successfully via SetSource (Python 3)")- except Exception as e:- print("SetSource attempt failed: %s" % e)-- if not code_set:- for prop_name in ("Code", "ScriptSource", "Expression"):- try:- prop = py_comp.GetType().GetProperty(prop_name)- if prop and prop.CanWrite:- prop.SetValue(py_comp, FACADE_CODE, None)- code_set = True- print("Code embedded successfully via: %s" % prop_name)- break- except: pass-- # Expand inputs dynamically matching slider count- from Grasshopper.Kernel import GH_ParameterSide- target = len(SLIDER_ORDER)- added = 0- while py_comp.Params.Input.Count < target:- try:- idx_new = py_comp.Params.Input.Count- param = py_comp.CreateParameter(GH_ParameterSide.Input, idx_new)- py_comp.Params.RegisterInputParam(param)- added += 1- except Exception as e:- print(" Input parameter expansion failed at %d: %s" % (py_comp.Params.Input.Count, e))- break- try:- py_comp.VariableParameterMaintenance()- py_comp.Params.OnParametersChanged()- except: pass- print("Inputs expanded to: %d (added %d)" % (py_comp.Params.Input.Count, added))-- # Connect/wire each slider to its corresponding input- n_wired = 0- for idx, sname in enumerate(SLIDER_ORDER):- if sname not in sliders: continue- if idx >= py_comp.Params.Input.Count: break- try:- ip = py_comp.Params.Input[idx]- ip.NickName = sname- ip.Name = sname- ip.AddSource(sliders[sname])- n_wired += 1- except Exception as wire_err:- print(" Wiring failure for parameter %s: %s" % (sname, wire_err))-- print("Wired %d / %d inputs to sliders" % (n_wired, target))-- # ── Add Custom Outputs to Python Component ────────────────────────────────- OUTPUT_NAMES = ["mullions", "transoms", "glass_outer", "glass_inner", "gaskets", "brackets", "slabs", "firestops", "fixings"]- # Unregister default output "a" if it exists at index 1- while py_comp.Params.Output.Count > 1:- try:- py_comp.Params.UnregisterOutputParam(py_comp.Params.Output[1])- except: break-- for name in OUTPUT_NAMES:- try:- param = py_comp.CreateParameter(GH_ParameterSide.Output, py_comp.Params.Output.Count)- param.NickName = name- param.Name = name- py_comp.Params.RegisterOutputParam(param)- except Exception as out_err:- print(" Output registration failed for %s: %s" % (name, out_err))-- try:- py_comp.VariableParameterMaintenance()- py_comp.Params.OnParametersChanged()- except: pass- print("Outputs expanded to: %d" % py_comp.Params.Output.Count)-- # ── Custom Preview & Swatch pipeline instantiation ────────────────────────- preview_proxy = None- swatch_proxy = None- for proxy in server.ObjectProxies:- try:- nm = proxy.Desc.Name.lower()- if nm == "custom preview":- preview_proxy = proxy- elif nm == "colour swatch" or nm == "color swatch":- swatch_proxy = proxy- except: pass-- if preview_proxy and swatch_proxy:- print("Building Custom Preview pipeline...")- PREVIEW_SPECS = [- ("mullions", (35, 38, 46, 255), 0),- ("transoms", (50, 55, 65, 255), 1),- ("glass_outer", (60, 140, 210, 100), 2),- ("glass_inner", (170, 210, 240, 60), 3),- ("gaskets", (20, 20, 20, 255), 4),- ("brackets", (120, 120, 125, 255), 5),- ("slabs", (160, 155, 145, 255), 6),- ("firestops", (180, 160, 100, 255), 7),- ("fixings", (220, 220, 225, 255), 8),- ]-- DESCRIPTIONS = {- "mullions": "Mullion Profiles\nAlu 6063-T6, Anodized\nSightline 60mm, D=150mm\nUf = 1.6 W/m²K",- "transoms": "Transom Profiles & Accessories\nTransom 60x120mm, Cover Caps,\nPressure Plates, Thermal Isolator",- "glass_outer": "Outer Glass Pane\n6mm solar-control, tinted\nSolar heat gain g = 0.38\nUg = 1.1 W/m²K",- "glass_inner": "Inner Glass Pane\n6mm clear float\nRoom-side glazing surface",- "gaskets": "EPDM Weather Gaskets\nContinuous internal & external\nperimeter air/water barrier seals",- "brackets": "Anchor Brackets & Sheets\nGalvanized steel flanking legs &\n2mm sheet smoke containment",- "slabs": "Concrete Floor Slabs\nC30/37 reinforced structural slab\nThickness = 300mm",- "firestops": "Perimeter Fire Safing\n2-hour rated rockwool fire stop\nbetween slab edge & mullion back",- "fixings": "Structural Screws & Bolts\nM8 stainless steel screws\nspaced at 350mm centers",- }-- legend_objs = []- scribble("III. MATERIAL SPECIFICATION LEGEND", PX + 160, PY_COMP_Y - 35, 12)-- for idx, (out_name, rgba, row_idx) in enumerate(PREVIEW_SPECS):- row_spacing = 70- # Swatch- swatch = swatch_proxy.CreateInstance()- swatch.CreateAttributes()- sw_x = PX + 160- sw_y = PY_COMP_Y + row_idx * row_spacing- swatch.Attributes.Pivot = sd.PointF(float(sw_x), float(sw_y + 15))- try: swatch.SwatchColour = sd.Color.FromArgb(*rgba)- except: pass-- gd.AddObject(swatch, False)- legend_objs.append(swatch)-- # Preview- preview = preview_proxy.CreateInstance()- preview.CreateAttributes()- pr_x = PX + 260- pr_y = PY_COMP_Y + row_idx * row_spacing- preview.Attributes.Pivot = sd.PointF(float(pr_x), float(pr_y + 15))- gd.AddObject(preview, False)- legend_objs.append(preview)-- # Wire Python output -> Preview input 0 (G)- py_out = None- for p in py_comp.Params.Output:- if p.Name == out_name:- py_out = p- break- if py_out and preview.Params.Input.Count > 0:- preview.Params.Input[0].AddSource(py_out)-- # Wire Swatch -> Preview input 1 (M)- if preview.Params.Input.Count > 1:- preview.Params.Input[1].AddSource(swatch)-- # Description Panel- p_desc = GH_Panel()- p_desc.CreateAttributes()- p_desc.Attributes.Pivot = sd.PointF(float(PX + 360), float(pr_y))- p_desc.UserText = DESCRIPTIONS[out_name]- gd.AddObject(p_desc, False)- legend_objs.append(p_desc)-- grp("MATERIAL LEGEND & SPECIFICATIONS", (100, 100, 100, 100), legend_objs)- print("Visual previews wired successfully.")-else:- print("WARNING: Python component could not be resolved programmatically.")--# ── Performance Calculator ──────────────────────────────────────────────────-build_performance_calculator()--# ── Info/Annotation Panel ─────────────────────────────────────────────────────-pan(- "PARAMETRIC FAÇADE SYSTEM — AEC Model Bridge\n"- "Realistic, high-detail stick curtain wall generator (Audited Edition)\n\n"- "Sliders control:\n"- " A Grid & Bays Bay counts, floor lines, widths, floor heights\n"- " B Structural Profiles Mullion and transom section dimensions\n"- " C Insulated Glazing IGU double glazing outer/inner panes, spacer and air gap\n"- " D Gaskets & Plates Clamping pressure plate, cover caps, isolator breaks, gaskets\n"- " E Slab & Brackets Flanking concrete anchor brackets, slab thickness, extensions\n\n"- "Instructions:\n"- "1. Open Grasshopper and adjust any slider in the left column.\n"- "2. Viewport automatically updates dynamically via Custom Previews.\n"- "3. To bake into permanent Rhino objects, right-click the Custom Preview and click Bake.\n"- "4. Clean visual layout resembles senior facade engineering logic.",- PX + 620, PY_COMP_Y-)--# ── Re-enable solution solver and save file ───────────────────────────────────-gd.Enabled = True-canvas.Refresh()-print("Grasshopper canvas building complete! Total objects: %d" % gd.ObjectCount)--# Save the Grasshopper document to the scratch folder for easy load-save_path = r"c:\Users\sammo\OneDrive\Documenten\GitHub\Autodesk-Revit-MCP-Server\scratch\facade_system.gh"-try:- doc_io = gh.Kernel.GH_DocumentIO(gd)- doc_io.SaveQuiet(save_path)- print("Saved Grasshopper definition to: %s" % save_path)-except Exception as e:- print("Warning: failed to save GH file: %s" % e)diff --git a/scratch/facade_system.dyn b/scratch/facade_system.dyndeleted file mode 100644index 49fe549..0000000--- a/scratch/facade_system.dyn+++ /dev/null@@ -1,3027 +0,0 @@-{- "Uuid": "cb09f430-cf5e-4f86-ad7c-21c01e6f3be9",- "IsCustomNode": false,- "Description": "Detailed Parametric Curtain Wall Façade System. Generated dynamically to match Rhino Grasshopper workflow.",- "Name": "facade_system",- "ElementResolver": {- "ResolutionMap": {- "DSCore.Color": {- "Key": "DSCore.Color",- "Value": "DSCoreNodes.dll"- }- }- },- "Inputs": [- {- "Id": "3e0e8b6d7f9e4f72a9096f3aa765f5cc",- "Name": "NUM BAYS",- "Type": "number",- "Type2": "number",- "Value": "5",- "MaximumValue": 10.0,- "MinimumValue": 1.0,- "StepValue": 1.0,- "NumberType": "Integer",- "Description": "Produces integer values"- },- {- "Id": "b96e1661160a4f568027acdce1721213",- "Name": "NUM FLOORS",- "Type": "number",- "Type2": "number",- "Value": "4",- "MaximumValue": 5.0,- "MinimumValue": 1.0,- "StepValue": 1.0,- "NumberType": "Integer",- "Description": "Produces integer values"- },- {- "Id": "8da8966fc846481cb1ad4bb913a26f68",- "Name": "BAY WIDTH",- "Type": "number",- "Type2": "number",- "Value": "2.1",- "MaximumValue": 3.0,- "MinimumValue": 0.8,- "StepValue": 0.1,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "a9a3b361afae4d0e8d09234e2a4f6c4b",- "Name": "FLOOR HEIGHT",- "Type": "number",- "Type2": "number",- "Value": "3.5",- "MaximumValue": 5.0,- "MinimumValue": 2.5,- "StepValue": 0.1,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "67ba837e2cf34048a3ac6724e3810f7e",- "Name": "MULLION W",- "Type": "number",- "Type2": "number",- "Value": "0.06",- "MaximumValue": 0.1,- "MinimumValue": 0.03,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "b3c81662502348d0a2867ce7b8b793a8",- "Name": "MULLION D",- "Type": "number",- "Type2": "number",- "Value": "0.15",- "MaximumValue": 0.25,- "MinimumValue": 0.08,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "3a6f389ff69d4dc4a04257cda57125ad",- "Name": "MULLION T",- "Type": "number",- "Type2": "number",- "Value": "0.003",- "MaximumValue": 0.008,- "MinimumValue": 0.002,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "3b7bdeac2fbb42a682ed97c235beeed0",- "Name": "TRANSOM W",- "Type": "number",- "Type2": "number",- "Value": "0.06",- "MaximumValue": 0.1,- "MinimumValue": 0.03,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "565ddd5ca8df4d94b2b887c2d6472940",- "Name": "TRANSOM D",- "Type": "number",- "Type2": "number",- "Value": "0.12",- "MaximumValue": 0.2,- "MinimumValue": 0.06,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "4c4744cf3adf4efd8bdba6aba598dcac",- "Name": "TRANSOM T",- "Type": "number",- "Type2": "number",- "Value": "0.003",- "MaximumValue": 0.008,- "MinimumValue": 0.002,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "ccbf5a3058a44b02b69cbd1b532e5794",- "Name": "GLASS OUTER T",- "Type": "number",- "Type2": "number",- "Value": "0.006",- "MaximumValue": 0.015,- "MinimumValue": 0.004,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "12f316bae7934ad89bad9ac09df1fbeb",- "Name": "GLASS INNER T",- "Type": "number",- "Type2": "number",- "Value": "0.006",- "MaximumValue": 0.015,- "MinimumValue": 0.004,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "caaf874b70b7402a82ee4c9dc18e0b36",- "Name": "GLASS GAP T",- "Type": "number",- "Type2": "number",- "Value": "0.016",- "MaximumValue": 0.024,- "MinimumValue": 0.008,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "b3da8d4c6c78421a8ad297112f740389",- "Name": "GLASS REVEAL",- "Type": "number",- "Type2": "number",- "Value": "0.015",- "MaximumValue": 0.025,- "MinimumValue": 0.005,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "105725b161694d57b8f334134fc5fb44",- "Name": "GLASS SETBACK",- "Type": "number",- "Type2": "number",- "Value": "0.04",- "MaximumValue": 0.08,- "MinimumValue": 0.02,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "8ccabfcd98b148c18147cc71184ff2da",- "Name": "GASKET T",- "Type": "number",- "Type2": "number",- "Value": "0.004",- "MaximumValue": 0.01,- "MinimumValue": 0.002,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "17fe3a97bbcf400a8a3507abdda738ba",- "Name": "GASKET W",- "Type": "number",- "Type2": "number",- "Value": "0.012",- "MaximumValue": 0.02,- "MinimumValue": 0.005,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "d3ef1990bff44938ad66783fdcf8ecfd",- "Name": "ISOLATOR W",- "Type": "number",- "Type2": "number",- "Value": "0.012",- "MaximumValue": 0.024,- "MinimumValue": 0.006,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "5595e927617e4909a1f08ce5da267f76",- "Name": "PRESSURE PLATE T",- "Type": "number",- "Type2": "number",- "Value": "0.006",- "MaximumValue": 0.015,- "MinimumValue": 0.004,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "5143d28498ad49f0a5a660b4c3338e2e",- "Name": "COVER CAP D",- "Type": "number",- "Type2": "number",- "Value": "0.02",- "MaximumValue": 0.05,- "MinimumValue": 0.01,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "fe794dec44174728adfc27ec61a4f21e",- "Name": "SLAB T",- "Type": "number",- "Type2": "number",- "Value": "0.3",- "MaximumValue": 0.5,- "MinimumValue": 0.15,- "StepValue": 0.1,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "c89558e511a248399ede5a60dd7295ae",- "Name": "SLAB DEPTH",- "Type": "number",- "Type2": "number",- "Value": "1.5",- "MaximumValue": 2.5,- "MinimumValue": 0.5,- "StepValue": 0.1,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "72b4243578cd49f0b61606a711dd3359",- "Name": "SLAB INSET",- "Type": "number",- "Type2": "number",- "Value": "0.01",- "MaximumValue": 0.05,- "MinimumValue": 0.005,- "StepValue": 0.1,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "d04e5255c03340489c7434ed373711b4",- "Name": "BRACKET W",- "Type": "number",- "Type2": "number",- "Value": "0.08",- "MaximumValue": 0.15,- "MinimumValue": 0.04,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "4eed8d61cbb84781b675c24316787b32",- "Name": "BRACKET L1",- "Type": "number",- "Type2": "number",- "Value": "0.15",- "MaximumValue": 0.3,- "MinimumValue": 0.08,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "cd9be4a0c23e45c2bf05628b74827d3c",- "Name": "BRACKET L2",- "Type": "number",- "Type2": "number",- "Value": "0.12",- "MaximumValue": 0.25,- "MinimumValue": 0.06,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- },- {- "Id": "40182fd99c064d2a80d33b55838b4b80",- "Name": "BRACKET T",- "Type": "number",- "Type2": "number",- "Value": "0.008",- "MaximumValue": 0.016,- "MinimumValue": 0.004,- "StepValue": 0.001,- "NumberType": "Double",- "Description": "Produces numeric values"- }- ],- "Outputs": [],- "Nodes": [- {- "ConcreteType": "CoreNodeModels.Input.IntegerSlider, CoreNodeModels",- "NumberType": "Integer",- "MaximumValue": 10,- "MinimumValue": 1,- "StepValue": 1,- "Id": "3e0e8b6d7f9e4f72a9096f3aa765f5cc",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "aa32f57e169f4b45919ac9fcda2567a6",- "Name": "",- "Description": "Int64",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces integer values",- "InputValue": 5- },- {- "ConcreteType": "CoreNodeModels.Input.IntegerSlider, CoreNodeModels",- "NumberType": "Integer",- "MaximumValue": 5,- "MinimumValue": 1,- "StepValue": 1,- "Id": "b96e1661160a4f568027acdce1721213",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "7a23d5a543f2485d9609083d70fcec6f",- "Name": "",- "Description": "Int64",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces integer values",- "InputValue": 4- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 3.0,- "MinimumValue": 0.8,- "StepValue": 0.1,- "Id": "8da8966fc846481cb1ad4bb913a26f68",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "6f0e12fd6b0945ff97b7c472141864d9",- "Name": "",- "Description": "BAY WIDTH",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 2.1- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 5.0,- "MinimumValue": 2.5,- "StepValue": 0.1,- "Id": "a9a3b361afae4d0e8d09234e2a4f6c4b",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "df9eecb5393c41d38916c034b1e892c0",- "Name": "",- "Description": "FLOOR HEIGHT",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 3.5- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.1,- "MinimumValue": 0.03,- "StepValue": 0.001,- "Id": "67ba837e2cf34048a3ac6724e3810f7e",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "214893190dbb41469846ec6e4ec22656",- "Name": "",- "Description": "MULLION W",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.06- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.25,- "MinimumValue": 0.08,- "StepValue": 0.001,- "Id": "b3c81662502348d0a2867ce7b8b793a8",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "70fa1c649d8e46848df8ab1bcdb24b52",- "Name": "",- "Description": "MULLION D",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.15- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.008,- "MinimumValue": 0.002,- "StepValue": 0.001,- "Id": "3a6f389ff69d4dc4a04257cda57125ad",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "36aa2b3119964dd6b3c3a1c88e91fe72",- "Name": "",- "Description": "MULLION T",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.003- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.1,- "MinimumValue": 0.03,- "StepValue": 0.001,- "Id": "3b7bdeac2fbb42a682ed97c235beeed0",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "dba0cd96ff574b6da132e6d04a45d252",- "Name": "",- "Description": "TRANSOM W",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.06- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.2,- "MinimumValue": 0.06,- "StepValue": 0.001,- "Id": "565ddd5ca8df4d94b2b887c2d6472940",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "98e82c722c80476c99301b8f7d251643",- "Name": "",- "Description": "TRANSOM D",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.12- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.008,- "MinimumValue": 0.002,- "StepValue": 0.001,- "Id": "4c4744cf3adf4efd8bdba6aba598dcac",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "467c26d243ef4040b360133208edc2db",- "Name": "",- "Description": "TRANSOM T",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.003- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.015,- "MinimumValue": 0.004,- "StepValue": 0.001,- "Id": "ccbf5a3058a44b02b69cbd1b532e5794",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "4da2501efbca4e72b41da5278c519764",- "Name": "",- "Description": "GLASS OUTER T",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.006- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.015,- "MinimumValue": 0.004,- "StepValue": 0.001,- "Id": "12f316bae7934ad89bad9ac09df1fbeb",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "d2fc5b8fedb144b68cc7a73ca51d1279",- "Name": "",- "Description": "GLASS INNER T",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.006- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.024,- "MinimumValue": 0.008,- "StepValue": 0.001,- "Id": "caaf874b70b7402a82ee4c9dc18e0b36",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "53a7ec1f1125404f84e908df397d5b33",- "Name": "",- "Description": "GLASS GAP T",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.016- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.025,- "MinimumValue": 0.005,- "StepValue": 0.001,- "Id": "b3da8d4c6c78421a8ad297112f740389",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "ec940296327a4b488a75fa21e086bbe1",- "Name": "",- "Description": "GLASS REVEAL",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.015- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.08,- "MinimumValue": 0.02,- "StepValue": 0.001,- "Id": "105725b161694d57b8f334134fc5fb44",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "a083fca7ea6e472c88092ffbdf3d7c4a",- "Name": "",- "Description": "GLASS SETBACK",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.04- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.01,- "MinimumValue": 0.002,- "StepValue": 0.001,- "Id": "8ccabfcd98b148c18147cc71184ff2da",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "f7c27791cc68426daac6a7f0744a3798",- "Name": "",- "Description": "GASKET T",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.004- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.02,- "MinimumValue": 0.005,- "StepValue": 0.001,- "Id": "17fe3a97bbcf400a8a3507abdda738ba",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "871478408acb445da3a6864f98d8786f",- "Name": "",- "Description": "GASKET W",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.012- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.024,- "MinimumValue": 0.006,- "StepValue": 0.001,- "Id": "d3ef1990bff44938ad66783fdcf8ecfd",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "c1854ece37de47d09baef7b89fdf4cc4",- "Name": "",- "Description": "ISOLATOR W",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.012- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.015,- "MinimumValue": 0.004,- "StepValue": 0.001,- "Id": "5595e927617e4909a1f08ce5da267f76",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "44f05dce688642779c93a25dcbfd3730",- "Name": "",- "Description": "PRESSURE PLATE T",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.006- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.05,- "MinimumValue": 0.01,- "StepValue": 0.001,- "Id": "5143d28498ad49f0a5a660b4c3338e2e",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "ac92f39881ff49d682076158ceffa52a",- "Name": "",- "Description": "COVER CAP D",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.02- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.5,- "MinimumValue": 0.15,- "StepValue": 0.1,- "Id": "fe794dec44174728adfc27ec61a4f21e",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "e0d00dc0c8da4cad9d943d022b277aa2",- "Name": "",- "Description": "SLAB T",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.3- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 2.5,- "MinimumValue": 0.5,- "StepValue": 0.1,- "Id": "c89558e511a248399ede5a60dd7295ae",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "feb4afbf457546dfa5936e0066a4526b",- "Name": "",- "Description": "SLAB DEPTH",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 1.5- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.05,- "MinimumValue": 0.005,- "StepValue": 0.1,- "Id": "72b4243578cd49f0b61606a711dd3359",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "2824674e85ed41288b8b89f7cb6c6e16",- "Name": "",- "Description": "SLAB INSET",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.01- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.15,- "MinimumValue": 0.04,- "StepValue": 0.001,- "Id": "d04e5255c03340489c7434ed373711b4",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "9577466fc9a0415cb0efc3c6d8205c72",- "Name": "",- "Description": "BRACKET W",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.08- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.3,- "MinimumValue": 0.08,- "StepValue": 0.001,- "Id": "4eed8d61cbb84781b675c24316787b32",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "f031345ece3a49e995f822f53ab9ae30",- "Name": "",- "Description": "BRACKET L1",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.15- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.25,- "MinimumValue": 0.06,- "StepValue": 0.001,- "Id": "cd9be4a0c23e45c2bf05628b74827d3c",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "8c382c9fe63546b39a7a3aae39f8cd7b",- "Name": "",- "Description": "BRACKET L2",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.12- },- {- "ConcreteType": "CoreNodeModels.Input.DoubleSlider, CoreNodeModels",- "NumberType": "Double",- "MaximumValue": 0.016,- "MinimumValue": 0.004,- "StepValue": 0.001,- "Id": "40182fd99c064d2a80d33b55838b4b80",- "NodeType": "NumberInputNode",- "Inputs": [],- "Outputs": [- {- "Id": "958c83219231448f9068e1d5f0704fcc",- "Name": "",- "Description": "BRACKET T",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Produces numeric values",- "InputValue": 0.008- },- {- "ConcreteType": "PythonNodeModels.PythonNode, PythonNodeModels",- "Code": "import clr\nclr.AddReference('ProtoGeometry')\nfrom Autodesk.DesignScript.Geometry import *\nimport math\n\n# Map inputs from IN list\nnum_bays = int(IN[0]) if IN[0] is not None else 3\nnum_floors = int(IN[1]) if IN[1] is not None else 2\nbay_width = float(IN[2]) if IN[2] is not None else 1.50\nfloor_height = float(IN[3]) if IN[3] is not None else 3.50\n\nmullion_w = float(IN[4]) if IN[4] is not None else 0.060\nmullion_d = float(IN[5]) if IN[5] is not None else 0.150\nmullion_t = float(IN[6]) if IN[6] is not None else 0.003\n\ntransom_w = float(IN[7]) if IN[7] is not None else 0.060\ntransom_d = float(IN[8]) if IN[8] is not None else 0.120\ntransom_t = float(IN[9]) if IN[9] is not None else 0.003\n\nglass_outer_t = float(IN[10]) if IN[10] is not None else 0.006\nglass_inner_t = float(IN[11]) if IN[11] is not None else 0.006\nglass_gap_t = float(IN[12]) if IN[12] is not None else 0.016\nglass_reveal = float(IN[13]) if IN[13] is not None else 0.015\nglass_setback = float(IN[14]) if IN[14] is not None else 0.040\n\ngasket_t = float(IN[15]) if IN[15] is not None else 0.004\ngasket_w = float(IN[16]) if IN[16] is not None else 0.012\nisolator_w = float(IN[17]) if IN[17] is not None else 0.012\npressure_plate_t = float(IN[18]) if IN[18] is not None else 0.006\ncover_cap_d = float(IN[19]) if IN[19] is not None else 0.020\n\nslab_t = float(IN[20]) if IN[20] is not None else 0.30\nslab_depth = float(IN[21]) if IN[21] is not None else 1.50\nslab_inset = float(IN[22]) if IN[22] is not None else 0.010\n\nbracket_w = float(IN[23]) if IN[23] is not None else 0.080\nbracket_l1 = float(IN[24]) if IN[24] is not None else 0.150\nbracket_l2 = float(IN[25]) if IN[25] is not None else 0.120\nbracket_t = float(IN[26]) if IN[26] is not None else 0.008\n\nTOTAL_HEIGHT = num_floors * floor_height\n\ndef make_box(x_min, x_max, y_min, y_max, z_min, z_max):\n try:\n pt1 = Point.ByCoordinates(x_min, y_min, z_min)\n pt2 = Point.ByCoordinates(x_max, y_max, z_max)\n return Cuboid.ByCorners(pt1, pt2)\n except:\n return None\n\n# Coords grid\nX_grid = [i * bay_width for i in range(num_bays + 1)]\n\n# Define transom elevations\nZ_grid = []\nZ_grid.append(0.0) # Bottom boundary\nfor f in range(1, num_floors):\n fz = f * floor_height\n Z_grid.append(fz - 0.15) # Head transom\n Z_grid.append(fz + 0.85) # Sill transom\nZ_grid.append(TOTAL_HEIGHT) # Top boundary\nZ_grid = sorted(list(set(Z_grid)))\n\nm_list = []\nt_list = []\ngo_list = []\ngi_list = []\ng_list = []\nb_list = []\ns_list = []\nfs_list = []\nfx_list = []\n\n# Mullions with Noses\nfor x in X_grid:\n # Main chamber\n y_front = -glass_setback + gasket_t\n y_back = y_front + mullion_d\n m_brep = make_box(x - mullion_w*0.5, x + mullion_w*0.5, y_front, y_back, 0.0, TOTAL_HEIGHT)\n if m_brep: m_list.append(m_brep)\n \n # Nose\n nose_w = 0.024\n y_nose_min = -glass_setback - glass_inner_t\n y_nose_max = -glass_setback + gasket_t\n m_nose_brep = make_box(x - nose_w*0.5, x + nose_w*0.5, y_nose_min, y_nose_max, 0.0, TOTAL_HEIGHT)\n if m_nose_brep: m_list.append(m_nose_brep)\n\n# Transoms with Noses (placed at all Z_grid levels)\nfor k in range(len(Z_grid)):\n z = Z_grid[k]\n\n for i in range(num_bays):\n x_start = X_grid[i] + mullion_w*0.5\n x_end = X_grid[i+1] - mullion_w*0.5\n length = x_end - x_start\n if length <= 0: continue\n \n # Main transom profile\n y_front = -glass_setback + gasket_t\n y_back = y_front + transom_d\n t_brep = make_box(x_start, x_end, y_front, y_back, z - transom_w*0.5, z + transom_w*0.5)\n if t_brep: t_list.append(t_brep)\n \n # Central nose\n nose_w = 0.024\n y_nose_min = -glass_setback - glass_inner_t\n y_nose_max = -glass_setback + gasket_t\n t_nose_brep = make_box(x_start, x_end, y_nose_min, y_nose_max, z - transom_w*0.5, z + transom_w*0.5)\n if t_nose_brep: t_list.append(t_nose_brep)\n\n# Floor slabs and Fire Stop containment (intermediate slab levels only)\nfor f in range(1, num_floors):\n z_floor = f * floor_height\n y_mullion_back = -glass_setback + gasket_t + mullion_d\n slab_edge_y = y_mullion_back + slab_inset\n \n # Slab\n slab = make_box(0.0, num_bays * bay_width, slab_edge_y, slab_edge_y + slab_depth, z_floor - slab_t, z_floor)\n if slab: s_list.append(slab)\n \n # Fire wool\n firestop_wool = make_box(0.0, num_bays * bay_width, y_mullion_back, slab_edge_y, z_floor - slab_t, z_floor)\n if firestop_wool: fs_list.append(firestop_wool)\n \n # Galvanized sheet\n smoke_sheet = make_box(0.0, num_bays * bay_width, y_mullion_back, slab_edge_y + 0.050, z_floor, z_floor + 0.002)\n if smoke_sheet: b_list.append(smoke_sheet)\n\n# Slab brackets (intermediate levels only)\nfor f in range(1, num_floors):\n z_floor = f * floor_height\n y_mullion_back = -glass_setback + gasket_t + mullion_d\n slab_edge_y = y_mullion_back + slab_inset\n for x in X_grid:\n leg1_l = make_box(x - mullion_w*0.5 - bracket_t, x - mullion_w*0.5, slab_edge_y, slab_edge_y + bracket_l1, z_floor, z_floor + bracket_t)\n leg2_l = make_box(x - mullion_w*0.5 - bracket_t, x - mullion_w*0.5, y_mullion_back - bracket_w, slab_edge_y, z_floor, z_floor + bracket_l2)\n if leg1_l: b_list.append(leg1_l)\n if leg2_l: b_list.append(leg2_l)\n leg1_r = make_box(x + mullion_w*0.5, x + mullion_w*0.5 + bracket_t, slab_edge_y, slab_edge_y + bracket_l1, z_floor, z_floor + bracket_t)\n leg2_r = make_box(x + mullion_w*0.5, x + mullion_w*0.5 + bracket_t, y_mullion_back - bracket_w, slab_edge_y, z_floor, z_floor + bracket_l2)\n if leg1_r: b_list.append(leg1_r)\n if leg2_r: b_list.append(leg2_r)\n\n# Gaskets and pressure plates on Mullions\ng_w_m = mullion_w * 0.5 - glass_reveal\nfor x in X_grid:\n g_l = make_box(x - glass_reveal - g_w_m, x - glass_reveal, -glass_setback, -glass_setback + gasket_t, 0.0, TOTAL_HEIGHT)\n g_r = make_box(x + glass_reveal, x + glass_reveal + g_w_m, -glass_setback, -glass_setback + gasket_t, 0.0, TOTAL_HEIGHT)\n if g_l: g_list.append(g_l)\n if g_r: g_list.append(g_r)\n \n gy_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t - gasket_t\n gy_max = gy_min + gasket_t\n og_l = make_box(x - glass_reveal - g_w_m, x - glass_reveal, gy_min, gy_max, 0.0, TOTAL_HEIGHT)\n og_r = make_box(x + glass_reveal, x + glass_reveal + g_w_m, gy_min, gy_max, 0.0, TOTAL_HEIGHT)\n if og_l: g_list.append(og_l)\n if og_r: g_list.append(og_r)\n \n iy_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t\n iy_max = -glass_setback - glass_inner_t\n ti = make_box(x - isolator_w*0.5, x + isolator_w*0.5, iy_min, iy_max, 0.0, TOTAL_HEIGHT)\n if ti: t_list.append(ti)\n \n py_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t - gasket_t - pressure_plate_t\n py_max = py_min + pressure_plate_t\n pp = make_box(x - mullion_w*0.5, x + mullion_w*0.5, py_min, py_max, 0.0, TOTAL_HEIGHT)\n if pp: t_list.append(pp)\n\n # Detailed Snap-on Cover Cap (chamfered polygon)\n try:\n pts_c = [\n Point.ByCoordinates(x - mullion_w*0.5, py_min, 0.0),\n Point.ByCoordinates(x - mullion_w*0.5, py_min - cover_cap_d + 0.006, 0.0),\n Point.ByCoordinates(x - mullion_w*0.5 + 0.006, py_min - cover_cap_d, 0.0),\n Point.ByCoordinates(x + mullion_w*0.5 - 0.006, py_min - cover_cap_d, 0.0),\n Point.ByCoordinates(x + mullion_w*0.5, py_min - cover_cap_d + 0.006, 0.0),\n Point.ByCoordinates(x + mullion_w*0.5, py_min, 0.0),\n Point.ByCoordinates(x - mullion_w*0.5, py_min, 0.0)\n ]\n cap = PolyCurve.ByPoints(pts_c).ExtrudeAsSolid(Vector.ByCoordinates(0, 0, 1), TOTAL_HEIGHT)\n if cap: t_list.append(cap)\n except:\n # Fallback to simple box representation\n cap = make_box(x - mullion_w*0.5, x + mullion_w*0.5, py_min - cover_cap_d, py_min, 0.0, TOTAL_HEIGHT)\n if cap: t_list.append(cap)\n\n # Screws as cylinders\n screw_spacing = 0.35; screw_rad = 0.004; screw_len = 0.090\n cur_z = 0.1\n while cur_z < TOTAL_HEIGHT:\n pt1 = Point.ByCoordinates(x, py_min, cur_z)\n pt2 = Point.ByCoordinates(x, py_min + screw_len, cur_z)\n cyl = Cylinder.ByPointsRadius(pt1, pt2, screw_rad)\n if cyl: fx_list.append(cyl)\n cur_z += screw_spacing\n\n# Gaskets and accessories on Transoms\ng_w_t = transom_w * 0.5 - glass_reveal\nfor k in range(len(Z_grid)):\n z = Z_grid[k]\n\n for i in range(num_bays):\n x_start = X_grid[i] + mullion_w*0.5\n x_end = X_grid[i+1] - mullion_w*0.5\n length = x_end - x_start\n if length <= 0: continue\n \n gy_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t - gasket_t\n gy_max = gy_min + gasket_t\n\n # Top Gaskets - skip if top boundary\n if k < len(Z_grid) - 1:\n g_t = make_box(x_start, x_end, -glass_setback, -glass_setback + gasket_t, z + glass_reveal, z + glass_reveal + g_w_t)\n if g_t: g_list.append(g_t)\n \n og_t = make_box(x_start, x_end, gy_min, gy_max, z + glass_reveal, z + glass_reveal + g_w_t)\n if og_t: g_list.append(og_t)\n\n # Bottom Gaskets - skip if bottom boundary\n if k > 0:\n g_b = make_box(x_start, x_end, -glass_setback, -glass_setback + gasket_t, z - glass_reveal - g_w_t, z - glass_reveal)\n if g_b: g_list.append(g_b)\n \n og_b = make_box(x_start, x_end, gy_min, gy_max, z - glass_reveal - g_w_t, z - glass_reveal)\n if og_b: g_list.append(og_b)\n \n iy_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t\n iy_max = -glass_setback - glass_inner_t\n ti = make_box(x_start, x_end, iy_min, iy_max, z - isolator_w*0.5, z + isolator_w*0.5)\n if ti: t_list.append(ti)\n \n py_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t - gasket_t - pressure_plate_t\n py_max = py_min + pressure_plate_t\n pp = make_box(x_start, x_end, py_min, py_max, z - transom_w*0.5, z + transom_w*0.5)\n if pp: t_list.append(pp)\n\n # Snap-on Transom Cover Cap (chamfered polygon in YZ plane extruded along X)\n try:\n pts_c = [\n Point.ByCoordinates(x_start, py_min, z + transom_w*0.5),\n Point.ByCoordinates(x_start, py_min - cover_cap_d + 0.006, z + transom_w*0.5),\n Point.ByCoordinates(x_start, py_min - cover_cap_d, z + transom_w*0.5 - 0.006),\n Point.ByCoordinates(x_start, py_min - cover_cap_d, z - transom_w*0.5 + 0.006),\n Point.ByCoordinates(x_start, py_min - cover_cap_d + 0.006, z - transom_w*0.5),\n Point.ByCoordinates(x_start, py_min, z - transom_w*0.5),\n Point.ByCoordinates(x_start, py_min, z + transom_w*0.5)\n ]\n cap = PolyCurve.ByPoints(pts_c).ExtrudeAsSolid(Vector.ByCoordinates(1, 0, 0), length)\n if cap: t_list.append(cap)\n except:\n # Fallback to simple box representation\n cap = make_box(x_start, x_end, py_min - cover_cap_d, py_min, z - transom_w*0.5, z + transom_w*0.5)\n if cap: t_list.append(cap)\n\n # Screws\n screw_spacing = 0.35; screw_rad = 0.004; screw_len = 0.090\n cur_x = x_start + 0.1\n while cur_x < x_end:\n pt1 = Point.ByCoordinates(cur_x, py_min, z)\n pt2 = Point.ByCoordinates(cur_x, py_min + screw_len, z)\n cyl = Cylinder.ByPointsRadius(pt1, pt2, screw_rad)\n if cyl: fx_list.append(cyl)\n cur_x += screw_spacing\n\n# IGUs\nfor k in range(len(Z_grid) - 1):\n z_start = Z_grid[k]\n z_end = Z_grid[k+1]\n for i in range(num_bays):\n x_start = X_grid[i]; x_end = X_grid[i+1]\n x1 = x_start + glass_reveal; x2 = x_end - glass_reveal\n z1 = z_start + glass_reveal; z2 = z_end - glass_reveal\n if x2 - x1 <= 0 or z2 - z1 <= 0: continue\n \n # Inner Glass\n y_in_min = -glass_setback - glass_inner_t\n y_in_max = -glass_setback\n glass_in = make_box(x1, x2, y_in_min, y_in_max, z1, z2)\n if glass_in: gi_list.append(glass_in)\n\n # Outer Glass\n y_ot_min = -glass_setback - glass_inner_t - glass_gap_t - glass_outer_t\n y_ot_max = y_ot_min + glass_outer_t\n glass_ot = make_box(x1, x2, y_ot_min, y_ot_max, z1, z2)\n if glass_ot: go_list.append(glass_ot)\n\n # Spacers and sealant\n sp_offset = 0.015; sp_width = 0.012\n sx1 = x1 + sp_offset; sx2 = x2 - sp_offset\n sz1 = z1 + sp_offset; sz2 = z2 - sp_offset\n sy_min_spacer = -glass_setback - glass_inner_t - glass_gap_t\n sy_max_spacer = -glass_setback - glass_inner_t\n if sx2 - sx1 > 0 and sz2 - sz1 > 0:\n sp_l = make_box(sx1, sx1 + sp_width, sy_min_spacer, sy_max_spacer, sz1, sz2)\n sp_r = make_box(sx2 - sp_width, sx2, sy_min_spacer, sy_max_spacer, sz1, sz2)\n sp_b = make_box(sx1 + sp_width, sx2 - sp_width, sy_min_spacer, sy_max_spacer, sz1, sz1 + sp_width)\n sp_t = make_box(sx1 + sp_width, sx2 - sp_width, sy_min_spacer, sy_max_spacer, sz2 - sp_width, sz2)\n for sp in (sp_l, sp_r, sp_b, sp_t):\n if sp: t_list.append(sp)\n\n se_l = make_box(x1, sx1, sy_min_spacer, sy_max_spacer, z1, z2)\n se_r = make_box(sx2, x2, sy_min_spacer, sy_max_spacer, z1, z2)\n se_b = make_box(sx1, sx2, sy_min_spacer, sy_max_spacer, z1, sz1)\n se_t = make_box(sx1, sx2, sy_min_spacer, sy_max_spacer, sz2, z2)\n for se in (se_l, se_r, se_b, se_t):\n if se: t_list.append(se)\n\nOUT = [m_list, t_list, go_list, gi_list, g_list, b_list, s_list, fs_list, fx_list]\n",- "Engine": "PythonNet3",- "VariableInputPorts": true,- "Id": "ff9c2f0f66f24022b11fefba48402ac0",- "NodeType": "PythonScriptNode",- "Inputs": [- {- "Id": "7580cb76ba074600bbca28e9ed72b18a",- "Name": "in_0",- "Description": "Input #0",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "eb60dfbd82da4664b8fdc0182d8e1448",- "Name": "in_1",- "Description": "Input #1",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "687af158da074e4997995f90389f0a6e",- "Name": "in_2",- "Description": "Input #2",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "f2b4d6ff06424551babd627d8203bda5",- "Name": "in_3",- "Description": "Input #3",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "d746e471c13b49cfbdca128ee68c987f",- "Name": "in_4",- "Description": "Input #4",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "42a96191615a4f908b2696ee9198540f",- "Name": "in_5",- "Description": "Input #5",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "e534389c4cfb4bf698ccc49b5f854bc1",- "Name": "in_6",- "Description": "Input #6",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "c6001667d7aa401196a0adfc16af057a",- "Name": "in_7",- "Description": "Input #7",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "fba8872223aa4f0ba37e9fe1928d2e29",- "Name": "in_8",- "Description": "Input #8",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "6e8dbbdd14564718b5f7fde760d014cc",- "Name": "in_9",- "Description": "Input #9",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "f9b04122892840d193b1af64bbbfbb18",- "Name": "in_10",- "Description": "Input #10",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "e13d06fd16af409e9120f3feefc42437",- "Name": "in_11",- "Description": "Input #11",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "2c0ed2d2880243e1901fce64c56478bf",- "Name": "in_12",- "Description": "Input #12",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "a941fe9769ee49cfb4ab0957a797763d",- "Name": "in_13",- "Description": "Input #13",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "fc6a538e31d9408e9a97e1ed7760d206",- "Name": "in_14",- "Description": "Input #14",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "e33874576c3f4a11b61fb4a18eda8116",- "Name": "in_15",- "Description": "Input #15",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "0938d85d52f843899610162c44839848",- "Name": "in_16",- "Description": "Input #16",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "11771e96fca942a58ec68e03a74fa622",- "Name": "in_17",- "Description": "Input #17",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "f881934390f24013add689c7ca53a9f6",- "Name": "in_18",- "Description": "Input #18",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "37cc7c3e03c74d849b6401c509646152",- "Name": "in_19",- "Description": "Input #19",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "54228213f1c04de5ae72f19b2096facf",- "Name": "in_20",- "Description": "Input #20",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "afafff4b817b4163857ba04e65f5b33c",- "Name": "in_21",- "Description": "Input #21",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "1ae5bdf37e354f6d8350cb7038aba9f4",- "Name": "in_22",- "Description": "Input #22",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "aeb752395a7e4bc2b20a1c9a85f5db9c",- "Name": "in_23",- "Description": "Input #23",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "9807f0decc8b4329a835320a1b78500c",- "Name": "in_24",- "Description": "Input #24",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "b97759b0b5024fa79acbcee24a5feaf9",- "Name": "in_25",- "Description": "Input #25",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "2e08e4e9dc434feca05cf2cd9c2500a4",- "Name": "in_26",- "Description": "Input #26",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "9d21ba43e05f44e78a7d66477c2961ee",- "Name": "OUT",- "Description": "Engine Output",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Runs an embedded Python script."- },- {- "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",- "Id": "2d1fde34e06f435dbfd0b06358331805",- "NodeType": "CodeBlockNode",- "Inputs": [- {- "Id": "83cf80ac685c4b37b7cef54e4df4553e",- "Name": "data",- "Description": "data",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "60a5f94ec1404907b114572ea374a9bf",- "Name": "mullions",- "Description": "mullions = DesignScript.Builtin.Get.ValueAtIndex(data, 0)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "a2695ac386c84b328db05ac314f448e4",- "Name": "transoms",- "Description": "transoms = DesignScript.Builtin.Get.ValueAtIndex(data, 1)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "e6027553888540568841b588a890f90d",- "Name": "glass_outer",- "Description": "glass_outer = DesignScript.Builtin.Get.ValueAtIndex(data, 2)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "cd48b6f7cdef4184bc709a9719e6069b",- "Name": "glass_inner",- "Description": "glass_inner = DesignScript.Builtin.Get.ValueAtIndex(data, 3)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "a70689410fe14e74a7b1ac609a6e2773",- "Name": "gaskets",- "Description": "gaskets = DesignScript.Builtin.Get.ValueAtIndex(data, 4)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "cdda8c6074374a3a9e6da10d4eb6cf77",- "Name": "brackets",- "Description": "brackets = DesignScript.Builtin.Get.ValueAtIndex(data, 5)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "54f4c97532644c27ad9dc4a2aed02f05",- "Name": "slabs",- "Description": "slabs = DesignScript.Builtin.Get.ValueAtIndex(data, 6)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "4e430e799c854d7683a59c0f306877b7",- "Name": "firestops",- "Description": "firestops = DesignScript.Builtin.Get.ValueAtIndex(data, 7)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "defc42a7a61049c4ad62e95e7b747195",- "Name": "fixings",- "Description": "fixings = DesignScript.Builtin.Get.ValueAtIndex(data, 8)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Allows for DesignScript code to be authored directly",- "Code": "mullions = data[0];\ntransoms = data[1];\nglass_outer = data[2];\nglass_inner = data[3];\ngaskets = data[4];\nbrackets = data[5];\nslabs = data[6];\nfirestops = data[7];\nfixings = data[8];"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",- "Id": "a3e555303b5e4da5a6840ffb530f84a3",- "NodeType": "CodeBlockNode",- "Inputs": [],- "Outputs": [- {- "Id": "3eed8abdc14346d2a0e0416effdd33ff",- "Name": "c_mullion",- "Description": "c_mullion = DSCore.Color.ByARGB(255, 35, 38, 46)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "4fc8d21c11e64bcd9ec56ba84137a567",- "Name": "c_transom",- "Description": "c_transom = DSCore.Color.ByARGB(255, 50, 55, 65)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "6498a603f7f44230a81cc183058ef3ac",- "Name": "c_glass_ot",- "Description": "c_glass_ot = DSCore.Color.ByARGB(120, 60, 140, 210)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "bad88f2cb4664356a19bd58772836fb2",- "Name": "c_glass_in",- "Description": "c_glass_in = DSCore.Color.ByARGB(60, 170, 210, 240)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "c99b8c715fa14f2cbb5cb6db1368274f",- "Name": "c_gaskets",- "Description": "c_gaskets = DSCore.Color.ByARGB(255, 20, 20, 20)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "610cfaf8430d41209532314af54e95d0",- "Name": "c_brackets",- "Description": "c_brackets = DSCore.Color.ByARGB(255, 120, 120, 125)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "42163ece32fa41aa9d07564471a6f7e0",- "Name": "c_slabs",- "Description": "c_slabs = DSCore.Color.ByARGB(255, 160, 155, 145)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "aabffea6523f4a4698b4f478f23632c4",- "Name": "c_firestops",- "Description": "c_firestops = DSCore.Color.ByARGB(255, 180, 160, 100)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "dc0afac0bbdf44be9bba591ad74384ab",- "Name": "c_fixings",- "Description": "c_fixings = DSCore.Color.ByARGB(255, 220, 220, 225)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Allows for DesignScript code to be authored directly",- "Code": "c_mullion = DSCore.Color.ByARGB(255, 35, 38, 46);\nc_transom = DSCore.Color.ByARGB(255, 50, 55, 65);\nc_glass_ot = DSCore.Color.ByARGB(120, 60, 140, 210);\nc_glass_in = DSCore.Color.ByARGB(60, 170, 210, 240);\nc_gaskets = DSCore.Color.ByARGB(255, 20, 20, 20);\nc_brackets = DSCore.Color.ByARGB(255, 120, 120, 125);\nc_slabs = DSCore.Color.ByARGB(255, 160, 155, 145);\nc_firestops = DSCore.Color.ByARGB(255, 180, 160, 100);\nc_fixings = DSCore.Color.ByARGB(255, 220, 220, 225);"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",- "Id": "38d376e4a74c486298564a8d34b5df2d",- "NodeType": "FunctionNode",- "Inputs": [- {- "Id": "5cf15a289b484b68b7ef0e9c8f8e0e13",- "Name": "geometry",- "Description": "The geometry to which you would like to apply color.\n\nGeometry",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "df05b85705184536be24cde860441b94",- "Name": "color",- "Description": "The color.\n\nColor",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "7e09a67f763e4e4a8c388d0a8f53a17d",- "Name": "GeometryColor",- "Description": "A Display object.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "FunctionSignature": "Modifiers.GeometryColor.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color",- "Replication": "Auto",- "Description": "Display geometry using a color.\n\nGeometryColor.ByGeometryColor (geometry: Geometry, color: Color): GeometryColor"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",- "Id": "d4cc672c845e4e7bbbb7a2e5a15b79c2",- "NodeType": "FunctionNode",- "Inputs": [- {- "Id": "7ca71ebc74634df5a4f2c7275647b64f",- "Name": "geometry",- "Description": "The geometry to which you would like to apply color.\n\nGeometry",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "601149504c714ae4813ae1ec5293b11d",- "Name": "color",- "Description": "The color.\n\nColor",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "2ea3dde479c7487b8b3c05c3df53bded",- "Name": "GeometryColor",- "Description": "A Display object.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "FunctionSignature": "Modifiers.GeometryColor.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color",- "Replication": "Auto",- "Description": "Display geometry using a color.\n\nGeometryColor.ByGeometryColor (geometry: Geometry, color: Color): GeometryColor"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",- "Id": "18307a4a218f481d9c42e8976d64b1eb",- "NodeType": "FunctionNode",- "Inputs": [- {- "Id": "0c4b9138b0654f39b2cf3b25a3e85950",- "Name": "geometry",- "Description": "The geometry to which you would like to apply color.\n\nGeometry",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "32cd2b0cb9cb431291b5a8af0863cccb",- "Name": "color",- "Description": "The color.\n\nColor",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "48b78b101623463a9fc4fb34bb9c1e41",- "Name": "GeometryColor",- "Description": "A Display object.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "FunctionSignature": "Modifiers.GeometryColor.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color",- "Replication": "Auto",- "Description": "Display geometry using a color.\n\nGeometryColor.ByGeometryColor (geometry: Geometry, color: Color): GeometryColor"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",- "Id": "781f5162975d4ecf9d4a6904689cdb01",- "NodeType": "FunctionNode",- "Inputs": [- {- "Id": "c782afd70f72460fbdc92e3d27c3de99",- "Name": "geometry",- "Description": "The geometry to which you would like to apply color.\n\nGeometry",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "feee51c6a34d426fa2cb54d40569ff2f",- "Name": "color",- "Description": "The color.\n\nColor",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "df1f948159674e9eb2cb382cb03bc9c8",- "Name": "GeometryColor",- "Description": "A Display object.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "FunctionSignature": "Modifiers.GeometryColor.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color",- "Replication": "Auto",- "Description": "Display geometry using a color.\n\nGeometryColor.ByGeometryColor (geometry: Geometry, color: Color): GeometryColor"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",- "Id": "adb7d620a97044299c47f980007b55d0",- "NodeType": "FunctionNode",- "Inputs": [- {- "Id": "b43c9416c55e4d5295debc8f69f2fafc",- "Name": "geometry",- "Description": "The geometry to which you would like to apply color.\n\nGeometry",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "d7abc59e74db42cc8946548ce04abf31",- "Name": "color",- "Description": "The color.\n\nColor",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "dcb6e749c76046eebaedfce2accee005",- "Name": "GeometryColor",- "Description": "A Display object.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "FunctionSignature": "Modifiers.GeometryColor.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color",- "Replication": "Auto",- "Description": "Display geometry using a color.\n\nGeometryColor.ByGeometryColor (geometry: Geometry, color: Color): GeometryColor"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",- "Id": "d6eb6a215bf94b9a83ae0d4f1b029686",- "NodeType": "FunctionNode",- "Inputs": [- {- "Id": "1ca58ba8974d4ede892821dc0a77ae5a",- "Name": "geometry",- "Description": "The geometry to which you would like to apply color.\n\nGeometry",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "44de613dda9949b58d35043014cd06c7",- "Name": "color",- "Description": "The color.\n\nColor",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "bdc6760dc01d49f49208314b86ae4698",- "Name": "GeometryColor",- "Description": "A Display object.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "FunctionSignature": "Modifiers.GeometryColor.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color",- "Replication": "Auto",- "Description": "Display geometry using a color.\n\nGeometryColor.ByGeometryColor (geometry: Geometry, color: Color): GeometryColor"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",- "Id": "339ba37bbcbf4604ba465a1668e9e71c",- "NodeType": "FunctionNode",- "Inputs": [- {- "Id": "5b85fe115dcc409ea47cf810d6c828b2",- "Name": "geometry",- "Description": "The geometry to which you would like to apply color.\n\nGeometry",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "8fd59bad6fb344a7b23352d25c1572ca",- "Name": "color",- "Description": "The color.\n\nColor",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "7a350644973c49af80695b8cc3c996a4",- "Name": "GeometryColor",- "Description": "A Display object.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "FunctionSignature": "Modifiers.GeometryColor.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color",- "Replication": "Auto",- "Description": "Display geometry using a color.\n\nGeometryColor.ByGeometryColor (geometry: Geometry, color: Color): GeometryColor"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",- "Id": "3f33572adcbc4550b828cb43753e1068",- "NodeType": "FunctionNode",- "Inputs": [- {- "Id": "4a86bc4b697b45e1b851c33bf0973b65",- "Name": "geometry",- "Description": "The geometry to which you would like to apply color.\n\nGeometry",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "a46427f6c7e9496480a64d8698a2f786",- "Name": "color",- "Description": "The color.\n\nColor",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "80738ce30f044ac18a27aaf31e2dc0db",- "Name": "GeometryColor",- "Description": "A Display object.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "FunctionSignature": "Modifiers.GeometryColor.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color",- "Replication": "Auto",- "Description": "Display geometry using a color.\n\nGeometryColor.ByGeometryColor (geometry: Geometry, color: Color): GeometryColor"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.ZeroTouch.DSFunction, DynamoCore",- "Id": "e6c587978eab492795075a507f431983",- "NodeType": "FunctionNode",- "Inputs": [- {- "Id": "8c94c5ff247c4bd0a3059497f96e8d5c",- "Name": "geometry",- "Description": "The geometry to which you would like to apply color.\n\nGeometry",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "e23b49a7329542759452ecae4de934ef",- "Name": "color",- "Description": "The color.\n\nColor",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "16c05e2c00284a80b93d229172da52ba",- "Name": "GeometryColor",- "Description": "A Display object.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "FunctionSignature": "Modifiers.GeometryColor.ByGeometryColor@Autodesk.DesignScript.Geometry.Geometry,DSCore.Color",- "Replication": "Auto",- "Description": "Display geometry using a color.\n\nGeometryColor.ByGeometryColor (geometry: Geometry, color: Color): GeometryColor"- },- {- "ConcreteType": "Dynamo.Graph.Nodes.CodeBlockNodeModel, DynamoCore",- "Id": "4e58b8782643421ebb538af34ba03b10",- "NodeType": "CodeBlockNode",- "Inputs": [- {- "Id": "7f7442ddd086491e879837b6b3aaed0f",- "Name": "num_bays",- "Description": "num_bays",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "ce3c6a63b15943318571454d7838c07a",- "Name": "bay_width",- "Description": "bay_width",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "ca97ceb06718439195f4b566208f494e",- "Name": "num_floors",- "Description": "num_floors",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "c2db1878954e4f36bf8c7ab3c31821ef",- "Name": "floor_height",- "Description": "floor_height",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "002929fe3b25431da7174d04d10a62d2",- "Name": "area",- "Description": "area = (num_bays * bay_width) * (num_floors * floor_height)",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- },- {- "Id": "b9d2107fe2b84a3c8c06ca6556a980b1",- "Name": "cost",- "Description": "cost = area * 650",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Allows for DesignScript code to be authored directly",- "Code": "area = (num_bays * bay_width) * (num_floors * floor_height);\ncost = area * 650.0;"- },- {- "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels",- "WatchWidth": 42.5,- "WatchHeight": 40.0,- "Id": "bd7df917d96d40ca99f8ecc0e6759797",- "NodeType": "ExtensionNode",- "Inputs": [- {- "Id": "e624314e6cbe4d20b6079c48d65e278b",- "Name": "",- "Description": "Incoming data.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "5d0c770d74394d9392616e96cc20cc71",- "Name": "",- "Description": "Watch contents.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Visualizes a node's output"- },- {- "ConcreteType": "CoreNodeModels.Watch, CoreNodeModels",- "WatchWidth": 57.5,- "WatchHeight": 40.0,- "Id": "9f963a9799cc4f3c8d02c50382a0acc7",- "NodeType": "ExtensionNode",- "Inputs": [- {- "Id": "49824b21c8314e319df886bca62701e7",- "Name": "",- "Description": "Incoming data.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Outputs": [- {- "Id": "d19db200a4074d4e818ea51c4a214968",- "Name": "",- "Description": "Watch contents.",- "UsingDefaultValue": false,- "Level": 2,- "UseLevels": false,- "KeepListStructure": false- }- ],- "Replication": "Disabled",- "Description": "Visualizes a node's output"- }- ],- "Connectors": [- {- "Start": "aa32f57e169f4b45919ac9fcda2567a6",- "End": "7580cb76ba074600bbca28e9ed72b18a",- "Id": "07cce8fa2c244896bbed6050af52c4f5",- "IsHidden": "False"- },- {- "Start": "aa32f57e169f4b45919ac9fcda2567a6",- "End": "7f7442ddd086491e879837b6b3aaed0f",- "Id": "f28df1b7203740289827fc19446f6f66",- "IsHidden": "False"- },- {- "Start": "7a23d5a543f2485d9609083d70fcec6f",- "End": "eb60dfbd82da4664b8fdc0182d8e1448",- "Id": "003fc635eea14b27a1443d9989cf36c8",- "IsHidden": "False"- },- {- "Start": "7a23d5a543f2485d9609083d70fcec6f",- "End": "ca97ceb06718439195f4b566208f494e",- "Id": "3f5c0a4c8baa487aa598301de1c851cd",- "IsHidden": "False"- },- {- "Start": "6f0e12fd6b0945ff97b7c472141864d9",- "End": "687af158da074e4997995f90389f0a6e",- "Id": "c1e9e0970a444f11922abd7113112684",- "IsHidden": "False"- },- {- "Start": "6f0e12fd6b0945ff97b7c472141864d9",- "End": "ce3c6a63b15943318571454d7838c07a",- "Id": "18fb3575f6a24c53b9d86f487a58027d",- "IsHidden": "False"- },- {- "Start": "df9eecb5393c41d38916c034b1e892c0",- "End": "f2b4d6ff06424551babd627d8203bda5",- "Id": "4c5a6e21a1164f67bf4ecbf16a631743",- "IsHidden": "False"- },- {- "Start": "df9eecb5393c41d38916c034b1e892c0",- "End": "c2db1878954e4f36bf8c7ab3c31821ef",- "Id": "ad93df090dc040e2b583a660483118bf",- "IsHidden": "False"- },- {- "Start": "214893190dbb41469846ec6e4ec22656",- "End": "d746e471c13b49cfbdca128ee68c987f",- "Id": "0c942d5499844796b03a45478c1930cd",- "IsHidden": "False"- },- {- "Start": "70fa1c649d8e46848df8ab1bcdb24b52",- "End": "42a96191615a4f908b2696ee9198540f",- "Id": "98d06f5257624a62a50137b7c86f89fb",- "IsHidden": "False"- },- {- "Start": "36aa2b3119964dd6b3c3a1c88e91fe72",- "End": "e534389c4cfb4bf698ccc49b5f854bc1",- "Id": "fe54d3055c784613949912d93efc2c02",- "IsHidden": "False"- },- {- "Start": "dba0cd96ff574b6da132e6d04a45d252",- "End": "c6001667d7aa401196a0adfc16af057a",- "Id": "12e03ee737f14b99b614ed7a6b9e661a",- "IsHidden": "False"- },- {- "Start": "98e82c722c80476c99301b8f7d251643",- "End": "fba8872223aa4f0ba37e9fe1928d2e29",- "Id": "14e4a76716a74a56b038211c84c9b546",- "IsHidden": "False"- },- {- "Start": "467c26d243ef4040b360133208edc2db",- "End": "6e8dbbdd14564718b5f7fde760d014cc",- "Id": "84334219252343c4b24d4b2e5e76dbd9",- "IsHidden": "False"- },- {- "Start": "4da2501efbca4e72b41da5278c519764",- "End": "f9b04122892840d193b1af64bbbfbb18",- "Id": "5d5eff2ae18b4472be4e35d58fc2d00c",- "IsHidden": "False"- },- {- "Start": "d2fc5b8fedb144b68cc7a73ca51d1279",- "End": "e13d06fd16af409e9120f3feefc42437",- "Id": "081199df5276436d88cb3da1ecdf9b52",- "IsHidden": "False"- },- {- "Start": "53a7ec1f1125404f84e908df397d5b33",- "End": "2c0ed2d2880243e1901fce64c56478bf",- "Id": "4591fbacd8704ab98ed9242437ff12fe",- "IsHidden": "False"- },- {- "Start": "ec940296327a4b488a75fa21e086bbe1",- "End": "a941fe9769ee49cfb4ab0957a797763d",- "Id": "e11a0d90f5d14836819f90a4c8d12165",- "IsHidden": "False"- },- {- "Start": "a083fca7ea6e472c88092ffbdf3d7c4a",- "End": "fc6a538e31d9408e9a97e1ed7760d206",- "Id": "9392e830da0e4c2590b745a841a6aa1e",- "IsHidden": "False"- },- {- "Start": "f7c27791cc68426daac6a7f0744a3798",- "End": "e33874576c3f4a11b61fb4a18eda8116",- "Id": "aa655fbc3d5744cebe34da8dab02dbc1",- "IsHidden": "False"- },- {- "Start": "871478408acb445da3a6864f98d8786f",- "End": "0938d85d52f843899610162c44839848",- "Id": "830cf7f7d2ca4a348c8c46eb18a81fc6",- "IsHidden": "False"- },- {- "Start": "c1854ece37de47d09baef7b89fdf4cc4",- "End": "11771e96fca942a58ec68e03a74fa622",- "Id": "60a2e89f9f394db899c438f1a5c5e6d7",- "IsHidden": "False"- },- {- "Start": "44f05dce688642779c93a25dcbfd3730",- "End": "f881934390f24013add689c7ca53a9f6",- "Id": "e69a269bc52142c4a9b3cff27fd2cb93",- "IsHidden": "False"- },- {- "Start": "ac92f39881ff49d682076158ceffa52a",- "End": "37cc7c3e03c74d849b6401c509646152",- "Id": "c70aabfa05f3441f99ab046e27a0bf7d",- "IsHidden": "False"- },- {- "Start": "e0d00dc0c8da4cad9d943d022b277aa2",- "End": "54228213f1c04de5ae72f19b2096facf",- "Id": "b8030162a9664d26a7b2006f271756b0",- "IsHidden": "False"- },- {- "Start": "feb4afbf457546dfa5936e0066a4526b",- "End": "afafff4b817b4163857ba04e65f5b33c",- "Id": "23968cfe1e244b7b8229b6fa63d0adfb",- "IsHidden": "False"- },- {- "Start": "2824674e85ed41288b8b89f7cb6c6e16",- "End": "1ae5bdf37e354f6d8350cb7038aba9f4",- "Id": "8965f86d431141a888a6e723c0dcbc56",- "IsHidden": "False"- },- {- "Start": "9577466fc9a0415cb0efc3c6d8205c72",- "End": "aeb752395a7e4bc2b20a1c9a85f5db9c",- "Id": "8ff28eff64a64b5087430bf14be36b15",- "IsHidden": "False"- },- {- "Start": "f031345ece3a49e995f822f53ab9ae30",- "End": "9807f0decc8b4329a835320a1b78500c",- "Id": "6dd51affb1ea43b0a7c95598a6545a85",- "IsHidden": "False"- },- {- "Start": "8c382c9fe63546b39a7a3aae39f8cd7b",- "End": "b97759b0b5024fa79acbcee24a5feaf9",- "Id": "2e899b38b1e647969e56ea4547190c84",- "IsHidden": "False"- },- {- "Start": "958c83219231448f9068e1d5f0704fcc",- "End": "2e08e4e9dc434feca05cf2cd9c2500a4",- "Id": "49e90e7c3dba4d7b986cfe980363e4ae",- "IsHidden": "False"- },- {- "Start": "9d21ba43e05f44e78a7d66477c2961ee",- "End": "83cf80ac685c4b37b7cef54e4df4553e",- "Id": "07b620f24699441c89b57eec9602eea2",- "IsHidden": "False"- },- {- "Start": "60a5f94ec1404907b114572ea374a9bf",- "End": "5cf15a289b484b68b7ef0e9c8f8e0e13",- "Id": "64069faaf979452eb2e1c6234255ef0b",- "IsHidden": "False"- },- {- "Start": "a2695ac386c84b328db05ac314f448e4",- "End": "7ca71ebc74634df5a4f2c7275647b64f",- "Id": "678918551ac54f5fbee91a8c728b8ac4",- "IsHidden": "False"- },- {- "Start": "e6027553888540568841b588a890f90d",- "End": "0c4b9138b0654f39b2cf3b25a3e85950",- "Id": "a5ad2ab79c0b4ac38a5f1ebdd34ec110",- "IsHidden": "False"- },- {- "Start": "cd48b6f7cdef4184bc709a9719e6069b",- "End": "c782afd70f72460fbdc92e3d27c3de99",- "Id": "c4a68a058c9b442d9c6b6e613c00cd88",- "IsHidden": "False"- },- {- "Start": "a70689410fe14e74a7b1ac609a6e2773",- "End": "b43c9416c55e4d5295debc8f69f2fafc",- "Id": "33a82e7686ce4cbebab015ab7ce13c6b",- "IsHidden": "False"- },- {- "Start": "cdda8c6074374a3a9e6da10d4eb6cf77",- "End": "1ca58ba8974d4ede892821dc0a77ae5a",- "Id": "a50a77f29b48491897d347d1ca2b3606",- "IsHidden": "False"- },- {- "Start": "54f4c97532644c27ad9dc4a2aed02f05",- "End": "5b85fe115dcc409ea47cf810d6c828b2",- "Id": "912437b2b6ac4db0add89e1e589980a3",- "IsHidden": "False"- },- {- "Start": "4e430e799c854d7683a59c0f306877b7",- "End": "4a86bc4b697b45e1b851c33bf0973b65",- "Id": "a3321f35e7cb4a25af7445511d510da2",- "IsHidden": "False"- },- {- "Start": "defc42a7a61049c4ad62e95e7b747195",- "End": "8c94c5ff247c4bd0a3059497f96e8d5c",- "Id": "609a3e020afa441c8f9242611f7e382d",- "IsHidden": "False"- },- {- "Start": "3eed8abdc14346d2a0e0416effdd33ff",- "End": "df05b85705184536be24cde860441b94",- "Id": "dd4c3f44cbe940cc8ecd13e47acb9193",- "IsHidden": "False"- },- {- "Start": "4fc8d21c11e64bcd9ec56ba84137a567",- "End": "601149504c714ae4813ae1ec5293b11d",- "Id": "55c6936f34ba4da38860888f3031aae7",- "IsHidden": "False"- },- {- "Start": "6498a603f7f44230a81cc183058ef3ac",- "End": "32cd2b0cb9cb431291b5a8af0863cccb",- "Id": "8dfd4f6e7f024c599394db010de31f12",- "IsHidden": "False"- },- {- "Start": "bad88f2cb4664356a19bd58772836fb2",- "End": "feee51c6a34d426fa2cb54d40569ff2f",- "Id": "61e606eea37249d2b30be5c147b38fd0",- "IsHidden": "False"- },- {- "Start": "c99b8c715fa14f2cbb5cb6db1368274f",- "End": "d7abc59e74db42cc8946548ce04abf31",- "Id": "508945948785450a8756ae6881646443",- "IsHidden": "False"- },- {- "Start": "610cfaf8430d41209532314af54e95d0",- "End": "44de613dda9949b58d35043014cd06c7",- "Id": "00e6743369a141699b52bbb94f0a7965",- "IsHidden": "False"- },- {- "Start": "42163ece32fa41aa9d07564471a6f7e0",- "End": "8fd59bad6fb344a7b23352d25c1572ca",- "Id": "ca2c7a20e7244aacab52b557d75b9624",- "IsHidden": "False"- },- {- "Start": "aabffea6523f4a4698b4f478f23632c4",- "End": "a46427f6c7e9496480a64d8698a2f786",- "Id": "b47ded4f32114153953fa12b1ad18b90",- "IsHidden": "False"- },- {- "Start": "dc0afac0bbdf44be9bba591ad74384ab",- "End": "e23b49a7329542759452ecae4de934ef",- "Id": "a6c633269fdb485ba0f02f72197e84c8",- "IsHidden": "False"- },- {- "Start": "002929fe3b25431da7174d04d10a62d2",- "End": "e624314e6cbe4d20b6079c48d65e278b",- "Id": "18376856ed664153b9f9c1e330a3a88a",- "IsHidden": "False"- },- {- "Start": "b9d2107fe2b84a3c8c06ca6556a980b1",- "End": "49824b21c8314e319df886bca62701e7",- "Id": "b4390fd64d364593a488c405d27a6ddb",- "IsHidden": "False"- }- ],- "Dependencies": [],- "NodeLibraryDependencies": [],- "EnableLegacyPolyCurveBehavior": false,- "Thumbnail": "",- "GraphDocumentationURL": null,- "ExtensionWorkspaceData": [- {- "ExtensionGuid": "28992e1d-abb9-417f-8b1b-05e053bee670",- "Name": "Properties",- "Version": "4.1",- "Data": {}- }- ],- "Author": "AEC Computational Designer",- "Linting": {- "activeLinter": "None",- "activeLinterId": "7b75fb44-43fd-4631-a878-29f4d5d8399a",- "warningCount": 0,- "errorCount": 0- },- "Bindings": [],- "View": {- "Dynamo": {- "ScaleFactor": 1.0,- "HasRunWithoutCrash": true,- "IsVisibleInDynamoLibrary": true,- "Version": "4.1.0.4676",- "RunType": "Automatic",- "RunPeriod": "1000"- },- "Camera": {- "Name": "_Background Preview",- "EyeX": 24.04003143310547,- "EyeY": 14.398872375488281,- "EyeZ": 14.686155319213867,- "LookX": -21.99448013305664,- "LookY": -8.280454635620117,- "LookZ": -16.423992156982422,- "UpX": -0.038442812860012054,- "UpY": 0.9988484382629395,- "UpZ": -0.028706232085824013- },- "ConnectorPins": [],- "NodeViews": [- {- "Id": "3e0e8b6d7f9e4f72a9096f3aa765f5cc",- "Name": "NUM BAYS",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1719.8928221570156,- "Y": -16.460349987498034- },- {- "Id": "b96e1661160a4f568027acdce1721213",- "Name": "NUM FLOORS",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1489.8928221570156,- "Y": 143.53965001250197- },- {- "Id": "8da8966fc846481cb1ad4bb913a26f68",- "Name": "BAY WIDTH",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1719.8928221570156,- "Y": 303.53965001250197- },- {- "Id": "a9a3b361afae4d0e8d09234e2a4f6c4b",- "Name": "FLOOR HEIGHT",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1489.8928221570156,- "Y": 463.53965001250197- },- {- "Id": "67ba837e2cf34048a3ac6724e3810f7e",- "Name": "MULLION W",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1727.7008722406376,- "Y": 704.30779498183- },- {- "Id": "b3c81662502348d0a2867ce7b8b793a8",- "Name": "MULLION D",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1497.7008722406376,- "Y": 864.30779498183- },- {- "Id": "3a6f389ff69d4dc4a04257cda57125ad",- "Name": "MULLION T",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1727.7008722406376,- "Y": 1024.30779498183- },- {- "Id": "3b7bdeac2fbb42a682ed97c235beeed0",- "Name": "TRANSOM W",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1497.7008722406376,- "Y": 1184.30779498183- },- {- "Id": "565ddd5ca8df4d94b2b887c2d6472940",- "Name": "TRANSOM D",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1727.7008722406376,- "Y": 1344.30779498183- },- {- "Id": "4c4744cf3adf4efd8bdba6aba598dcac",- "Name": "TRANSOM T",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1497.7008722406376,- "Y": 1504.30779498183- },- {- "Id": "ccbf5a3058a44b02b69cbd1b532e5794",- "Name": "GLASS OUTER T",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2433.732802195778,- "Y": 2221.42442109617- },- {- "Id": "12f316bae7934ad89bad9ac09df1fbeb",- "Name": "GLASS INNER T",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2203.732802195778,- "Y": 2381.42442109617- },- {- "Id": "caaf874b70b7402a82ee4c9dc18e0b36",- "Name": "GLASS GAP T",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2433.732802195778,- "Y": 2541.42442109617- },- {- "Id": "b3da8d4c6c78421a8ad297112f740389",- "Name": "GLASS REVEAL",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2203.732802195778,- "Y": 2706.4244210961706- },- {- "Id": "105725b161694d57b8f334134fc5fb44",- "Name": "GLASS SETBACK",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2433.732802195778,- "Y": 2866.4244210961706- },- {- "Id": "8ccabfcd98b148c18147cc71184ff2da",- "Name": "GASKET T",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2433.732802195778,- "Y": 3092.4244210961697- },- {- "Id": "17fe3a97bbcf400a8a3507abdda738ba",- "Name": "GASKET W",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2203.732802195778,- "Y": 3252.4244210961697- },- {- "Id": "d3ef1990bff44938ad66783fdcf8ecfd",- "Name": "ISOLATOR W",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2433.732802195778,- "Y": 3412.42442109617- },- {- "Id": "5595e927617e4909a1f08ce5da267f76",- "Name": "PRESSURE PLATE T",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2203.732802195778,- "Y": 3577.4244210961697- },- {- "Id": "5143d28498ad49f0a5a660b4c3338e2e",- "Name": "COVER CAP D",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2433.732802195778,- "Y": 3737.4244210961697- },- {- "Id": "fe794dec44174728adfc27ec61a4f21e",- "Name": "SLAB T",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2433.732802195778,- "Y": 3961.42442109617- },- {- "Id": "c89558e511a248399ede5a60dd7295ae",- "Name": "SLAB DEPTH",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2203.732802195778,- "Y": 4121.42442109617- },- {- "Id": "72b4243578cd49f0b61606a711dd3359",- "Name": "SLAB INSET",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2433.732802195778,- "Y": 4281.42442109617- },- {- "Id": "d04e5255c03340489c7434ed373711b4",- "Name": "BRACKET W",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2203.732802195778,- "Y": 4441.42442109617- },- {- "Id": "4eed8d61cbb84781b675c24316787b32",- "Name": "BRACKET L1",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2433.732802195778,- "Y": 4601.42442109617- },- {- "Id": "cd9be4a0c23e45c2bf05628b74827d3c",- "Name": "BRACKET L2",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2203.732802195778,- "Y": 4761.42442109617- },- {- "Id": "40182fd99c064d2a80d33b55838b4b80",- "Name": "BRACKET T",- "IsSetAsInput": true,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -2433.732802195778,- "Y": 4926.424421096171- },- {- "Id": "ff9c2f0f66f24022b11fefba48402ac0",- "Name": "KINETIC CURTAIN WALL ENGINE",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1490.6694118945945,- "Y": 1941.975968221504- },- {- "Id": "2d1fde34e06f435dbfd0b06358331805",- "Name": "EXTRACT GEOMETRY CHANNELS",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1550.0956249047315,- "Y": 3134.997744261373- },- {- "Id": "a3e555303b5e4da5a6840ffb530f84a3",- "Name": "MATERIAL COLOR SWATCHES",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1717.270650846624,- "Y": 3524.8917845429614- },- {- "Id": "38d376e4a74c486298564a8d34b5df2d",- "Name": "RENDER: MULLIONS",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": true,- "X": -1029.2643331442916,- "Y": 2221.734809328548- },- {- "Id": "d4cc672c845e4e7bbbb7a2e5a15b79c2",- "Name": "RENDER: TRANSOMS",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": true,- "X": -1029.2643331442916,- "Y": 2381.734809328548- },- {- "Id": "18307a4a218f481d9c42e8976d64b1eb",- "Name": "RENDER: GLASS_OUTER",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": true,- "X": -1029.2643331442916,- "Y": 2541.734809328548- },- {- "Id": "781f5162975d4ecf9d4a6904689cdb01",- "Name": "RENDER: GLASS_INNER",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": true,- "X": -1029.2643331442916,- "Y": 2701.734809328548- },- {- "Id": "adb7d620a97044299c47f980007b55d0",- "Name": "RENDER: GASKETS",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": true,- "X": -1029.2643331442916,- "Y": 2861.734809328548- },- {- "Id": "d6eb6a215bf94b9a83ae0d4f1b029686",- "Name": "RENDER: BRACKETS",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": true,- "X": -1029.2643331442916,- "Y": 3021.734809328548- },- {- "Id": "339ba37bbcbf4604ba465a1668e9e71c",- "Name": "RENDER: SLABS",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": true,- "X": -1029.2643331442916,- "Y": 3181.734809328548- },- {- "Id": "3f33572adcbc4550b828cb43753e1068",- "Name": "RENDER: FIRESTOPS",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": true,- "X": -1029.2643331442916,- "Y": 3341.734809328548- },- {- "Id": "e6c587978eab492795075a507f431983",- "Name": "RENDER: FIXINGS",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": true,- "X": -1029.2643331442916,- "Y": 3501.734809328548- },- {- "Id": "4e58b8782643421ebb538af34ba03b10",- "Name": "PERFORMANCE CALCULATOR",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -1414.8875227385731,- "Y": 4061.3805712970457- },- {- "Id": "bd7df917d96d40ca99f8ecc0e6759797",- "Name": "Watch: TOTAL AREA (m²)",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -661.8875227385731,- "Y": 3989.725571297046- },- {- "Id": "9f963a9799cc4f3c8d02c50382a0acc7",- "Name": "Watch: ESTIMATED COST ($)",- "IsSetAsInput": false,- "IsSetAsOutput": false,- "Excluded": false,- "ShowGeometry": false,- "X": -661.8875227385731,- "Y": 4149.7255712970455- }- ],- "Annotations": [- {- "Id": "6040cd10a6df4255924df88e6e1e5966",- "Title": "A: GRID & BAYS",- "DescriptionText": null,- "IsExpanded": true,- "WidthAdjustment": 0.0,- "HeightAdjustment": 0.0,- "UserSetWidth": 0.0,- "UserSetHeight": 0.0,- "Nodes": [- "3e0e8b6d7f9e4f72a9096f3aa765f5cc",- "b96e1661160a4f568027acdce1721213",- "8da8966fc846481cb1ad4bb913a26f68",- "a9a3b361afae4d0e8d09234e2a4f6c4b"- ],- "HasNestedGroups": false,- "Left": -1729.8928221570156,- "Top": -66.46034998749803,- "Width": 598.0,- "Height": 674.0,- "FontSize": 14.0,- "GroupStyleId": "00000000-0000-0000-0000-000000000000",- "InitialTop": -16.460349987498034,- "InitialHeight": 235.0,- "TextblockHeight": 40.0,- "IsOptionalInPortsCollapsed": false,- "IsUnconnectedOutPortsCollapsed": false,- "HasToggledOptionalInPorts": false,- "HasToggledUnconnectedOutPorts": false,- "Background": "#FFFFC999"- },- {- "Id": "6de664feac3c48f2bc6eb07d45af7546",- "Title": "B: STRUCTURAL PROFILES",- "DescriptionText": null,- "IsExpanded": true,- "WidthAdjustment": 0.0,- "HeightAdjustment": 0.0,- "UserSetWidth": 0.0,- "UserSetHeight": 0.0,- "Nodes": [- "67ba837e2cf34048a3ac6724e3810f7e",- "b3c81662502348d0a2867ce7b8b793a8",- "3a6f389ff69d4dc4a04257cda57125ad",- "3b7bdeac2fbb42a682ed97c235beeed0",- "565ddd5ca8df4d94b2b887c2d6472940",- "4c4744cf3adf4efd8bdba6aba598dcac"- ],- "HasNestedGroups": false,- "Left": -1737.7008722406376,- "Top": 654.30779498183,- "Width": 598.0,- "Height": 994.0,- "FontSize": 14.0,- "GroupStyleId": "883066aa-1fe2-44a4-9bd1-c3df86bfe9f6",- "InitialTop": 704.30779498183,- "InitialHeight": 325.0,- "TextblockHeight": 40.0,- "IsOptionalInPortsCollapsed": false,- "IsUnconnectedOutPortsCollapsed": false,- "HasToggledOptionalInPorts": false,- "HasToggledUnconnectedOutPorts": false,- "Background": "#FFFFB8D8"- },- {- "Id": "32c00fc1db004f629cd4143977d8a4b6",- "Title": "C: INSULATED GLAZING (IGU)",- "DescriptionText": null,- "IsExpanded": true,- "WidthAdjustment": 0.0,- "HeightAdjustment": 0.0,- "UserSetWidth": 0.0,- "UserSetHeight": 0.0,- "Nodes": [- "ccbf5a3058a44b02b69cbd1b532e5794",- "12f316bae7934ad89bad9ac09df1fbeb",- "caaf874b70b7402a82ee4c9dc18e0b36",- "b3da8d4c6c78421a8ad297112f740389",- "105725b161694d57b8f334134fc5fb44"- ],- "HasNestedGroups": false,- "Left": -2443.732802195778,- "Top": 2171.42442109617,- "Width": 598.0,- "Height": 839.0000000000005,- "FontSize": 14.0,- "GroupStyleId": "883066aa-1fe2-44a4-9bd1-c3df86bfe9f6",- "InitialTop": 2221.42442109617,- "InitialHeight": 325.0,- "TextblockHeight": 40.0,- "IsOptionalInPortsCollapsed": false,- "IsUnconnectedOutPortsCollapsed": false,- "HasToggledOptionalInPorts": false,- "HasToggledUnconnectedOutPorts": false,- "Background": "#FFFFB8D8"- },- {- "Id": "1157660f44c74a1283b9621a2914ab91",- "Title": "D: GASKETS & PRESSURE PLATES",- "DescriptionText": null,- "IsExpanded": true,- "WidthAdjustment": 0.0,- "HeightAdjustment": 0.0,- "UserSetWidth": 0.0,- "UserSetHeight": 0.0,- "Nodes": [- "8ccabfcd98b148c18147cc71184ff2da",- "17fe3a97bbcf400a8a3507abdda738ba",- "d3ef1990bff44938ad66783fdcf8ecfd",- "5595e927617e4909a1f08ce5da267f76",- "5143d28498ad49f0a5a660b4c3338e2e"- ],- "HasNestedGroups": false,- "Left": -2443.732802195778,- "Top": 3042.4244210961697,- "Width": 598.0,- "Height": 839.0,- "FontSize": 14.0,- "GroupStyleId": "00000000-0000-0000-0000-000000000000",- "InitialTop": 3092.4244210961697,- "InitialHeight": 325.0,- "TextblockHeight": 40.0,- "IsOptionalInPortsCollapsed": false,- "IsUnconnectedOutPortsCollapsed": false,- "HasToggledOptionalInPorts": false,- "HasToggledUnconnectedOutPorts": false,- "Background": "#FFFFC999"- },- {- "Id": "5f63659303584c16b9ee3d30c5717b20",- "Title": "E: SLAB & ANCHOR BRACKETS",- "DescriptionText": null,- "IsExpanded": true,- "WidthAdjustment": 0.0,- "HeightAdjustment": 0.0,- "UserSetWidth": 0.0,- "UserSetHeight": 0.0,- "Nodes": [- "fe794dec44174728adfc27ec61a4f21e",- "c89558e511a248399ede5a60dd7295ae",- "72b4243578cd49f0b61606a711dd3359",- "d04e5255c03340489c7434ed373711b4",- "4eed8d61cbb84781b675c24316787b32",- "cd9be4a0c23e45c2bf05628b74827d3c",- "40182fd99c064d2a80d33b55838b4b80"- ],- "HasNestedGroups": false,- "Left": -2443.732802195778,- "Top": 3911.42442109617,- "Width": 598.0,- "Height": 1159.0000000000005,- "FontSize": 14.0,- "GroupStyleId": "00000000-0000-0000-0000-000000000000",- "InitialTop": 3961.42442109617,- "InitialHeight": 415.0,- "TextblockHeight": 40.0,- "IsOptionalInPortsCollapsed": false,- "IsUnconnectedOutPortsCollapsed": false,- "HasToggledOptionalInPorts": false,- "HasToggledUnconnectedOutPorts": false,- "Background": "#FFFFC999"- },- {- "Id": "0be6ea7740bf4f8dba846fb87d09f506",- "Title": "KINETIC CURTAIN WALL ENGINE",- "DescriptionText": null,- "IsExpanded": true,- "WidthAdjustment": 0.0,- "HeightAdjustment": 0.0,- "UserSetWidth": 0.0,- "UserSetHeight": 0.0,- "Nodes": [- "ff9c2f0f66f24022b11fefba48402ac0"- ],- "HasNestedGroups": false,- "Left": -1500.6694118945945,- "Top": 1891.975968221504,- "Width": 334.5,- "Height": 1072.0,- "FontSize": 14.0,- "GroupStyleId": "00000000-0000-0000-0000-000000000000",- "InitialTop": 1941.975968221504,- "InitialHeight": 145.0,- "TextblockHeight": 40.0,- "IsOptionalInPortsCollapsed": false,- "IsUnconnectedOutPortsCollapsed": false,- "HasToggledOptionalInPorts": false,- "HasToggledUnconnectedOutPorts": false,- "Background": "#FF333333"- },- {- "Id": "00ebc3f93996476ea0b05cc7862661d4",- "Title": "EXTRACT GEOMETRY CHANNELS",- "DescriptionText": null,- "IsExpanded": true,- "WidthAdjustment": 0.0,- "HeightAdjustment": 0.0,- "UserSetWidth": 0.0,- "UserSetHeight": 0.0,- "Nodes": [- "2d1fde34e06f435dbfd0b06358331805"- ],- "HasNestedGroups": false,- "Left": -1560.0956249047315,- "Top": 3084.997744261373,- "Width": 362.5,- "Height": 318.0,- "FontSize": 14.0,- "GroupStyleId": "00000000-0000-0000-0000-000000000000",- "InitialTop": 3134.997744261373,- "InitialHeight": 145.0,- "TextblockHeight": 40.0,- "IsOptionalInPortsCollapsed": false,- "IsUnconnectedOutPortsCollapsed": false,- "HasToggledOptionalInPorts": false,- "HasToggledUnconnectedOutPorts": false,- "Background": "#FF505050"- },- {- "Id": "d0cf827484ed45beafea719b6dbb041a",- "Title": "MATERIAL COLOR SWATCHES",- "DescriptionText": null,- "IsExpanded": true,- "WidthAdjustment": 0.0,- "HeightAdjustment": 0.0,- "UserSetWidth": 0.0,- "UserSetHeight": 0.0,- "Nodes": [- "a3e555303b5e4da5a6840ffb530f84a3"- ],- "HasNestedGroups": false,- "Left": -1727.270650846624,- "Top": 3474.8917845429614,- "Width": 563.0,- "Height": 318.0,- "FontSize": 14.0,- "GroupStyleId": "00000000-0000-0000-0000-000000000000",- "InitialTop": 3524.8917845429614,- "InitialHeight": 145.0,- "TextblockHeight": 40.0,- "IsOptionalInPortsCollapsed": false,- "IsUnconnectedOutPortsCollapsed": false,- "HasToggledOptionalInPorts": false,- "HasToggledUnconnectedOutPorts": false,- "Background": "#FF505050"- },- {- "Id": "f036b5f22a684c9dbb7a37816b5fd8b4",- "Title": "RENDER PIPELINE",- "DescriptionText": null,- "IsExpanded": true,- "WidthAdjustment": 0.0,- "HeightAdjustment": 0.0,- "UserSetWidth": 0.0,- "UserSetHeight": 0.0,- "Nodes": [- "38d376e4a74c486298564a8d34b5df2d",- "d4cc672c845e4e7bbbb7a2e5a15b79c2",- "18307a4a218f481d9c42e8976d64b1eb",- "781f5162975d4ecf9d4a6904689cdb01",- "adb7d620a97044299c47f980007b55d0",- "d6eb6a215bf94b9a83ae0d4f1b029686",- "339ba37bbcbf4604ba465a1668e9e71c",- "3f33572adcbc4550b828cb43753e1068",- "e6c587978eab492795075a507f431983"- ],- "HasNestedGroups": false,- "Left": -1039.2643331442916,- "Top": 2171.734809328548,- "Width": 292.0,- "Height": 1490.0,- "FontSize": 14.0,- "GroupStyleId": "00000000-0000-0000-0000-000000000000",- "InitialTop": 2221.734809328548,- "InitialHeight": 1425.0,- "TextblockHeight": 40.0,- "IsOptionalInPortsCollapsed": false,- "IsUnconnectedOutPortsCollapsed": false,- "HasToggledOptionalInPorts": false,- "HasToggledUnconnectedOutPorts": false,- "Background": "#FF4B6C3F"- },- {- "Id": "2341b6ea7ac24d9ab8eec25380971acf",- "Title": "PERFORMANCE CALCULATOR (NATIVE GRAPH)",- "DescriptionText": null,- "IsExpanded": true,- "WidthAdjustment": 0.0,- "HeightAdjustment": 0.0,- "UserSetWidth": 0.0,- "UserSetHeight": 0.0,- "Nodes": [- "4e58b8782643421ebb538af34ba03b10",- "bd7df917d96d40ca99f8ecc0e6759797",- "9f963a9799cc4f3c8d02c50382a0acc7"- ],- "HasNestedGroups": false,- "Left": -1424.8875227385731,- "Top": 3939.725571297046,- "Width": 1055.0,- "Height": 361.6550000000002,- "FontSize": 14.0,- "GroupStyleId": "00000000-0000-0000-0000-000000000000",- "InitialTop": 3989.725571297046,- "InitialHeight": 265.0,- "TextblockHeight": 40.0,- "IsOptionalInPortsCollapsed": false,- "IsUnconnectedOutPortsCollapsed": false,- "HasToggledOptionalInPorts": false,- "HasToggledUnconnectedOutPorts": false,- "Background": "#FFA36423"- }- ],- "X": 918.5805375911324,- "Y": 375.3957504976821,- "Zoom": 0.5315777610431371- }-}\ No newline at end of filediff --git a/scratch/facade_system.gh b/scratch/facade_system.ghdeleted file mode 100644index 69429a7..0000000Binary files a/scratch/facade_system.gh and /dev/null differdiff --git a/scratch/generate_variations.py b/scratch/generate_variations.pydeleted file mode 100644index 9977130..0000000--- a/scratch/generate_variations.py+++ /dev/null@@ -1,134 +0,0 @@-import os-import sys-import requests--BRIDGE = "http://127.0.0.1:3004"-EXECUTE_URL = BRIDGE + "/execute"-SCRIPT_PATH = os.path.join(os.path.dirname(__file__), "detailed_facade.py")-ARTIFACT_DIR = r"C:\Users\sammo\.gemini\antigravity-ide\brain\fa30a343-026e-4366-b14d-56a8c1f3112f"--def capture_viewport(filename):- path = os.path.join(ARTIFACT_DIR, filename)- print("Capturing viewport to: {0}...".format(path))- # Python code to execute inside Rhino- cap_code = r'''-import Rhino-import System-import os-import scriptcontext as sc--doc = sc.doc-view = doc.Views.ActiveView-if view:- # Zoom extends to frame the model- view.ActiveViewport.ZoomExtents()- # Redraw- view.Redraw()- # Capture bitmap- bmp = view.CaptureToBitmap(System.Drawing.Size(1200, 800))- if bmp:- path = r"{path}"- bmp.Save(path, System.Drawing.Imaging.ImageFormat.Png)- bmp.Dispose()- print("Captured successfully!")- else:- print("Error: bitmap capture failed")-else:- print("Error: active view not found")-'''.replace("{path}", path)-- try:- # Set view mode to rendered first- requests.post(EXECUTE_URL, json={"command": "set_view", "view": "rendered"}, timeout=15)- # Run capture- r = requests.post(EXECUTE_URL, json={"command": "run_python", "code": cap_code}, timeout=15)- r.raise_for_status()- print("Capture complete: {0}".format(r.json().get("output", "").strip()))- except Exception as e:- print("Error capturing viewport: " + str(e))--def run_facade(params=None):- with open(SCRIPT_PATH, encoding="utf-8") as f:- code = f.read()-- # Modify parameters if provided- if params:- lines = code.splitlines()- for i, line in enumerate(lines):- # Check for matches and replace- for param, val in params.items():- if line.startswith(param + " "):- # Find equals and replace rest- parts = line.split("=")- lines[i] = parts[0] + "= " + str(val) + " # dynamically updated"- code = "\n".join(lines)-- # Clean active scene- try:- requests.post(EXECUTE_URL, json={"command": "clear_scene"}, timeout=15)- except Exception as e:- print("Warning: failed to clear scene: " + str(e))-- # Send script- try:- r = requests.post(- EXECUTE_URL,- json={"command": "run_python", "code": code},- timeout=180- )- r.raise_for_status()- print("Bake successful!")- except Exception as e:- print("Bake failed: " + str(e))--def main():- if not os.path.exists(SCRIPT_PATH):- sys.exit("Cannot find detailed_facade.py: " + SCRIPT_PATH)-- print("Checking bridge health...")- try:- h = requests.get(BRIDGE + "/health", timeout=5).json()- print("Bridge is active! Status: {0}".format(h.get("status")))- except Exception as e:- sys.exit("Bridge is not reachable: " + str(e))-- # 1. RUN DEFAULT VARIATION- print("\n--- Running Default Façade (3 Bays, 2 Floors) ---")- run_facade()- capture_viewport("facade_default.png")-- # 2. RUN HIGH DENSITY VARIATION (5 Bays, 3 Floors, deep profiles)- print("\n--- Running Variation 1: High Density (5 Bays, 3 Floors) ---")- var1_params = {- "NUM_BAYS": 5,- "NUM_FLOORS": 3,- "BAY_WIDTH": 1.20,- "FLOOR_HEIGHT": 3.60,- "MULLION_D": 0.180,- "TRANSOM_D": 0.140,- "GLASS_REVEAL": 0.008, # Wider glass panels- }- run_facade(var1_params)- capture_viewport("facade_high_density.png")-- # 3. RUN LOW DENSITY VARIATION (2 Bays, 1 Floor, wide spans, shallow profiles)- print("\n--- Running Variation 2: Low Density (2 Bays, 1 Floor, wide span) ---")- var2_params = {- "NUM_BAYS": 2,- "NUM_FLOORS": 1,- "BAY_WIDTH": 2.20,- "FLOOR_HEIGHT": 4.00,- "MULLION_D": 0.120,- "TRANSOM_D": 0.100,- "GLASS_REVEAL": 0.015, # Narrower glass panels- }- run_facade(var2_params)- capture_viewport("facade_low_density.png")-- # 4. RESTORE DEFAULT CONFIGURATION- print("\n--- Restoring Default Façade ---")- run_facade()- print("Done generating variations!")--if __name__ == "__main__":- main()diff --git a/scratch/glass_diamond.py b/scratch/glass_diamond.pydeleted file mode 100644index 30a978f..0000000--- a/scratch/glass_diamond.py+++ /dev/null@@ -1,163 +0,0 @@-import scriptcontext as sc-import Rhino, Rhino.Geometry as rg, Rhino.DocObjects as rdo, System.Drawing as sd--# ── Tower params (must match mullion generation) ─────────────────────────────-BASE_R=22.0; WAIST_R=13.5; TOP_R=19.0; HEIGHT=200.0-U_DIVS=20 # divisions in i-direction (= surface U = HEIGHT direction on this loft)-V_DIVS=36 # divisions in j-direction (= surface V = CIRCUMFERENTIAL direction)-THICKNESS=0.028; SETBACK=0.06--scale = Rhino.RhinoMath.UnitScale(Rhino.UnitSystem.Meters, sc.doc.ModelUnitSystem)--# ── Rebuild tower loft ────────────────────────────────────────────────────────-def smooth_r(a,b,c,t):- if t<=0.5: s=t*2.0; return a+(b-a)*(s*s*(3-2*s))- s=(t-0.5)*2.0; return b+(c-b)*(s*s*(3-2*s))--crvs=[]-for k in range(12):- t=float(k)/11; r=smooth_r(BASE_R,WAIST_R,TOP_R,t)*scale; z=t*HEIGHT*scale- crvs.append(rg.Circle(rg.Plane(rg.Point3d(0,0,z),rg.Vector3d.ZAxis),r).ToNurbsCurve())-breps=rg.Brep.CreateFromLoft(crvs,rg.Point3d.Unset,rg.Point3d.Unset,rg.LoftType.Normal,False)-face=breps[0].Faces[0]-face.SetDomain(0,rg.Interval(0,1)); face.SetDomain(1,rg.Interval(0,1))--# Confirmed: surface U = HEIGHT (i direction), surface V = CIRCUMFERENCE (j direction)-# The circumferential seam is at V=0/V=1 (j=0/j=V_DIVS).-# i goes from 0 (bottom) to U_DIVS (top) — NO wrap needed for i.-# j wraps: j % V_DIVS keeps us inside the closed circumferential range.--def gpt(i, j):- """Grid corner: i=height index (0..U_DIVS), j=circumference index (wraps)."""- u = float(i) / U_DIVS- v = float(j % V_DIVS) / V_DIVS- return face.PointAt(u, v)--def cc(i, j):- """Cell centre on surface: i=height cell (0..U_DIVS-1), j=circ cell (wraps)."""- u = (i + 0.5) / U_DIVS- v = ((j % V_DIVS) + 0.5) / V_DIVS- return face.PointAt(u, v)--# ── Layer + material ──────────────────────────────────────────────────────────-def get_layer(name, rgb, clear=False):- idx = sc.doc.Layers.FindByFullPath(name,-1)- if idx < 0:- lay=rdo.Layer(); lay.Name=name- lay.Color=sd.Color.FromArgb(*rgb)- idx=sc.doc.Layers.Add(lay)- elif clear:- for o in list(sc.doc.Objects):- if o.Attributes.LayerIndex==idx:- sc.doc.Objects.Delete(o.Id,True)- return idx--glass_layer = get_layer("Glass",(18,75,52),clear=True)-mat=rdo.Material(); mat.Name="ArchGlass"-mat.DiffuseColor=sd.Color.FromArgb(35,155,105)-mat.Transparency=0.55; mat.Reflectivity=0.95-mat.FresnelReflections=True; mat.IndexOfRefraction=1.52-mat.Shine=int(0.92*rdo.Material.MaxShine)-try:- mat.ToPhysicallyBased()- pbr=mat.PhysicallyBased- pbr.BaseColor=Rhino.Display.Color4f(0.04,0.28,0.16,1.0)- pbr.Metallic=0.0; pbr.Roughness=0.02; pbr.Opacity=0.48-except:- pass-glass_mat=sc.doc.Materials.Add(mat)--attr=rdo.ObjectAttributes()-attr.LayerIndex=glass_layer; attr.MaterialIndex=glass_mat-attr.MaterialSource=rdo.ObjectMaterialSource.MaterialFromObject--tol=sc.doc.ModelAbsoluteTolerance-# Reject any panel whose bbox diagonal exceeds 2 cell widths (catches spanning artifacts)-MAX_DIAG = 15000.0 * scale-added=0; skipped=0--# ── Quad panel (6-face solid) ─────────────────────────────────────────────────-def make_panel(A, B, C, D):- bb = rg.BoundingBox([A,B,C,D])- if bb.Diagonal.Length > MAX_DIAG:- return False- cpt=rg.Point3d((A.X+B.X+C.X+D.X)/4.,(A.Y+B.Y+C.Y+D.Y)/4.,(A.Z+B.Z+C.Z+D.Z)/4.)- ok,cu,cv=face.ClosestPoint(cpt)- if not ok: return False- n=face.NormalAt(cu,cv)- if not n.Unitize(): return False- push=n*(-SETBACK*scale); thick=n*(-THICKNESS*scale)- fA=A+push; fB=B+push; fC=C+push; fD=D+push- bA=fA+thick; bB=fB+thick; bC=fC+thick; bD=fD+thick- front=rg.NurbsSurface.CreateFromCorners(fA,fB,fC,fD)- back =rg.NurbsSurface.CreateFromCorners(bA,bD,bC,bB)- s1=rg.NurbsSurface.CreateFromCorners(fA,fB,bB,bA)- s2=rg.NurbsSurface.CreateFromCorners(fB,fC,bC,bB)- s3=rg.NurbsSurface.CreateFromCorners(fC,fD,bD,bC)- s4=rg.NurbsSurface.CreateFromCorners(fD,fA,bA,bD)- faces=[x.ToBrep() for x in [front,back,s1,s2,s3,s4] if x]- if len(faces)<6: return False- joined=rg.Brep.JoinBreps(faces,tol)- if joined and len(joined)>0: sc.doc.Objects.AddBrep(joined[0],attr)- else: [sc.doc.Objects.AddBrep(f,attr) for f in faces]- return True--# ── Triangular panel (5-face solid, for top/bottom caps) ─────────────────────-def make_tri(A, B, C):- bb = rg.BoundingBox([A,B,C])- if bb.Diagonal.Length > MAX_DIAG:- return False- cpt=rg.Point3d((A.X+B.X+C.X)/3.,(A.Y+B.Y+C.Y)/3.,(A.Z+B.Z+C.Z)/3.)- ok,cu,cv=face.ClosestPoint(cpt)- if not ok: return False- n=face.NormalAt(cu,cv)- if not n.Unitize(): return False- push=n*(-SETBACK*scale); thick=n*(-THICKNESS*scale)- fA=A+push; fB=B+push; fC=C+push- bA=fA+thick; bB=fB+thick; bC=fC+thick- front=rg.NurbsSurface.CreateFromCorners(fA,fB,fC)- back =rg.NurbsSurface.CreateFromCorners(bA,bC,bB)- s1=rg.NurbsSurface.CreateFromCorners(fA,fB,bB,bA)- s2=rg.NurbsSurface.CreateFromCorners(fB,fC,bC,bB)- s3=rg.NurbsSurface.CreateFromCorners(fC,fA,bA,bC)- faces=[x.ToBrep() for x in [front,back,s1,s2,s3] if x]- if len(faces)<5: return False- joined=rg.Brep.JoinBreps(faces,tol)- if joined and len(joined)>0: sc.doc.Objects.AddBrep(joined[0],attr)- else: [sc.doc.Objects.AddBrep(f,attr) for f in faces]- return True--# ── Type A: TOP triangle of cell(i,j) + BOTTOM triangle of cell(i,j+1) ──────-# Vertices: cc(i,j), gpt(i+1,j+1), cc(i,j+1), gpt(i,j+1)-# i spans full height range, j wraps circumferentially via gpt/cc % V_DIVS-for i in range(U_DIVS):- for j in range(V_DIVS):- r = make_panel(cc(i,j), gpt(i+1,j+1), cc(i,j+1), gpt(i,j+1))- if r: added+=1- else: skipped+=1--# ── Type B: RIGHT triangle of cell(i,j) + LEFT triangle of cell(i+1,j) ──────-# Vertices: cc(i,j), gpt(i+1,j), cc(i+1,j), gpt(i+1,j+1)-# i goes 0..U_DIVS-2 (height cells that have a valid i+1 cell above them, NO wrap)-for i in range(U_DIVS - 1):- for j in range(V_DIVS):- r = make_panel(cc(i,j), gpt(i+1,j), cc(i+1,j), gpt(i+1,j+1))- if r: added+=1- else: skipped+=1--# ── Bottom caps: LEFT triangle of cell(i=0, j) ───────────────────────────────-# LEFT(0,j): gpt(0,j), gpt(0,j+1), cc(0,j) (all at height i=0 = tower base)-for j in range(V_DIVS):- r = make_tri(gpt(0,j), gpt(0,j+1), cc(0,j))- if r: added+=1- else: skipped+=1--# ── Top caps: RIGHT triangle of cell(i=U_DIVS-1, j) ──────────────────────────-# RIGHT(U_DIVS-1,j): cc(U_DIVS-1,j), gpt(U_DIVS,j+1), gpt(U_DIVS,j)-for j in range(V_DIVS):- r = make_tri(cc(U_DIVS-1,j), gpt(U_DIVS,j+1), gpt(U_DIVS,j))- if r: added+=1- else: skipped+=1--sc.doc.Views.Redraw()-print("Panels added: %d skipped: %d" % (added, skipped))diff --git a/scratch/omega_gh_builder.py b/scratch/omega_gh_builder.pydeleted file mode 100644index 8a3ad9b..0000000--- a/scratch/omega_gh_builder.py+++ /dev/null@@ -1,583 +0,0 @@-# =============================================================================-# OMEGA TOWER — Grasshopper Canvas Builder-# Runs via: MCP bridge run_python (Grasshopper must be open)-#-# Programmatically populates the open GH canvas with:-# - 24 number sliders in 6 colour-coded groups-# - 1 Python Script component containing the full tower generator-# - Wires connecting every slider to the Python component-# - Annotation panels-# =============================================================================--import clr-import System-import System.Drawing as sd-import System.Reflection as sr--clr.AddReference('Grasshopper')-import Grasshopper as gh-from Grasshopper.Kernel import GH_Document-from Grasshopper.Kernel.Special import GH_NumberSlider, GH_Group--# ─── Access open GH canvas ────────────────────────────────────────────────────-canvas = gh.Instances.ActiveCanvas-if canvas is None:- print("ERROR: Grasshopper is not open. Run _Grasshopper in Rhino first.")- raise SystemExit("GH canvas not found")--gd = canvas.Document-if gd is None:- gd = GH_Document()- canvas.Document = gd- print("Created blank GH document")-else:- print("Using existing GH document")--gd.Enabled = False # pause solver while building--# ─── Clear only objects added by previous builder runs ───────────────────────-# (We tag objects by nickname prefix; safe to comment out on first run)-# gd.Objects.Clear()--# ─── Layout constants (GH canvas pixels) ────────────────────────────────────-COL_A = 80 # left column X (sliders)-COL_B = 280 # right column X (second slider column inside each group)-PY_X = 560 # Python Script component X-PY_Y = 80-ROW_H = 30 # vertical spacing between sliders-GROUP_PAD = 20 # extra vertical padding between groups--# ─── Helper: add number slider ────────────────────────────────────────────────-def add_slider(name, mn, mx, val, x, y, dec=2):- s = GH_NumberSlider()- s.CreateAttributes()- s.Name = name- s.NickName = name- s.Slider.Minimum = System.Decimal(mn)- s.Slider.Maximum = System.Decimal(mx)- s.Slider.Value = System.Decimal(val)- s.Slider.DecimalPlaces = dec- s.Attributes.Pivot = sd.PointF(float(x), float(y))- gd.AddObject(s, False)- return s--# ─── Helper: add group around a list of objects ───────────────────────────────-def add_group(title, rgb, objects):- g = GH_Group()- g.NickName = title- g.Colour = sd.Color.FromArgb(*rgb)- for o in objects:- g.AddObject(o.InstanceGuid)- gd.AddObject(g, False)- return g--# ─── Helper: add a text panel ────────────────────────────────────────────────-from Grasshopper.Kernel.Special import GH_Panel--def add_panel(text, x, y):- p = GH_Panel()- p.CreateAttributes()- p.UserText = text- p.Attributes.Pivot = sd.PointF(float(x), float(y))- gd.AddObject(p, False)- return p--# =============================================================================-# BUILD SLIDERS — 6 groups, 24 sliders-# =============================================================================--sliders = {} # name → GH_NumberSlider object-y = 80--# ── Group 1: TOWER FORM ──────────────────────────────────────────────────────-g1_items = []-labels_g1 = [- ("base_r", 5.0, 60.0, 26.0, COL_A, y, 1),- ("waist_r", 3.0, 50.0, 14.5, COL_A, y+30, 1),- ("top_r", 5.0, 55.0, 21.0, COL_A, y+60, 1),- ("height", 50.0, 600.0, 272.0, COL_B, y, 1),- ("squircle_n", 2.0, 8.0, 3.5, COL_B, y+30, 2),- ("twist_deg", 0.0, 180.0, 72.0, COL_B, y+60, 1),-]-for lbl, mn, mx, val, x, yy, dec in labels_g1:- s = add_slider(lbl, mn, mx, val, x, yy, dec)- g1_items.append(s)- sliders[lbl] = s--add_group("A — TOWER FORM", (45, 80, 135, 60), g1_items)-y += 60 + ROW_H + GROUP_PAD--# ── Group 2: DIAGRID SYSTEM ──────────────────────────────────────────────────-g2_items = []-labels_g2 = [- ("u_divs", 12, 48, 24, COL_A, y, 0),- ("v_divs", 20, 96, 52, COL_A, y+30, 0),- ("mul_w_base", 0.10, 0.80, 0.30, COL_B, y, 3),- ("mul_w_top", 0.05, 0.40, 0.12, COL_B, y+30, 3),- ("mul_d_base", 0.15, 1.20, 0.52, COL_A, y+60, 3),- ("mul_d_top", 0.08, 0.60, 0.20, COL_B, y+60, 3),-]-for lbl, mn, mx, val, x, yy, dec in labels_g2:- s = add_slider(lbl, mn, mx, val, x, yy, dec)- g2_items.append(s)- sliders[lbl] = s--add_group("B — DIAGRID SYSTEM", (135, 80, 45, 60), g2_items)-y += 60 + ROW_H + GROUP_PAD--# ── Group 3: FACADE ZONES ────────────────────────────────────────────────────-g3_items = []-labels_g3 = [- ("zone_solid", 0.0, 0.5, 0.22, COL_A, y, 3),- ("zone_glass", 0.5, 1.0, 0.80, COL_B, y, 3),- ("glass_t", 0.010, 0.060, 0.028, COL_A, y+30, 3),- ("glass_inset", 0.02, 0.20, 0.09, COL_B, y+30, 3),-]-for lbl, mn, mx, val, x, yy, dec in labels_g3:- s = add_slider(lbl, mn, mx, val, x, yy, dec)- g3_items.append(s)- sliders[lbl] = s--add_group("C/D — FACADE ZONES", (45, 135, 80, 60), g3_items)-y += 30 + ROW_H + GROUP_PAD--# ── Group 4: SOLAR FINS ──────────────────────────────────────────────────────-g4_items = []-labels_g4 = [- ("sun_azimuth", 0.0, 360.0, 195.0, COL_A, y, 1),- ("sun_altitude", 5.0, 85.0, 40.0, COL_B, y, 1),- ("fin_len", 0.2, 3.0, 1.1, COL_A, y+30, 2),- ("fin_thick", 0.02, 0.20, 0.055, COL_B, y+30, 3),- ("fin_step", 1, 6, 2, COL_A, y+60, 0),-]-for lbl, mn, mx, val, x, yy, dec in labels_g4:- s = add_slider(lbl, mn, mx, val, x, yy, dec)- g4_items.append(s)- sliders[lbl] = s--add_group("F — SOLAR FIN SYSTEM", (135, 120, 40, 60), g4_items)-y += 60 + ROW_H + GROUP_PAD--# ── Group 5: FLOOR PLATES ────────────────────────────────────────────────────-g5_items = []-labels_g5 = [- ("floor_h", 2.5, 6.5, 4.3, COL_A, y, 2),- ("slab_t", 0.15, 0.6, 0.30, COL_B, y, 3),- ("slab_in", 0.05, 0.4, 0.14, COL_A, y+30, 3),-]-for lbl, mn, mx, val, x, yy, dec in labels_g5:- s = add_slider(lbl, mn, mx, val, x, yy, dec)- g5_items.append(s)- sliders[lbl] = s--add_group("G — FLOOR PLATES", (80, 80, 80, 60), g5_items)-y += 30 + ROW_H + GROUP_PAD--# ── Group 6: BRANCHING COLUMNS ───────────────────────────────────────────────-g6_items = []-labels_g6 = [- ("col_n", 4, 16, 8, COL_A, y, 0),- ("col_depth", 1, 4, 3, COL_B, y, 0),- ("col_angle", 8.0, 50.0, 26.0, COL_A, y+30, 1),- ("col_h", 5.0, 30.0, 15.0, COL_B, y+30, 1),-]-for lbl, mn, mx, val, x, yy, dec in labels_g6:- s = add_slider(lbl, mn, mx, val, x, yy, dec)- g6_items.append(s)- sliders[lbl] = s--add_group("H — BRANCHING COLUMNS", (100, 55, 20, 60), g6_items)-y += 30 + ROW_H + GROUP_PAD--total_sliders = len(sliders)-print("Sliders added: %d" % total_sliders)--# =============================================================================-# PYTHON SCRIPT COMPONENT — with complete tower generator code-# =============================================================================--# The GHPython component GUID (GH1 IronPython)-PY_GUID_STR = "410755b1-224a-4c1e-a407-bf32fb45ea7e"--# Search the component server-server = gh.Instances.ComponentServer-py_proxy = None--# Try exact GUID first-try:- py_proxy = server.FindObjectByGuid(System.Guid(PY_GUID_STR))-except:- pass--# Fallback: search by name-if py_proxy is None:- for proxy in server.ObjectProxies:- n = proxy.Desc.Name.lower()- if "python" in n:- py_proxy = proxy- print("Found Python component: %s (%s)" % (proxy.Desc.Name, proxy.Desc.Guid))- break--if py_proxy is None:- print("WARNING: No Python Script component found in this GH version.")- print(" Sliders are built. Add a Python Script component manually and")- print(" paste the code from scratch/omega_tower.py.")-else:- py_comp = py_proxy.CreateInstance()- py_comp.CreateAttributes()- py_comp.Attributes.Pivot = sd.PointF(float(PY_X), float(PY_Y))- gd.AddObject(py_comp, False)-- # ── Embed the tower code as the component's source ────────────────────────- TOWER_CODE = r'''-import math, Rhino, Rhino.Geometry as rg, Rhino.DocObjects as rdo-import Rhino.Display as rdp, scriptcontext as sc, System.Drawing as sd--# ── Read GH slider inputs (all named variables from input params) ──────────-# Defaults are used when running standalone (F5 in Rhino editor).-def _f(v, default):- try: return float(v) if v is not None else default- except: return default-def _i(v, default):- try: return int(v) if v is not None else default- except: return default--BASE_R = _f(base_r, 26.0)-WAIST_R = _f(waist_r, 14.5)-TOP_R = _f(top_r, 21.0)-HEIGHT = _f(height, 272.0)-SQUIRCLE_N = _f(squircle_n, 3.5)-TWIST_DEG = _f(twist_deg, 72.0)-U_DIVS = _i(u_divs, 24)-V_DIVS = _i(v_divs, 52)-MUL_W_BASE = _f(mul_w_base, 0.30)-MUL_W_TOP = _f(mul_w_top, 0.12)-MUL_D_BASE = _f(mul_d_base, 0.52)-MUL_D_TOP = _f(mul_d_top, 0.20)-ZONE_SOLID = _f(zone_solid, 0.22)-ZONE_GLASS = _f(zone_glass, 0.80)-GLASS_T = _f(glass_t, 0.028)-GLASS_INSET = _f(glass_inset, 0.09)-SUN_AZ = _f(sun_azimuth, 195.0)-SUN_ALT = _f(sun_altitude, 40.0)-FIN_LEN = _f(fin_len, 1.10)-FIN_THICK = _f(fin_thick, 0.055)-FIN_STEP = _i(fin_step, 2)-FLOOR_H = _f(floor_h, 4.3)-SLAB_T = _f(slab_t, 0.30)-SLAB_IN = _f(slab_in, 0.14)-COL_N = _i(col_n, 8)-COL_DEPTH = _i(col_depth, 3)-COL_ANGLE = _f(col_angle, 26.0)-COL_H = _f(col_h, 15.0)--WAIST_T = 0.42-PROFILE_PTS = 64-LOFT_RINGS = 22-SPIRE_H = 38.0; SPIRE_BASE_R = 1.80; SPIRE_TIP_R = 0.08-FIN_ON = True; CLEAR_BEFORE = True--doc = sc.doc; tol = doc.ModelAbsoluteTolerance-S = Rhino.RhinoMath.UnitScale(rg.UnitSystem.Meters, doc.ModelUnitSystem)--def smoothstep(a,b,t):- t=max(0.0,min(1.0,t)); t=t*t*(3.0-2.0*t); return a+(b-a)*t-def tower_r(t):- if t<=WAIST_T: return smoothstep(BASE_R,WAIST_R,t/WAIST_T)- return smoothstep(WAIST_R,TOP_R,(t-WAIST_T)/(1.0-WAIST_T))-def cs(mag,sgn): return abs(mag) if sgn>=0 else -abs(mag)-def sqxy(ang,r,n):- c=math.cos(ang); s=math.sin(ang)- return r*cs(abs(c)**(2.0/n),c), r*cs(abs(s)**(2.0/n),s)-def mk_layer(name,rgb):- idx=doc.Layers.FindByFullPath(name,-1)- if idx<0:- lyr=rdo.Layer(); lyr.Name=name; lyr.Color=sd.Color.FromArgb(*rgb)- idx=doc.Layers.Add(lyr)- elif CLEAR_BEFORE:- objs=doc.Objects.FindByLayer(name)- if objs:- for o in objs: doc.Objects.Delete(o,True)- return idx-def mk_attr(li,mi):- a=rdo.ObjectAttributes(); a.LayerIndex=li; a.MaterialIndex=mi- a.MaterialSource=rdo.ObjectMaterialSource.MaterialFromObject; return a-def d3(a,b): return a.X*b.X+a.Y*b.Y+a.Z*b.Z-def prj(pt,o,n):- d=(pt.X-o.X)*n.X+(pt.Y-o.Y)*n.Y+(pt.Z-o.Z)*n.Z- return rg.Point3d(pt.X-d*n.X,pt.Y-d*n.Y,pt.Z-d*n.Z)-def add_m(nm,bc,me,ro,dif,tr=0.0,re=0.0,sh=0.5,op=1.0):- m=rdo.Material(); m.Name=nm- try:- m.ToPhysicallyBased(); pb=m.PhysicallyBased- pb.BaseColor=rdp.Color4f(*bc); pb.Metallic=me; pb.Roughness=ro- try: pb.Opacity=op- except: pass- except: pass- m.DiffuseColor=sd.Color.FromArgb(*dif); m.Transparency=tr- m.Reflectivity=re; m.FresnelReflections=True- m.Shine=int(sh*rdo.Material.MaxShine); return doc.Materials.Add(m)--mf=add_m("Frame",(0.038,0.040,0.048,1.0),0.94,0.17,(30,32,38),re=0.87,sh=0.74)-mg=add_m("Glass",(0.025,0.14,0.09,1.0),0.00,0.01,(10,58,40),tr=0.88,re=0.94,sh=0.96,op=0.10)-mc=add_m("Corten",(0.16,0.055,0.018,1.0),0.80,0.48,(105,48,18),re=0.42,sh=0.30)-mfi=add_m("Fin",(0.52,0.48,0.40,1.0),0.65,0.22,(155,142,115),re=0.60,sh=0.55)-ms=add_m("Slab",(0.26,0.26,0.24,1.0),0.00,0.82,(132,130,122),re=0.06,sh=0.04)-mcol=add_m("Col",(0.20,0.07,0.022,1.0),0.82,0.44,(118,55,22),re=0.40,sh=0.28)-msp=add_m("Spire",(0.78,0.76,0.74,1.0),0.96,0.08,(200,195,188),re=0.92,sh=0.90)--lf=mk_layer("Diagrid",(35,38,46)); lg=mk_layer("Glass",(12,65,45))-lc=mk_layer("Cladding",(105,50,20)); lfn=mk_layer("SolarFins",(158,144,112))-lsl=mk_layer("FloorSlabs",(140,136,126)); lco=mk_layer("Columns",(112,52,20))-lsp=mk_layer("Spire",(195,190,182))--af=mk_attr(lf,mf); ag=mk_attr(lg,mg); ac=mk_attr(lc,mc)-afn=mk_attr(lfn,mfi); asl=mk_attr(lsl,ms); aco=mk_attr(lco,mcol); asp=mk_attr(lsp,msp)--# Tower surface-loft=[];-for k in range(LOFT_RINGS+1):- t=float(k)/LOFT_RINGS; r=tower_r(t)- twist=math.radians(TWIST_DEG*t); z=t*HEIGHT*S- ring=[rg.Point3d(*(list(sqxy(2.0*math.pi*p/PROFILE_PTS+twist,r*S,SQUIRCLE_N))+[z])) for p in range(PROFILE_PTS)]- crv=rg.NurbsCurve.CreateInterpolatedCurve(ring,3,rg.CurveKnotStyle.ChordPeriodic)- if not crv: ring.append(ring[0]); crv=rg.NurbsCurve.CreateInterpolatedCurve(ring,3)- if crv: loft.append(crv)--breps=rg.Brep.CreateFromLoft(loft,rg.Point3d.Unset,rg.Point3d.Unset,rg.LoftType.Normal,False)-if not breps: print("Loft failed"); raise SystemExit-face=breps[0].Faces[0]-face.SetDomain(0,rg.Interval(0,1)); face.SetDomain(1,rg.Interval(0,1))-pts=[[face.PointAt(float(i)/U_DIVS,float(j)/V_DIVS) for j in range(V_DIVS+1)] for i in range(U_DIVS+1)]--# Diagrid-nm=0-for i in range(U_DIVS):- for j in range(V_DIVS):- th=(float(j)+0.5)/V_DIVS- mw=(MUL_W_BASE+(MUL_W_TOP-MUL_W_BASE)*th)*S- md=(MUL_D_BASE+(MUL_D_TOP-MUL_D_BASE)*th)*S- if th<ZONE_SOLID: mw*=1.35; md*=1.55- for p0,p1 in [(pts[i][j],pts[i+1][j+1]),(pts[i+1][j],pts[i][j+1])]:- line=rg.LineCurve(p0,p1); ok,fr=line.PerpendicularFrameAt(line.Domain.Min)- if not ok: continue- mid=line.PointAt(line.Domain.Mid); ok2,cu,cv=face.ClosestPoint(mid)- if not ok2: continue- sn=face.NormalAt(cu,cv); sn.Unitize(); tang=fr.ZAxis- tn=d3(tang,sn); dep=rg.Vector3d(sn.X-tn*tang.X,sn.Y-tn*tang.Y,sn.Z-tn*tang.Z)- if not dep.Unitize(): continue- wid=rg.Vector3d.CrossProduct(tang,dep)- if not wid.Unitize(): continue- rect=rg.Rectangle3d(rg.Plane.WorldXY,rg.Interval(-mw*0.5,mw*0.5),rg.Interval(-md,0.0))- prof=rect.ToNurbsCurve(); spln=rg.Plane(fr.Origin,wid,dep)- xf=rg.Transform.PlaneToPlane(rg.Plane.WorldXY,spln); prof.Transform(xf)- sw=rg.Brep.CreateFromSweep(line,prof,True,tol)- if sw:- for b in sw: doc.Objects.AddBrep(b,af)- nm+=1--# Panels-def panel(p1,p2,p3,p4,t,sb,ins,c,n,attr):- k=1.0-ins- gi=[rg.Point3d(c.X+(p.X-c.X)*k,c.Y+(p.Y-c.Y)*k,c.Z+(p.Z-c.Z)*k) for p in[p1,p2,p3,p4]]- fp=[prj(g,c,n) for g in gi]; off=n*(-sb)- sp=[rg.Point3d(f.X+off.X,f.Y+off.Y,f.Z+off.Z) for f in fp]; tv=n*(-t)- bp=[rg.Point3d(s.X+tv.X,s.Y+tv.Y,s.Z+tv.Z) for s in sp]- ss=[rg.NurbsSurface.CreateFromCorners(sp[0],sp[1],sp[2],sp[3]),- rg.NurbsSurface.CreateFromCorners(bp[0],bp[3],bp[2],bp[1]),- rg.NurbsSurface.CreateFromCorners(sp[0],sp[1],bp[1],bp[0]),- rg.NurbsSurface.CreateFromCorners(sp[1],sp[2],bp[2],bp[1]),- rg.NurbsSurface.CreateFromCorners(sp[2],sp[3],bp[3],bp[2]),- rg.NurbsSurface.CreateFromCorners(sp[3],sp[0],bp[0],bp[3])]- fb=[s.ToBrep() for s in ss if s]- if len(fb)<6: return- j2=rg.Brep.JoinBreps(fb,tol)- if j2: doc.Objects.AddBrep(j2[0],attr)--for i in range(U_DIVS):- for j in range(V_DIVS):- th=(float(j)+0.5)/V_DIVS- if th>ZONE_GLASS: continue- p1=pts[i][j];p2=pts[i+1][j];p3=pts[i+1][j+1];p4=pts[i][j+1]- cx=(p1.X+p2.X+p3.X+p4.X)*0.25;cy=(p1.Y+p2.Y+p3.Y+p4.Y)*0.25;cz=(p1.Z+p2.Z+p3.Z+p4.Z)*0.25- c=rg.Point3d(cx,cy,cz); ok,cu,cv=face.ClosestPoint(c)- if not ok: continue- n=face.NormalAt(cu,cv)- if not n.Unitize(): continue- if th<ZONE_SOLID: panel(p1,p2,p3,p4,0.055*S,0.018*S,0.03,c,n,ac)- else: panel(p1,p2,p3,p4,GLASS_T*S,0.030*S,GLASS_INSET,c,n,ag)--# Solar fins-if FIN_ON:- az=math.radians(SUN_AZ); alt=math.radians(SUN_ALT)- sv=rg.Vector3d(math.sin(az)*math.cos(alt),math.cos(az)*math.cos(alt),math.sin(alt)); sv.Unitize()- for i in range(U_DIVS):- for j in range(0,V_DIVS,FIN_STEP):- th=float(j)/V_DIVS- if th<ZONE_SOLID or th>ZONE_GLASS: continue- nd=pts[i][j]; ok,cu,cv=face.ClosestPoint(nd)- if not ok: continue- sn=face.NormalAt(cu,cv)- if not sn.Unitize(): continue- dsn=d3(sv,sn); pj=rg.Vector3d(sv.X-dsn*sn.X,sv.Y-dsn*sn.Y,sv.Z-dsn*sn.Z)- if pj.Length<0.01: pj=rg.Vector3d(0,0,1)- pj.Unitize(); fw=rg.Vector3d.CrossProduct(sn,pj)- if not fw.Unitize(): continue- fl=FIN_LEN*S; ft=FIN_THICK*S; bo=sn*(0.02*S)- c1=rg.Point3d(nd.X+bo.X-fw.X*ft*0.5,nd.Y+bo.Y-fw.Y*ft*0.5,nd.Z+bo.Z)- c2=rg.Point3d(c1.X+fw.X*ft,c1.Y+fw.Y*ft,c1.Z)- c3=rg.Point3d(c2.X+sn.X*fl,c2.Y+sn.Y*fl,c2.Z+sn.Z*fl)- c4=rg.Point3d(c1.X+sn.X*fl,c1.Y+sn.Y*fl,c1.Z+sn.Z*fl)- fs=rg.NurbsSurface.CreateFromCorners(c1,c2,c3,c4)- if fs: doc.Objects.AddSurface(fs,afn)--# Floor slabs-nfl=int(HEIGHT/FLOOR_H)-for fi in range(1,nfl+1):- zf=float(fi)*FLOOR_H/HEIGHT- if zf>=1.0: break- z=zf*HEIGHT*S; tw=math.radians(TWIST_DEG*zf); r=tower_r(zf)-SLAB_IN- sr=[rg.Point3d(*(list(sqxy(2.0*math.pi*p/PROFILE_PTS+tw,r*S,SQUIRCLE_N))+[z])) for p in range(PROFILE_PTS)]- sc2=rg.NurbsCurve.CreateInterpolatedCurve(sr,3,rg.CurveKnotStyle.ChordPeriodic)- if not sc2: sr.append(sr[0]); sc2=rg.NurbsCurve.CreateInterpolatedCurve(sr,3)- if not sc2: continue- ex=rg.Surface.CreateExtrusion(sc2,rg.Vector3d(0,0,SLAB_T*S))- if ex:- sb=ex.ToBrep(); sb=rg.Brep.CapPlanarHoles(sb,tol)- if sb: doc.Objects.AddBrep(sb,asl)--# Branching columns-def grow(st,dr,ln,rad,dep,out):- en=rg.Point3d(st.X+dr.X*ln,st.Y+dr.Y*ln,st.Z+dr.Z*ln)- pp=rg.Brep.CreatePipe(rg.LineCurve(st,en),rad,True,rg.PipeCapMode.Flat,False,tol,tol)- if pp: out.extend(pp)- if dep<COL_DEPTH:- ar=math.radians(COL_ANGLE); pe=rg.Vector3d(-dr.Y,dr.X,0.0)- if pe.Length<1e-6: pe=rg.Vector3d(1,0,0)- pe.Unitize()- for sg in [1,-1]:- rt=rg.Transform.Rotation(sg*ar,pe,en); nd2=rg.Vector3d(dr); nd2.Transform(rt); nd2.Unitize()- grow(en,nd2,ln*0.60,rad*0.62,dep+1,out)--cb=[]-for k in range(COL_N):- ang=2.0*math.pi*k/COL_N- xb,yb=sqxy(ang,BASE_R*0.85*S,SQUIRCLE_N)- grow(rg.Point3d(xb,yb,0.0),rg.Vector3d(0,0,1),COL_H*S,0.44*S,0,cb)-for b in cb: doc.Objects.AddBrep(b,aco)--# Spire-sr2=[]-for k in range(6):- t=float(k)/5.0; rs=(SPIRE_BASE_R+(SPIRE_TIP_R-SPIRE_BASE_R)*(t*t))*S- zs=(HEIGHT+SPIRE_H*t)*S- sr2.append(rg.Circle(rg.Plane(rg.Point3d(0,0,zs),rg.Vector3d.ZAxis),rs).ToNurbsCurve())-spb=rg.Brep.CreateFromLoft(sr2,rg.Point3d.Unset,rg.Point3d.Unset,rg.LoftType.Normal,False)-if spb:- for b in spb:- b2=rg.Brep.CapPlanarHoles(b,tol)- doc.Objects.AddBrep(b2 if b2 else b,asp)--doc.Views.Redraw()-print("Omega Tower: mullions=%d Done." % nm)-'''-- # Try to set the code on the Python component- code_set = False- for prop_name in ("Code", "ScriptSource", "Expression"):- try:- prop = py_comp.GetType().GetProperty(prop_name)- if prop and prop.CanWrite:- prop.SetValue(py_comp, TOWER_CODE, None)- code_set = True- print("Code set via property: %s" % prop_name)- break- except:- pass-- if not code_set:- print("NOTE: Could not auto-set code. Open the Python component and paste from:")- print(" scratch/omega_tower.py")-- # ── Wire sliders to Python component inputs ───────────────────────────────- # Ordered to match expected GHPython input variable names- SLIDER_ORDER = [- "base_r","waist_r","top_r","height","squircle_n","twist_deg",- "u_divs","v_divs","mul_w_base","mul_w_top","mul_d_base","mul_d_top",- "zone_solid","zone_glass","glass_t","glass_inset",- "sun_azimuth","sun_altitude","fin_len","fin_thick","fin_step",- "floor_h","slab_t","slab_in",- "col_n","col_depth","col_angle","col_h",- ]-- n_wired = 0- try:- inputs = py_comp.Params.Input- n_inputs = inputs.Count if hasattr(inputs, 'Count') else len(inputs)-- for idx, sname in enumerate(SLIDER_ORDER):- if sname not in sliders: continue- slider = sliders[sname]-- # Ensure there are enough input params; GHPython auto-expands in ZUI- if idx < n_inputs:- target_param = inputs[idx]- else:- break # Can't add inputs externally without ZUI-- # Rename the input param to match the slider- try:- target_param.NickName = sname- target_param.Name = sname- except: pass-- # Wire: slider output[0] → python input[idx]- try:- source = slider.Params.Output[0]- target_param.AddSource(source)- n_wired += 1- except Exception as e:- pass # Some params don't allow AddSource externally-- print("Wires connected: %d / %d" % (n_wired, len(SLIDER_ORDER)))- except Exception as wire_err:- print("Wiring note: %s" % str(wire_err))- print(" Connect sliders manually by dragging wires in GH canvas.")--# =============================================================================-# ANNOTATION PANEL-# =============================================================================-add_panel(- "OMEGA TOWER — AEC Omni-Bridge\n"- "Squircle-twisted parametric skyscraper\n"- "Adjust any slider and press TAB to update.\n"- "\n"- "Systems:\n"- " A Tower form squircle + twist loft\n"- " B Diagrid variable section depth\n"- " C Corten base solid cladding zone\n"- " D Glass mid high-perf IGU panels\n"- " E Open crown structural expression\n"- " F Solar fins sun-responsive louvers\n"- " G Floor slabs concrete edge plates\n"- " H Branch cols recursive tree columns\n"- " I Crown spire tapered steel needle",- PY_X + 240, PY_Y-)--# =============================================================================-# RE-ENABLE + REFRESH-# =============================================================================-gd.Enabled = True-try:- gd.ExpireSolution()-except: pass-canvas.Refresh()--print("")-print("GH definition built:")-print(" Sliders : %d" % total_sliders)-print(" Groups : 6 colour-coded")-print(" Python : 1 component (%s)" % ("code embedded" if py_proxy else "add manually"))-print("")-print("Tip: In GH canvas, press Ctrl+A, then Ctrl+Shift+P to arrange layout")diff --git a/scratch/omega_gh_builder2.py b/scratch/omega_gh_builder2.pydeleted file mode 100644index 9ac8f55..0000000--- a/scratch/omega_gh_builder2.py+++ /dev/null@@ -1,196 +0,0 @@-import clr, System, System.Drawing as sd-import System.Reflection as rf-clr.AddReference("Grasshopper")-import Grasshopper as gh-from Grasshopper.Kernel import GH_Document-from Grasshopper.Kernel.Special import GH_NumberSlider, GH_Group, GH_Panel--# ── Document ──────────────────────────────────────────────────────────────────-canvas = gh.Instances.ActiveCanvas-gd = canvas.Document-if gd is None:- gd = GH_Document()- canvas.Document = gd-gd.Objects.Clear()-gd.Enabled = False-print("Canvas ready — cleared")--# ── Helpers ───────────────────────────────────────────────────────────────────-def sl(name, mn, mx, val, x, y, dec=2):- s = GH_NumberSlider()- s.CreateAttributes()- s.Name = name; s.NickName = name- s.Slider.Minimum = System.Decimal(mn)- s.Slider.Maximum = System.Decimal(mx)- s.Slider.Value = System.Decimal(val)- s.Slider.DecimalPlaces = dec- s.Attributes.Pivot = sd.PointF(float(x), float(y))- gd.AddObject(s, False)- return s--def grp(title, rgba, objs):- g = GH_Group(); g.NickName = title- g.Colour = sd.Color.FromArgb(*rgba)- for o in objs: g.AddObject(o.InstanceGuid)- gd.AddObject(g, False)- return g--def pan(text, x, y):- p = GH_Panel(); p.CreateAttributes()- p.UserText = text- p.Attributes.Pivot = sd.PointF(float(x), float(y))- gd.AddObject(p, False)- return p--# ── Slider layout (6 groups, 28 sliders) ─────────────────────────────────────-A = 80; B = 290; H = 32; GP = 24-sliders = {}; y = 60--specs = [- # (group_title, rgba, [ (name, min, max, val, col, rel_row, dec), ... ])- ("A TOWER FORM", (45, 80, 135, 55), [- ("base_r", 5., 60., 26., A, 0, 1),- ("waist_r", 3., 50., 14.5, B, 0, 1),- ("top_r", 5., 55., 21., A, 1, 1),- ("height", 50., 600., 272., B, 1, 1),- ("squircle_n", 2., 8., 3.5, A, 2, 2),- ("twist_deg", 0., 180., 72., B, 2, 1),- ]),- ("B DIAGRID SYSTEM", (135, 80, 45, 55), [- ("u_divs", 20, 80, 52, A, 0, 0),- ("v_divs", 12, 48, 24, B, 0, 0),- ("mul_w_base", 0.1, 0.8, 0.30, A, 1, 3),- ("mul_w_top", 0.05,0.4, 0.12, B, 1, 3),- ("mul_d_base", 0.15,1.2, 0.52, A, 2, 3),- ("mul_d_top", 0.08,0.6, 0.20, B, 2, 3),- ]),- ("C/D FACADE ZONES", (45, 135, 80, 55), [- ("zone_solid", 0., 0.5, 0.22, A, 0, 3),- ("zone_glass", 0.5, 1.0, 0.80, B, 0, 3),- ("glass_t", 0.01,0.06,0.028,A, 1, 3),- ("glass_inset", 0.02,0.2, 0.09, B, 1, 3),- ]),- ("F SOLAR FINS", (135, 120, 40, 55), [- ("sun_azimuth", 0., 360., 195., A, 0, 1),- ("sun_altitude", 5., 85., 40., B, 0, 1),- ("fin_len", 0.2, 3.0, 1.1, A, 1, 2),- ("fin_thick", 0.02,0.2, 0.055,B,1, 3),- ("fin_step", 1, 6, 2, A, 2, 0),- ]),- ("G FLOOR PLATES", (80, 80, 80, 55), [- ("floor_h", 2.5, 6.5, 4.3, A, 0, 2),- ("slab_t", 0.15,0.6, 0.30, B, 0, 3),- ("slab_in", 0.05,0.4, 0.14, A, 1, 3),- ]),-]--for grp_title, grp_rgba, items in specs:- g_objs = []- rows = max(r for _, _, _, _, _, r, _ in items)- for name, mn, mx, val, col, row, dec in items:- s = sl(name, mn, mx, val, col, y + row * H, dec)- g_objs.append(s); sliders[name] = s- grp(grp_title, grp_rgba, g_objs)- y += (rows + 1) * H + GP--print("Sliders: %d" % len(sliders))--# ── Python Script component ───────────────────────────────────────────────────-PX = 580; PY_COMP_Y = 60-GHPY_GUID = System.Guid("410755b1-224a-4c1e-a407-bf32fb45ea7e")--server = gh.Instances.ComponentServer-py_proxy = None-for proxy in server.ObjectProxies:- try:- if proxy.Guid == GHPY_GUID:- py_proxy = proxy- break- except: pass-if py_proxy is None:- for proxy in server.ObjectProxies:- try:- nm = proxy.Desc.Name.lower()- if "ghpython" in nm or "ironpython 2" in nm:- py_proxy = proxy- break- except: pass--if py_proxy:- py_comp = py_proxy.CreateInstance()- py_comp.CreateAttributes()- py_comp.Attributes.Pivot = sd.PointF(float(PX), float(PY_COMP_Y))- gd.AddObject(py_comp, False)- print("Python component: %s" % py_proxy.Desc.Name)-- # Wire available inputs (typically 2 default: x, y)- SLIDER_ORDER = [- "base_r","waist_r","top_r","height","squircle_n","twist_deg",- "u_divs","v_divs","mul_w_base","mul_w_top","mul_d_base","mul_d_top",- "zone_solid","zone_glass","glass_t","glass_inset",- "sun_azimuth","sun_altitude","fin_len","fin_thick","fin_step",- "floor_h","slab_t","slab_in",- ]-- # ── Add inputs until we have enough ──────────────────────────────────────- from Grasshopper.Kernel import GH_ParameterSide- target = len(SLIDER_ORDER)- added = 0- while py_comp.Params.Input.Count < target:- try:- idx_new = py_comp.Params.Input.Count- param = py_comp.CreateParameter(GH_ParameterSide.Input, idx_new)- py_comp.Params.RegisterInputParam(param)- added += 1- except Exception as e:- print(" add input failed at %d: %s" % (py_comp.Params.Input.Count, e))- break- try:- py_comp.VariableParameterMaintenance()- py_comp.Params.OnParametersChanged()- except: pass- print("Inputs after expansion: %d (added %d)" % (py_comp.Params.Input.Count, added))-- # ── Wire sliders → inputs ─────────────────────────────────────────────────- # GH_NumberSlider IS an IGH_Param itself — AddSource takes it directly- wired = 0- for idx, sname in enumerate(SLIDER_ORDER):- if sname not in sliders: continue- if idx >= py_comp.Params.Input.Count: break- try:- ip = py_comp.Params.Input[idx]- ip.NickName = sname; ip.Name = sname- ip.AddSource(sliders[sname])- wired += 1- except Exception as e:- print(" wire[%d] %s: %s" % (idx, sname, e))-- print("Wired: %d / %d" % (wired, target))-else:- print("WARNING: GhPython component not found — add manually from GH toolbar")--# ── Info panel ────────────────────────────────────────────────────────────────-pan(- "OMEGA TOWER | AEC Omni-Bridge MCP\n"- "Squircle-twisted performative skyscraper\n\n"- "Geometry baked in Rhino (run omega_tower.py):\n"- " 2496 diagrid members tapered section base→crown\n"- " 260 corten cladding solid base 0-22%\n"- " 1508 diamond glass IGU mid zone 22-80%\n"- " 360 solar fins sun az=195 alt=40\n"- " 61 floor slabs squircle profile\n"- " 1 crown spire\n\n"- "TO USE GH SLIDERS:\n"- "1. Open Python component (double-click)\n"- "2. Paste code from omega_tower.py\n"- "3. Click the + (ZUI) to add 24 inputs\n"- "4. Name them matching the slider NickNames\n"- "5. Drag wires slider > input\n"- "6. Press TAB to update geometry",- PX + 260, PY_COMP_Y-),--# ── Re-enable ─────────────────────────────────────────────────────────────────-gd.Enabled = True-canvas.Refresh()-print("GH definition complete (objects: %d)" % gd.ObjectCount)diff --git a/scratch/omega_set_code.py b/scratch/omega_set_code.pydeleted file mode 100644index d2dd879..0000000--- a/scratch/omega_set_code.py+++ /dev/null@@ -1,39 +0,0 @@-import clr, System, System.Reflection as rf-clr.AddReference("Grasshopper")-import Grasshopper as gh--canvas = gh.Instances.ActiveCanvas-gd = canvas.Document-GHPY_GUID = System.Guid("410755b1-224a-4c1e-a407-bf32fb45ea7e")-py_comp = None-for obj in gd.Objects:- try:- if hasattr(obj, "ComponentGuid") and obj.ComponentGuid == GHPY_GUID:- py_comp = obj; break- except: pass--if py_comp is None:- print("GhPython component not found in canvas")- raise SystemExit--# Read the GH-aware tower code from file (IronPython can open() files normally)-code_path = r"C:\Users\sammo\OneDrive\Documenten\GitHub\Autodesk-Revit-MCP-Server\scratch\omega_tower_gh.py"-with open(code_path, "r") as f:- code = f.read()--print("Read code: %d chars, %d lines" % (len(code), len(code.splitlines())))--# Set via Code property-t = py_comp.GetType()-prop = t.GetProperty("Code", rf.BindingFlags.Public | rf.BindingFlags.Instance)-if prop and prop.CanWrite:- prop.SetValue(py_comp, code, None)- print("Code embedded successfully")- try:- py_comp.ExpireSolution(False)- except: pass-else:- print("Code property not settable")--canvas.Refresh()-print("Done")diff --git a/scratch/omega_tower.py b/scratch/omega_tower.pydeleted file mode 100644index 3ecce11..0000000--- a/scratch/omega_tower.py+++ /dev/null@@ -1,622 +0,0 @@-# =============================================================================-# OMEGA TOWER — Adaptive Performative Facade System-# AEC Omni-Bridge MCP Showcase | Run via bridge or Rhino PythonEdit (F5)-#-# Systems:-# A Squircle-twisted NURBS tower (variable profile, 72° rotation)-# B Diagrid frame — tapered sections, heavier at base-# C Facade zone 1: solid weathering steel cladding (base 0-22%)-# D Facade zone 2: high-performance glass IGU (22-80%)-# E Facade zone 3: open structural crown (80-100%)-# F Solar fin system — louvers oriented by sun vector at each node-# G Floor plates — squircle profile slabs at every 4.3 m-# H Branching ground columns — recursive binary tree, 3 levels-# I Crown spire — tapered steel needle-# J 5 PBR materials + 7 layers-# =============================================================================--import math-import Rhino-import Rhino.Geometry as rg-import Rhino.DocObjects as rdo-import Rhino.Display as rdp-import scriptcontext as sc-import System.Drawing as sd--sc.doc = Rhino.RhinoDoc.ActiveDoc-doc = sc.doc-tol = doc.ModelAbsoluteTolerance-S = Rhino.RhinoMath.UnitScale(Rhino.UnitSystem.Meters, doc.ModelUnitSystem)--# =============================================================================-# MASTER PARAMETERS ← These map 1-to-1 with GH sliders-# =============================================================================--# A. Tower form-BASE_R = 26.0 # base radius (m)-WAIST_R = 14.5 # waist radius at ~40% height (m)-TOP_R = 21.0 # crown radius (m)-HEIGHT = 272.0 # total height (~63 floors at 4.3 m)-WAIST_T = 0.42 # fractional height of waist (0.3–0.6)-SQUIRCLE_N = 3.5 # 2.0 = circle | 4.0 = rounded-square | 8.0 = near-square-TWIST_DEG = 72.0 # total profile rotation from base to crown (degrees)-PROFILE_PTS = 64 # points per ring cross-section (smoothness)-LOFT_RINGS = 22 # loft guide rings (accuracy)--# B. Diagrid-U_DIVS = 52 # height rows (U = HEIGHT on the loft surface)-V_DIVS = 24 # circumference columns (V = CIRCUMFERENCE)-MUL_W_BASE = 0.30 # face width at base (m)-MUL_W_TOP = 0.12 # face width at crown (m)-MUL_D_BASE = 0.52 # structural depth at base (m)-MUL_D_TOP = 0.20 # structural depth at crown (m)--# C/D/E. Facade zones (fractions of total height)-ZONE_SOLID = 0.22 # solid cladding below this-ZONE_GLASS = 0.80 # glass panels between solid and this; open crown above--# D. Glass panels-GLASS_T = 0.028 # IGU depth (m)-GLASS_SB = 0.030 # setback behind facade plane (m)-GLASS_INSET = 0.09 # corner reveal fraction (0 = full panel, 0.15 = exposed frame)--# F. Solar fins-FIN_ON = True-SUN_AZ = 195.0 # azimuth degrees from North (SW orientation)-SUN_ALT = 40.0 # solar altitude (degrees above horizon)-FIN_LEN = 1.10 # projection length (m)-FIN_THICK = 0.055 # fin thickness (m)-FIN_STEP = 2 # place fin at every Nth height division--# G. Floor plates-FLOOR_H = 4.3 # floor-to-floor height (m)-SLAB_T = 0.30 # concrete slab thickness (m)-SLAB_IN = 0.14 # inset from facade (m)---# I. Crown spire-SPIRE_H = 38.0 # spire extension above roof (m)-SPIRE_BASE_R = 1.80 # spire base radius (m)-SPIRE_TIP_R = 0.08 # spire tip radius (m)--CLEAR_BEFORE = True--# =============================================================================-# UTILITIES-# =============================================================================--def smoothstep(a, b, t):- t = max(0.0, min(1.0, t))- t = t * t * (3.0 - 2.0 * t)- return a + (b - a) * t--def tower_r(t):- """Radius at normalised height t ∈ [0,1]. Non-symmetric waist."""- if t <= WAIST_T:- return smoothstep(BASE_R, WAIST_R, t / WAIST_T)- return smoothstep(WAIST_R, TOP_R, (t - WAIST_T) / (1.0 - WAIST_T))--def copysign_py(mag, sgn):- return abs(mag) if sgn >= 0 else -abs(mag)--def squircle_xy(angle, r, n):- """Superellipse point at given angle, radius r, exponent n."""- c = math.cos(angle)- s = math.sin(angle)- x = r * copysign_py(abs(c) ** (2.0 / n), c)- y = r * copysign_py(abs(s) ** (2.0 / n), s)- return x, y--def make_layer(name, rgb, clear=CLEAR_BEFORE):- idx = doc.Layers.FindByFullPath(name, -1)- if idx < 0:- lyr = rdo.Layer()- lyr.Name = name- lyr.Color = sd.Color.FromArgb(*rgb)- idx = doc.Layers.Add(lyr)- else:- doc.Layers[idx].Color = sd.Color.FromArgb(*rgb)- if clear:- objs = doc.Objects.FindByLayer(name)- if objs:- for o in objs:- doc.Objects.Delete(o, True)- return idx--def make_attr(layer_idx, mat_idx):- a = rdo.ObjectAttributes()- a.LayerIndex = layer_idx- a.MaterialIndex = mat_idx- a.MaterialSource = rdo.ObjectMaterialSource.MaterialFromObject- return a--def dot3(a, b):- return a.X*b.X + a.Y*b.Y + a.Z*b.Z--def project_to_plane(pt, origin, unit_n):- d = (pt.X-origin.X)*unit_n.X + (pt.Y-origin.Y)*unit_n.Y + (pt.Z-origin.Z)*unit_n.Z- return rg.Point3d(pt.X - d*unit_n.X, pt.Y - d*unit_n.Y, pt.Z - d*unit_n.Z)--# =============================================================================-# MATERIALS (PBR first, standard fallback)-# =============================================================================--def _purge_layer(name):- """Delete all objects on a named layer (idempotent)."""- idx = doc.Layers.FindByFullPath(name, -1)- if idx < 0: return- objs = doc.Objects.FindByLayer(name)- if objs:- for o in objs:- doc.Objects.Delete(o, True)--# Purge stale layers left by older script versions-_purge_layer("Columns")--def add_mat(name, base_c4f, metallic, roughness, diffuse_rgb,- transp=0.0, refl=0.0, shine=0.5, opacity=1.0, ior=1.5):- # Reuse existing material so colours don't accumulate across re-runs- existing = doc.Materials.Find(name, True)- if existing >= 0:- m = doc.Materials[existing]- else:- m = rdo.Material()- m.Name = name- try:- m.ToPhysicallyBased()- pb = m.PhysicallyBased- pb.BaseColor = rdp.Color4f(*base_c4f)- pb.Metallic = metallic- pb.Roughness = roughness- try: pb.Opacity = opacity- except: pass- try: pb.OpacityIOR = ior- except: pass- except: pass- m.DiffuseColor = sd.Color.FromArgb(*diffuse_rgb)- m.Transparency = transp- m.Reflectivity = refl- m.FresnelReflections = True- m.Shine = int(shine * rdo.Material.MaxShine)- if existing >= 0:- doc.Materials.Modify(m, existing, True)- return existing- return doc.Materials.Add(m)--mat_frame = add_mat("DarkAluminium",- (0.038, 0.040, 0.048, 1.0), 0.94, 0.17, (30, 32, 38),- refl=0.87, shine=0.74)--mat_glass = add_mat("PerfGlass_IGU",- (0.68, 0.84, 0.94, 1.0), 0.00, 0.02, (170, 210, 240),- transp=0.92, refl=0.86, shine=0.98, opacity=0.08, ior=1.52)--mat_corten = add_mat("CortenSteelBase",- (0.16, 0.055, 0.018, 1.0), 0.80, 0.48, (105, 48, 18),- refl=0.42, shine=0.30)--mat_fin = add_mat("AluminiumFin",- (0.52, 0.48, 0.40, 1.0), 0.65, 0.22, (155, 142, 115),- refl=0.60, shine=0.55)--mat_slab = add_mat("ExposedConcrete",- (0.26, 0.26, 0.24, 1.0), 0.00, 0.82, (132, 130, 122),- refl=0.06, shine=0.04)---mat_spire = add_mat("BrightStainless",- (0.78, 0.76, 0.74, 1.0), 0.96, 0.08, (200, 195, 188),- refl=0.92, shine=0.90)--# =============================================================================-# LAYERS-# =============================================================================--l_frame = make_layer("Diagrid", (35, 38, 46))-l_glass = make_layer("Glass", (60, 140, 210))-l_clad = make_layer("Cladding", (105, 50, 20))-l_fins = make_layer("SolarFins", (158, 144, 112))-l_slabs = make_layer("FloorSlabs", (140, 136, 126))-l_spire = make_layer("Spire", (195, 190, 182))--a_frame = make_attr(l_frame, mat_frame)-a_glass = make_attr(l_glass, mat_glass)-a_clad = make_attr(l_clad, mat_corten)-a_fins = make_attr(l_fins, mat_fin)-a_slab = make_attr(l_slabs, mat_slab)-a_spire = make_attr(l_spire, mat_spire)--# =============================================================================-# A — TOWER SURFACE (squircle twisted loft)-# =============================================================================-print("A: Building tower surface...")--loft_crvs = []-for k in range(LOFT_RINGS + 1):- t = float(k) / LOFT_RINGS- r = tower_r(t)- twist = math.radians(TWIST_DEG * t)- z = t * HEIGHT * S-- ring = []- for p in range(PROFILE_PTS):- angle = 2.0 * math.pi * p / PROFILE_PTS + twist- x, y = squircle_xy(angle, r * S, SQUIRCLE_N)- ring.append(rg.Point3d(x, y, z))-- crv = rg.NurbsCurve.CreateInterpolatedCurve(- ring, 3, rg.CurveKnotStyle.ChordPeriodic)- if crv:- loft_crvs.append(crv)- else:- # Fallback: degree-3 through points (close manually)- ring.append(ring[0])- crv2 = rg.NurbsCurve.CreateInterpolatedCurve(ring, 3)- if crv2: loft_crvs.append(crv2)--breps = rg.Brep.CreateFromLoft(loft_crvs, rg.Point3d.Unset, rg.Point3d.Unset,- rg.LoftType.Normal, False)-if not breps:- print("ERROR: loft failed"); raise SystemExit--face = breps[0].Faces[0]-face.SetDomain(0, rg.Interval(0, 1))-face.SetDomain(1, rg.Interval(0, 1))--# Build UV grid (diagrid node positions)-pts = []-for i in range(U_DIVS + 1):- row = []- u = float(i) / U_DIVS- for j in range(V_DIVS + 1):- v = float(j) / V_DIVS- row.append(face.PointAt(u, v))- pts.append(row)--print(" Squircle n=%.1f twist=%.0f deg rings=%d" % (SQUIRCLE_N, TWIST_DEG, LOFT_RINGS))--# Diamond-panel helpers — U=HEIGHT (i), V=CIRCUMFERENCE (j wraps)-# Use pts array directly so shapes are geometrically correct regardless of-# surface parameterisation uniformity (squircle curves are chord-length spaced).-def gpt(hi, ci):- return pts[hi][ci % V_DIVS]--def cc_pt(hi, ci):- """Geometric centroid of the four surrounding grid corners."""- j0 = ci % V_DIVS; j1 = (ci + 1) % V_DIVS- p0=pts[hi][j0]; p1=pts[hi][j1]; p2=pts[hi+1][j0]; p3=pts[hi+1][j1]- return rg.Point3d((p0.X+p1.X+p2.X+p3.X)*0.25,- (p0.Y+p1.Y+p2.Y+p3.Y)*0.25,- (p0.Z+p1.Z+p2.Z+p3.Z)*0.25)--# =============================================================================-# B — DIAGRID FRAME (variable section: deeper + wider at base)-# =============================================================================-print("B: Building diagrid frame...")--n_mul = 0-for i in range(U_DIVS):- for j in range(V_DIVS):- t_h = (float(i) + 0.5) / U_DIVS # normalised height at cell centre- mw = (MUL_W_BASE + (MUL_W_TOP - MUL_W_BASE) * t_h) * S- md = (MUL_D_BASE + (MUL_D_TOP - MUL_D_BASE) * t_h) * S-- # Heavier section in solid base zone- if t_h < ZONE_SOLID:- mw *= 1.35; md *= 1.55-- diags = [- (pts[i ][j ], pts[i + 1][j + 1]),- (pts[i + 1][j ], pts[i ][j + 1]),- ]- for p0, p1 in diags:- line = rg.LineCurve(p0, p1)- ok, fr = line.PerpendicularFrameAt(line.Domain.Min)- if not ok: continue-- mid = line.PointAt(line.Domain.Mid)- ok2, cu, cv = face.ClosestPoint(mid)- if not ok2: continue- sn = face.NormalAt(cu, cv)- sn.Unitize()-- tang = fr.ZAxis- t_n = dot3(tang, sn)- depth = rg.Vector3d(sn.X - t_n*tang.X, sn.Y - t_n*tang.Y, sn.Z - t_n*tang.Z)- if not depth.Unitize(): continue- width = rg.Vector3d.CrossProduct(tang, depth)- if not width.Unitize(): continue-- rect = rg.Rectangle3d(rg.Plane.WorldXY,- rg.Interval(-mw*0.5, mw*0.5),- rg.Interval(-md, 0.0))- prof = rect.ToNurbsCurve()- sweep_pln = rg.Plane(fr.Origin, width, depth)- xf = rg.Transform.PlaneToPlane(rg.Plane.WorldXY, sweep_pln)- prof.Transform(xf)-- swept = rg.Brep.CreateFromSweep(line, prof, True, tol)- if swept:- for b in swept: doc.Objects.AddBrep(b, a_frame)- n_mul += 1--print(" Mullion sweeps: %d" % n_mul)--# =============================================================================-# C/D — FACADE PANELS-# Solid base (UV quad corten) : 0 → ZONE_SOLID-# Glass zone (diamond panels) : ZONE_SOLID → ZONE_GLASS-# Crown (open structural frame) : ZONE_GLASS → 1.0-#-# Diamond topology identical to diagrid_tower_glass.py:-# Type A : cc(i,j)→gpt(i+1,j+1)→cc(i,j+1)→gpt(i,j+1)-# Type B : cc(i,j)→gpt(i+1,j)→cc(i+1,j)→gpt(i+1,j+1)-# Bot cap : gpt(i0,j)→gpt(i0,j+1)→cc(i0,j)-# Top cap : cc(ie-1,j)→gpt(ie,j+1)→gpt(ie,j)-# =============================================================================-print("C/D: Building facade panels...")--def _surf_cn(pts_list):- """Surface normal + centroid for a list of surface points."""- cx = sum(p.X for p in pts_list) / len(pts_list)- cy = sum(p.Y for p in pts_list) / len(pts_list)- cz = sum(p.Z for p in pts_list) / len(pts_list)- c = rg.Point3d(cx, cy, cz)- ok, cu, cv = face.ClosestPoint(c)- if not ok: return None, None- n = face.NormalAt(cu, cv)- return (c, n) if n.Unitize() else (None, None)--def _solid_6face(verts_f, verts_b, attr):- """Build and bake a 6-face closed solid from front and back quad vertices."""- f, b = verts_f, verts_b- surfs = [- rg.NurbsSurface.CreateFromCorners(f[0],f[1],f[2],f[3]),- rg.NurbsSurface.CreateFromCorners(b[0],b[3],b[2],b[1]),- rg.NurbsSurface.CreateFromCorners(f[0],f[1],b[1],b[0]),- rg.NurbsSurface.CreateFromCorners(f[1],f[2],b[2],b[1]),- rg.NurbsSurface.CreateFromCorners(f[2],f[3],b[3],b[2]),- rg.NurbsSurface.CreateFromCorners(f[3],f[0],b[0],b[3]),- ]- faces_b = [s.ToBrep() for s in surfs if s]- if len(faces_b) < 6: return False- j2 = rg.Brep.JoinBreps(faces_b, tol)- if j2: doc.Objects.AddBrep(j2[0], attr)- return bool(j2)--def _solid_5face(verts_f, verts_b, attr):- """Build and bake a 5-face closed solid from front and back triangle vertices."""- f, b = verts_f, verts_b- surfs = [- rg.NurbsSurface.CreateFromCorners(f[0],f[1],f[2]),- rg.NurbsSurface.CreateFromCorners(b[0],b[2],b[1]),- rg.NurbsSurface.CreateFromCorners(f[0],f[1],b[1],b[0]),- rg.NurbsSurface.CreateFromCorners(f[1],f[2],b[2],b[1]),- rg.NurbsSurface.CreateFromCorners(f[2],f[0],b[0],b[2]),- ]- faces_b = [s.ToBrep() for s in surfs if s]- if len(faces_b) < 5: return False- j2 = rg.Brep.JoinBreps(faces_b, tol)- if j2: doc.Objects.AddBrep(j2[0], attr)- return bool(j2)--def diamond_quad(A, B, C, D, thick, setback, attr):- """Diamond glass panel: vertices ARE the structural nodes (no corner inset)."""- c, n = _surf_cn([A, B, C, D])- if c is None: return False- off = n * (-setback); tv = n * (-thick)- fv = [p + off for p in [A, B, C, D]]- bv = [p + tv for p in fv]- return _solid_6face(fv, bv, attr)--def diamond_tri(A, B, C, thick, setback, attr):- """Triangular glass cap panel."""- c, n = _surf_cn([A, B, C])- if c is None: return False- off = n * (-setback); tv = n * (-thick)- fv = [p + off for p in [A, B, C]]- bv = [p + tv for p in fv]- return _solid_5face(fv, bv, attr)--def rect_corten(p1, p2, p3, p4, thick, setback, inset, attr):- """UV-quad solid cladding panel with corner inset."""- c, n = _surf_cn([p1, p2, p3, p4])- if c is None: return False- k = 1.0 - inset- gi = [rg.Point3d(c.X+(p.X-c.X)*k, c.Y+(p.Y-c.Y)*k, c.Z+(p.Z-c.Z)*k)- for p in [p1, p2, p3, p4]]- fp = [project_to_plane(g, c, n) for g in gi]- off = n * (-setback); tv = n * (-thick)- fv = [rg.Point3d(f.X+off.X, f.Y+off.Y, f.Z+off.Z) for f in fp]- bv = [rg.Point3d(f.X+tv.X, f.Y+tv.Y, f.Z+tv.Z ) for f in fv]- return _solid_6face(fv, bv, attr)--# ── Solid corten base (UV quads) ──────────────────────────────────────────────-n_clad = 0-for i in range(U_DIVS):- if (float(i) + 0.5) / U_DIVS >= ZONE_SOLID: break- for j in range(V_DIVS):- p1=pts[i][j]; p2=pts[i+1][j]; p3=pts[i+1][j+1]; p4=pts[i][j+1]- if rect_corten(p1,p2,p3,p4, 0.055*S, 0.018*S, 0.03, a_clad):- n_clad += 1--# ── Diamond glass panels ──────────────────────────────────────────────────────-i_solid = int(round(ZONE_SOLID * U_DIVS))-i_glass = min(int(round(ZONE_GLASS * U_DIVS)), U_DIVS)-n_glass = 0--# Bottom-zone transition caps (left-triangle of first glass row)-for j in range(V_DIVS):- if diamond_tri(gpt(i_solid,j), gpt(i_solid,j+1), cc_pt(i_solid,j),- GLASS_T*S, GLASS_SB*S, a_glass):- n_glass += 1--# Type A: top-tri(i,j) + bottom-tri(i,j+1) merged as rhombus-for i in range(i_solid, i_glass):- for j in range(V_DIVS):- if diamond_quad(cc_pt(i,j), gpt(i+1,j+1), cc_pt(i,j+1), gpt(i,j+1),- GLASS_T*S, GLASS_SB*S, a_glass):- n_glass += 1--# Type B: right-tri(i,j) + left-tri(i+1,j) merged as rhombus-for i in range(i_solid, i_glass - 1):- for j in range(V_DIVS):- if diamond_quad(cc_pt(i,j), gpt(i+1,j), cc_pt(i+1,j), gpt(i+1,j+1),- GLASS_T*S, GLASS_SB*S, a_glass):- n_glass += 1--# Top-zone transition caps (right-triangle of last glass row)-for j in range(V_DIVS):- if diamond_tri(cc_pt(i_glass-1,j), gpt(i_glass,j+1), gpt(i_glass,j),- GLASS_T*S, GLASS_SB*S, a_glass):- n_glass += 1--print(" Corten panels: %d Diamond glass: %d" % (n_clad, n_glass))--# =============================================================================-# F — SOLAR FIN SYSTEM (louvers oriented perpendicular to projected sun ray)-# =============================================================================-if FIN_ON:- print("F: Building solar fins...")-- az_r = math.radians(SUN_AZ)- alt_r = math.radians(SUN_ALT)- sun_v = rg.Vector3d(math.sin(az_r)*math.cos(alt_r),- math.cos(az_r)*math.cos(alt_r),- math.sin(alt_r))- sun_v.Unitize()-- n_fins = 0- for i in range(U_DIVS):- for j in range(0, V_DIVS, FIN_STEP):- t_h = float(j) / V_DIVS- if t_h < ZONE_SOLID or t_h > ZONE_GLASS:- continue-- node = pts[i][j]- ok_cp, cu, cv = face.ClosestPoint(node)- if not ok_cp: continue- sn = face.NormalAt(cu, cv)- if not sn.Unitize(): continue-- # Project sun vector onto surface tangent plane- d_sn = dot3(sun_v, sn)- proj = rg.Vector3d(sun_v.X - d_sn*sn.X,- sun_v.Y - d_sn*sn.Y,- sun_v.Z - d_sn*sn.Z)- if proj.Length < 0.01:- proj = rg.Vector3d(0, 0, 1)- proj.Unitize()-- # Fin faces the sun: width direction is cross(sn, proj_sun)- fw = rg.Vector3d.CrossProduct(sn, proj)- if not fw.Unitize(): continue-- fl = FIN_LEN * S- ft = FIN_THICK * S- base_off = sn * (0.02 * S) # tiny lift off facade-- c1 = rg.Point3d(node.X + base_off.X - fw.X*ft*0.5,- node.Y + base_off.Y - fw.Y*ft*0.5,- node.Z + base_off.Z)- c2 = rg.Point3d(c1.X + fw.X*ft, c1.Y + fw.Y*ft, c1.Z)- c3 = rg.Point3d(c2.X + sn.X*fl, c2.Y + sn.Y*fl, c2.Z + sn.Z*fl)- c4 = rg.Point3d(c1.X + sn.X*fl, c1.Y + sn.Y*fl, c1.Z + sn.Z*fl)-- fin_s = rg.NurbsSurface.CreateFromCorners(c1, c2, c3, c4)- if fin_s:- doc.Objects.AddSurface(fin_s, a_fins)- n_fins += 1-- print(" Solar fins: %d (sun az=%.0f° alt=%.0f°)" % (n_fins, SUN_AZ, SUN_ALT))--# =============================================================================-# G — FLOOR PLATES (squircle profile follows tower twist + taper)-# =============================================================================-print("G: Building floor plates...")--n_floors_actual = int(HEIGHT / FLOOR_H)-n_slabs = 0--for fl_idx in range(1, n_floors_actual + 1):- z_frac = float(fl_idx) * FLOOR_H / HEIGHT- if z_frac >= 1.0: break- z = z_frac * HEIGHT * S-- twist = math.radians(TWIST_DEG * z_frac)- r = tower_r(z_frac) - SLAB_IN-- slab_ring = []- for p in range(PROFILE_PTS):- angle = 2.0 * math.pi * p / PROFILE_PTS + twist- x, y = squircle_xy(angle, r * S, SQUIRCLE_N)- slab_ring.append(rg.Point3d(x, y, z))-- slab_crv = rg.NurbsCurve.CreateInterpolatedCurve(- slab_ring, 3, rg.CurveKnotStyle.ChordPeriodic)- if not slab_crv:- slab_ring.append(slab_ring[0])- slab_crv = rg.NurbsCurve.CreateInterpolatedCurve(slab_ring, 3)- if not slab_crv: continue-- try:- extrusion = rg.Extrusion.Create(slab_crv, SLAB_T * S, True)- if extrusion:- doc.Objects.AddExtrusion(extrusion, a_slab)- n_slabs += 1- continue- except: pass- # fallback: planar cap only- flat = rg.Brep.CreatePlanarBreps(slab_crv, tol)- if flat:- for fb in flat:- doc.Objects.AddBrep(fb, a_slab)- n_slabs += 1--print(" Floor slabs: %d" % n_slabs)--# =============================================================================-# I — CROWN SPIRE (tapered stainless needle)-# =============================================================================-print("I: Building crown spire...")--spire_rings = []-for k in range(6):- t = float(k) / 5.0- r_s = (SPIRE_BASE_R + (SPIRE_TIP_R - SPIRE_BASE_R) * (t*t)) * S- z_s = (HEIGHT + SPIRE_H * t) * S- spire_rings.append(rg.Circle(- rg.Plane(rg.Point3d(0, 0, z_s), rg.Vector3d.ZAxis), r_s- ).ToNurbsCurve())--sp_brep = rg.Brep.CreateFromLoft(spire_rings, rg.Point3d.Unset, rg.Point3d.Unset,- rg.LoftType.Normal, False)-if sp_brep:- for b in sp_brep:- b2 = rg.Brep.CapPlanarHoles(b, tol)- doc.Objects.AddBrep(b2 if b2 else b, a_spire)- print(" Spire: OK")--# =============================================================================-# DONE-# =============================================================================-doc.Views.Redraw()--print("")-print("=" * 58)-print("OMEGA TOWER — Complete")-print(" Diagrid members : %d" % n_mul)-print(" Corten cladding : %d (zone 0 – %.0f%%)" % (n_clad, ZONE_SOLID*100))-print(" Glass IGU panels : %d (zone %.0f%% – %.0f%%)" % (n_glass, ZONE_SOLID*100, ZONE_GLASS*100))-if FIN_ON:- print(" Solar fins : %d" % n_fins)-print(" Floor slabs : %d (@ %.1f m)" % (n_slabs, FLOOR_H))-print(" Crown spire : 1")-print("=" * 58)-print("Next: Rendered display mode + HDRI sky for final image")--# Restore GH scriptcontext if running inside a Grasshopper component-try:- sc.doc = ghdoc-except NameError:- passdiff --git a/scratch/omega_tower_gh.py b/scratch/omega_tower_gh.pydeleted file mode 100644index 0075e23..0000000--- a/scratch/omega_tower_gh.py+++ /dev/null@@ -1,267 +0,0 @@-# =============================================================================-# OMEGA TOWER — Grasshopper-aware version-# All parameters read from GH input ports; defaults used when standalone.-# Paste this into the GhPython Script component that omega_gh_builder2.py created.-# =============================================================================--import math-import Rhino, Rhino.Geometry as rg, Rhino.DocObjects as rdo-import Rhino.Display as rdp, scriptcontext as sc, System.Drawing as sd--# ── GH input helpers ─────────────────────────────────────────────────────────-def _f(v, d):- try: return float(v) if v is not None else d- except: return d-def _i(v, d):- try: return int(float(v)) if v is not None else d- except: return d--# ── Parameters (read from wired sliders, fallback to defaults) ───────────────-BASE_R = _f(base_r, 26.0)-WAIST_R = _f(waist_r, 14.5)-TOP_R = _f(top_r, 21.0)-HEIGHT = _f(height, 272.0)-SQUIRCLE_N = _f(squircle_n, 3.5)-TWIST_DEG = _f(twist_deg, 72.0)-U_DIVS = _i(u_divs, 24)-V_DIVS = _i(v_divs, 52)-MUL_W_BASE = _f(mul_w_base, 0.30)-MUL_W_TOP = _f(mul_w_top, 0.12)-MUL_D_BASE = _f(mul_d_base, 0.52)-MUL_D_TOP = _f(mul_d_top, 0.20)-ZONE_SOLID = _f(zone_solid, 0.22)-ZONE_GLASS = _f(zone_glass, 0.80)-GLASS_T = _f(glass_t, 0.028)-GLASS_INSET = _f(glass_inset, 0.09)-SUN_AZ = _f(sun_azimuth, 195.0)-SUN_ALT = _f(sun_altitude,40.0)-FIN_LEN = _f(fin_len, 1.10)-FIN_THICK = _f(fin_thick, 0.055)-FIN_STEP = _i(fin_step, 2)-FLOOR_H = _f(floor_h, 4.3)-SLAB_T = _f(slab_t, 0.30)-SLAB_IN = _f(slab_in, 0.14)-COL_N = _i(col_n, 8)-COL_DEPTH = _i(col_depth, 3)-COL_ANGLE = _f(col_angle, 26.0)-COL_H = _f(col_h, 15.0)--WAIST_T = 0.42-PROFILE_PTS = 64-LOFT_RINGS = 22-SPIRE_H = 38.0; SPIRE_BASE_R = 1.80; SPIRE_TIP_R = 0.08-FIN_ON = True; CLEAR_BEFORE = True--doc = sc.doc; tol = doc.ModelAbsoluteTolerance-S = Rhino.RhinoMath.UnitScale(Rhino.UnitSystem.Meters, doc.ModelUnitSystem)--# ── Utilities ─────────────────────────────────────────────────────────────────-def smoothstep(a,b,t):- t=max(0.0,min(1.0,t)); t=t*t*(3.0-2.0*t); return a+(b-a)*t-def tower_r(t):- if t<=WAIST_T: return smoothstep(BASE_R,WAIST_R,t/WAIST_T)- return smoothstep(WAIST_R,TOP_R,(t-WAIST_T)/(1.0-WAIST_T))-def cs(m,s): return abs(m) if s>=0 else -abs(m)-def sqxy(ang,r,n):- c=math.cos(ang); s=math.sin(ang)- return r*cs(abs(c)**(2.0/n),c), r*cs(abs(s)**(2.0/n),s)-def mk_layer(name,rgb):- idx=doc.Layers.FindByFullPath(name,-1)- if idx<0:- lyr=rdo.Layer(); lyr.Name=name; lyr.Color=sd.Color.FromArgb(*rgb)- idx=doc.Layers.Add(lyr)- elif CLEAR_BEFORE:- objs=doc.Objects.FindByLayer(name)- if objs:- for o in objs: doc.Objects.Delete(o,True)- return idx-def mk_attr(li,mi):- a=rdo.ObjectAttributes(); a.LayerIndex=li; a.MaterialIndex=mi- a.MaterialSource=rdo.ObjectMaterialSource.MaterialFromObject; return a-def d3(a,b): return a.X*b.X+a.Y*b.Y+a.Z*b.Z-def prj(pt,o,n):- d=(pt.X-o.X)*n.X+(pt.Y-o.Y)*n.Y+(pt.Z-o.Z)*n.Z- return rg.Point3d(pt.X-d*n.X,pt.Y-d*n.Y,pt.Z-d*n.Z)-def add_m(nm,bc,me,ro,dif,tr=0.0,re=0.0,sh=0.5,op=1.0):- m=rdo.Material(); m.Name=nm- try:- m.ToPhysicallyBased(); pb=m.PhysicallyBased- pb.BaseColor=rdp.Color4f(*bc); pb.Metallic=me; pb.Roughness=ro- try: pb.Opacity=op- except: pass- except: pass- m.DiffuseColor=sd.Color.FromArgb(*dif); m.Transparency=tr- m.Reflectivity=re; m.FresnelReflections=True- m.Shine=int(sh*rdo.Material.MaxShine); return doc.Materials.Add(m)--# ── Materials ─────────────────────────────────────────────────────────────────-mf =add_m("Frame", (0.038,0.040,0.048,1.0),0.94,0.17,(30,32,38), re=0.87,sh=0.74)-mg =add_m("Glass", (0.025,0.14,0.09,1.0), 0.00,0.01,(10,58,40), tr=0.88,re=0.94,sh=0.96,op=0.10)-mc =add_m("Corten", (0.16,0.055,0.018,1.0),0.80,0.48,(105,48,18), re=0.42,sh=0.30)-mfi=add_m("Fin", (0.52,0.48,0.40,1.0), 0.65,0.22,(155,142,115),re=0.60,sh=0.55)-ms =add_m("Slab", (0.26,0.26,0.24,1.0), 0.00,0.82,(132,130,122),re=0.06,sh=0.04)-mco=add_m("Col", (0.20,0.07,0.022,1.0),0.82,0.44,(118,55,22), re=0.40,sh=0.28)-msp=add_m("Spire", (0.78,0.76,0.74,1.0), 0.96,0.08,(200,195,188),re=0.92,sh=0.90)--# ── Layers ────────────────────────────────────────────────────────────────────-lf =mk_layer("Diagrid",(35,38,46)); lg =mk_layer("Glass",(12,65,45))-lc =mk_layer("Cladding",(105,50,20)); lfn=mk_layer("SolarFins",(158,144,112))-lsl=mk_layer("FloorSlabs",(140,136,126)); lco=mk_layer("Columns",(112,52,20))-lsp=mk_layer("Spire",(195,190,182))-af=mk_attr(lf,mf); ag=mk_attr(lg,mg); ac=mk_attr(lc,mc)-afn=mk_attr(lfn,mfi); asl=mk_attr(lsl,ms); aco=mk_attr(lco,mco); asp=mk_attr(lsp,msp)--# ── A: Tower surface ──────────────────────────────────────────────────────────-loft=[]-for k in range(LOFT_RINGS+1):- t=float(k)/LOFT_RINGS; r=tower_r(t)- twist=math.radians(TWIST_DEG*t); z=t*HEIGHT*S- ring=[rg.Point3d(sqxy(2.0*math.pi*p/PROFILE_PTS+twist,r*S,SQUIRCLE_N)[0],- sqxy(2.0*math.pi*p/PROFILE_PTS+twist,r*S,SQUIRCLE_N)[1],z)- for p in range(PROFILE_PTS)]- crv=rg.NurbsCurve.CreateInterpolatedCurve(ring,3,rg.CurveKnotStyle.ChordPeriodic)- if not crv: ring.append(ring[0]); crv=rg.NurbsCurve.CreateInterpolatedCurve(ring,3)- if crv: loft.append(crv)-breps=rg.Brep.CreateFromLoft(loft,rg.Point3d.Unset,rg.Point3d.Unset,rg.LoftType.Normal,False)-if not breps: print("Loft failed"); raise SystemExit-face=breps[0].Faces[0]-face.SetDomain(0,rg.Interval(0,1)); face.SetDomain(1,rg.Interval(0,1))-pts=[[face.PointAt(float(i)/U_DIVS,float(j)/V_DIVS) for j in range(V_DIVS+1)] for i in range(U_DIVS+1)]--# ── B: Diagrid frame ──────────────────────────────────────────────────────────-nm=0-for i in range(U_DIVS):- for j in range(V_DIVS):- th=(float(j)+0.5)/V_DIVS- mw=(MUL_W_BASE+(MUL_W_TOP-MUL_W_BASE)*th)*S- md=(MUL_D_BASE+(MUL_D_TOP-MUL_D_BASE)*th)*S- if th<ZONE_SOLID: mw*=1.35; md*=1.55- for p0,p1 in [(pts[i][j],pts[i+1][j+1]),(pts[i+1][j],pts[i][j+1])]:- line=rg.LineCurve(p0,p1); ok,fr=line.PerpendicularFrameAt(line.Domain.Min)- if not ok: continue- mid=line.PointAt(line.Domain.Mid); ok2,cu,cv=face.ClosestPoint(mid)- if not ok2: continue- sn=face.NormalAt(cu,cv); sn.Unitize(); tang=fr.ZAxis- tn=d3(tang,sn); dep=rg.Vector3d(sn.X-tn*tang.X,sn.Y-tn*tang.Y,sn.Z-tn*tang.Z)- if not dep.Unitize(): continue- wid=rg.Vector3d.CrossProduct(tang,dep)- if not wid.Unitize(): continue- rect=rg.Rectangle3d(rg.Plane.WorldXY,rg.Interval(-mw*0.5,mw*0.5),rg.Interval(-md,0.0))- prof=rect.ToNurbsCurve()- spln=rg.Plane(fr.Origin,wid,dep); xf=rg.Transform.PlaneToPlane(rg.Plane.WorldXY,spln)- prof.Transform(xf)- sw=rg.Brep.CreateFromSweep(line,prof,True,tol)- if sw:- for b in sw: doc.Objects.AddBrep(b,af)- nm+=1--# ── C/D: Facade panels (zone-aware) ──────────────────────────────────────────-def panel(p1,p2,p3,p4,t,sb,ins,c,n,attr):- k=1.0-ins- gi=[rg.Point3d(c.X+(p.X-c.X)*k,c.Y+(p.Y-c.Y)*k,c.Z+(p.Z-c.Z)*k) for p in[p1,p2,p3,p4]]- fp=[prj(g,c,n) for g in gi]; off=n*(-sb)- sp=[rg.Point3d(f.X+off.X,f.Y+off.Y,f.Z+off.Z) for f in fp]; tv=n*(-t)- bp=[rg.Point3d(s.X+tv.X,s.Y+tv.Y,s.Z+tv.Z) for s in sp]- ss=[rg.NurbsSurface.CreateFromCorners(sp[0],sp[1],sp[2],sp[3]),- rg.NurbsSurface.CreateFromCorners(bp[0],bp[3],bp[2],bp[1]),- rg.NurbsSurface.CreateFromCorners(sp[0],sp[1],bp[1],bp[0]),- rg.NurbsSurface.CreateFromCorners(sp[1],sp[2],bp[2],bp[1]),- rg.NurbsSurface.CreateFromCorners(sp[2],sp[3],bp[3],bp[2]),- rg.NurbsSurface.CreateFromCorners(sp[3],sp[0],bp[0],bp[3])]- fb=[s.ToBrep() for s in ss if s]- if len(fb)<6: return- j2=rg.Brep.JoinBreps(fb,tol)- if j2: doc.Objects.AddBrep(j2[0],attr)--for i in range(U_DIVS):- for j in range(V_DIVS):- th=(float(j)+0.5)/V_DIVS- if th>ZONE_GLASS: continue- p1=pts[i][j];p2=pts[i+1][j];p3=pts[i+1][j+1];p4=pts[i][j+1]- cx=(p1.X+p2.X+p3.X+p4.X)*0.25;cy=(p1.Y+p2.Y+p3.Y+p4.Y)*0.25;cz=(p1.Z+p2.Z+p3.Z+p4.Z)*0.25- c=rg.Point3d(cx,cy,cz); ok,cu,cv=face.ClosestPoint(c)- if not ok: continue- n=face.NormalAt(cu,cv)- if not n.Unitize(): continue- if th<ZONE_SOLID: panel(p1,p2,p3,p4,0.055*S,0.018*S,0.03,c,n,ac)- else: panel(p1,p2,p3,p4,GLASS_T*S,0.030*S,GLASS_INSET,c,n,ag)--# ── F: Solar fins ─────────────────────────────────────────────────────────────-if FIN_ON:- az=math.radians(SUN_AZ); alt=math.radians(SUN_ALT)- sv=rg.Vector3d(math.sin(az)*math.cos(alt),math.cos(az)*math.cos(alt),math.sin(alt)); sv.Unitize()- for i in range(U_DIVS):- for j in range(0,V_DIVS,FIN_STEP):- th=float(j)/V_DIVS- if th<ZONE_SOLID or th>ZONE_GLASS: continue- nd=pts[i][j]; ok,cu,cv=face.ClosestPoint(nd)- if not ok: continue- sn=face.NormalAt(cu,cv)- if not sn.Unitize(): continue- dsn=d3(sv,sn); pj=rg.Vector3d(sv.X-dsn*sn.X,sv.Y-dsn*sn.Y,sv.Z-dsn*sn.Z)- if pj.Length<0.01: pj=rg.Vector3d(0,0,1)- pj.Unitize(); fw=rg.Vector3d.CrossProduct(sn,pj)- if not fw.Unitize(): continue- fl=FIN_LEN*S; ft=FIN_THICK*S; bo=sn*(0.02*S)- c1=rg.Point3d(nd.X+bo.X-fw.X*ft*0.5,nd.Y+bo.Y-fw.Y*ft*0.5,nd.Z+bo.Z)- c2=rg.Point3d(c1.X+fw.X*ft,c1.Y+fw.Y*ft,c1.Z)- c3=rg.Point3d(c2.X+sn.X*fl,c2.Y+sn.Y*fl,c2.Z+sn.Z*fl)- c4=rg.Point3d(c1.X+sn.X*fl,c1.Y+sn.Y*fl,c1.Z+sn.Z*fl)- fs=rg.NurbsSurface.CreateFromCorners(c1,c2,c3,c4)- if fs: doc.Objects.AddSurface(fs,afn)--# ── G: Floor slabs ────────────────────────────────────────────────────────────-nfl=int(HEIGHT/FLOOR_H)-for fi in range(1,nfl+1):- zf=float(fi)*FLOOR_H/HEIGHT- if zf>=1.0: break- z=zf*HEIGHT*S; tw=math.radians(TWIST_DEG*zf); r=tower_r(zf)-SLAB_IN- if r<=0.5: continue- sr=[rg.Point3d(sqxy(2.0*math.pi*p/PROFILE_PTS+tw,r*S,SQUIRCLE_N)[0],- sqxy(2.0*math.pi*p/PROFILE_PTS+tw,r*S,SQUIRCLE_N)[1],z)- for p in range(PROFILE_PTS)]- sc2=rg.NurbsCurve.CreateInterpolatedCurve(sr,3,rg.CurveKnotStyle.ChordPeriodic)- if not sc2: sr.append(sr[0]); sc2=rg.NurbsCurve.CreateInterpolatedCurve(sr,3)- if not sc2: continue- try:- ex=rg.Extrusion.Create(sc2,SLAB_T*S,True)- if ex: doc.Objects.AddExtrusion(ex,asl); continue- except: pass- flat=rg.Brep.CreatePlanarBreps(sc2,tol)- if flat:- for fb in flat: doc.Objects.AddBrep(fb,asl)--# ── H: Branching columns ──────────────────────────────────────────────────────-def grow(st,dr,ln,rad,dep,out):- en=rg.Point3d(st.X+dr.X*ln,st.Y+dr.Y*ln,st.Z+dr.Z*ln)- pp=rg.Brep.CreatePipe(rg.LineCurve(st,en),rad,True,rg.PipeCapMode.Flat,False,tol,tol)- if pp: out.extend(pp)- if dep<COL_DEPTH:- ar=math.radians(COL_ANGLE); pe=rg.Vector3d(-dr.Y,dr.X,0.0)- if pe.Length<1e-6: pe=rg.Vector3d(1,0,0)- pe.Unitize()- for sg in [1,-1]:- rt=rg.Transform.Rotation(sg*ar,pe,en); nd2=rg.Vector3d(dr); nd2.Transform(rt); nd2.Unitize()- grow(en,nd2,ln*0.60,rad*0.62,dep+1,out)--cb=[]-for k in range(COL_N):- ang=2.0*math.pi*k/COL_N- xb,yb=sqxy(ang,BASE_R*0.85*S,SQUIRCLE_N)- grow(rg.Point3d(xb,yb,0.0),rg.Vector3d(0,0,1),COL_H*S,0.44*S,0,cb)-for b in cb: doc.Objects.AddBrep(b,aco)--# ── I: Crown spire ────────────────────────────────────────────────────────────-sr2=[]-for k in range(6):- t=float(k)/5.0; rs=(SPIRE_BASE_R+(SPIRE_TIP_R-SPIRE_BASE_R)*(t*t))*S- zs=(HEIGHT+SPIRE_H*t)*S- sr2.append(rg.Circle(rg.Plane(rg.Point3d(0,0,zs),rg.Vector3d.ZAxis),rs).ToNurbsCurve())-spb=rg.Brep.CreateFromLoft(sr2,rg.Point3d.Unset,rg.Point3d.Unset,rg.LoftType.Normal,False)-if spb:- for b in spb:- b2=rg.Brep.CapPlanarHoles(b,tol)- doc.Objects.AddBrep(b2 if b2 else b,asp)--doc.Views.Redraw()-print("Omega Tower: %d diagrid | BASE_R=%.1f TWIST=%.0f SQUIRCLE=%.1f" % (nm,BASE_R,TWIST_DEG,SQUIRCLE_N))diff --git a/scratch/rhino_diagrid_tower.py b/scratch/rhino_diagrid_tower.pydeleted file mode 100644index 502ecbd..0000000--- a/scratch/rhino_diagrid_tower.py+++ /dev/null@@ -1,410 +0,0 @@-# =============================================================================-# rhino_diagrid_tower.py-# Parametric diagrid skyscraper — run directly in Rhino 8 Python Script Editor-# or send via the MCP bridge (run_python command).-#-# HOW TO RUN IN RHINO:-# Type "PythonEdit" in Rhino → File > Open this file → press Run (F5)-# Adjust the PARAMETERS block below and re-run to iterate.-#-# HOW TO RUN VIA MCP BRIDGE:-# python scratch/diagrid_tower_python.py (sends this file to the bridge)-#-# BUILDABLE GEOMETRY GUARANTEES:-# - Glass panels are projected onto a flat plane before extrusion → truly planar IGUs-# - Mullion depth axis is locked to the outward surface normal at each midpoint-# - All glass solids are 6-face closed Breps (watertight)-# - Mullion sweeps are capped closed (CreateFromSweep with closed=True)-# - Materials: PBR tried first (Rhino 7/8), standard fallback for all display modes-# =============================================================================--import Rhino-import Rhino.Geometry as rg-import Rhino.DocObjects as rdo-import Rhino.Display as rdp-import scriptcontext as sc-import System.Drawing as sd--doc = sc.doc-tol = doc.ModelAbsoluteTolerance--# =============================================================================-# PARAMETERS ← edit this block to iterate-# All dimensions in metres — script converts to document units automatically.-# =============================================================================--# -- Tower form ----------------------------------------------------------------BASE_R = 22.0 # base radius (m) → wider = more imposing ground presence-WAIST_R = 13.5 # waist radius (m) → smaller = more dramatic hyperboloid pinch-TOP_R = 19.0 # crown radius (m) → larger than waist = outward flare at top-HEIGHT = 180.0 # total height (m) → ~45 stories at 4 m/floor--# -- Diagrid density -----------------------------------------------------------# Rule of thumb: U_DIVS sets structural bays around the perimeter.-# Each bay at the base ≈ 2π × BASE_R / U_DIVS = panel width.-# V_DIVS sets bays up the height. 2 floors per bay is structurally typical.-U_DIVS = 20 # panels around circumference (20 → ~6.9 m per bay at base)-V_DIVS = 40 # panels up the height (40 → 4.5 m per bay = 1 floor)--# -- Structural member cross-section (metres) ----------------------------------MUL_W = 0.20 # visible face width of each member (200 mm)-MUL_D = 0.40 # structural depth — goes inward from facade (400 mm)--# -- Glazing (metres) ----------------------------------------------------------GLASS_T = 0.028 # IGU thickness — 28 mm = high-performance triple-glazed unit-INSET = 0.14 # fraction each glass corner is pulled toward panel centre- # 0.12–0.18 is realistic for exposed-framing curtain walls-SETBACK = 0.025 # glass set back behind facade plane (25 mm)--# -- Appearance ----------------------------------------------------------------CLEAR_BEFORE = True # delete previous "Mullions" and "Glass" layer objects before running---# =============================================================================-# END OF PARAMETERS-# =============================================================================--# -- Scale: convert metres to document units -----------------------------------S = Rhino.RhinoMath.UnitScale(rg.UnitSystem.Meters, doc.ModelUnitSystem)--BASE_R *= S; WAIST_R *= S; TOP_R *= S; HEIGHT *= S-MUL_W *= S; MUL_D *= S-GLASS_T *= S; SETBACK *= S---# ─────────────────────────────────────────────────────────────────────────────-# UTILITIES-# ─────────────────────────────────────────────────────────────────────────────--def smoothstep(a, b, t):- """Smooth cubic ease between a and b (no overshoot)."""- e = t * t * (3.0 - 2.0 * t)- return a + (b - a) * e--def tower_r(t):- """Radius at normalised height t ∈ [0,1]: base → waist → crown."""- if t <= 0.5:- return smoothstep(BASE_R, WAIST_R, t * 2.0)- return smoothstep(WAIST_R, TOP_R, (t - 0.5) * 2.0)--def dot3(a, b):- return a.X*b.X + a.Y*b.Y + a.Z*b.Z--def vec_scale(v, s):- return rg.Vector3d(v.X*s, v.Y*s, v.Z*s)--def pt_shift(p, v):- return rg.Point3d(p.X+v.X, p.Y+v.Y, p.Z+v.Z)--def project_onto_plane(pt, origin, unit_normal):- """Orthographic projection of pt onto a plane defined by origin and unit normal."""- d = (pt.X-origin.X)*unit_normal.X + (pt.Y-origin.Y)*unit_normal.Y + (pt.Z-origin.Z)*unit_normal.Z- return rg.Point3d(pt.X - d*unit_normal.X,- pt.Y - d*unit_normal.Y,- pt.Z - d*unit_normal.Z)--def get_or_make_layer(name, color, clear_objects):- if clear_objects:- # Remove all objects on this layer before rebuilding- for obj in doc.Objects.FindByLayer(name) or []:- doc.Objects.Delete(obj, True)- for layer in doc.Layers:- if layer.Name == name and not layer.IsDeleted:- return layer.Index- lyr = rdo.Layer()- lyr.Name = name- lyr.Color = color- return doc.Layers.Add(lyr)---# ─────────────────────────────────────────────────────────────────────────────-# STEP 1 — TOWER SURFACE-# Smooth hyperboloid lofted from 13 ring circles.-# More rings = cleaner normal sampling across the full height.-# ─────────────────────────────────────────────────────────────────────────────-RINGS = 13-loft_crvs = []-for k in range(RINGS + 1):- t = float(k) / RINGS- r = tower_r(t)- z = t * HEIGHT- pln = rg.Plane(rg.Point3d(0, 0, z), rg.Vector3d.ZAxis)- loft_crvs.append(rg.Circle(pln, r).ToNurbsCurve())--breps = rg.Brep.CreateFromLoft(- loft_crvs, rg.Point3d.Unset, rg.Point3d.Unset, rg.LoftType.Normal, False)--if not breps:- print("ERROR: loft failed — check parameters")- raise SystemExit--surf = breps[0]-face = surf.Faces[0]-face.SetDomain(0, rg.Interval(0, 1)) # u: 0..1 around circumference-face.SetDomain(1, rg.Interval(0, 1)) # v: 0..1 up the height---# ─────────────────────────────────────────────────────────────────────────────-# STEP 2 — UV GRID-# pts[i][j] = world-space node at (u=i/U_DIVS, v=j/V_DIVS) on the surface.-# Nodes are the diagrid connection points (structural nodes / curtain-wall corners).-# ─────────────────────────────────────────────────────────────────────────────-pts = []-for i in range(U_DIVS + 1):- row = []- u = float(i) / U_DIVS- for j in range(V_DIVS + 1):- v = float(j) / V_DIVS- row.append(face.PointAt(u, v))- pts.append(row)---# ─────────────────────────────────────────────────────────────────────────────-# STEP 3 — MULLION CROSS-SECTION PROFILE-# Rectangle in WorldXY: width along X (what you see from street), depth along Y.-# Y=0 is the outward face of the member; Y=-MUL_D is the inward (hidden) back face.-# This gets re-oriented per-member in Step 4.-# ─────────────────────────────────────────────────────────────────────────────-profile_rect = rg.Rectangle3d(- rg.Plane.WorldXY,- rg.Interval(-MUL_W * 0.5, MUL_W * 0.5),- rg.Interval(-MUL_D, 0.0)-)-profile_crv = profile_rect.ToNurbsCurve()---# ─────────────────────────────────────────────────────────────────────────────-# STEP 4 — DIAGRID MEMBER SWEEPS-# Two diagonals per UV cell: (i,j)→(i+1,j+1) and (i+1,j)→(i,j+1).-#-# ORIENTATION FIX (key for buildability):-# Standard PerpendicularFrameAt gives an arbitrary roll around the tangent.-# We lock the roll so the depth axis (Y in the profile) aligns with the-# outward surface normal at the member's midpoint — the structural depth-# goes INTO the building, which is the only physically meaningful orientation.-# ─────────────────────────────────────────────────────────────────────────────-mullion_breps = []--for i in range(U_DIVS):- for j in range(V_DIVS):- diagonals = [- (pts[i ][j ], pts[i + 1][j + 1]), # up-right- (pts[i + 1][j ], pts[i ][j + 1]), # up-left- ]- for p0, p1 in diagonals:- line = rg.LineCurve(p0, p1)-- ok_fr, fr = line.PerpendicularFrameAt(line.Domain.Min)- if not ok_fr:- continue-- # Outward surface normal at the member midpoint- mid = line.PointAt(line.Domain.Mid)- ok_cp, cu, cv = face.ClosestPoint(mid)- if not ok_cp:- continue- surf_n = face.NormalAt(cu, cv)- surf_n.Unitize()-- tangent = fr.ZAxis # unit tangent of the line-- # Gram-Schmidt orthogonalisation:- # Remove the tangent component from surf_n → "depth" direction- # that lies in the plane perpendicular to the member.- t_dot_n = dot3(tangent, surf_n)- depth_dir = rg.Vector3d(surf_n.X - t_dot_n * tangent.X,- surf_n.Y - t_dot_n * tangent.Y,- surf_n.Z - t_dot_n * tangent.Z)- if not depth_dir.Unitize():- continue-- # Width direction: tangent × depth_dir- # → lies in the surface tangent plane, perpendicular to the member- width_dir = rg.Vector3d.CrossProduct(tangent, depth_dir)- if not width_dir.Unitize():- continue-- # Build sweep frame and map profile- sweep_pln = rg.Plane(fr.Origin, width_dir, depth_dir)- xf = rg.Transform.PlaneToPlane(rg.Plane.WorldXY, sweep_pln)-- oriented = profile_crv.DuplicateCurve()- oriented.Transform(xf)-- swept = rg.Brep.CreateFromSweep(line, oriented, True, tol)- if swept:- mullion_breps.extend(swept)--print("Mullion sweeps: " + str(len(mullion_breps)))---# ─────────────────────────────────────────────────────────────────────────────-# STEP 5 — PLANAR GLASS PANELS-# For each UV quad cell we create a flat glazed panel.-#-# BUILDABILITY LOGIC:-# a) Compute the 4 node corners of the cell.-# b) Find the outward surface normal at the cell centroid.-# c) Pull each corner INSET fraction toward the centroid (creates frame reveal).-# d) PROJECT all 4 inset corners onto the plane through centroid + outward normal.-# This is the critical step: it converts the slightly doubly-curved UV quad-# into a perfectly flat panel — exactly what a standard flat-glass IGU is.-# e) Step back SETBACK behind the facade plane (glass sits inside the frame).-# f) Create a 6-face closed solid by building front/back/4 side NurbsSurfaces-# and joining them. Result: a proper solid glass brick, not a surface.-# ─────────────────────────────────────────────────────────────────────────────-glass_breps = []--for i in range(U_DIVS):- for j in range(V_DIVS):- p1 = pts[i ][j ]; p2 = pts[i + 1][j ]- p3 = pts[i + 1][j + 1]; p4 = pts[i ][j + 1]-- # Centroid of the quad- cx = (p1.X + p2.X + p3.X + p4.X) * 0.25- cy = (p1.Y + p2.Y + p3.Y + p4.Y) * 0.25- cz = (p1.Z + p2.Z + p3.Z + p4.Z) * 0.25- c = rg.Point3d(cx, cy, cz)-- # Outward surface normal at centroid- ok_n, cu, cv = face.ClosestPoint(c)- if not ok_n:- continue- n = face.NormalAt(cu, cv)- if not n.Unitize():- continue-- # Pull each corner (1 - INSET) of the way from centroid to corner- def ins(p):- return rg.Point3d(c.X + (p.X - c.X) * (1.0 - INSET),- c.Y + (p.Y - c.Y) * (1.0 - INSET),- c.Z + (p.Z - c.Z) * (1.0 - INSET))-- gi1 = ins(p1); gi2 = ins(p2); gi3 = ins(p3); gi4 = ins(p4)-- # ── Planarity projection ──────────────────────────────────────────────- # Project all 4 inset corners onto the tangent plane at centroid.- # After this the 4 corners are exactly co-planar → flat glass panel.- fp1 = project_onto_plane(gi1, c, n)- fp2 = project_onto_plane(gi2, c, n)- fp3 = project_onto_plane(gi3, c, n)- fp4 = project_onto_plane(gi4, c, n)-- # Step back behind the facade surface- sb = vec_scale(n, -SETBACK)- sp1 = pt_shift(fp1, sb); sp2 = pt_shift(fp2, sb)- sp3 = pt_shift(fp3, sb); sp4 = pt_shift(fp4, sb)-- # Inner glass face (step inward by IGU thickness)- tv = vec_scale(n, -GLASS_T)- bp1 = pt_shift(sp1, tv); bp2 = pt_shift(sp2, tv)- bp3 = pt_shift(sp3, tv); bp4 = pt_shift(sp4, tv)-- # Build the 6-face closed solid- # Normal convention: all outer face-normals point away from the solid.- front = rg.NurbsSurface.CreateFromCorners(sp1, sp2, sp3, sp4) # outward face- back = rg.NurbsSurface.CreateFromCorners(bp1, bp4, bp3, bp2) # inward face (reversed)- s_b = rg.NurbsSurface.CreateFromCorners(sp1, sp2, bp2, bp1) # bottom edge- s_r = rg.NurbsSurface.CreateFromCorners(sp2, sp3, bp3, bp2) # right edge- s_t = rg.NurbsSurface.CreateFromCorners(sp3, sp4, bp4, bp3) # top edge- s_l = rg.NurbsSurface.CreateFromCorners(sp4, sp1, bp1, bp4) # left edge-- faces = [ns.ToBrep() for ns in [front, back, s_b, s_r, s_t, s_l] if ns is not None]- if len(faces) < 6:- continue-- joined = rg.Brep.JoinBreps(faces, tol)- if joined:- glass_breps.append(joined[0])- else:- glass_breps.extend(faces) # fallback: open surfaces still render--print("Glass panels: " + str(len(glass_breps)))---# ─────────────────────────────────────────────────────────────────────────────-# STEP 6 — PBR MATERIALS-# ToPhysicallyBased() is tried first (Rhino 7/8).-# Standard material properties are always set as a fallback for Shaded mode.-# ─────────────────────────────────────────────────────────────────────────────--def make_aluminum_mat():- m = rdo.Material()- m.Name = "DarkAnodizedAluminum"- try:- m.ToPhysicallyBased()- pbr = m.PhysicallyBased- pbr.BaseColor = rdp.Color4f(0.035, 0.038, 0.046, 1.0)- pbr.Metallic = 0.95- pbr.Roughness = 0.20- for attr in ("Reflectance", "Specular"): # name differs Rhino 7 vs 8- try: setattr(pbr, attr, 0.88); break- except: pass- except: pass- m.DiffuseColor = sd.Color.FromArgb(28, 30, 36)- m.SpecularColor = sd.Color.FromArgb(150, 158, 168)- m.Reflectivity = 0.88- m.FresnelReflections = True- m.Shine = int(0.70 * rdo.Material.MaxShine)- return m--def make_glass_mat():- m = rdo.Material()- m.Name = "HighPerformanceGlass"- try:- m.ToPhysicallyBased()- pbr = m.PhysicallyBased- pbr.BaseColor = rdp.Color4f(0.025, 0.14, 0.08, 1.0)- pbr.Metallic = 0.0- pbr.Roughness = 0.01 # near-mirror: maximum reflectivity- pbr.Opacity = 0.10 # 90% transparent- for attr in ("Reflectance", "Specular"):- try: setattr(pbr, attr, 0.95); break- except: pass- try: pbr.OpacityIOR = 1.52- except: pass- except: pass- m.DiffuseColor = sd.Color.FromArgb(15, 68, 48)- m.Transparency = 0.88- m.Reflectivity = 0.95- m.FresnelReflections = True- m.IndexOfRefraction = 1.52- return m--al_idx = doc.Materials.Add(make_aluminum_mat())-gl_idx = doc.Materials.Add(make_glass_mat())---# ─────────────────────────────────────────────────────────────────────────────-# STEP 7 — LAYERS + BAKE-# ─────────────────────────────────────────────────────────────────────────────-mul_layer = get_or_make_layer("Mullions", sd.Color.FromArgb(35, 38, 46), CLEAR_BEFORE)-gl_layer = get_or_make_layer("Glass", sd.Color.FromArgb(15, 68, 48), CLEAR_BEFORE)--def make_attr(layer_idx, mat_idx):- a = rdo.ObjectAttributes()- a.LayerIndex = layer_idx- a.MaterialIndex = mat_idx- a.MaterialSource = rdo.ObjectMaterialSource.MaterialFromObject- return a--mul_attr = make_attr(mul_layer, al_idx)-gl_attr = make_attr(gl_layer, gl_idx)--for b in mullion_breps:- doc.Objects.AddBrep(b, mul_attr)--for b in glass_breps:- doc.Objects.AddBrep(b, gl_attr)--doc.Views.Redraw()--print("")-print("Tower complete.")-print(" " + str(len(mullion_breps)) + " mullion sweeps (dark anodised aluminium PBR)")-print(" " + str(len(glass_breps)) + " glass panels (high-performance IGU)")-print("")-print("Next steps in Rhino:")-print(" 1. Set display mode to Rendered (V -> Rendered)")-print(" 2. Open Rendering panel -> Lighting -> add an HDRI sky")-print(" 3. Edit the PARAMETERS block at the top and re-run to iterate")diff --git a/scratch/run_facade_bridge.py b/scratch/run_facade_bridge.pydeleted file mode 100644index cf6ae05..0000000--- a/scratch/run_facade_bridge.py+++ /dev/null@@ -1,56 +0,0 @@-import os-import sys-import requests--BRIDGE = "http://127.0.0.1:3004"-EXECUTE_URL = BRIDGE + "/execute"-SCRIPT_PATH = os.path.join(os.path.dirname(__file__), "detailed_facade.py")--def main():- if not os.path.exists(SCRIPT_PATH):- sys.exit("Cannot find detailed_facade.py: " + SCRIPT_PATH)-- with open(SCRIPT_PATH, encoding="utf-8") as f:- code = f.read()-- print("Checking bridge health...")- try:- h = requests.get(BRIDGE + "/health", timeout=5).json()- print("Bridge is active! Status: {0}".format(h.get("status")))- except Exception as e:- sys.exit("Bridge is not reachable: " + str(e))-- print("Clearing Rhino scene...")- try:- r = requests.post(EXECUTE_URL, json={"command": "clear_scene"}, timeout=10)- r.raise_for_status()- print("Scene cleared!")- except Exception as e:- print("Warning: failed to clear scene: " + str(e))-- print("Sending detailed_facade.py script to Rhino ({0} lines)...".format(len(code.splitlines())))- try:- r = requests.post(- EXECUTE_URL,- json={"command": "run_python", "code": code},- timeout=300- )- r.raise_for_status()- result = r.json()- except requests.exceptions.ReadTimeout:- sys.exit("Timed out running detailed_facade.py script inside Rhino.")- except Exception as e:- sys.exit("HTTP error: " + str(e))-- if result.get("success"):- print("Success! Output from Rhino:")- output = (result.get("output") or "").strip()- for line in output.splitlines():- print(" " + line)- else:- print("Error from Rhino:")- print(result.get("error", "Unknown error"))- print(result.get("stackTrace", ""))--if __name__ == "__main__":- main()diff --git a/scratch/run_omega_bridge.py b/scratch/run_omega_bridge.pydeleted file mode 100644index e945193..0000000--- a/scratch/run_omega_bridge.py+++ /dev/null@@ -1,48 +0,0 @@-import os-import sys-import requests--BRIDGE = "http://127.0.0.1:3004"-EXECUTE_URL = BRIDGE + "/execute"-SCRIPT_PATH = os.path.join(os.path.dirname(__file__), "omega_tower.py")--def main():- if not os.path.exists(SCRIPT_PATH):- sys.exit("Cannot find omega_tower.py: " + SCRIPT_PATH)-- with open(SCRIPT_PATH, encoding="utf-8") as f:- code = f.read()-- print("Checking bridge health...")- try:- h = requests.get(BRIDGE + "/health", timeout=5).json()- print("Bridge is active! Status: {0}".format(h.get("status")))- except Exception as e:- sys.exit("Bridge is not reachable: " + str(e))-- print("Sending omega_tower.py script to Rhino ({0} lines)...".format(len(code.splitlines())))- try:- r = requests.post(- EXECUTE_URL,- json={"command": "run_python", "code": code},- timeout=300- )- r.raise_for_status()- result = r.json()- except requests.exceptions.ReadTimeout:- sys.exit("Timed out running omega_tower.py script inside Rhino.")- except Exception as e:- sys.exit("HTTP error: " + str(e))-- if result.get("success"):- print("Success! Output from Rhino:")- output = (result.get("output") or "").strip()- for line in output.splitlines():- print(" " + line)- else:- print("Error from Rhino:")- print(result.get("error", "Unknown error"))- print(result.get("stackTrace", ""))--if __name__ == "__main__":- main()diff --git a/scratch/test_bridge_print.py b/scratch/test_bridge_print.pydeleted file mode 100644index fe344ce..0000000--- a/scratch/test_bridge_print.py+++ /dev/null@@ -1,18 +0,0 @@-import requests--BRIDGE = "http://127.0.0.1:3004"-EXECUTE_URL = BRIDGE + "/execute"--code = """-import scriptcontext as sc, Rhino-doc = sc.doc-S = Rhino.RhinoMath.UnitScale(Rhino.UnitSystem.Meters, doc.ModelUnitSystem)-print("S = {0}".format(S))-print("UnitSystem = {0}".format(doc.ModelUnitSystem))-"""--try:- r = requests.post(EXECUTE_URL, json={"command": "run_python", "code": code}, timeout=10)- print(r.json())-except Exception as e:- print("Error:", e)diff --git a/scratch/test_rhino.py b/scratch/test_rhino.pydeleted file mode 100644index e1aa4e9..0000000--- a/scratch/test_rhino.py+++ /dev/null@@ -1,18 +0,0 @@-import asyncio-from revit_mcp_server.providers.rhino import RhinoProvider-from revit_mcp_server.security.workspace import WorkspaceMonitor-from revit_mcp_server.config import ServerConfig--async def test_rhino():- config = ServerConfig()- workspace = WorkspaceMonitor(config)- provider = RhinoProvider(workspace)- print('Testing Rhino Health Endpoint...')- try:- health = await provider.check_health()- print(f'Rhino Compute Health: {health}')- except Exception as e:- print(f'Error checking health: {e}')--if __name__ == '__main__':- asyncio.run(test_rhino())diff --git a/scratch/test_rhino_geom.py b/scratch/test_rhino_geom.pydeleted file mode 100644index 8dbe19a..0000000--- a/scratch/test_rhino_geom.py+++ /dev/null@@ -1,48 +0,0 @@-import asyncio-from revit_mcp_server.config import config-from revit_mcp_server.security.workspace import WorkspaceMonitor-from revit_mcp_server.providers.rhino import RhinoProvider--async def test_rhino_query():- print('Initializing Rhino test...')- workspace = WorkspaceMonitor(config.allowed_directories)- provider = RhinoProvider(workspace)-- print('Checking Rhino Compute Health...')- try:- health = await provider.check_health()- print(f'Health Response: {health}')- except Exception as e:- print(f'Failed Health Check: {e}')-- # Find the tool- tools = provider.get_tools()- query_tool = next((t for t in tools if t.name == 'rhino_query_file_geometry'), None)-- if not query_tool:- print('Tool rhino_query_file_geometry not found!')- return-- print('\nExecuting rhino_query_file_geometry on Untitled.3dm...')- file_path = r'C:\Users\sammo\OneDrive\Documenten\GitHub\Autodesk-Revit-MCP-Server\docs\Untitled.3dm'-- params = {- 'file_path': file_path,- 'extract_breps': True,- 'extract_meshes': True- }-- try:- result = await query_tool.handler(params)- print('\n--- Query Result ---')- # Print a truncated preview if it's large- res_str = str(result)- if len(res_str) > 1000:- print(res_str[:1000] + '... [truncated]')- else:- print(res_str)- except Exception as e:- print(f'Query Failed: {e}')--if __name__ == '__main__':- asyncio.run(test_rhino_query())diff --git a/scratch/test_rhino_mcp.py b/scratch/test_rhino_mcp.pydeleted file mode 100644index 5c24bd9..0000000--- a/scratch/test_rhino_mcp.py+++ /dev/null@@ -1,21 +0,0 @@-import asyncio-from mcp import ClientSession-from mcp.client.sse import sse_client-import httpx--async def test_rhino_mcp():- print('Connecting to Rhino MCP at http://localhost:9876/sse...')- url = 'http://localhost:9876/sse'- try:- async with sse_client(url) as (read, write):- async with ClientSession(read, write) as session:- await session.initialize()- print('Session initialized!')- tools = await session.list_tools()- for tool in tools.tools:- print(f'Tool: {tool.name} - {tool.description}')- except Exception as e:- print(f'Error connecting: {e}')--if __name__ == '__main__':- asyncio.run(test_rhino_mcp())diff --git a/test_e2e.py b/test_e2e.pydeleted file mode 100644index bd8a7cd..0000000--- a/test_e2e.py+++ /dev/null@@ -1,37 +0,0 @@-import urllib.request-import time-import sys-import json-import logging--logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(message)s')--def poll_endpoint(url, name, max_retries=60):- for i in range(max_retries):- try:- req = urllib.request.Request(url)- with urllib.request.urlopen(req, timeout=2) as response:- if response.status == 200:- data = json.loads(response.read().decode())- logging.info(f"{name} is UP! Response: {data}")- return True- except Exception as e:- pass- logging.info(f"Waiting for {name} to start... (Attempt {i+1}/{max_retries})")- time.sleep(5)-- logging.error(f"{name} failed to start or load the bridge add-in after {max_retries*5} seconds.")- return False--if __name__ == '__main__':- logging.info("Starting E2E Bridge Polling...")-- revit_up = poll_endpoint('http://127.0.0.1:3000/health', 'Revit Bridge (Port 3000)')- navis_up = poll_endpoint('http://127.0.0.1:3002/health', 'Navisworks Bridge (Port 3002)')-- if revit_up and navis_up:- logging.info("SUCCESS: Both Revit and Navisworks bridges are actively running and responding to the MCP Hub.")- sys.exit(0)- else:- logging.error("FAILURE: One or both bridges did not come online.")- sys.exit(1)