3D Sticky Notes Holder Using Tinkercad Codeblocks

by epresent in Workshop > 3D Printing

1174 Views, 12 Favorites, 0 Comments

3D Sticky Notes Holder Using Tinkercad Codeblocks

Lazy Susan Sticky Note Stand.gif
IMG_9873.JPG
IMG_9889.JPG
IMG_9888.JPG
IMG_9887.JPG
IMG_9886.JPG
IMG_9881.JPG
IMG_9877.JPG

Autodesk has recently added a new feature in Tinkercad called codeblocks. The codeblocks feature allows you to create 3D models and shapes using a block-based programming language. The codeblocks are super easy to learn and are a great and fun way to make your models. One example of a pro of using codeblocks includes using variables for dimensions of objects. Codeblocks are a great way of making models with different variations since it is super easy to change a number in a variable to change the dimension of an object.


In this tutorial, you will learn how to make a sticky note holder using Tinkercad's codeblock tool. You can 3D print this sticky note holder, which is a great way to organize the hundreds of sticky notes you have on your desk. On top of that, this design has slots on the side that can attach multiple sticky noteholders. Throughout this lesson, you will also learn how to use the codeblocks tool, so if there is something you don't like on the design, you will be able to change it super easily.

Supplies

  • Sticky Notes
  • Computer with internet access
  • Tinkercad account
  • Ruler
  • 3D Printer (optional)
  • Caliper (optional)

Table of Contents

  1. Step 1: Measurements
  2. Step 2: Login to Tinkercad
  3. Step 3: Getting Familiar with the Layout
  4. Step 4: The Basics of Codeblocks
  5. Step 5: Making the Pole
  6. Step 6: Adding Design to the Pole
  7. Step 7: Creating the Base
  8. Step 8: Adding the Remaining Poles
  9. Step 9: Create Finger Notches
  10. Step 10: Adding Attachments Part I
  11. Step 11: Adding Attachments Part II
  12. Step 12: Duplicating the Attachments
  13. Step 13: Printing 
  14. Step 14: What's Next?

Measurements

IMG_9917.JPG

It is important to get the length and width of a sticky note pad to determine how big to make the base of the sticky note holder. Throughout this project, I recommend working in millimeters so your measurements are more accurate. Plus, the default units in Tinkercad are millimeters.

I used a ruler to measure the dimensions of a sticky notepad. My ruler is in centimeters, so I needed to multiply by 10 to get the dimensions in millimeters. I would also recommend taking a caliper if you have one to double-check the measurements.


My sticky note pad is about 80 mm for both the length and the width (rounding up). It is important to round up to give the sticky notes enough wiggle room. I found that 80 mm gives the sticky notes enough wiggle room without making it look like the base is too big.


*Note: the perspective of the image might distort the image.

Login to Tinkercad

Screen Shot 2021-10-10 at 5.37.39 PM.png
Screen Shot 2021-10-10 at 5.37.39 PM copy.png
Screen Shot 2021-10-10 at 5.42.38 PM.png

Open your web browser on your computer and go to Tinkercad.com. If you have an account, now is the time to log in. If you don't, you can easily create an account by either using your google account or by entering an email address.


Once you are logged in, you will be brought to your dashboard, which should look like the image above. Since we are creating a codeblock, click on the codeblock tab in the left menu, then click Create new Codeblock.

Getting Familiar With the Layout

Screen Shot 2021-10-10 at 5.45.29 PM.png


Once you clicked on Create new Codeblock, you may be prompted with a design box. Simply click the blue button at the top right corner that says New Design.


The first thing you should do is rename the file. Tinkercad gives new files a random name. In the top left corner near the Tinkercad logo, you will see the file name. Click the file name to rename it to Sticky Note Holder.


On the left side of the screen, you will see a menu with different blocks of code. These are the different commands you can use in the code editor. Each block of code has a certain background color that represents its primary goal.

  • dark blue backgrounds = shape blocks
  • purple backgrounds = modify blocks
  • yellow backgrounds = control blocks
  • green backgrounds = math blocks
  • light blue backgrounds = data blocks

There are other blocks, like the comment block, which lets you write a comment in the code. The code editor won't read comment blocks. They are used to tell the reader what a section of code does.

There are also round code blocks. These blocks are usually used to fill another block with input.


