import math import rhinoscriptsyntax as rs import Rhino.Geometry as rg # Parameters for panel design panel_width = 20 # Panel width in feet panel_height = 10 # Panel height in feet thickness = 0.5 # Thickness of the panel in feet num_bamboo_strips = 6 # Number of vertical elements resembling bamboo bamboo_variation = 2 # Variation in the width of the bamboo strips # Geometry containers facade_panels = [] # Create the outer boundary of the panel (rectangular) panel_corners = [ rg.Point3d(0, 0, 0), rg.Point3d(panel_width, 0, 0), rg.Point3d(panel_width, panel_height, 0), rg.Point3d(0, panel_height, 0), rg.Point3d(0, 0, 0) ] panel_boundary = rg.Polyline(panel_corners).ToNurbsCurve() # Create bamboo-like vertical elements with organic variation for i in range(num_bamboo_strips): # Calculate positions and variation for each strip x_pos = (i + 1) * (panel_width / (num_bamboo_strips + 1)) width_variation = (i % 2) * bamboo_variation # Alternate wide and narrow strips strip_width = 1 + width_variation # Create the bamboo strip using a polygonal form (no curves) strip_corners = [ rg.Point3d(x_pos - strip_width / 2, 0, 0), rg.Point3d(x_pos + strip_width / 2, 0, 0), rg.Point3d(x_pos + strip_width / 2, panel_height, 0), rg.Point3d(x_pos - strip_width / 2, panel_height, 0), rg.Point3d(x_pos - strip_width / 2, 0, 0) ] strip = rg.Polyline(strip_corners).ToNurbsCurve() # Extrude the strip to create the thickness strip_extrusion = rg.Extrusion.Create(strip, thickness, True) facade_panels.append(strip_extrusion) # Output geometry for the panel a = facade_panels