Wednesday, 21 September 2016

Looking for better design options and better slicers... and then, stop

I've had a lot of fun designing things in OpenSCAD, but I'm also running up against its inherent limitations. Doing anything organic-looking is difficult, because the little tweaks that make it look "right" have to be done via changing the program and recompiling.

I used to be the maintainer of Dia back when I needed diagrams for various papers. One of the things I liked in Dia was its approach to Bezier curves. For either loops or open curves, you could control each point finely, and switch between symmetric, smooth, and sharp corner for each. I pretty quickly got a feel for how to create the curve I wanted.

Now that OpenSCAD is my tool and physical items my eventual outcome, I find making equivalent figures a royal pain. For instance, I wanted to design something similar to this sketch:

Trying at first with simple polygons and the offset() function, I found it too blocky, unless I spent a lot of time interpolating points by hand. Next, I found a splines library on Thingiverse, and got fairly far with that. However, splines tend to "push" their neighbors a lot, so I ended up with unpleasant overshoots making the parts not exactly the same thickness:

This is three spline loops overlaying each other: One from the top point over the middle to the lower-left corner and back, one around the two right-hand points, and one across all three points and the lower-left corner. You can see the problems around the middle point, where the two smaller loops poke out a bit, and in the lower right part, where the bigger loop shoots out more.

There's also a Bezier library, which creates one Bezier segment at a time, again from programmed points.

In Dia, it would have been easy to get the corners and endpoints right by controlling each corner accurately. Unfortunately, 1) Dia doesn't run on Mac except through XQuartz, which is an unpleasant experience (same with Inkscape), and 2) Dia doesn't export to OpenSCAD points. The latter could be fixed, though with more coding than I want to do today. The former is more tricky, and in either case it's not the greatest way of working either: You can get the base structure right in Dia, then you'd export as an OpenSCAD set of Bezier definitions, take that into OpenSCAD and try it there. Any further modification you'd have to either do by fiddling constants (in which case your Dia diagram becomes outdated) or going back to Dia and rework it from there, then exporting again.

What I would like would be something that can edit parts of an OpenSCAD program interactively. It'd be OK if they were limited to a few kinds of things, like beziers and polygons, and obviously the parts would have to be "simple", not involved in minkowskis and hulls and such while editing. Maybe something that just lets you interactively edit points in a section of an OpenSCAD program text.

I've also started trying out other slicers and printer controllers, since Slic3r doesn't do the supports for a new extruder holder at all well.

Cura: I know several people who use and like this. It has a nicer interface than Pronterface/Slic3r, very few options compared to Slic3r (which is good if those are the right options), but hangs at "Preparing to slice..." (no a MacBook Air). This might be a security blockage if Cura tries to call out to a separate binary. Or just a bug. They claim it's fixed in release 2.2.

CraftWare: Hadn't heard of this one before. Can't run this on my work laptop (yet) for security reasons.

NetFabb: The professional choice. And by "professional" I mean bloody expensive, €1000/year subscription. Hahahano.

Repetier: Can't run this on my work laptop (yet) for security reasons. Also, the Mac version is quite a bit behind the Windows/Linux versions. It allows remote control, though with limited features for the free version.

Simplify3D: Like Cura, I keep hearing mentions of this. It's not free, but at €149 isn't not outrageous. And at least it's not a subscription system. I paid that much for Lightroom and never regretted it. The Mendel90 is supposedly supported, but it won't run on a Raspberry Pi. Unfortunately, they don't have a trial period, so I'm going to try other approaches first before handing over money.

KISSlicer: Supposedly going to be available for Raspberry, which is nice. Can't run this on my work laptop (yet) for security reasons.

MatterControl: Won't install in a specified subdirectory on a Mac (in any way I have found). Since I use a work laptop, I have all my apps in an Applications folder under a separate non-privileged user, and refuse to give root access to installers (like Adobe's CloudCrap installer which is required for Lightroom 6).

Slic3r: At least I know this, and it integrates with OctoPrint, which I am looking at switching to for running print control on a Raspberry Pi.

At this point, printing grinds to a halt as my work laptop gets beefed up security and can't print or upload firmware unless I get a security exception. Pronterface on my iMac doesn't yet like to connect, nor is Arduino set up to understand a Melzi. I shall have to see my earlier notes if I wrote down what actually worked.

