OpenSCAD Princess Castle Project

Initial Design Idea

 

Our goal is to create a Disney castle in openscad that sort of models this one above (from thingiverse). We really liked this idea of creating a Disney castle because the different shapes present a new challenge for us to tackle. We also think it is easy to personalize and make it the way we want to. We think we bring knowledge from learning openscad already, however, we realize we are going to have to continue to learn the system and how to code. We are going to have to learn how to get all the shapes to come together and how to build the walls of the castle. This will be able to be learned from youtube tutorials and through trial and error. Even though we are not full skilled in openscad we believe that we will be determined to learn how to make the castle the way we want to.

Design Iteration

 

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

$fn=16;

s = [30, 50, 15];

walls=2;

 

castle();

module castle()

{

   //four corner towers

   for(x=[-1:2:1], y=[-1:2:1])

       translate([s[0]/2*x, s[1]/2*y, 0])

       tower(height=s[2]);

   

   //sidewalls

   for(y=[-1:2:1])

       translate([0,y*s[1]/2, 0])

       wall([s[0], walls, s[2]*3/4], false);

   //front and back walls

   for(x=[-1:2:1])

       translate([x*s[0]/2, 0, 0])

       wall([walls, s[1], s[2]*3/4]);

}

module tower(height = 15)

{

   translate([0, 0, height/2])

   union()

   {

       cylinder(d=height/3, h=height, center=true);

       translate([0,0, height*5/8])

       cylinder(d1=height/2.75, d2=0, h=height/4, center=true);

   }

}

module wall(dims=[30, 3, 10])

{

   translate([0, 0, dims[2]/2])

   cube(dims, center=true);

}

In order to code this castle, we watched a Youtube tutorial by Les Hall explaining each specific part we needed to code in order to create our castle. The code works because each part of the castle walls had to be coded individually with specific x and y dimensions.  We also had to translate each cylinder to the walls in order for the castle to connect properly and work. At first, the shape of the roofs on top of each cylinder was not fitting correctly so we had to alter the size of each one to look correct. We also had to change the translations walls and dimensions because they were not fitting together right. Overall, the video was helpful but it did not create the model exactly how we wanted to, the dimensions were off and translation wasn’t working, so we had to change it a few times so that it all came together.

First Draft Print

Overall, we think our first print was a success! We learned from this print that we need to make the print a lot bigger and taller. We also want to change. a few things for our final print. We want to add a brick texture or possibly a door to our print to make it more advanced and unique. We wanted the draft to be simple so we can see the logistics of the shape.  We are going to have to do some exploring in that aspect of the project in terms of finding a good texture to customize it. For the most part we are pleased and are going to work on it becoming more advanced!

Thingiverse Customizer

//////////////////////////////////
wallThickness=30;
castleLength=50;
castleHeight=15;

$fn=16*1;
s = [wallThickness, castleLength, castleHeight];
walls=2;

castle();
module castle()
{
difference(){
union(){
//four corner towers
for(x=[-1:2:1], y=[-1:2:1])
translate([s[0]/2*x, s[1]/2*y, 0])
tower(height=s[2]);

//sidewalls
for(y=[-1:2:1])
translate([0,y*s[1]/2, 0])
wall([s[0], walls, s[2]*3/4], false);
//front and back walls
for(x=[-1:2:1])
translate([x*s[0]/2, 0, 0])
wall([walls, s[1], s[2]*3/4]);

In our code that we uploaded to customizer, the viewers are able to customize the wall thickness (wallThickness=__), castle length (castleLength=__), and castle height (castleHeight=__) seen at the top of our code. The user would have to insert their own dimensions for the features they want to customize in the castle. The users can modify all of these three dimensions to however they want them. We did not set a limit for how big or small to make it.

https://www.thingiverse.com/thing:3450723 

Final Prints

The big orange castle is what we used as our big final project. We also printed a variety of smaller castles using customizer to see how the users would be able to change how the castle looked.

Small Orange Castle 

For this small castle, we altered the wall thickness and how far apart the walls are from each other. Our original parameter for this was 30mm, and we altered it to be 45mm so that the walls were further from each other, which made the walls look thinner. We kept the length at 50mm and the height at 15mm.

Strength: Makes the middle of the castle wider so if someone wanted to, they could put more items/toys inside the castle

Weakness: The further the castle walls are from each other, the thinner the walls get. This can affect the door in the code and can make the castle flimsy when removing it.

Clear Castle 

For this clear castle, we altered the length of the body of the castle all together. We originally had it set to 50mm and then altered it to 60mm to make the castle longer. We kept the thickness/distance of the wall at 30mm and the height at 15mm.

Strength: The castle is longer which stretches the body and walls out. If someone wanted to paint or decorate the castle, there would be more length to put decorations on it.

Weakness: The castle’s length looks thinner and longer, which eliminates more of the typical shape of the castle. The longer the castle is, the harder it is to tell it’s a castle.

White Castle 

For the white castle, we altered the height. Our original height that we coded was 15 mm and then we changed it to 20mm. We kept the wall thickness/ distance at 30mm and the length at 50mm.

Strengths: The height makes the columns looks taller which asserts the model is a castle. It would be easier to add flags so the castle could be more unique. It also gives more of a shelter over the middle of the castle.

Weakness: The higher the castle/columns are, the harder it is for the castle to print correctly. If you make it too high, there might be some problems printing.

Big Orange Castle 

This was our original code with the dimensions being wall thickness/distance 30mm, castle length 50mm, and castle height 15mm. We made the castle really big when we printed it so that our vision of our project would come true.

Strengths: The dimensions coordinate and they come together to look like a castle. The door we coded also printed correctly which we were really nervous about (it ended up being harder to code than we thought). These dimensions also printed smoothly.

Weakness: We were very pleased with how our final print turned out. We wanted to add a texture to the castle but it was too late and complicated. Another weakness was that the columns are extremely advanced comparing to other castles coded.