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.

Monday, October 3, 2016

Optimizing prints (aka the BB-8 cookie cutter)

There's a lot to catch up on - I print about 20-50 hours a week, and there's so much information to share.

Recently a friend asked for a BB-8 cookie cutter. Yes, designing from scratch is awesome. If I were to print only things I designed...egads. I found a nice one with not TOO much heavy design on Thingiverse. It turns out to be 5" tall and 4" wide...a little big for my tastes in cookie size. (Incidently, it allowed commercial use - Etsy had several of these...$6-$7 apiece for 60 cents of plastic. Maybe more cost-of-goods, depending on the maker's cost of plastic...I had gotten some random PETG filament from makergeek for $18/kg.)

Adding a link to Imgur for the next bit.

I remixed the cookie cutter in Blender to give it a lip to help pull it off the cookie dough. In the Cura slicer software, I scaled it from 100% down to 50%. It looked good in Cura - print! It lost lines...but..why? Well, print it at 60% - more lines back, but not complete.

I could have continued to print over and over again, until all of the lines came back with the object creeping back up in size. At this point, we can assume that the line is just too thin to print occasionally. (This was a learning moment for me from here on.) One - how do we keep a smaller size, and two - how do we identify a bad print before we waste time and plastic?

I'll start with identifying bad prints. Cura has something call the LAYER mode in the upper right corner (where it starts with NORMAL). Right there, I can see where items disappear. Now we have that nailed down, we can look at possible fixes to the object file before prints...great. Incidentally, 90% seemed to have all of the lines back - it was too big of a cookie though.

Next, getting a small size, we'd run into the same situation if we just did scaling in Blender instead of Cura. There's a useful plug-in for Blender called "3D Printing", already included...you just need to turn it on. (It'll show up as a tab on the left-hand side, if you have an object loaded in Blender.)

In Blender - select the object, go to edit view, and de-select all. ("a" selects all or deselects all.) Then click the "Check All" box in the 3D Printing tab. Down below, you'll notice the Output box is now full of information. (If you want to fully duplicate my experience, download the cookie cutter, scale it to 70% in Blender, then do the above to see the output.)



Let's make another change before we go further - Thickness is the size of your nozzle. My Lulzbot Mini has a stock nozzle of 0.5 mm. I'm running the standard blender unit scaling, which means 1 blender unit = 1 mm. If I set the Thickness at .7 - the Output display will show a lot of Thin Faces. If your nozzle/Thickness is .3mm, you'll have much LESS for Thin Faces. This makes sense - a bigger opening = bigger lines; small opening = thinner lines.

Depending on your nozzle and calibration accuracy - you might consider changing the thickness setting. I think I was fortunate starting out with a Lulzbot Mini for my first experience into printing (no calibration necessary, even after a year).

At .5 Thickness, it shows me more thin faces than I need to be concerned about. I only care about the walls that are too thin - not the bases or tops. Click on the "Thin Faces" box in output - it will select all of the thin faces. Fix the walls that weren't printing, Check All again, fix walls...then check the new object file in Cura. It's possible that you'll need to go back to fix walls before printing, but I had good fortune. Printing it at 70% worked out great - my first run after my adjustments had no errors.

Below is the image of the "thin faces" I mentioned:


Good luck!

EDIT:
As a follow-up to this article, the current release of Blender has the 3D printing information as part of the object information ("n" when you're selecting the object). I haven't upgraded yet, but moving from a plug-in to part of how Blender is used is a great acknowledgment on how Blender is developing. I've been using 2.76, I think 2.78 has this feature but is buggy in other respects.

Monday, January 18, 2016

Tips on Getting Started, Part 1 - Cura

Getting Started with Cura


My coworker from the first post suggested that I print existing models to learn what to expect.

I printed 8 cookie cutters from Thingiverse, then started printing the Pip-Boy pieces (also mentioned in the first post). Later on, I downloaded things like Open Forge terrain for D&D, D&D figures from Shapeways, and watch stands from Thingiverse.

After the first couple of items printed, I probably could have moved onto the "difficult" pieces. But as a caution: just because it was modeled in 3D, doesn't mean it will print well.

Profiles in Cura

Cura has a "basic" setting that didn't work for my first print - I ended up jumping straight into "Expert mode". Expert mode uses Profiles to manage general settings for what material you are using, and how fine you want the details. This is primarily addressing extruder temperature (melting the plastic), the bed temperature (so there's a consistent temperature once the plastic has been "printed" - allowing for regular adhesion)...and then Layer Height for detail (the smaller the number, the finer the detail). A distant fourth quality is "in-fill" - if you have 100% in-fill, it will be a solid object. More plastic, longer printing, heavier...20% is considered "enough", but if you want additional heft or strength...

If you need to use gcode to print, these profiles will be included in the gcode instructions.

Standard profiles can be found on the lulzbot website, and probably anywhere you downloaded Cura from. (I did fast printing for a long time. It's rare that I use "fine" printing.)

Adding Useful Information

You bought some PLA/HIPS? Great. In File>Preferences>, you can put the Cost/kg. This will give you an idea on the cost of your model - it's probably cheaper than you think. My current standard price is about $25-30 / kg.

Rules for 3D printing

It's ridiculous to have rules for this, right?
  1. The object needs to be small enough to fit on the printer bed. (I think the Lulzbot Mini has a 6" x 6" x 6" area.) One of my early-modelling projects was designing a 9" diameter braiding wheel. I cut it apart in quarters in Blender, then printed the 4 pieces in Cura.
  2. The printer can only reasonably handle 45 degree angles as it builds vertical layers. Beyond that, the plastic has nothing to layer on top of. If your object has overhang issues, Cura's answer is "Support: Everything". It will leave some rough parts where you remove the support, but it doesn't use a lot of plastic - and doesn't cause your model to collapse as it would without the supports. (I've aborted a half-dozen printings because of not having support turned on.) Cura is an all-or-nothing choice, when it comes to supports.

Slightly Advanced Choices

Rotating the Model

Sometimes I'll change the model's orientation to the printer bed. Usually so there's less support needed, or so that the smooth surface from the bed. Cura's generous with rotating (and bringing in models) - it will always bring the object up into the printing area. This is nice if you don't create your objects above the origin point in Blender.

Scaling the Model

Ugh. I think my biggest issue with Blender is scaling, due to its use of "Blender Units" or BU. They actually export as millimeters. I'll talk more about the measurements once I talk about Blender in-depth. Fortunately, Cura is good about scaling your models. My initial braiding wheel was usually boosted by 28:1 scale in each axis.

Printing Multiple Objects

When I'm printing multiple small objects, it's convenient to load them all onto the platform in Cura. This reduces the start-up time for the printer - the Lulzbot Mini needs to scrub off the plastic on the extruder from last printing session, and auto-level the bed again. This tacks on 3-5 minutes, which becomes a more onerous task if you're printing things one after another. Under Tools, you can choose to print all at once or one at a time - I recommend one at a time, so that the temperature is consistent for adhesion.

Thursday, January 14, 2016

The Software Tools

Overview of the Software Tools Used

The best part of these tools: they work regardless of OS - Windows, Mac, or Linux. There's a couple pieces of software I installed on my 2008 Mac Pro (this is nearly 8 years old). It has 16 GB of RAM and is running 10.9.5 Mavericks. I have a Linux laptop with 8GB that can handle Blender.

Cura

The first piece of software came with the Lulzbot Mini - Cura. Cura is an open source "slicer". Basically you need a slicer to create instructions to send to your printer. You can put multiple objects on the virtual bed, scale/rotate them, and add supports (we'll cover this later). The instructions are exported in "gcode" - mostly important if you are putting those instructions on a memory stick and putting the stick into your printer. (This is not an option for the Lulzbot - it needs a computer hooked up to it.)

If you are just downloading models from the internet - that's ALL you need.

Blender

The second piece of software I installed was a 3D modeling program, to create new objects. I settled on learning Blender - none of the software I found was strictly meant for 3D printing. Blender is also open source/free. It has a lot of features, including animation and video editing that I won't be needing. I considered Google's Sketch-up - it's supposed to be much simpler and easier to grasp. (As it wasn't meant for 3D printing, it can sometimes require MeshMixer to make it a solid object to print.) In the end, I was going for a complete learning experience, and wanted more tools than I needed. If you're a student, you might check out Maya - a friend mentioned he got a 3-year license for free/cheap. Tinkercad and Fusion 360 are often used by other 3D printing people.

The file type Blender saves is ".blend", but you can export it as an .stl file, which is what ...most? slicing software use. If I have made progress on an object, I will usually try to save it every 15 minutes. My naming convention is similar to what I practiced when learning ruby - 5.2.1. This would mean I've gone through 5 major revisions, I am on the second minor version (but pretty much version 5), and the first minor tweak to the minor version. I have a simple text file, where I take quick notes on what the new version added in case I come back to a project 6 months later.

If you are looking for a simple design+print solution, you can stop here.

Octoprint

Octoprint takes over the "print server" aspect. My Lulzbot needs a computer to push the gcode to it, but it doesn't care too much about what computer does it. I picked up a Raspberry Pi B, a wireless USB stick, and a 8+GB micro-SD card. I would probably wait a month or so before adding it to your process - I'll eventually have a documentation of how I set mine up. The cool part of Octoprint is that  if you attached a cheap USB camera (goodwill=win!), you can watch what it's printing or even get a time-lapse done. Another benefit of Octoprint is that you can have multiple computers feed their models to it - laptop, desktop...it doesn't care.

Saturday, January 9, 2016

The Start is not the End

The Disclaimer

Disclaimer: I am not an artist, electrical engineer, or a professional programmer.

I thought at least SOME of these would ruin the experience. I was horribly wrong. And not the "you need them all". You need none of these skills. Maybe someday I'll develop extra skills along those lines.

The Beginning of the Maker

I like the idea of making things. I have a dozen or so "MAKE" magazines. My dad had a woodworking shop in the basement where I grew up. One of the things that religion focuses on is the Maker or Creator - it's a high calling.

You want to feel good about yourself? Create something. Do art, cook, weld, drill, glue, sculpt, music. (Gratitude isn't a bad method to feel good, this is about making.) I cook. I like some game design...but I'm not really an artist. I like architecture, but not freehand.

The 3D Print Maker

At one point, I start saving towards a printer. I wanted a list of a dozen or so things I wanted to make, before I started shopping. Was this a fad for me? How serious was I going to be about printing? It took about a month in my off-time. Custom cat-toy feeders (too easy? Print a new one with smaller holes)...game pieces, a specialized pill dispenser (controlled by Arduino, Raspberry pi?), a braider's disk for the girlfriend, dinosaur cookie cutters, flora for D&D games, a shotgun loader for a Nerf gun, a tootsie roll stamp (look up Toot-Sweet Factory from a long time ago). The final game breaker was a PipBoy for Fallout 4. Found here: http://ytec3d.com/pip-boy-3000-mark-iv/

Researching the Printer


I will start by saying it's painful. I joined meetup groups (no responses), I browsed local Reddits. None of my friends were into it. None of my family had done it. An uncle of my girlfriend had tried a kit years ago, and had replaced his stepper motor several times - he has the part, but didn't bother, and I don't know if he ever actually printed.

Eventually through networking at work, a coworker mentioned a guy down on 6th who had done some printing. I tracked him down for lunch.

His experiences:

  • Also a kit: he has an electrical engineer background
  • Yes, a heated bed is awesome - he installed one later on
  • "Auto-level" on a bed is needed - it gives your printer knowledge on the slope of the bed, if any
  • Printers are not really that noisy (reviews all had checkmarks on noisy), not more than a paper printer
  • Only ABS is toxic-fume smelling. PLA smells like waffles
  • PLA itself is natural except for dyes...you can get "natural PLA" without dye - kind of food safe
  • Moisture is indeed bad. Invest in a cooler with a way to suck up moisture. (Or only print with one reel at a time, and don't let it sit for 6 months)

My Lulzbot Mini Purchase

I went with a Lulzbot Mini, for about $1300 on Amazon. Tom's Hardware gave it a  strong review as a plug-and-play printer. I wanted to spend time printing (and designing 3D models), not repairing the printer - troubleshooting what was wrong today. A different Tom did a great youtube walkthrough of the setup here. The 6" heated bed is nice, the auto-leveling bed is great.

I picked mine up in October 2015, and it's been a great experience.

Ordering Plastic

I ordered a kilogram of PLA from Amazon at the same time - this is a lot of plastic. If you are printing for a couple of hours every night for a month, this is about a month or two of material. (If you want to print with HIPS, Amazon was my source for this as my local stores don't carry it.)

I also found a selection at Fry's Electronics - I even found some on clearance, so I picked up some more. There's a local electronics shop also on the Eastside of Seattle called "Vetco". Really great people, knowledgeable and interested in projects. They had a lighter selection of plastic, but they carried the parts for the Octoprint.