Kokopelli: Creating Living Hinge

Kokopelli is an opensource modeling package.

Step 1: Create Driving Parameters

Start kokopelli

Import Shapes, this is already there when open

from koko.lib.shapes import *

Set units, for this case units are in inches and lh to none creating a null variable.

cad.in_per_unit= 1 # units are in inches
lh = None

Set driving parameters. For living hinge there are a few driving parameters listed below. This will make the model parametric and able to change the size of the living hinge.

#Driving parameters
esw = .25 #Empty space thickness esl = 3. #Empty space length wt = .25 # Web thickness nb = -2 #number of empty spaces below to origin na = 3 #number of empty space above the origin les = -6 # Half the number of colums to the left of the origin
res = 6 # Half the number of colums to the right of the origin w = 8. h = 6.

Note: Kokopelli interperts a number without a decimal as an integer.

Step 2: Create Empty Spaces

This step shows how to create the empty spaces to make the board flex. This example the with is .25 in and the height is 3. in. Round the top and the bottom space to desired roundness.

es = rectangle(-esw/2,esw/2,-esl/2,esl/2)
es += move(circle(0,0,esw/2),0,esl/2)
es += move(circle(0,0,esw/2),0,-esl/2)

To veiw the empty space place ""

Step 3: Offset and Duplicate Empty spaces

This step shows the duplication and offset of the empty spaces. The offset spaces give the flexibility of the living hinge.

#Copies the empty space in the vertical diection
est = es #empty space temporary
for i in range(nb,na):
es += move(est,0,i*(esl+esw+wt),0)

Offset the empty spaces with the code below.

#Create an offset of the original empty spaces
est = es
for i in range(2): #offset empty spaces
   es +=move(est,esw+wt,esl/2+esw)

Duplicate the empty space colums.

#Creates Duplicates of the columns of empty spaces
est = es #empty space temporary 
for i in range(les,res):
    es += move(est,2*i*(esw+wt),0)

At this point the virtual living hinge should look like the below picture. Notice the empty spaces are not empty spaces at this point.

Step 4: Size the Living Hinge

Create the size of the living hinge. Now it is time to subtract the empty spaces from the actual living hinge. Make sure the size of the hinge is less than the empty space dimensions or the hinge will not flex. Note: Comment the "cad.shape = es" to view the living hinge as shown in the code below.

#size the border (1/2*esw+wt)*
lh = rectangle(-w,w,-h,h)
lh -=es

cad.shape = lh
#cad.shape = es

Step 5: Example

I used the code to machine living hinge on the Shopbot. The width of the slots werw .26 inches, needed to be larger than cutter which was .25 in. Below is Chris showing the flexibiliy of the 3/4 in plywood.

Please provide feedback to make the tutorial better and/or share your experiences.

Happy Cutting!

Tutorial by Terence J Fagan - Last Updated March 2014