algorithmic-patterns
L-systems, cellular automata, agent-based modeling, swarm intelligence, reaction-diffusion, growth algorithms, packing…
Python for Rhino and Grasshopper (RhinoCommon, rhinoscriptsyntax, ghpythonlib), C# for Grasshopper components, Python for Revit (pyRevit, RevitPythonShell), JavaScript for web 3D (Three.js), and code patterns for AEC computational design
$ npx -y skills add Abhinavbwj/Claude-skills-for-Computational-Designers --skill scripting-reference --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/scripting-referenceContext preview
The summary Claude sees to decide when to auto-load this skill.
Python for Rhino and Grasshopper (RhinoCommon, rhinoscriptsyntax, ghpythonlib), C# for Grasshopper components, Python for Revit (pyRevit, RevitPythonShell), JavaScript for web 3D (Three.js), and code patterns for AEC computational design
title: Scripting Reference description: Python for Rhino and Grasshopper (RhinoCommon, rhinoscriptsyntax, ghpythonlib), C# for Grasshopper components, Python for Revit (pyRevit, RevitPythonShell), JavaScript for web 3D (Three.js), and code patterns for AEC computational design version: 1.0.0 tags: [scripting, Python, C-sharp, JavaScript, RhinoCommon, rhinoscriptsyntax, Three-js, pyRevit, code, programming] auto_activate: true user_invocable: true invocation: /scripting-reference
Visual programming environments like Grasshopper, Dynamo, and Marionette have democratized computational design for architects and engineers. But they hit hard walls in practice:
| Level | Tool | Difficulty | Use Case | |-------|------|------------|----------| | Entry | rhinoscriptsyntax (rs) | Easy | Quick automation, batch ops, simple geometry | | Intermediate | RhinoCommon (Python) | Medium | Complex geometry, intersections, analysis | | Intermediate | GhPython | Medium | Custom GH components, data tree manipulation | | Advanced | C# in GH | Hard | Performance-critical components, custom .gha | | Advanced | pyRevit / Dynamo Python | Medium | Revit automation, BIM scripting | | Advanced | Full .NET (C#/F#) | Hard | Production plugins, commercial tools | | Specialist | Three.js / WebGL | Medium | Web viewers, interactive presentations |
**Python** — Use when:
**C#** — Use when:
**JavaScript/TypeScript** — Use when:
Feature Python C# ───────────────────────────────────────────────────────────── Typing Dynamic Static Speed 1x (baseline) 10-100x REPL Yes (interactive) No (compile required) GH Component GhPython node Scripting / Visual Studio Learning curve Gentle Steeper Error detection Runtime Compile-time Deployment .py files .gha / .dll External libraries pip (huge ecosystem) NuGet (large ecosystem) Data science Excellent (numpy, pandas) Good (MathNet, ML.NET) String handling Superior Adequate Memory management Automatic (GC) Automatic (GC) Multithreading GIL limitation Full parallel support
---
The `rhinoscriptsyntax` module (imported as `rs`) wraps RhinoCommon in friendly, high-level functions. It is the fastest way to automate Rhino.
import rhinoscriptsyntax as rs
# Points
pt = rs.AddPoint(0, 0, 0)
pt2 = rs.AddPoint([10, 5, 3])
# Lines
line = rs.AddLine([0,0,0], [10,0,0])
line2 = rs.AddLine(rs.GetPoint("Start"), rs.GetPoint("End"))
# Polylines
pts = [[0,0,0],[5,0,0],[5,5,0],[0,5,0],[0,0,0]]
pline = rs.AddPolyline(pts)
# Curves
crv = rs.AddCurve(pts, degree=3) # NURBS curve
interp = rs.AddInterpCurve(pts) # interpolated through points
# Circles and Arcs
circle = rs.AddCircle([0,0,0], 5.0)
arc = rs.AddArc3Pt([0,0,0], [10,0,0], [5,5,0])
ellipse = rs.AddEllipse([0,0,0], 10, 5)
# Rectangles
rect = rs.AddRectangle([0,0,0], 10, 5)
# Surfaces
srf = rs.AddSrfPt([[0,0,0],[10,0,0],[10,10,0],[0,10,0]])
pipe = rs.AddPipe(crv, 0, 1.0)
loft = rs.AddLoftSrf([crv1, crv2])
extrusion = rs.ExtrudeCurveStraight(crv, [0,0,0], [0,0,5])
revolve = rs.AddRevSrf(profile_crv, axis_line)
# Meshes
mesh = rs.AddMesh([[0,0,0],[1,0,0],[1,1,0],[0,1,0]], [[0,1,2,3]])
# Solids
box = rs.AddBox([[0,0,0],[10,0,0],[10,10,0],[0,10,0],
[0,0,5],[10,0,5],[10,10,5],[0,10,5]])
sphere = rs.AddSphere([0,0,0], 5.0)
cylinder = rs.AddCylinder([0,0,0], [0,0,10], 3.0)
cone = rs.AddCone([0,0,0], [0,0,10], 5.0)
# Text and annotations
text = rs.AddText("Building A", [0,0,0], height=2.0)
dot = rs.AddTextDot("Label", [5,5,0])
leader = rs.AddLeader([[0,0,0],[5,5,0],[10,5,0]])
dim = rs.AddLinearDimension([0,0,0], [10,0,0], [5,2,0])# Selection
objs = rs.GetObjects("Select objects")
obj = rs.GetObject("Select one curve", rL-systems, cellular automata, agent-based modeling, swarm intelligence, reaction-diffusion, growth algorithms, packing…
Revit API fundamentals, Dynamo for Revit, pyRevit framework, IFC schema and openBIM, model checking, automated documentation,…
Python calculators for geometry analysis, structural checking, solar calculations, panel optimization, mesh analysis, material…
Auto-activating foundation layer providing computational design paradigms, key pioneers, tools landscape, core concepts, and…
NURBS curves and surfaces, mesh geometry, boolean operations, subdivision surfaces, tessellation methods, surface analysis, and…
GIS integration, sensor data, occupancy analytics, space syntax analysis, urban data analytics, climate data processing, and API…