Sunday, March 12, 2017

How to Remix an STL or object in Blender

Premise:
I need to modify a poop bag holder that will hang off the dog's leash.

Goal:
Original STL is set for 70mm-tall cylinder for its bags, I'm going to adjust this to a 63mm-tall cylinder.

What you'll need:
Blender (MeasureIt plug-in hugely recommended, File>User Preferences>Add-ons>3D View: MeasureIt)
STL to be modified (I chose www.thingiverse.com/thing:1369224)

Importing the Robot into Blender:
File > Import > Poop_bag_robot_body.stl (from wherever you've stored it)

Moving the camera view:
NumPad-9 flips the orientation, NumPad-2 & -8 raise and lower your view, NumPad-4 & -6 change side-to-side. I changed the view to look from the robot's bottom, so I could look at the top and spike that I will be pulling down.

Prep Work
You're in Object Mode - it'll show this at the bottom of the primary window. You can mouse it to Edit mode, or just hit <tab>. Everything now shows up as orange lines, because this was imported from an STL. This is doable, you'd just have to make sure you select everything you want to move correctly.


Instead, we're going to lightly cheat. Mesh > Clean Up > Limited Dissolve. Clean! There is a risk that you could dissolve details, but it would take multiple applications of that, as well as changing the constraints.

Click "a" on the main screen to deselect everything.

MeasureIt
You're in Edit mode, nothing is selected. There are three boxes on the bottom of your screen — Vertex, Edge, and Plane selection tool. If you choose one, the others will turn off.  Choose the Edge selection box in the center, then click on any line runs the length of the cylinder.

Click on the MeasureIt tab on the far left, click Show, then <-> Segment. You can now see a blue line with a ".07m" measurement attached to it, running along that edge/line you selected. This measurement will change if either vertex moves — useful later on, when we start moving things.

On the right hand side of your primary window, there's a tab for MeasureIt. Any line that you measure will show up in that tab...you can hide them, change their colors, but I'm concerned about .07m being rounded up. Change the number of decimal precision to 3 - it now shows the line length as .069m!



The modification:
Next, we'll hit "a" again to deselect everything. Choose Plane selection, hit "c" for an area selection tool, then left-click your mouse over the spike. This should select the spike as well as the top of the cylinder.



With those highlighted, hit "g" for grab, "x" to only move it on the X-axis, then move your mouse so that the .069m becomes a .063m.

Conclusion:
That's all! It wasn't a huge amount of work, but you can save the Blender file (File>Save), or just export the STL (File>Export). There are more complex things you could try — if you wanted more room for bags, use MeasureIt to find the width of the cylinder, select the whole object in Edit mode ("a" will select/deselect all), "s" for scale, "shift-x" means you scale everything BUT the x-axis...then use your mouse to scale. (You might want to deselect the spike on the inside before scaling, unless you want that to become bigger as well.)

Personal Preference:
I felt the spike at the top of the cylinder wouldn't print without supports (the 45 degree overhang angle rule). In Vertex selection, scrolled my mouse wheel to view it closely (you can also use the "." on the number pad). I grabbed "g" the tip, hit "x" to only move on the x-axis, then moved it towards the top of the sideways cylinder.


Tuesday, February 28, 2017

Using Blender as a 3D modeling tool for 3D printing

As I was getting into 3D printing, I needed a tool to modify objects. Thingiverse has got a respectable library, but not all of the projects are complete...or they don't fit what you need. I covered use of the 3D Print Toolbox plugin in a previous post "Optimizing prints (aka the BB-8 cookie cutter)".

So you'll need a tool. TinkerCAD, AutoDesk, Fusion 360, Maya, SketchUp — they're all possibilities. I chose Blender. It is open source, works the same across platforms (Windows/OSX/Linux), and had more features than I would ever probably use. (This also means that if I needed a tool, I just had to go to youtube and browse.) I could have chosen a simpler software, but then would need to learn a NEW tool when the existing one didn't work.

There are some great tutorials out there. I would suggest searching for the user inventimark - he does covers the basics, as well as going into 3D printing aspects of Blender.

One of the things that we can talk about, without actually teaching you Blender...is the setup. When you start Blender, it'll always use the same basic setup until you change & save it.

First, go to the plugins. There will be a couple I highly recommend — MeasureIt & 3D Print Toolbox. First, we'll go to where the plugins are found. File>User Preferences>Add-ons takes you to the plugins, and you can search for any of the plugins you want to include on starting Blender. (Or you can scroll down, choosing "3D View: MeasureIt" & "Mesh: 3D Print Toolbox".)

At this point if you want to stop, File>Save Startup File will save those preferences.

If you want things in metric, go to the Scene selection (upper right corner), then in the box below choose Scene (currently the middle of 5 options, the graphic is a circle, a cylinder, and a light source. Under Units, choose Metric. Unit scale should be .001. Next, expand the bar to the left of these two boxes (there's a plus sign that you click on to pop out if needed). Scroll down to Display, then change the lines and scale. For my printer bed, I put 200 lines, and the scale as .001. (200mm by 200mm is about the size of my print bed.)

You can save your preferences again, if you went metric.

Your Blender window now has a large grid space, with the thicker lines being centimeters, the thinner lines being millimeters. On the far left edge, you'll notice a MeasureIt tab. The 3D Print Toolbox doesn't appear until you've selected an object (right-click), and then the tab will appear above MeasureIt.

The 3D Print Toolbox has several useful features - Overhang will outline any parts that exceed the setting...I set mine for 45 degrees. When I am in edit mode, and click the "Check All" box, there will be clickable boxes for anything that is found. If you still have the starting square, it will return "Overhang Face:1" and outline the bottom face - it's showing you the bottom doesn't have support, which is correct...it's going to be sitting on the printer bed.

The other useful feature I have needed, was "Thickness". This should be the nozzle of your printer. My Lulzbot Mini has a .5mm nozzle, a lot of other printers use .4mm...this is going to be the thinnest free-standing wall that you can print. I had a BB-8 cookie cutter that I shrunk down, but parts of the cookie cutter wouldn't show up even though they were visible in Blender (and Cura, my printer slicer software). It turned out that the walls were too thin for my "thick" nozzle. Setting the thickness to my nozzle size, it outlines all of the parts that were too thin...I manually adjusted the walls and everything printed just fine.

The final "common" use I have for the 3D Print Toolbox, is great to track revisions. Once you've saved the Blender file, you can click the "Export" button in the 3D Print Toolbox tab...whatever object you have selected will be saved as filename-objectname.stl. This can be useful if you have multiple objects in your blender file, but you want to save/print them as separate objects.