Thursday, November 1, 2018

Figuring out bad meshes in Cura and Blender

One of my recent quick projects was making a simple "D" with a cut for a magnet. I was using magnets from my first project on Thingiverse, so I started by appending the "white" portion of that Blender file.

The benefits of appending, means that I get the Blender object, without having been converted to an STL. This means if I do edge loops, Blender already knows how to play with it...and I can use my current Blender startup file, instead of the dated one I used two years ago.

I switched into edit mode after the append, selected all of the planes of the magnet-holding portion, and hid all of that. I then selected the rest and deleted it. Looking back, I should have just done Control-I, to invert the selection. Oh well...un-hid the ring of planes and made it a cylinder (select an edge with Alt-A, F to create a face, repeat it for the other end of the cylinder. Renamed it Magnet.

Back in Object mode, I added Text, Edit Mode to make it a D. Object mode, Object>Convert to>Mesh from Curve/Text. I went back into Edit mode to scale the interior of the D in, so it would be a thicker letter. Boolean>Solidify>Thicken 1mm...Apply, easy.

It should be a simple matter just to Boolean>Difference the magnet out of the D...and it was. Opened the STL in Cura, and it was ready to print. But there's a red bit. Huh. (I'm posting the fix above it, the broken original beneath.)


It probably would have printed, but it also means something is wrong in the design.

Running Blender 2.78 on OSX, I re-examine the cutout...it's a slightly different shade. It's an easy enough fix, reseting normals in Edit mode. Mesh>Normals>Recalculate Outside. But it doesn't explain why this was a problem!


Remember my first steps? I used the magnet sizing from the STOP sign...and the cylinder part inside-outside normals were flipped. When I made the magnet cutout, by using those cylinder sides, it used those same normals. You can see the Magnet object that is off-color. (When I was doing work, I hid objects and never saw the color difference.)



Be wary of Boolean cuts with bad normals!

[The solution is: fix the normals on the "bad" magnet, so the colors look correct. When you use boolean on the D to remove the magnet shape, it will have the correct normals.]




Sunday, October 7, 2018

Udemy's Blender Course - Learn 3D Modelling

The intro:
My girlfriend wanted to buy me something 3D printing related for my most recent birthday, so I suggested something I wouldn't buy for myself. The class was $12, for 50 hours of instructional videos — bound to learn tricks or better processes unknown to me. I'm not an expert, having learned most of my skills from youtube or practice. (A brief shout-out to SEABUG - a local meetup for Blender. They know a lot of things, share experiences, and really helped expand my knowledge of what was possible. I found them through Meetup, but they also had facebook...just in case you want to look for a local group near you.)

Short answer: please don't spend $12. Wander youtube, check out people like Miguel Zavala (of the D&D monster fame as mz4250), Zacharias Reinhardt...I still really like inventimark's material — as an intro into Blender for 3D printing it's fantastic. You'll progress a lot further in 20 hours there, than 50+ hours in this udemy "class".

What's the key to delivering a good joke?

An hour into the class, and they hadn't even touched the starting cube. The longer I got into the class, the more it felt like they were stretching out content. 50 hours now seemed like a punishment, not a value. [Timing.]

What's the key to delivering a good joke?

3-button mouses. Share your work on udemy. 3-button mouses.  Share your work. Remove doubled vertices. Do an action. Remove those doubled vertices. Do an action. Remove THOSE doubled vertices. Share your work. [Repetition.]

Bad techniques

It's great (and mostly true) there are tons of ways to accomplish the same thing in Blender. It's also true there are BAD ways of doing things. Inefficient, or delivering meshes that don't work correctly. There's nothing stopping you from mass-removal of doubled vertices. (This is in Edit mode, Control-V to get the vertices menu, remove double vertices - only possibly affects selected vertices.)

In a section where they want to low-poly an object, they want to remove an edge loop that is giving definition - alt-select the edge, x to delete the edge loop, alt-select the edge loops above and below that deleted edge loop, then Bridget Edge loops (I use the spacebar to search to get there.) OR...they could have just alt-select the first edge loop, then dissolve edge. See what I mean by inefficient?

