posts tagged with the keyword ‘openscad’

2017.04.02

Stand

I recently had to design a simple cabinet to serve as a stand for a mill/lathe. I thought about pulling out some rulers and triangles (yes, I used to actually do drafting with pencils and paper) but instead I decided to try using OpenSCAD.

Stand

I used specific colors in my design, of course when you actually render a thing in OpenSCAD the color goes away, but you can export the different views just fine without rendering. Here are the various view of the thing. Oh, since OpenSCAD is a “unit-less” thing which mostly outputs in millimeters (at least for STL files) I just assumed the units were inches.

Stand

I used the OpenSCAD “scale” feature to scale up the thing by 25.4 times in each direction, which means my 1 millimeter became 1 inch.

Stand

But in a real drawing you plan to hand to someone you need dimensions for things. While there’s been some experimentation in adding them, there just doesn’t seem to be an easy way to show dimensions of things in OpenSCAD. I resorted to printing out paper and marking it up… with a pencil.

Stand

I probably need to learn how to use FreeCAD for this sort of thing. I’m sure I can easily add dimensions with it. One of the really interesting things about FreeCAD is that it has an OpenSCAD Module. You can import a CSG file which you’ve exported from OpenSCAD, and you can just open .scad files as well.

Much more to explore here… stay tuned!

2017.04.01

Adjustable Rectangular Mount v1

I finally got around to creating a parametric version of the 3D printed mount I’ve been using for the past few years. Typically I’d just open a previously designed thing in OpenSCAD, make some adjustments, and export an STL to print. Eventually I realized that I should just create a bunch of variables so I can easily just make minor adjustments each time and not have to do a bunch of find & replace operations.

The result is Adjustable Rectangular Mount v1 which you can find on Thingiverse and Youmagine.

It’s a work in progress, and it still needs some tweaking, but I figured it was worth releasing to the world. (Hey, make it better if you can!) It doesn’t work for all sizes and configurations, but for most of my needs, it’s good enough.

Adjustable Rectangular Mount v1

I should probably do more research on how to improve things by reading through other OpenSCAD code, but as mentioned, you’ve gotta start somewhere. I’ll probably be using this one quite a bit in the future, and I’ll update it as I can.

This mount specifically expects that you can use screws (or bolts) to mount it to a surface you can screw into or drill through. I also often add some double-sided foam tape to the inside of the mount and stick it directly to the object being mounted.

2017.03.31

Borrowing a bit from our friends at Bolt Depot, their chart showing US Machine Screw Diameters is helpful, but often I’m designing with Metric units (or a unit-less system that outputs in millimeters) and I need to convert Imperial units to mm. (I tend to do a lot of work using OpenSCAD and Inkscape for 3D printing.)

The chart below allows me to specify screws and bolts and then design holes that will work. For instance, I used a lot of #4 screws, and the chart tells me I need a hole diameter of approximately 2.794mm. Handy!

Size Thread Diameter
Decimal Nearest Fractional Metric
#0 0.06″ 1/16″ 1.524mm
#1 0.07″ 5/64″ 1.778mm
#2 0.08″ 3/32″ 2.032mm
#3 0.09″ 7/64″ 2.286mm
#4 0.11″ 7/64″ 2.794mm
#5 0.12″ 1/8″ 3.048mm
#6 0.13″ 9/64″ 3.302mm
#8 0.16″ 5/32″ 4.046mm
#10 0.19″ 3/16″ 4.826mm
#12 0.21″ 7/32″ 5.334mm
#14 0.24″ 1/4″ 6.096mm

See Also: Millimeters, Inches, Fraction, Decimals

2017.02.27

Cabinet Lock

Our new(-ish) kitten is still getting into trouble on a daily basis, and he occasionally opens up the kitchen cabinet doors, and either crawls inside, or worse, gets into the trash can and has a good ‘ole time. Not cool, kitten! The solution was simple, those child-proof cabinet door locks. I took a quick look on Amazon and found some, but they typically come in a 12 pack or 20 pack or some other number that makes sense to put on all of your cabinets. Of course, when you’ve got a 3D printer, why bother ordering things you can just print out?

Cabinet Lock

