How to make a snowflake in tinkercad codeblocks [Expert Review]

Table of Contents

Last updated : Sept 26, 2022
Written by : Retha Sosnowski
Current current readers : 9149
Write a comment

How to make a snowflake in tinkercad codeblocks

Did you find this article relevant to what you were looking for?

Write a comment

How to make a snowflake in tinkercad codeblocks

Comment by Buford Reinowski

hi i'm rachel donegan i am the howe libraries emerging technologies librarian and i am here to show you how to make something every week this is how makers hi everybody and welcome back to how makers today i am in studio h and i wanted to share with you a new project that i am really excited about um i recently was able to take a webinar with a teacher named rob morrell and he is really into tinkercad and another thing he's really into is tinkercad code blocks so this is tinkercad but instead of dragging in shapes and arranging them you write block-based code and then the program puts the code together and makes a shape for you it's really cool i wanted to share it with you i'm a beginner with code blocks for sure and in general with coding but i wanted to show you this really cool project this is something that you can do at home you can make a free account with tinkercad you can send me your file and i will print your project for you and sometimes there's a small fee depending on how big the project is anything under 10 grams is free so you have nothing to lose you can send me an stl file and i will print it on the 3d printer so this is the project that i made right here and i'm going to show you how i created this in code blocks and i'm also going to introduce you to our ultimaker 3d printer okay so here we are in tinkercad and i'm signed into my account and i'm going to go over here to code blocks click on that and we are going to create a new code block okay so this part if you've played with tinkercad looks probably pretty familiar this is your work plane here and these are your blocks that you're going to build a program with right in here so if you've used scratch before this will look kind of familiar your blocks are over here you build your scripts here and then whatever it is that you're building is going to show up here so let's try it out first thing we're going to do is create a variable right here and we're going to change the name to rotation degrees okay and then we are going to bring out our repeat and i'm going to repeat 12 times and because i'm going to make a snowflake i'm going to bring out an object this one here you can hear the 3d printer starting up in the back there so this when you drag it out it looks like this but you can click on this little carrot here and you get some more options so and if you wanted to make it into a hole you would click over here but of course we don't want to do that right now we can change the color if we want it doesn't look very snow flaky though let's do something snow flaky um so our radius is going to be 35 sides six sort of a hexagon based 2.0 16 steps and then we're going to move so what we're doing is we're making one we're going to move it and then rotate around a pivot point so this will make sense in a minute we'll make the y 45 so it's just going to move it up in the y direction 45 millimeters and then we get to rotate this is the fun part actually before we do that let's play the program and see what we have so far i'm actually going to take out the repeat block there we go so we're just going to run this part and see what we have so far so to run the program you have to click this play button up here and here you can toggle the speed at which this happens so we'll go about the mid speed and just watch over here on the right to see what happens there we go so we created this hexagon and then slid it upward so we're going to add some more things to our to our block here we're going to rotate and we want to rotate around the z axis because we want this thing here and you can see the axis right here there's a green is the y red is the x and blue is the z axis it goes up and down in space and you can think of this as sort of a clothesline and if you rotate around it it's like winging things around a clothesline or a tetherball court so our tetherball pole in this case so this is going to rotate around this green pole right there and we want to rotate it by our rotation degrees and the pivot you do have to fill this in i found out the hard way i thought you could just leave it blank but you know you cannot you must put something in there and so zero oh you scroll over so you can see this better zero zero zero just means the very center of our work plane and then we need to let's see what actually happens what happens let's see what happens when we play this program as we have it so far so i'm going to clear the work plane and i'm going to come back here so that we can see it straight on and i'm going to hit play again so you can see it's making lots of copies of this hexagon and they're not rotating yet because we're not changing the rotation so we're going to do that next stop that and clear the plane clear the work plane and we're going to change i'm going to change that notation degree by 30. so we have 30 degree shift every single time okay so next we're going to add this create group which is just going to meld everything together into a printable unit so let's see what happens and so this is just a simple hexagon and because it's rotating and overlapping and i'm doing nothing right now the program is just running but you can see in the middle you can see what it's doing it's kind of scrolling through the different parts of the program and because i told it to loop 12 times it's going to do this 12 times and then that last little flash was the group so once it was done repeating 12 times as you can see up here it does all this 12 times then it creates a group it just welds everything together so now we can export this and we can export it as an stl if we just want to print it we can even export it as an svg if we want to put it in a laser cutter or we can ex we can export it as a part which this is very interesting if you if you export it as a part you can bring it into regular tinkercad and you can add it to other things that you've made in sort of traditional tinkercad so say you made a building in tinkercad you could make this be a window in tinkercad say in your house so that's pretty cool that's pretty powerful so we are going to just export it as an stl for now and that is it there we go so we're going to open it with cura which actually let's just go ahead and do that oh one thing i did forget to do hold on go back you want to change the name of it tinkercad gives your files sort of these goofy names um i'm going to call it snowflake for video then i'll know but this is the snowflake we made for this video hit return now we can export stl and we're going to open it with kira so kira is the slicing software that we use with actually a lot of people use it it was created i believe for ultimaker printers which is what we have but a lot of people use cura to slice their models so you design something and it is an stl or an obj in our case we use stls and what happens is you bring it into cura to slice it so what that does is it takes the stl and converts it to g-code which is the language that the printer actually understands the printer actually isn't all that smart the computer does sort of the work of designing and you do the work of designing and the printer

Thanks for your comment Buford Reinowski, have a nice day.
- Retha Sosnowski, Staff Member

Comment by rosochaC