Sunday, 4 September 2016

Voronoi diagrams and printer error art

I've been busy doing various prints. I did yet another phone cover, this time at 1.3mm thickness, which seems like a good compromise. I changed the voronoi pattern, too, not just to make it unique, but also because there happened to be a hole almost like the one I made for the fingerprint scanner but at the wrong end of the phone. So confusing.

The new print came out nice, except the right-side holes were a little too low, so pressing the side could turn the phone on and off. Interesting note: The print behaves differently when printing small parts of a piece and the whole piece, presumably due to differences in temperature.

I got myself a tiny adjustable soldering station, of a make that goes below 150C. I'm trying to use it to remove some of the little pieces of filament sticking out here and there, and smoothen the occasional rough edge. I would like a larger heated surface for that purpose, though. Like the ones you can get for wood burning, except at low temperature.

I did my wife's workshop/bedroom furniture as 1:50 models for easier playing around with. A couple of the pieces case off during printing, leading to this tiny Godzilla scenario:

They were easily re-printed, though, and now merely away a room to be put into.

I made some rounded tips to put on sword cores. Unfortunately, when I printed 3 of them, two of them didn't hold on to the bed (should have used a raft for such a small print surface, I guess), and came loose. I removed them, but the filament being printed into the area then created this piece of print-art:

Switched to the new red filament from DasFilament. Here's a test piece (accidentally printed with support, which somewhat defeats the point) on top of a lid that has been painted with the supposedly same RAL shade, 3003:

It's not exactly the same color, the print is a slightly brighter red. Bummer. You need a pretty good eye for color to realize this when they're not next to each other, though.

Next, a Dustbuster attachment for getting into very tiny places. Took a while to get the outline right, since all I had to work from was a printer scan. And I don't think it's perfectly tight, but finding gaps is tricky. What an oddly-shaped mouthpiece. What's wrong with a circle, anyway?

Finally right now I'm printing a new mount for the extruder motor, the design that actually is for the Mendel90. The entire heating part is loose, which causes misprints with some regularity, and I believe nophead's version can be fastened much better. Alas, ironically, this print is suffering from those exact misprints. But this red filament is quite nice to print with, sticks easily, doesn't curl that much.

Saturday, 27 August 2016

Printing with flexible filament is fun

I'm just about out of the purple Innofill plastic. For purposes of printing things for our kitchen, I'm looking for a matching red color. Turns out there's a color scale I hadn't heard of until recently, namely RAL, and some things I spraypainted were RAL 3003, a nice deep red. So let's see if that's available in filament!

At they offer any color filament you can pick out of RAL, but you have to buy 10 kg at a time, which is a bit much. They don't state the RAL for their regular spools.

At I find exactly the right color, at an almost suspiciously low price, 16€ for 800g. Looks like they're quite active on the forum, and I don't see any complaints there. (argh! When did "berlin" become a top-level domain?) has a nice overview of their colors, but alas no 3003. it is. Got here just before we left for the US, but not in time to do anything with it. Also got a sample of PETG, which I hadn't heard of before, but sounds like it's worth trying.

I'll need to do a better filament setup. From what I'm reading, the way I've just had the spool hang loose with no guiding and letting go of the end, I've set myself up for the tangles I now suffer from. I broke the spool holder that came with the kit, plus it was for larger spools AFAICT, so now I'll just use the rest of this spool to print the holder for the next.

For a quick test print, I reduced infill from 20 to 5%, set 1 top and 2 bottom solid layers, set infill_only_when_needed to true. Then I printed a reduced version of this filament holder to check that it matches my spools. Looks good, though it was probably designed to just let the spool sit loose and accept the bit of friction. I started designing a spool holder rolling on four ball bearings, so there's practically no friction, but then it struck me that a bit of friction may be a good thing. Instead I might just want to guide the filament better, maybe with a bit of PTFE tubing and a longer way from the spool to the extruder. Only problem with that is that cold pulls become harder.

And because I was running low on the normal filament, I decided it was time to try out the flexible filament. At the same settings as my regular PLA, it came out quite nice:

