Categories
Uncategorized

Programming with OpenSCAD [Book]

I recently picked up Programming with OpenSCAD from No Starch Press. I’ve been using OpenSCAD for over 10 years, and I’ve not yet mastered it, but I’m definitely proficient at it. I’ve learned a lot of tricks over the years and I’ve created some complex 3D objects, but there’s always more to learn.

So did this book help? Yes. I read it while I was “offline” (meaning, on vacation away from home for a week) and it was good to just read a book and have a reference without being distracted by a computer. If you’re a complete newbie to using OpenSCAD, this would be a great book for you. I could still do most of what I do without ever having read it, but I feel like I picked up enough tips and tricks to make it worthwhile.

Other things to check out are the OpenSCAD Cheat Sheet, and the GitHub repo for the book which has all the code you’ll find in the book in case you want to grab any of it.

Categories
Uncategorized

Wyze Cam Magnetic Shelf

I needed to mount my Wyze Cam to a metallic door but still wanted it upright (and not sideways) so I made a small shelf, added magnets, and stuck the metal plate that came with the camera onto it.

I used 12mm x 3mm magnets, so the pockets are for that specific size. I didn’t glue them in as they fit really well, but did add some gaff tape so they don’t fall out.

If you’re familiar with OpenSCAD you can modify the .scad file to allow for different size magnets. I seem to have a large pile of 12mm x 3mm so I just used those.

The metal plate that comes with Wyze Cam has a mounting hole in the center but also has adhesive, so I just stuck it right onto the shelf. It should stay put just fine. (I probably could have used a few washers as well, but I have a few of these plates now.)

You can get the STL and .scad file from Printables.com – Wyze Cam Magnetic Shelf. Print it if you need it!

Categories
Uncategorized

Band Ties

I needed some Bongo Ties but didn’t have any Bongo Ties, so I made some Band Ties using my 3D printer. What’s a Band Tie? Well, it’s just like a Bongo Tie, but you can print your own. Wait, what is a Bongo Tie? It’s a small piece of wood that looks like two golf tees merged, with a heavy duty rubber band attached to it.

Bongo Ties are great to use in media production. Got a photo studio, or a camera bag? You’ll probably want a bunch of them around. They are super handy for attaching cables or cords to light stands and tripods.

They’re also great for securing wrapped up cables. Bongo Ties are strong and difficult to break! (The wood part and the rubber part.) Band Ties are just plain old rubber bands, so for lightweight uses, they’re good enough.

This is one of those things I expected to find on Printables.com but did not. I did find one on that dead site we don’t talk about, but I wanted one on Printables so I took the time to model one (well, two) and drop them over there.

My Prusa MINI+ printed them like a champ, and my Monoprice Select Plus printed them… not as good, but totally acceptable. I was unable to break one. It’s a fairly small object, so just getting a grip on both ends in an attempt to snap it was not easy.

You can get the STL and .scad files from Printables.com – Band Tie. There are two versions, one is simplified (use that one) and one is a bit more complex code-wise and only recommended if you’re familiar with writing OpenSCAD code. Otherwise just use the STL files and print!

Categories
Uncategorized

OpenSCAD Improvements

When writing code for yourself you can choose to leave it messy and confusing (though you may not want to) and when writing code that other people will see it may be a good idea to attempt to be clear and organized. I’m trying to be more clear an organized. Which you know, can help your Future Self as well.

Here’s a recent project. It’s a 3D model of a simple foot switch. There are two 3D printed parts (a base and a cover) and one non-printed part (a push button) and sometimes I want to see one part, and sometimes I want to see all of the parts together.

Another thing I’m hoping this helps with is that since you need to export each part individually for slicing and printing I used to just add a line that said “Uncomment this to export” above each item to be exported.

I figure this is a bit cleaner as you just need to toggle some values between 0 and 1. (And yes, you can do an export that is all parts laid out ready to print but I tend to not do that.)

Anyway, I’ve never really read up on best practices for writing OpenSCAD code. I’ve picked up things over the years from looking at code others have written, and from making my own mistakes and wanting to improve them.

If you know of any good tricks or have some tips, let me know!

Update: Someone asked why I was using 0 and 1 instead of false and true. I am not an expert on this but I believe since OpenSCAD is not strongly typed that 0 and 1 pretty much work as Boolean values and the only real difference is readability. If so, it’s really just a personal choice. (Let me know if that is incorrect.)

Categories
Uncategorized

Printing versus… Not Printing?

After I posted about my Fan Shelf Brackets I shared it on Facebook, and got the following comment from a friend:

I’ve done that with blocks of wood. I’m not sure the 3D printer adds any value over that.

I didn’t try to add value by using my method (3D printing) over another method (cutting blocks of wood) but I wanted to explain my approach, so I did. you can read my response below:

Great comment! So here’s the deal… Sometimes printing is easier for these things, at least for me. I would need blocks of wood, and I would also need to cut the wood. Now, those things should not be too difficult, but they can be. I have a miter saw in the garage, and to use it I need to open the garage door and move my car back partway into the alley, then use the saw, then move my car back. The miter saw is okay for cutting small pieces of wood, but I don’t always feel comfortable doing that. (I don’t have a real table saw, so that’s not an option for me.)

Once I make the needed cuts I probably have to glue and clamp things, or nail/screw them together. Again, not a huge pain, but it is work. Also, I do need to have wood on hand. (Who am I kidding, I always have scrap around!)

With the printed version, I printed a small test part quickly to see if it would fit, then I printed the larger versions overnight, confident they would fit right based on my test. Since the groove is 6mm wide I would either need to cut a groove that width or stack multiple cuts/pieces and glue them together to get what I needed.

There’s always multiple ways to do things, and honestly, with two 3D printers on hand and plenty of filament, this was the easiest way for me to make this thing.

I’ve been 3D printing things for over a decade now. Have I printed things that might seem silly to print? Sure, and I’m one of those people who mostly does practical printing, not fun decorative things. I once print a shim because it was the easiest way for me to get exactly what I needed. As long as I have a 3D printer I am going to use it for all sorts of things that other people might not. If you’ve got metalworking or woodworking tools and raw materials and feel comfortable and skilled working with those, you might choose to do so. For me personally, modeling and printing a thing makes good sense, and luckily, I still enjoy it.

Note: I think it’s important to pull conversations like this out of the walled garden that is Facebook, so I may do this more often if valuable insight (!?!) warrants it.