## Introduction: MAT 594X_Parametric Lamp Shade

Continuing on from the previous instructable. Designed 3 versions of the lamp shade with 3 different patterns. Printed and mounted the LED lamp shade.

## Supplies

Creality Ender 3, Cura, Grasshopper 3D, Rhinoceros, Weaverbird Library (for GH)

## Step 1: Adjusted the Support Structure Setting

Due to the intense density of the support structure in my previous print, it was impossible to peel off the structure.

In Cura settings, I lowered the density from 20% to 10%, et voila!

I designed the bottom radius such that it would fit my tiny LED lamp with cute little feet!

See the snapshot of my GH patch. Requires Weaverbird Library.

## Step 2: Exhausting the Voronoi Cliché

I know it is an overused idea, but it was the low hanging fruit and I could not help!

See the GH code snapshot.

There are some problems on the edges that can be seen in the photos. This is due to the code, not the printing. This was the way I figured out how to implement the voronoi algorithm. It is probably not the best way.

But, as a summary:

- I created a
**bounding box**around the base geometry - Created a 3D voronoi partition in this box, using the
**voronoi3D**component - Got the intersection between the box and the base geometry using
**BREP intersection**component. this gave me the voronoi curves on the surface of the base geometry. (This is the part that can probably be done different. Preferably with a higher level component) - Then I scaled them down and
**weaved**together the original cells with the**scaled cells and lofted**them. This gave me surfaces from the voronoi cells. The edges of the overall geometry is problematic and not properly offset, because instead of offsetting each curve, the procedure I created offsets the "cells". I tried to access these curves using list item component and offset them "manually', but it did not work. - Anyway, the rest is pretty
**standard mesh operations**using the WB (weaverbird) library.

## Step 3: Yet Another Pattern!

This is one of the patterns from the 2.5D pattern project (see my 1st instructable!).

**Coding**

I was finally able to morph this pattern onto my desired surface using **surface morph** component. The reason it worked this time was that I **reparameterize **the base surface. (Simply right click on it, and pick "reparameterize").

Below is from McNeel's GH Documentation site

The parameters values of the objects recalculate so that the parameter space of the objects is roughly the same size as the 3-D geometry of the objects.

Poorly parameterized objects may not intersect and trim properly when combined with other objects. "Poorly parameterized" means the curve's domain or the surface's u- or v- spaces are tiny or huge compared to the size of the object.

See the code at the end of the document for the custom python script that creates the pattern. Many thanks to Jennifer Jacobs for this code.

///////////////////

**Printing**

Ok, even though I used exactly the same settings as step 1, this time, the support structure tended to fuse with parts of the object where the pattern is more dense. I need to figure put a better solution to the support structure problem. It is not a very 'clean' print.

///////////////////

import rhinoscriptsyntax as rs import math pt = [] dx = (p2.X-p1.X)/(rx-1) ry = int(0.5 + (p2.Y - p1.Y) / dx)</p><p>for i in range(0, ry + 1): for j in range(0, rx): x = p1.X + j * dx y = p1.Y + i * dx if(mtype == 0): if((i*i - j*j) % mod) == 0: pt.append(rs.CreatePoint(x, y, 0.0)) elif(mtype == 1): if((i*i + j*j) % mod) == 0: pt.append(rs.CreatePoint(x, y, 0.0)) elif(mtype == 2): if((i*j) % mod) == 0: pt.append(rs.CreatePoint(x, y, 0.0)) else: if((i * j + j + i) % mod) == 0: pt.append(rs.CreatePoint(x, y, 0.0)) a = pt</p><p>def dist2(p0, p1): return (p0.X - p1.X) * (p0.X - p1.X) + (p0.Y - p1.Y) * (p0.Y - p1.Y) + (p0.Z - p1.Z) * (p0.Z - p1.Z) ln = [] d2 = dist * dist for j in range(0, len(pt)): for i in range(0, len(pt)): if(dist2(pt[i], pt[j]) < d2): ln.append(rs.AddLine(pt[i],pt[j])) b = ln</p>

## Comments

2 years ago

These lamp forms are really nice! I also had issues with support structure on my print, although my issues were due to my geometry not being very physically viable. Thanks for sharing!