In the center of the screen, you will see the code editor. This is where your code goes, and this is where Tinkercad will run your code.


On the right side of the screen, you will see the model window. This is where your shapes will go once they are written in code.


Above the code editor and the model window, there is a slider with the word speed and a play button. The play button will run the code, and the speed button is how fast the code will run. You can try to drag a cube block onto the code editor and push run. Notice how the model window plays an animation to create the shapes. This is where speed comes to play. If you want to "skip" this animation, put the speed on high.


To the right of the play button, there is an export button. Once you are finished with the design, you can export the model as a .stl and 3D print the sticky note holder.

The Basics of Codeblocks

Sticky Note Holder Gif 1.gif


Before we start making the actual sticky note stand, it is important to know the basics of the codeblocks. I recommend dragging a couple of shapes into the code editor and run the code to see what happens. The first thing you should notice is how the shapes are animated. The second thing you should notice is that the shapes are not created flat on the blue workplane. Instead, half of the shape's body is below the plane. I recommend after creating every shape to move the shape up, so the whole shape is above the workplane.


Most shapes have a height component. In order to move a shape so the whole shape is above the workplane, find the move block and drag it below the shape block you created. Move the shape's Z component by half of the shape's height.


To delete code, drag the codeblock to the trash can icon in the bottom right of the code editor. You can drag a group of code that are connected to each other by dragging the first codeblock


I also want to point out that to the right of the picture of the shape on the codeblock, there are two circles. The first circle on the left is the shape's color. To change the shape's color, click on the circle, and different color options will appear. Click on the color you want.

The second circle on the right is the hole circle, which turns the object into a hole. Whole objects create wholes in non-whole objects once they are grouped.

Making the Poles

Screen Shot 2021-10-16 at 7.44.18 AM.png
Screen Shot 2021-10-16 at 12.22.10 PM.png
Screen Shot 2021-10-16 at 3.38.53 PM.png

It is best to start off by making one of the poles first. This way, we can get a sense of how high the object will be and where we should place the base of the object.


Every time you create a new object, you should always start the code off with the

Create New Object block (modify section).

You can rename this as a variable which lets us create clones of that object instantly. Drag the codeblock into the code editor. Left-click where it says the name of the element (by default, it might be object0) and click rename. Rename this object to Pole.


Before we actually start dragging shapes into the code editor, we need to make important variables. Variables can store different numbers. They are useful for editing a shape's dimensions or changing the position of a shape. If a shape is too big, instead of having to change the size of many different shapes, you can just change one number–the variable. On top of that, you can increase or decrease a variable by a certain number which we will use later.

In the math (green) section, you can see all the different codeblocks that deal with variables. We are going to be using the first block a lot. Click and drag the

Create Variable block

onto the code editor. Just like renaming an object, left-click the name and click rename. Name this variable Pole Height and set the number to 25. Repeat this step for the following variables:

  • Pole Length = 13.25
  • Rotate = 0
  • Cylinder Radius = 5
  • Cylinder Position = Cylinder Radius. If you scroll down to the data (light blue) section, you will see round code blocks with the names of the variables you created. You can use these round codeblocks in other codeblocks with numbers as input. Drag the blue codeblock with the name Cylinder Radius into the Cylinder Position.


The base shape of my pole was a square, but the great thing about codeblocks is it only takes one drag of a different codeblock to change the shape. This tutorial is going to use a square as the base shape for a pole.

In the Shapes Section, click and drag a

Box block 

under the variables you created. Click the arrow on the box block to view the dimensions of the box. Scroll down until you get to the data codeblocks. Change the width and length of the square to "Pole Length" and change the height to "Pole Height." Remember, it is best to move a shape up, so it is flat on the workspace before editing a shape. Find the

Move block 

in the Modify section. Move the shape Z component by half of the height of the shape. You can do this by:

  • Scrolling down to the math section of the codeblocks
  • Find the:
Addition block. 
  • By default, it would say "0 + 0."
  • Drag that block into the Z component of the move block
  • Click the + sign, and a drop-down menu will open. Click on the / sign (divide sign).
  • Scroll down to the data codeblocks and drag the Pole Height into the first input section.
  • Change the second input section to 2.


Adding Design to the Pole