This is not an extremely flexible filament, just enough that I can compress the sides of this cube. I was going to print at 25% speed, but it didn't get picked up, and printing at 100% worked just nicely. Let's move on to testing ObPhoneCase by intersection the design with some cubes and printing that.

I realize now that placing the design centered in 0,0 would have made some things easier, for instance scaling.

Looks like I set the Z adjustment a teeny bit high, but the flexible filament doesn't seem to curl when cooling, so all that does is make the bottom layer less flat. That simplifies things!

The trickiest part of the phone case is getting the holes right. While some overhang is doable, it's not so predictable. However, printing with support doesn't work so well for this kind of structure, the support generated by Slic3r is fairly heavy-handed and doesn't come off nicely in this case:

Overall the case looks good, though:

Eventually I just decided to do my own support for the holes, with little cubes literally hanging in mid-air, but with a fraction of a millimeter distance. That actually came out really nice:

They come off at a light touch (actually some fell out just due to the bending when getting the print off the bed) and leave only the smallest of marks.

Saturday, 6 August 2016

More printing success than you can shake a piece of filament at

After cleaning the stripped filament from last time off the hobbed bolt, I printed the phone cover with my regular filament, just to see if it would fit. And it does! My calibration is great! My design, however, needs a bit of tweaking, but that was exactly the point of this print. The bottom holes should be a bit higher, the audio jack a bit further right, and both possibly enlarged. I'm quite amazed, though, that the overhang for the USB-C jack came out so nice - that's without any support:

The hole on the side needs a bit of enlargement, and the sides of it should be slanted for easier access:

On the back, there is a little bit of offset to the left, and the hole for the fingerprint is up too far. Plus, the sphere I used to make the fingerprint scanner easier to touch left a few strands. That might just be the effect of having a part that's thinner than the layer height. I can reasonably make it more steep.

Most importantly, at the very start of this print, I caught the extruder skipping a few steps, and just to attempt to save the print, tightened the idler screws somewhat, to where the springs are almost fully compressed. That helped! So now I know that the stripping has been partly due to the idler being too loose. That clears up one of my remaining questions.

After that, I printed the AAA battery dispenser again, this time at 90% scale. Unfortunately, part way up it the hotend came a bit loose (the mounting system is crap and I want to print a better one), and I had to fasten it again while printing. The result can store batteries, but isn't as nice, and tends to have the batteries go sideways:

Having noticed the very nice overhang on the phone cover, I thought it'd be nice to have a test piece for overhangs. So I maded one (shared on Thingiverse):

Overhang test with the overhang width in mm.
This shows that I can actually do up to 18mm of overhang, which is pretty incredible. It also shows "ringing", especially after the letters, which I should fix. While most troubleshooting guides seem to blame speed or acceleration settings, I think in this case the slightly loose hotend may be to blame.

The back side of the test piece has circles, where while the overhang is technically smaller, the ends fall down, making them a bit unclean:

I tried also doing this test without my fan running, to see what difference that made. Not quite as much as I expected, but still there's a lot more drooping:

Closeups, first without fan:

Then with fan:

The difference is striking. Having a fan is definitely helping. And this is just with a simple front-mounted fan, no fancy ducts. I have an idea for a fan duct setup with the fan mounted separately and blowing through a tube, but haven't gotten around to it yet. That would at least solve a bunch of annoying mounting issues. It might be more easily done with the radial type fan, possibly mounted on the left side of the extruder motor. The "ducts" could be a wide ring with four little blowers instead of a hotend-specific circle. The quality I'm getting from just blowing in the side tells me that getting every last drop of air placed just right is less important than actually being able to easily mount it. Plus, I want to be able to see the print in progress.

I also finally got around to fixing the loose wires I had had hanging around, getting rid of the last crocodile wire. It's better, and I won't have to worry about the fan wires falling down and catching on the corner clamp, but I still need a few cable ties to make it perfect:

Friday, 5 August 2016

Designing a phone cover, part I

For my next project, I want to play around with my flexible filament. Because I've overcome so many problems, it's time to add some more. But also because I want to make a case for my Nexus 5X.

While designing this case, I got to try out some OpenSCAD operations I hadn't done so much with before, in particular the minkowski() operator. While it works nicely for giving the case an outer rounding, I ran into a nice little problem when doing the interior. You see, the Nexus 5X isn't just a rounded box with rounded edges. The backside is tapering off towards the edges:

So my first model of the phone itself (to be used negatively) using just a hull of four cylinders wouldn't work. Instead, I tried to use an intersection of the hull with a minkowski of a similar hull:

module doubleround(size, corner, chamfer)

    hull() {
      for (x = [0, size[0]]) {
        for (y = [0, size[1]]) {
          translate([x, y, 0])
            cylinder(r=corner, h=size[2]);
    // Using a sphere is possible, but will kill performance

module nexus_5x_case() {
  intersection() {
    hull() {
      for (x = [rounding, width-rounding]) {
        for (y = [rounding, height-rounding]) {
          translate([x, y, 0])
            cylinder(r=rounding, h=thickness);
                   thickness], rounding, under_round);

Thanks to nophead for providing me the excellent word "chamfer", though he does it by subtracting an inverted corner.

This unfortunately led to some bumps in the corners:

The better approach turns out to be doing a hull() of an intersection of a cylinder and a large sphere:

module nexus5x_base() {
    under_round = 20;
  intersection() {
    hull() {
      for (x = [rounding, width-rounding]) {
        for (y = [rounding, height-rounding]) {
          translate([x, y, 0])
            intersection() {
              cylinder(r=rounding, h=thickness);
              sphere(r=under_round, $fn=50);


Much better. Alas, my first attempt at printing it fell prey to stripping again, though this time in a rather artistic manner:

So currently my two main problems are stripping and tangling filament. Stripping comes partly from poor Z adjustment and the tangling, but possibly also from poor adjustment of the extruder idler. 

I'm not sure what to do about the tangling filament. I haven't seen any conclusive tips on how to best prevent it, and it seems to be getting worse - I have to babysit the printing process now.

Wednesday, 3 August 2016

A pedal is born (with difficulties)

Finally, after several weeks of on-and-off experimentation, I have a fully functional foot pedal to replace the one that broke off our trashcan:

Due to the odd break, the difficulty of looking at the relevant parts, and difficulties printing, I went through quite a few prototypes before getting it right:

But by now I have my printing procedure down to a regular practice and can get good results as long as I Z-calibrate properly and my filament doesn't tangle. Tangling filament, apparently a side-effect of my repeated cold pulls, is becoming more of a problem, and I need to pick a good solution. The other repeating problem was various parts coming loose from the bed, especially the support pillars and a thin strip of the main part touching the bed. Also happened with some of the first tests. Adhesion for thin things is problematic and they should be rafted, or I should get a better hair spray (currently using Nivea Volumen Kraft & Pflege strength 4 of 6 possible.

Other things recently printed:

A guard for the X shaft, since I didn't have a properly stiff piece of plastic.

(On the right) A AAA battery dispenser that didn't scale quite right

First test of a holder for the RC-1 Canon remote control.
A yarn bobbin. Came out perfect on the first try.

Friday, 29 July 2016

Still calibrating, now also supporting

After last time's big failure, I'm not leaving complex prints alone until I am more satisfied with the sticking. I tried it again today, and with a height measurement of 0.4, I set a Z offset of 0.7, which resulted in warping after a few layers. With 0.5, the first layer was entirely white (which at least shows the bed is level to the X axis). It didn't strip nor warp, but the print has a very long flat slope that a) doesn't print nicely, and b) comes loose once the piece is big enough. For my next try, I will adjust the support settings to support any 35 degree angle, since using the default settings for this long overhang doesn't work:

Upside-down view of overhang not sufficiently supported

Starting procedure:

Home all
Center X/Y
G0 Z1
Put piece of paper under nozzle
Motors off
Move down Z by 0.1 at a time, checking if the paper can still be moved. It will be held slightly at some point, with 0.1 more it will be held fairly firmly.
Set Z offset to 1-#moves.
Home all
Spray bed with hairspray (still need to figure out if cold or hot bed is better when spraying, whether to dry off the spray, and whether to do multiple layers)
Start printing!

After talking with +Richard Jørgensen about his setup, I'm quite tempted to add a Raspberry Pi to control mine. Having to tether my main laptop for printing is not very handy (the SD card reader appears to be broken). Fortunately, nophead has already shown how.