COORDINATES


Thoughts & News From The Polar 3D Team

Viewing entries tagged
blockscad

January EDU Project: Fractal Tree In The Forest

Comment

January EDU Project: Fractal Tree In The Forest

Welcome to the first EDU project of 2017 by our own Dr. David Thornburg! Winter is still in full effect, but hopefully this project will have you thinking about a verdant, green tree on a beautiful spring day. Without further adieu, here's Dr. Thornburg's Lesson...


Followers of this blog are no strangers to BlocksCAD, and this is the tool we'll be using today. The best way to access BlocksCAD is through its own site: www.blockscad3d.com

Recursion

Good programming languages (like BlocksCAD) support recursive programming. Instead of looping a single set of commands, a recursive module uses replicas of itself as a part of the module definition. Once a module is called, the values of variables are local to that instance of the module. The result is the ability to create complex objects that can't be made with simple loop instructions.

In celebration of this capability, we'll create a famous recursive structure, a fractal tree. Fractals are complex structures in which any part of the structure is a replica of the structure as a whole. An entire branch of mathematics (chaos and complexity theory) is devoted to the exploration of these structures.

Consider a tree, for example, branches are similar to each other, but their size changes as smaller branches grow out of larger ones.

A similar pattern is found in ferns where the whole structure is similar to the smaller parts that make up the plant.

I became so engaged by these structures that I wrote a couple of books on the topic back in the 1980's: Discovering Apple Logo : An Invitation to the Art and Pattern of Nature, Addison Wesley, 1983.

The language I wrote about, Logo, supported recursion so it was a natural choice. Of course, in those days, the graphics were low resolution 2D images on an Apple II computer ― a far cry from what we can do with BlocksCAD and a 3D printer today.

BUILDING OUR TREE

As our tree is being built, the size and length of branches will change, just as they do with real trees. We start by creating a set of global variables used in our structure.

Next we define a recursive module called tree. This module uses three local variables ― the starting branch length and width and the depth (number of levels) of the tree. These three variables will have their local values changed during use of the module. All other variables will keep their global values.

There are two things to notice in this module. First, you'll see that we don't use the Centered option for the cylinder. This makes it easy to get all the branches connected. Second, the cylinder is tapered from its previous radius at the bottom to the new one at the top ― just like the branches of many real trees.
Once this module has been created, we can create our final instructions.

When this BlocksCAD program is run, it produces the following tree. I changed the rendering color by clicking on the Render window box with the color swatch and choosing green as the new color since it looks more tree-like. Of course the color of your printed object will be chosen by the filament you use.

Here's our printed tree.

This tree also looks like a stalk of broccoli. You should do some research to see why this is.

Comment

December EDU Project: Hot Tub + Hour Of Code

Comment

December EDU Project: Hot Tub + Hour Of Code

As the chilly winter weather sets in across the nation, we thought this would be a welcome subject for this month's Thornburg EDU Project. At the end of this month's EDU Project, we've got a challenge in conjunction with the #hourofcode initiative, so be sure to check that out as well! Now, on to Dr. Thornburg's lesson!

Background

Hot tubs are relaxing! They come in a wide variety of models, but the main concepts are the same. Unlike swimming pools, hot tub users generally just sit and relax in warm water with small jets blowing bubbles and water streams on your back. After a half-hour, you emerge from the tub well relaxed with aches in your joints pretty well dissipated. The therapeutic value of hot tubs is why they are in training rooms for athletic teams, but a lot of people have installed hot tubs in their homes.

Hot Tub Image Source: Morguefile

Hot Tub Image Source: Morguefile

This project involves the design and building of a hot tub suitable for inclusion in a doll house. This project involves a lot of mathematics, and even explores the concept of water pressure. While it doesn't have any jets in it, you can add those if you want, and make a nice place for your fingers to relax, since our model is pretty small. Normally, hot tubs are about 2.5 meters across. Ours has an outside dimension of only 13 cm.

As with the other projects we've explored so far, this one will be done using Tinkercad.

Step-By-Step Design