Screen Shot 2021-10-17 at 7.43.15 AM.png
Screen Shot 2021-10-17 at 7.58.02 AM.png
Screen Shot 2021-10-17 at 7.57.25 AM.png

Congratulations on making the first pole. The pole will work just fine, but it looks a bit bland. You can cut holes in between the pole to give it some design.

If you like how the pole looks and don't want to add a design to it, then skip this step.


The design we are going to add to the pole is a hole in the shape of a circle that will go all the way through the pole. There are many ways we could do this, but the most efficient way of doing this is with a for loop. A for loop will loop through code a certain amount of times.

Warning: These steps can get confusing. If you are confused, you can download the two videos.


  • Click and drag a
Count With block (control section)
  • Drag this block under the move block you made in the last step.
  • Scroll up to the shapes section. Click and drag a
Cylinder block
  • and place it inside the count with block (the section with the word do). Click the arrow to change the size of the shape. Scroll down to the data (light blue) section and drag the cylinder radius variable into the shapes radius component.
  • Scroll down to the Modify (purple) section. Click and drag a
Rotate block 
  • and place it under the cylinder block. Click the x-axis drop-down menu and select the y-axis.
  • Click and drag a
Rotate block 
  • and place it under the previous rotate block. Click the x-axis drop-down menu and select the z-axis. Scroll down to the data (light blue) section and click and drag the rotate variable and replace the default number (the number you are rotating by). Scroll up to the math (green) section. Click and drag the
"X:0 Y:0 Z:0" (Position) block 
  • and drag it into the rotate block to the right of where it says "from pivot."
  • Click and drag a
Move block 
  • and place it under the previous rotate block. Scroll down into the math section and place an
Addition block 
  • into the z component of the move block. Scroll down into the data section and drag the cylinder position variable into the first number of the math block. Change the second number to 3
  • Move into the math (green) section of the codeblocks, and drag a