hi so what we're going to do today is design a snowflake to be laser-cut using Tinkercad code blocks setting so once you've logged into Tinkercad go to your dashboard and click code blocks on the left hand side then click create new code block and the plan is to get to a nice blank new window create a new design and you've got a big blank screen here so over here on the right is where your design will be this big blank bit in the middle is for your code and on the left is all the different code blocks that you can use to drag together to make an interesting shape so the first thing that I'm going to do is create the center of my snowflake by creating a new object and so that I remember what all these different parts of the project are I'm going to rename it Center I think that my snowflake should have a star in the middle so I'm going to choose a star and connect it up here like this and then click Play and you can see what the star looks like so the laser cutter cuts things out of a flat piece of material which means that rounded shapes that are different at the bottom to the top are not going to work for this project so this paraboloid and this rounded roof is not going to work to help you see what the laser cutter is going to see you can change the perspective by using this little box here to view it from the top and you can also change the perspective slightly to make it flat instead of perspective just changes it a little bit and makes it a bit more flat looking so because we're going to be cutting this out of material on the laser cutter we start with a flat piece of material that is three millimeters thick so it'll make it easier to see what's going on with our design it makes sense to make all the parts of that line also be three millimeters thick because I know that they're all going to be the same and I can use the math blocks to create a variable and I'm going to we name this variable Fitness I'm going to set that thickness equal to three so that this means we can use this variable and we can tell things to be all be exactly the same so we've got a star which we see over here and you've got more options to this star if you click this little arrow button here we've got things to change its shape and size so the thing I'm gonna change first is the height of it so instead of being 10 millimeters thick I want it to be 3 instead of typing 3 and I'm gonna use this day to the block so our new variable Fitness has now shown up here and you've got a pop that in there our height is now going to be equal to the thickness which is 3 instead of what it originally was of 10 millimeters so just writing 3 in here we'll do the same job but it means to be able to change the thickness you'll have to go into every shape and change every time so because we know they all want to be 3 this variable just makes it a bit easier to see what is going on um our star is currently still 10 millimeters thick because it doesn't change until we run our code run our change code if I press play now it will change the height to be 3 millimeters instead of 10 you can see there it is much thinner than it was before I'm gonna put a perspective back to how it was and changed a few other things to do the star I'm gonna give it 6 sides instead of 5 because I think that will look a bit nicer and I'm also gonna change the radius so the radius is the distance between the middle point and one of the outer corners and it's currently 20 millimeters which is 2 centimeters which i think is quite large so the centre of a snowflake so if I change it to 12 a little bit more than 1 centimeter and it's just going to be a little bit of danger making easier to add things to it afterwards so for my next step I'm going to wrote hate this started one of the spokes is pointing directly upwards just because it's gonna make my life easier later when I start adding some spokes to it so over here on the modify section I've got a rotate block so let's see what happens if I just run this block as is we get our star it rotates it but it's rotating it in a different direction so one wanted to using a different axis to rotate and round so let's change from X to Y and see what happens again it's gone in the wrong direction so now let's try that and see what it does here yeah so that is going to keep things on the work plane keep them nice and flat how we want them for the laser cutter instead of the other two which is going to make it come off at different angles I think 90 you also follow it further round that I needed to so I'm gonna change my angle to make it not do any unnecessary work and I'm going to show you you can change the speed up here after how quickly it runs your code so that is much quicker than it was before so as you add more and more code it's going to take longer and longer to check your changes so upping the speed means you can get to the end a little bit later the final thing that I'm going to do to the center of my snowflake is add a hole in the middle just for fun really but also you could put a string through it so you can hang it somewhere so to do that I need to add a new shape into my object I'm going to pull over a cylinder she's going to give me a nice round Center so let's see what it does when I run that code we've got quite a large cylinder there so it's a lot wider than we want it and it's also a lot taller than we want it so let's expand the options and we can make the height the thickness again so that is in the data blocks so that's going to and make sure that it's not too tall it looks pretty good and I'm gonna change the radius so that it's not cutting out all of the Skoll of the and stuff so let's try making it six so that's half the size of the radius let's have a look at that that looks like it might work but if you look closely you can see that it's going to cut each of the spokes of my star away from each other we'll have lots of individual triangles which is not very useful so let's change the radius make it a bit smaller that looks more like it will also make it a hole instead of a solid shape okay we're almost there except that they're still two entirely separate objects so the last thing that I need to do to combine these two shapes together is create a group which was in the modified men menu so this is going to make the cylinder and the star become the same shape and cut that hole out of the star so let's press play there we are perfect we've got the center of our snowflake I'm going to start working on the spokes of my snowflake now and I don't want anything that I do to the spokes to affect the center because I'm quite happy with the center so I'm going to create a new object and this one is going to be my spoke so I'm going to choose a shape to start my spoke I might have a cylinder and we can change all of the options the same way we did before gonna make that a bit smaller than the hole and I'm going to change the thickness now this is gonna put your new shape right in the center which isn't quite where we need it but luckily there is a move block that we haven't used yet so I'm gonna move this a little bit away from the center and we've

Thanks rosochaC your participation is very much appreciated
- Retha Sosnowski

About the author

How to make a snowflake in tinkercad codeblocks

All you ever wanted to know

about "How to make a snowflake in tinkercad codeblocks".

How to make a snowflake in tinkercad codeblocks

Try Not to laugh !

Joke resides here...


Follow Us on Social Media

How to make a snowflake in tinkercad codeblocks

How to make a snowflake in tinkercad codeblocks