1. The first step is to put the ruler on the workplane, and drag a Polygon from the Basic Shapes area of the screen onto the workplane. The shape of this polygonal prism is hexagonal ― just what we want.

2. Our next step is to resize this shape to represent the interior of the tub. The original dimension is 20 mm corner to corner, and 17.32 mm across the faces. The goal is to maintain the aspect ratio and resize the hexagon to 120 mm corner to corner. The face to face size will be 120 x 17.32 ÷ 20 which is 103.92 mm. Next, set the height to 40 mm.

3. Next, we'll make the outer part of the tub. Select the hexagonal prism, copy it, and paste it. To keep from being confused later, make the new shape a different color.

4. Move the interior piece up by 5 mm. You can pull it up with the black arrow, or enter 5 mm in the base position field on the left of the screen, just below the height setting.

5. Now it is time to change the size of the outer piece. Select it, make the corner to corner dimension 130 mm, and adjust the face to face dimension proportionately. In this case, the size will be 130 x 103.92 ÷ 120 which is 112.58 mm.

6. Now we need to align the two pieces so they are centered. Select both pieces, choose the align tool and click on the center button for both the X- and Y-axes. This might be easier for you to see if you use the Top view of the workplace.

7. When you are done, the pieces are centered like this.

8. Next, select the interior piece and choose the Hole tool to the right of the workplace.

9. Select both pieces, and click on the Group button to the top right of the workplace. This gives us the finished view of the tub itself.

10. Now we need to add seats to the tub. Drag a cylinder to the interior of the tub.

11. Change the seat size to 30 mm in diameter, with a 20 mm height. Finally, raise the seat 4 mm from the base. As before, this kind of movement can be done with the black arrow, or by entering 4 mm into the field below the height field.

12. Now move the seat to one of the corners so it makes a tight fit.

13. Copy the seat, and paste five more of them to the interior of the tub. Position them to the remaining corners, and you're done.

14. If you choose the Home view of the workplane, you can see a nice view of the tub. Export everything to an STL file and you're ready to print!

Printing & Assembly

Print a copy of your tub and check to make sure there are no holes in your model from which water can leak.

Things To Do & Notice

Calculate the volume of your tub. Here are some hints: A hexagon is made from six equilateral triangles. In our case, these triangles are 65 mm on each side. The tub is 35 mm deep, and you need to subtract the volume of the six cylindrical seats, each of which has a diameter of 30 mm and a height on 19 mm.
Using a measuring cup, fill your tub with water and compare the volume you found with the volume you calculated. If the numbers are different, how do you account for this?
Our tub has a wall thickness of 5 mm. Water exerts pressure on the walls of its container. Since the density of water is one gram per cm3, what is the pressure inside a full tub in newtons (N) per cm2? Where is this pressure the highest? Where is it the lowest. How thin do you think you can make the tub walls and still safely hold a tub full of water?

#HourOfCode Challenge

From December 5th to the 11th, multiple companies, schools, and organizations are participating in the Hour Of Code program to encourage students to learn and experiment with code. We'd like to get in on the action with this monthly lesson. Can you reconstruct this month's EDU lesson using the code based CAD program, BlocksCAD? If you send us a screenshot of your code solution with an image of your final model, and we will put your name in the hopper to win a 1kg roll of PLA filament in the color of your choosing! We will select a winner from the submissions on January 1st, so you have nearly a whole month to fit in an hour of code! Best of luck everyone!

Comment

October EDU Project: Building With BlocksCAD

Comment

October EDU Project: Building With BlocksCAD

This is another installment in the monthly, continuing series of Educational Projects by David Thornburg. This October lesson, aimed at middle school students or higher, focuses on an interesting design tool called BlocksCAD. Without further adieu, here's David Thornburg with his monthly lesson!

Introducing BlocksCAD

