Saturday, May 26, 2012
Dogbot: Openscad vs. Solidworks
First, a little background. I started work on a dog robot a few years ago. One key aspect of the design was the solid bits that I printed on my 3d printer, which connected the servos together and gave the robot a shape. I chose to use a tool called Openscad to design these parts. Because I kept the parts simple I was able to design them with Openscad fairly easily. I was even able to animate them to verify that I got the math right. All of this work is on my youtube channel.
Now here is where the story gets interesting. As I start to add in sensors and finalize the design I am desiring a much more complex design. I am wanting a design that can be considered to be art as much as good engineering. As I design artistic and life resembling parts I am starting to feel like I have reached the limits of Openscad. I don't give up without a fight, however. Here is an animation of my last stand:
This leg took me at least 10 hours to design and I was mentally fried multiple times by trying to visualize while I coded. In fact, I frequently picked up a pencil and paper as a faster medium to work out the kinks in my design before changing code. This is not how I want to design. I want my tools to be inspiring and suggestive, not tiring. Maybe I am doing something wrong. To give you a better idea of how I designed the lower portion of the leg, here is the code:
Does it make sense to you? What line of code makes the screw hole that holds the rubber ball to the leg? Even after writing it I couldn't tell you right away.
After this experience I started looking for a new tool. I am not a mechanical engineer. I didn't know what to use. So I started looking around the internet for something that looked like the best CAD tool out there. I found a few, but Solidworks stood out as a FUN tool. I want to have fun!
So I decided to conduct an experiment. Below is a picture of a servo that I use in my dogbot. What would the experience be like modeling this servo in Openscad? What would be the experience modeling it in Solidworks?
To model this in Openscad you need to keep it simple. Here is the code to create a rough representation of the servo:
It only took me about 30 minutes to get the code just right and to take all the measurements. Here is a render of the result:
So next I tried to design this servo in Solidworks. This was one of the first times I have used Solidworks after watching a few youtube tutorials. At first I just went with a simple representation like I did with Openscad, but that only took 10 minutes. So I decided to see how far a newbie could take it. I buckled in and took it all the way to what I consider to be an identical representation. In less than 2 hours I finished the design! In another 30 minutes I had the material tools and rendering tools figured out. Here is the result!
If you put the original servo next to this render you can barely tell them apart, and that's just because I am new to Solidworks. So now I have a dilemma. Openscad is open source and I believe in open source. It is code based and because of this you can create parametric designs that can change by changing one variable, like bolt size. Solidworks is hundreds of dollars and is almost completely mouse driven. But Solidworks is fun and almost without limitless with a new version is coming out every year.
What to do? Which do I use? Is there something even better?