Bad knowledge

It's fine if you want to skip a topic that you're not familiar with. It is bad if you want to touch on a subject you know nothing about, and present it as knowledge. In this case, it was about something near and dear to my heart, 3D printing.

That somehow, you need to move your model so the bottom of the base is at 0 on the z-axis. STLs don't have that. Also, setting your scale to 1. Again, you export as an STL, it doesn't know what scale Blender had it at. (If you needed to, as a Blender file imported into Unity — sure. Object>Apply>Scale.)

The statement of "Is the model closed?" Well, the language is "Is the model manifold?" Is there a hole in the mesh that leads to the "inside" of the model...or are there parts within the model, that aren't necessary for printing that should be removed? (Use the 3D Print Toolbox plug-in to check. It isn't great at fixing it with the magic "Make Manifold" button, but sometimes. It can show you the broken bits with the "Check All" button in edit mode.)

Suggestions

They should have broken out non-Blender things as bonus content. How Unity uses your Blender models. Best practices for backing up your work. Their interest in "LEAN" processes.

Instead of talking about that there ARE different ways of doing things, either stick to your techniques (as an expert), or show the different results (or at a minimum the time/effort it took to employ those different methods. I have limited amounts of time, and would like the least amount of brute force needed to accomplish a task...unless the other end result is going to be that much more spectacular.

Get someone to actually edit their slides - it's vs. its? Don't use periods on bullet points (or at the very least, be consistently bad). Always make sure your screencast keys are turned on.

Summary

I skipped reviewing things that were not relevant to 3D modeling for 3D printing. Lighting, camera, animation, the video game related parts...not 100% that I'll finish the "class" at this point. I learned several small bits of information, but not worth the extreme amounts of filler.





The Days of Filament Past and Future

The home models for 3D printing are FDM (fused deposition modeling). The printer has a spool of filament, feeds it into the printer, through a heat sink (so it doesn't melt INSIDE the printer, from the next step), through the hot end to melt it, and pushed through the nozzle by the filament above it being pushed through.

The hot end nozzle on my Mini is .5mm, which is basically its limitation on how thin of a line it can print. Other printers can have smaller ones, with the drawback it's going to take you longer to print a bigger object. This is not the filament size - the Lulzbot Mini uses 3mm, but I've heard you can change the feed rate to be faster in Cura for 1.75mm...but I haven't gone down that road yet.

You can switch nozzles, but be cautious on getting it too tight — it can strip threading on the nozzle and/or the hot end block. Tighten it a bit, try extruding...if you are getting plastic out the sides of the nozzle, tighten slightly more.

ABS
Durable, but toxic fumes. Supposed to be really great at bridging. (Where the filament is essentially strung out over air, between two edges without support material beneath it.) I have been less concerned about strength, and more interested in less toxic fumes...so I basically started with PLA.

PLA
The standard for beginning prints. Easy to print, easy to remove. PLA is non-toxic...except for its dyes. It would be food safe, if not dyed...but the hot-end could introduce toxicity. The other hurdle with "food safe" plastics, is that the printing process leaves the plastic slightly porous - minuscule bacteria could grow within it. Sands fairly well, forgiving as far as temperature...a bit brittle.

HIPS
Very similar to PLA. I think it sands the best. I discovered the problems of printing larger projects with it though....the corners would pull up during the print, layers can separate in such a way that you can't even glue and clamp it. ($30/kg) Snaps easily though.

PETG
So far, this is my favorite filament after several years into printing. It's very durable like ABS, prints easily like PLA. Sanding translucent PETG (like some eSun, $30/kg, prints at 235/85) - it leaves scarring. If you need to clean up a print, consider cutting it with nail clippers. I used to be super happy with Makergeeks PETG - inexpensive, regular diameter (2.85mm experience), and free shipping on top of the constant sales. I just canceled an order that had been sitting around for 3+ months...I kept getting "shipped in 4 days" at every email exchange, or offers of alternative material that also never shipped. Maybe when they get their system back in place again. (Currently a no-buy recommendation as of 2018.10.07.)

Coffee HTPLA v2.0 - Proto-pasta
This is pretty interesting as a concept. It has coffee in the filament, so it smells like a sweet, syrupy coffee as it prints. I received a lovely gift of a half kilogram for Christmas.   You can bake it afterward in the oven on glass/ceramic to give it more durability. It's...tricky to print with.

  • It drizzles out even when it is below the print temp of 225.
  • It..."feels" sticky.  My hot end looks covered in dark molasses, preventing reliable nozzle-to-disk corner auto-level process. (Want to hear a crunching-like sound? Gah. The hot end keeps pushing down until it gets an electrical connection...and then thinks the board is level at that mistake...this is how you melt a PEI sheet.)
  • Upper layers with very little to print will be a dark brown, compared to the ordinary "glossy" shine that an unbaked piece will have.
  • Usually have to carefully watch the auto-level (make sure the sticky bits on the tip don't cause problems) AND first layer - the filament doesn't always feed through correctly. I typically have to restart the print 2-3 times. 

Things I haven't tried:

PLA+, PLA-HT - supposedly a better PLA, more durable.

Flexible filament - brands like Ninjaflex. In order for my Mini to print it, I'd need to swap in an entirely new head. ($400 and do-able, but I don't have any ideas that need flexible filament currently.)

Wood+plastic filaments - There are plastic+wood filaments, that can be sanded and (somewhat) stained. I've avoided using it for now - I've read a bit about it gumming up the extruders for users, and I like my printer too much to risk it.

Metal+plastic filaments can actually conduct electricity.


Thursday, April 19, 2018

Octopi and Octoprint

Cura used to hang during long print jobs, when I used it to drive the printer from my desktop. (Lulzbot Mini has a USB connection, no SD card slot.) Octopi addresses that problem, and adds some additional useful features.

Octopi is a Raspberry Pi linux build that runs Octoprint, connecting on USB. It's basically a mini-computer that acts as the printer server.

The benefits of Octoprint:
  • A dedicated server - nothing else is running on it, making it very stable
  • Built-in web-based GUI - you can upload files directly to it, start/cancel jobs, extrude/retract, heat bed/nozzle...
  • Plugins are available, including API access (I use it for the Octowatch app for my Pebble)
  • Any computer on your network can access it (and there is id/password for control)
  • USB webcams can be easily added in for monitoring/time lapse
  • Modern Cura/slic3r plug directly into Octoprint, allowing you to send gcode directly from your laptop/desktop slicer application - can print these files without proper settings in Octoprint
  • If the micro SD card stops working correctly, wipe it, reinstall
The challenges of Octoprint:
  • Must open the web browser to reconnect to the printer, after the printer has been off
  • Has its own printer settings (used ONLY when uploading stl files to Octoprint)
It took a number of failures. Starting with a Raspberry Pi 2 B+, with a wifi USB stick, keyboard, mouse, monitor...Octoprint didn't work. I put the Octopi image on the micro SD card from my desktop OSX, following the instructions. Could see it on the network, log into it from ssh, but couldn't see it as http://octopi.local from a browser. Eventually it did work, after repeating the process again. Either the micro SD card's image got corrupted, or I don't follow directions easily.

I picked up a Raspberry Pi 3 and created the image (and made the changes to wifi) from a linux laptop. The only thing I plug into the USB ports are the $5 USB webcam from Goodwill and the printer's USB connection. It's magic. There's even a Pebble app (Octowatch, Gullickson Laboratories) that can connect to Octoprint with minimal fuss. Octowatch has some basic functions: time remaining, pause/restart, and my favorite "run again"/stop. Run again is pretty sweet, especially if you're duplicating a previously successful print.

Tips for setting up Octoprint correctly:

  • If you are on ANY system that auto-corrects you, be cautious when you are editing the octopi-network.txt file on your pre-Pi run. Smart quotes suck. Make sure it gets saved as plain text. (Edit: Current Octopi, edit octopi-wpa-supplicant.txt instead, as octopi-network.txt is non-functional.
  • If you are having problems later on, wipe the card and reinstall. Your image can get corrupted, through no fault of your own.
  • Change your password, when you first log in. When I set up my first pi, I thought I needed a keyboard and monitor...no. Maybe if you are going to troubleshoot it, otherwise...just remote into the pi from your existing computer.
  • Use the IP address seen from the router - your router might let you reserve the local IP for your Octopi, this is a benefit from finding it again on a webpage. (For example, Octoprint #1 is 192.168.1.11, while #2 manages a different printer on 192.168.1.12.) If you don't reserve an IP, the router will assign random IPs whenever it is powered back on. If you have octopi.local working 100%, maybe you won't be using IP anyways.
  • Sending files through web browser - that's when Octoprint's Cura set-up matters. If you are just sending it gcode through your Cura desktop application...I don't think settings need to be accurate. Nozzle size, etc...as long as you have it correct where you generate the gcode, you should be fine. (I ran Octoprint with an incorrect nozzle setting, and didn't notice it until I was trying to use Octoprint to measure how much filament was being sent through vs. e-steps. Impossible numbers.)

Useful Linux commands for your Pi:

  • ps -ef | grep oct
This will show any octoprint services running. If you don't have a line with "/home/pi/oprint/bin/python /home/pi/oprint/bin/octoprint serve --host=127.0.0.1 --port=5000" - this means you can't log in through the web browser. 

  • passwd
Changes the password for the user "pi", that you are logged in as. Always change the default from "raspberry".
  • exit

Will log you out.

For future readings, I also plan on looking at this: https://discourse.octoprint.org/t/how-do-i-backup-my-octoprint-settings-on-octopi/1489 - backing up an entire card (in addition to maybe backing up Octoprint settings).

Blender Things I Did Not Know (Part 1)

Blender has a lot of techniques, for doing the same thing. It's great, in some ways - multiple paths to find a solution. There are faster techniques, there are more accurate techniques. If you're like me, you watch tutorials on YouTube when you're considering a problem.

At two years into Blender, I know some things. It means that tutorials will typically cover 95% of what I already know, and...I have to watch the whole thing to squeeze out 5% of the value.

This starts sharing my reading list of things that I didn't know.

Joining, Merging, and Filling Holes:

Repairing a Mesh

I've used his first two methods. "(F)ill" has always been "(f)ace" in my head. His second method, he chose a single edge to make a face from. I usually (f)ace from two opposing edges, or the 4 vertices. A single edge? Well, saves me small amounts of time.

His third method, eek. I didn't know the "alt"-when selecting an edge helps with edge loops. (Saves me button clicks of Select>Edge Loops.) And I didn't use J to join to vertices to make an edge within a plane...I've been using the Knife Tool. The Knife tool has some cool benefits to it, but J is fast.

Jimmer's 4th method, not covered...I would have extruded a vertex along a x/y/z axis to get a corner, and get the x/y/z axis correct by inputing the numbers in (make sure you are in Global, not Local). Create edges to the other axis vertices (f). Subdivide the edge a correct number of times, make faces. You only need to get coordinates right for that corner, and subdividing is a fast Ctrl-E away...you can add more than one cut as needed.

Reading the YouTube comments, there was some slightly more complex things to get vertices lined correctly, using the third method. Change the Pivot to Active Element (this is found on the bottom bar), grab the vertices you want to line up, and the final one is what you want them to align with. Then (s) for scale, (y) for the y-axis, (0) to zero them. Interesting and fast.

Normals

A friend asked me how to fix normals when importing things in from Maya. I wasn't familiar with it, so I basically just pointed to Mesh>Normals as the solution. Sometimes when working in Blender, I've noticed off-color faces...I had to delete faces, rebuild them...I now understand what those faces mean. And what the Shading/UVs tab in the upper right gets you....and you can Flip Direction on a single face. A much faster and cleaner response to the occasional "Blender doesn't know what you're doing" trigger.

Wednesday, February 14, 2018

Dying Printers and Rebirth

In December 2017, there were printer woes. My trusty Lulzbot Mini 1.03 from October 2015 was having issues. Watching Octopi, I could see it wasn't holding a steady temperature for the hot end.

I attempted just fixing the thermistor, which heats up the aluminum hot end. It was pretty involved - taking the whole printer head apart. Putting it back together, there was a wire feeding into the hotend - I couldn't tell if it was supposed to be covered by heatshrink or not. ZAPPPP!

It caused a short, causing my printer to go a bit crazy. Crashed the head down hard, then *through* the washers. This is where I went completely wrong. One of the z-axis motors was making bad noises, so I tried to adjust all of that. I should have just focused on the short first, then...other things.

The hotend was replaced, to avoid more shorts, and reduce what could be wrong with the machine. The left z-axis motor can work, but it grinds. I did some print jobs as an experiment - the second one caused my x-axis to decant...one side was all the way up, the other side was halfway down.

This leads to the story: when do you leave a hobby behind? Was 3D printing going to be a did-it-for-2-years thing, or a longer project?

Future options as I saw them:
  • Retire the hobby
  • Buy a new printer
    • Another Mini?
    • Prusa mk3 (drawback, it uses 1.75mm filament, and I have a lot of 3mm)
  • Buy refurbished Mini (1.03 is $750, 1.04 is $1000)
  • Buy a craigslist Mini (1.04 with the extra Flexystruder head for $1k total)
  • Fix original printer (or buy another from the above options)
I was still learning things. I loved printing. I loved making things. Retiring wasn't something I wanted to embrace. Just designing seemed...boring. There was a risk that if I sit around trying to fix my broken machine, that interest is lost (based on others' experiences). I ended up buying the Craigslist Mini. The guy was okay, he had used it to prototype some cool, flexible iphone cases with a built-in spot for the dongle.


The 1.04 has some nice features. An extra blower fan (nice, but also blocks seeing the nozzle straight on), noise dampeners on ALL of the motors (I had modded my 1.03 to have a dampener on the y-axis), and the filament feeder was much more reliable (probably my only real complaint on the 1.03, and it wasn't that big of a deal).

I have kept working on my 1.03, but the grinding is tough - the next step is to research "squaring" to see if it's my x-axis out of alignment. I was going to replace the z-axis motors, but they are solidly screwed in. More research.

I really enjoy designing and printing, and feel fortunate that it can continue.

Thursday, February 8, 2018

3D modeling and printing for Gloomhaven storage

I've been designing upgrade components for Gloomhaven for the past several weeks. So much, that everything for storing Gloomhaven efficiently went into one Thingiverse project download: https://www.thingiverse.com/thing:2774773



I started with the toolbox frame, being a Harbor Freight "20 Bin Portable Parts Storage Case" (any of the mustard-yellow bins came with it). $10 for each one, and two was more than I needed. It's completely possible to have remade the basic box myself, but I cheated. This project by cpodbob was a fine start - I really liked the feet they had made.

Most of my new boxes needed to be a 2x2 - big enough for playing cards. Before I started modifying THAT box, I printed a basic box to get a feel for how thick the walls would turn out, that the feet would fit properly...the boxes that came with the Harbor Freight tray had small pegs for feet.

First box, the walls were a bit thin at 1.5mm. 3 was more solid than I needed, so I evolved down to 2mm. Did you notice the crosses embossed in the bottom of the lid? The trays needed to either fit in them or at least not be interfering with them. 2mm was good.

In Blender, I made a copy of the 2x1 box, multiplied its width by two...but that made those awesome feet stretch out. I went back to the original box, went into wireframe mode (z), used the (b)ox selection tool in edit mode, and grabbed one side to match the copy's new width.

Good Design: I added a hole in the bottom in each of the boxes, to push things through from the back. This means there's no awkward "slamming down a box upside-down to get something out". This will come back even more with the trays later. (A simple Boolean operation, selecting the box and choosing difference with a cylinder.)

Event Card Boxes (City & Road)

Event card decks were my next consideration. It needed three compartments - 30-ish unlocked cards that would be pulled out often, a tray for the cards that had been experienced but not removed from the game, and room for 30-ish locked cards (needing an event to put them into the unlocked deck).



The first attempt had the dividers opening up in different directions. One set of holes on one side of the box, halfway up. Another set of holes at the other side, slightly further up on the box.
Bad Design: the underside divider got caught.
Good Design: there was enough room between them, when they were both pivoting from the same side, that both could open.

Difficult to see, the event box dividers were not flat pieces with pegs slapped on - I wanted the pegs to be pushed in, so when they popped into the holes they would stay. PETG is great as a filament - I made the original "arms" too thick to push easily. Slimming it down to 11mm meant that it was still solid, but just flexible enough for the posts to pop in.

Monster Trays

One of the organization needs of Gloomhaven, is to find the correct monster standees for what is going to fight that scenario. When playing other people's games, a huge plastic baggie was the worst. You didn't know how many to find and you needed to compare and contrast against hundreds of other monster tokens. Except, these are 3x2 boxes, instead of the 2x2 boxes I remixed earlier.


It works out that you need 6 trays for the different monsters. Each of the mini trays for each monster, had a hole in the back - you don't need to dump the whole tray to get just one stack out. You can also fit 6 monster standees per mini tray (sometimes 10 for the smaller monsters)...and the Harbor Freight tray is tall enough for exactly 3 trays.

Bad Design: I should have designed for the Earth Spirit. I had to remake the tray because I thought I could eyeball the dimensions "enough".
Bad Design: I also didn't know how many mini-trays I needed. I got lucky. I should have done my homework, counted it all out, then recounted it.
Good Design: The trays were stackable, so they needed foot cut-outs to sit in. I could have just made them all flat with no feet, but this gives them better stacking. I was happy with adding the cutouts.

Making the mini-trays - it was important for them to line up.  For this, I was in edit mode, and used the knife tool with "c" to make the cuts straight across, and "z" to cut through as if in wireframe.

To cut out the area for the feet, I copied the bottom outside vertexes of the feet, and dragged them to the top, then started merging vertexes (alt-m) first to last. This meant I didn't need to redo all of the planes. It was still tedious, but only 10 minutes of work. Measuring 3 trays from top to bottom, it worked out to tray+feet+tray+tray, as the second and third feet fit into the tray beneath them.

You can also see the Boss Standee tray - there's a mini-tray for the huge Stone Golem standees, and the rest of the "large size" standees fit loose in the un-trayed area.

The red tray holds the monster stat cards & envelopes. Mostly just a big 3x2 tray, but added lips inside the box so the envelopes would sit on those. Again, a hole in the back to push things out. This tray was 2 stacks high, combined with the Boss Standee tray it fit flush to the Harbor Freight Tray.

Dead Card Box

I also made a dead-card box, for the cards removed from game. I considered gluing shut, but haven't done it...yet. For the embossed "broken card" icon for the cover, I took a card-shaped cube, used the knife tool to make cuts in a zig-zag fashion, and then used the "p" selection tool to break it into two parts. This allowed me to rotate only part of the total card-cube, and then I "j"oined them back together, so I could face the two bottom parts of the ripped card back together.

The cover rests on some extruded shelves, instead of the cards so that more cards can be shoved in.

Store Divider

The store is frequently messy. You have the store, future store cards from prosperity, item designs from chests and events, and random item designs. Hopefully they will all end up in the store, but in the beginning, each separate.
I thought about redesigning the box and incorporating the lengthwise stand into the side of the box, but...maybe that would be good for people who sleeve their store cards.

The design challenge was to have the dividers stay upright and solid, but be able to slide to accommodate more/less cards in the various stacks.
I originally made a groove in the stand and the dividers had little tongues to fit inside the groove - too many tolerance problems can come up that way.

Good Design: Don't make more headaches than you need - reduce complexity, especially multiple tolerances.

I removed one side of the groove (on the part closest to the box) and thickened the tongue to take up the same space. I also made the dividers thicker so they would stay vertical more easily.

Overall

  • My Gloomhaven storage method turned out really well. I might tweak some more storage boxes later, as demands come up.
  • I learned the knife tool a lot better. 
  • I addressed card mix-up issues for the store and events. 
  • I probably could have made the box from scratch, instead of a remix. 
    • Is it lazy to use code that's already there and suits your purposes? Existing box gets repurposed, I'll call that a mixed-win.