One of my favorite new 3D design tools is a programming language that design shapes and generates a STL files as its output. This language is called BlocksCAD and it is made by the good folks at Einstein's Workshop (http://www.einsteinsworkshop.com). BlocksCAD is and easy-to-use version of OpenSCAD, a tremendously powerful design tool that can be tricky for younger users to master. If you are familiar with programming languages for kids like Scratch (http://scratch.mit.edu), you already know about coding through the assembly of jigsaw-like pieces to create a program of your own design. BlocksCAD works in a similar way, making it perfect for beginners without limiting the complexity of objects you can design. BlocksCAD works in the cloud, making it perfect for iPads and Chromebooks. To show you how it works, let's design a card holder. While this is not an educational project per se, it showcases the elements of the language. Since “coding” is increasingly of interest in education, it makes sense to highlight the language in this blog.

Go to the BlocksCAD site (https://blockscad.einsteinsworkshop.com) and log in. You will see the screen divided into three areas: a set of colored bars on the left denoting various shapes and operations (the commands of the BlocksCAD language), a window in the center where you will have your program, and a window on the right side where you can see your model as it is progressing. This is also the window you'll use to export your project as an STL file for printing.

Next, in the area to the right of Project Name near the top left of the window, type Card Holder, and click on the 3D shapes button to the left of the screen. This gives you a few options. Click on the Cube icon at it will show up on your center screen.

Enter X, Y and Z values of 60, 95, and 3 mm and choose “centered” for the shape. Press the Render button to see the result.

I like to choose “centered” whenever I can so I know the origin of every object. Objects can be moved and rotated using the transformation tools by pressing the Transforms button on the left side of the screen.

BlocksCAD supports text, so we'll illustrate that next. Click the Text button on the left side of the screen and choose 3D text. This puts an operator on the screen in which you can add your text (I wrote “Genius”), the height of the text in mm, the font (I chose Liberation Serif), and the amount by which the text is extruded (3 mm is fine for us). The only thing that's missing is the “centered” option, which bums me out. The great folks behind BlocksCAD are working on this. But, no problem for us, we have two cool tools in the Transforms button to fix this ― Translate and Rotate. I also used Union from the Set Ops button to combine everything using the Union block. This is important because we will soon rotate the whole plate, and want the cube and the text to stay together.

As you can see, we rotated the text 90º around the Z-axis and translated the text so it is somewhat centered horizontally and located near the top of the cube.

A quick note regarding text: BlocksCAD only provides a few typefaces because they can't go onto your computer and prowl around for your own fonts. Computer-resident software like OpenSCAD doesn't have this restriction. I mention this because it might come up in one of your later projects.

Our next step is to rotate our shape by 60º around the Y-axis so it forms a tilted back for our business card holder.

Once this is done, we make another “cube” with the same dimensions as the first, rotate it 60º the other way (quick, what positive rotation angle is equivalent to rotation by -60º?  (No fair looking at the numbers below!)

After doing the rotation, you need to translate the location of the card holder back so it interlocks with the front. You can either use your vast understanding of trigonometry, or tinker around until you get it!  I'll let you decide which approach is fastest.

I've chosen to put each of the pieces together with another Union block. The first item is our rotated part with the text. Next, we added the back, and if you click the + sign on the Union block you'll add a place for another part to add.

Now we need a base to hold the stack of cards. To do this, add a cube with X, Y, and X dimensions of 10, 95, and 3 mm. This gives us a flat base you can add to the holder with a Translate command. Add this part to the Union block.

Finally, you need to add a lip to make sure the cards don't slip out the front. This is made with another translated “cube” with X, Y, and Z dimensions of 3, 95 and 10 mm that has been translated into place and added to the Union block. 

That's it!

Now when you render the shape you'll get the finished card holder ready to save as an STL file and send to your printer. If you print the card holder the way it will sit on a desk, your printer will add supports to the interior of the holder that you take off when the print is finished. Now, if you want, you can rotate the entire model by 90º so it prints sideways. This way, no supports are needed, and the finish of the card holder might be prettier. You should try both ways and see which one you like best.

The finished card holder is shown below. The goal of this blog was to show a few of the nice tools in BlocksCAD. You should continue to experiment on your own and let me know how you like the language.

 

 

 

Comment