I found Child safety lock for cabinet/cupboard on Thingiverse, printed one, and put it on the cabinet that has the trash can. Problem solved! I printed two more, one for the cabinet with the pots and pans, because who wants cat fur in their frying pan? And the third was for the cabinet where we keep the cat food. It’s probably a good idea to keep him out of that one.

Cabinet Lock

Here’s Mr. Kitten inspecting my handiwork. Or maybe he’s just trying to figure out how to get around this terrible device. This is one of those things where I probably would have enjoyed 3D modeling this part, but I was able to find one someone already created, and best of all, it was created in OpenSCAD, which was nice because I could easily alter it, and I could learn from looking at code someone else wrote. Win all around.

Cabinet Lock

2017.02.11

When it comes to 3D modeling for the majority of the 3D printing I do, I tend to turn to OpenSCAD. OpenSCAD is known as “The Programmers Solid 3D CAD Modeller”, and it’s free software available for Linux/UNIX, Windows and Mac OS X. Yeah, you create objects by writing code. It’s weird, but so am I.

If you’re one of those cloud-loving weirdos (who also uses Chrome) you can also opt to use OpenSCAD.net, which is a (blah) “browser-based” version of OpenSCAD. Sort of. It definitely has it’s usefulness (Chromebooks!) but anytime I can download and install an open source application, I’ll opt for that route.

Now, once you get used to OpenSCAD (assuming you want to) you can refer to the cheat sheet or read the entire OpenSCAD manual. But suppose you don’t exactly want to write code, or you aren’t good at it yet… Perhaps BlocksCAD can help.

Functions

BlocksCAD puts a “blocks” interface on top of OpenSCAD. You may have seen this block-thing in use with Scratch. It’s a good way to teach kids how programming works. (There’s an Arduino-ish block application call mBlock that works with the Makeblock robots. And yes, there’s lots more scratch blocks stuff out there.)

Blocks

I took a model I made in OpenSCAD last week and recreated it in BlocksCAD. It took quite a bit longer (probably because I can write code fairly quickly) but the results were good. The blocks really help show the structure of things. For anyone whose had to remember bracket placement, semicolons (and tabs & indents if you care about readable code) the blocks interface hides all of those things. Again, possibly a good thing for beginner coders.

Code

In BlocksCAD you can toggle between the blocks interface and seeing the code. This is great, as you can see the code that gets created by the blocks. Note that you cannot edit the code in the code view. This is (slightly) annoying, but I can understand why this decision was made.

There are things that BlocksCAD doesn’t support, but the basics are there. (I’d love to see comments added.) The basics are enough to get a beginner (child or adult) started with building blocks into a program that generates a 3D model. Sweet!

Share

You can also easily share the models you create. (Okay, that’s probably the one nice feature about a browser/cloud-based thingy.) You might notice from the image above that the holes are weird looking, as in, not very round. What’s going on?

Rod Holder

Here’s the original model that I created in OpenSCAD running on my computer. Note that the round holes are super-round! I get them round by adding the line:

$fn = 100;

to the top of my code. The $fn thing controls the number of facets used to generate an arc. It’s the difference between a round circle and a low-resolution circle consisting of x number of flat sides. (You can also use the $fn to allow you to quickly render models by setting the number low, and then raising the number before you do your final render.)

Rod Holder

Here’s what I got when I copied the code from the “code view” of BlocksCAD and pasted it into OpenSCAD and rendered it. Blah! Low-resolution holes. If I added my $fn = 100; line it rendered what I really wanted.

STL

Okay, so I also downloaded an STL file from BlocksCAD and it looked like this. Hmmm, much better quality than the low-resolution version I got from the code I copied. So what’s up? Well…

When you render objects in BlocksCAD there’s a “smooth” option with Low, Medium, and High settings. So, if you choose the High setting, you get a much better model. The code view doesn’t show whatever the $fn/facet setting is for the model, but it must be adding it when it does the render. Makes sense.

BlocksCAD has a few quirks, but I think it’s a great concept. While I’d love to see a downloadable version, I hope Einsteins Workshop continues to provide the web-based offering for those who want to use it.

« Older Entries |


buy the button:

Buy The Button