Change {variable} by {#} block 
  • and place it under the previous move block. Click on the name of the variable to open the drop-down menu. Change the variable to cylinder position. Scroll to the math section and replace the number with an
Addition block.
  • Scroll to the data section and change the first number of the addition block to the cylinder radius variable. Change the second number to 5.
  • Click and drag a "
Change {variable} by {#}" block 
  • and place it under the previous block. Click on the variable name and change the variable to rotate. Change the value to change the variable by 90.

We are almost done with the design of the pole. If you run the code, the first thing you should notice is that there are too many cylinders. If you look at your count with block, you will see that it says "count with {variable} from 1 to 10 by 1." This means the loop will occur 10 times. Change the 10 to a 3, and then run the code. Next, you need to change the cylinder into a hole. The default color of the cylinder should be orange. There are two circles in the cylinder shape block next to the picture of the shape. Click the second shape block to change it into a hole.

Finally, we need to group the shape. In the modify section, click and drag a

Create Group block

and stick outside the loop (bottom of the loop). I would recommend clicking the color circle (first circle) and change it to one color (not multicolor). Then drag a

move block

to move the shape, so it is not in the way. Move the shape by 33 in the X and 33 in the Y.


Congratulations on finishing the design for the pole. There are many different things you could do if you did not like this design. First, try changing the shape. Instead of using a cylinder, try using a polygon (Note: some shapes don't have a size component, so you would need to use the scale block in the modify section and scale the shape down. You could also try changing the cylinder's radius to make them smaller or bigger. You could also change the number of times the loop runs to add more shapes. Part of the fun of using codeblocks is that doing one thing won't mess up your whole design because you can just delete a codeblock if something is not working. This allows you to try many things. I would recommend just playing with the design and getting something you like.

Creating the Base

Screen Shot 2021-10-17 at 8.11.00 AM.png

Creating the base is super easy. To start off, scroll down in the code editor below the creation of the pole. Remember, the code editor reads from top to bottom. We want to create the base after creating the pole, so we know how high to move the base, so it is resting on the pole.


Start the code by dragging a

Create New Object block. 

Rename the variable to base. Next, we are going to create two variables. Move into the Math section of the codeblocks and drag two

Create Variable blocks 

and put them under the base block you just created.

Rename the first variable to Base Width and change the value to 80.

  1. Rename the second variable to Base Height Position and change the value to 25

Click and drag a

Box block 

from the shape section. Change its width and length to the Base Width variable and change the height to 2. I would recommend changing its color if you have another shape that is red. Finally, we need to move the shape. I would recommend breaking the moving up into two steps.

  1. First, move the shape, so it is resting on the workplane. Rember, you do this by moving the shape's z component by half of its height. Change the z value to 1
  2. Second, move the shape's z component by the Base Height Position variable.


Adding the Remaining Poles

Screen Shot 2021-10-17 at 10.11.47 AM.png

Adding the remaining three poles is super easy because you already created the pole and saved it as a custom object.

Below the base object, click and drag a:

Add Copy of Object block

which can be found in the modify section. Scroll down to the data section and drag the Pole variable into the empty data field of the codeblock. Next, click and drag a

Move block

Change the x coordinates to -66. Repeat these steps two more times.

  • Add a copy of the pole object and move it. Change the x coordinates to -66 and the y coordinates to -66
  • Add a copy of the pole object and move it. Change the y coordinates to -66


Creating Finger Notches

Screen Shot 2021-10-17 at 10.34.48 AM.png
Screen Shot 2021-10-17 at 10.38.05 AM.png

Next, we are going to be creating finger notches. These notches will help you get the sticky notes out of the holder.

These steps will get a little more complicated.

Drag a:

Create New Object block

under the copy of poles, you just made. Rename the variable to Finger Notch. Under the object you just created, drag a:

Box block.

Click the arrow to change the dimensions of the box. Change the width to 1.2, the length to the variable Base Width, and the height to 11. Move the shape up, so it is flat on the work plane. Drag a:

Move block

and set the z component to 5.5.

Next, add a

Round Roof block.

Make the block a hole. Add 2

Rotate blocks
  1. Change the first block to rotate around the Z-axis by 90 degrees
  2. Change the second block to rotate around the Y-axis by 180 degrees

Round roofs don't have a size component, so instead, you will need to scale them down. Drag a

Scale block

which can be found in the modify section. Change the scale values to the following:

  • X = 0.9
  • Y = 0.9
  • Z = 0.9

Next, move the shape up. Drag a

Move block

and change the Z value to 7. Group the object by dragging a

Create Group block.

Finally, move the grouped object. Drag a

Move block

and change the block's components to the following:

  • X = 40
  • Y = 0
  • Z = Base Height Position Variable


Next, we need to add a copy of this object to surround the base. Under the finger notch object you made, drag a

Add a copy of Object block.

Change the variable of the block to Finger Notch. Drag a

Move block

and change the X value to -80. Drag another

Add a copy of Object block

and change the variable to Finger Notch. Drag a

Rotate around block

and change the axis to the Z-axis and rotate the shape by 90 degrees.


After you run the code, you should notice something. You only duplicated the finger notch object two more times, yet it created four total objects. Codeblocks read from top to bottom, and it does not really matter that much if blocks are attached. Since nothing is in between the creation of the first finger notch and the copied objects, codeblocks thinks that copying the finger notches is a part of the first creation. Before it creates the third finger notch object, it already creates two finger notches that are on opposite sides of each other. This feature allows us to simplify code. If you are not trying to do this, then you can drag a

Create New Object block

in between the creation of the first finger notch and the clones. You don't have to rename this variable. We will use this idea later on.

Adding Attachments Part I

Screen Shot 2021-10-17 at 3.50.40 PM.png

Something cool we can add to the design is the option to attach other sticky note stands. This way, you can print multiple stands and have them sit next to each other.

Click and drag the

Create New Object block

and rename it to Combine Stand I. Drag a

Box block

and change its dimensions to the following:

  • Width = Pole Length variable.
  • Length = Pole Length / 2
  • Height = 10

Next, add two

Move blocks

and change them to the following data:

  • Change the first move block's z component to 5, so the shape is flat on the workplane.
  • Change the second move block's x component to 33 and the y component to 43.

Drag a

Cylinder block

and change its dimensions to the following:

  • Radius = Pole Length / 4
  • Height = 10

Drag two

Move blocks

and change them to the following data:

  • Change the first move block's z component to 5, so the shape is flat on the workplane.
  • Change the second move block's x component to 33 and the y component to 48.

Finally, group this object together by dragging a

Create Group block.

Remember to change the color of the grouped object, so it is not multicolored.

Adding Attachments Part II

Screen Shot 2021-10-17 at 3.59.32 PM.png


Next, we are going to design the object that the sticky note stand can slide into.

Drag a new

Create New Object block

and change the name of the object to Combine Stand IIDrag a

Cylinder block

and make it a whole. Change the dimensions to the following:

  • Radius = Pole Length / 4
  • Height = 10

Using two

Move blocks

move the shape to the following data:

  • Change the first move block's z component to 5, so the shape is flat on the workplane.
  • Change the second move block's x component to 33 and the y component to 48.

Next, create a cube by dragging a

Box block

and change its dimension to the following:

  • Width = Pole Length
  • Length = Pole Length / 2
  • Height = 10

Using two

Move blocks

move to shape to the following data:

  • Change the first move block's z component to 5, so the shape is flat on the workplane.
  • Change the second move block's x component to 33 and the y component to 50.

Finally, group this object by using a

Create Group block

and change the color of the group, so it is one color. Use a

Move block

to move the shape out of the way. Change the Y value to -93. Keep the other values as 0.

Duplicating the Attachments

Screen Shot 2021-10-17 at 4.18.05 PM.png

We are almost done with the sticky note holder. The last step is to duplicate the attachment blocks we just created in the last two steps.

Remember when you were creating the finger notches, you only needed to create three copies of the object because there was nothing separating the blocks used to first create the notch and the blocks used to clone the notch. This time, we want to create four individual objects, so we need something to separate the blocks.

Click and drag a

Create New Object block.

You don't need to rename this because we are not going to be using it.

Click and drag an

Add Copy of Object block

and change the data to the Combine stand I variable. Drag a

Move block

under that and change the X coordinate to -66.

Click and drag an

Add Copy of Object block

and change the data to the Combine stand II variable. Drag a

Move block

under that and change the X coordinate to -66.

Printing

Screen Shot 2021-10-17 at 4.20.41 PM.png
Screen Shot 2021-10-17 at 4.21.12 PM.png
Screen Shot 2021-10-17 at 4.23.48 PM.png
Screen Shot 2021-10-17 at 4.32.35 PM.png
Screen Shot 2021-10-17 at 4.33.52 PM.png
Screen Shot 2021-10-17 at 4.27.14 PM.png
Screen Shot 2021-10-17 at 4.34.43 PM.png
Screen Shot 2021-10-17 at 4.35.34 PM.png
Screen Shot 2021-10-17 at 4.38.06 PM.png
Screen Shot 2021-10-17 at 4.44.53 PM.png

I have a Prusa Mini, so the following steps are going to be what I did to print this.

  1. In the top right corner, next to the play button, you will see an Export button.
  2. Click the export button, and then click .STL to export the file as an STL file.
  3. Open your slicer (in my case Prusa Slicer)
  4. Drag you .STL file into the slicer
  5. You will need supports for this print. I would recommend changing the orientation of the object before you print. That way, you will use less material. While you are in Prusa Slicer, click the F key on your keyboard to select the face of an object and select the top face (where the sticky notes normally go). This will move the face you selected to lay on the bed of the printer.
  6. Before you can add supports, there are a couple of settings you need to change.
  7. In the top right of Prusa Slicer, there are some settings for your printer and material. Below your printer name, there is a menu title supports. Click the dropdown menu and enable "for support enforcers only."
  8. A pop-up window will appear asking to change some settings. Click on Yes.
  9. In Prusa Slicer, click on Print Settings at the top of the screen.
  10. Click on Support Material
  11. Uncheck "Don't Support Bridges."
  12. Head back to the 3D model in Prusa Slicer by clicking Plater at the top.
  13. Move the camera angle to view the bottom of the 3D model. Select the model and on the left of the screen, click on the "Paint-on supports" (push the L key for a shortcut)
  14. Change the brush size to 5 and draw a line from one side of the sticky note stand to the other. Repeat this step for the neighboring side. You should have made a plus sign in the middle of the stand.
  15. Slice the 3D model and export it to your printer.


What's Next?

Congratulations on finishing this tutorial. You have successfully created something using Tinkercad's Codeblocks.

What's Next?

There are many different things you do now. You can change the design by either using different shapes.

Or you can try to remix the design and make a stand for a different size sticky note.

Remember, Tinkercad Codeblocks is all about having fun and trying different things. If something does not work out, then just keep trying until it does.