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)
{
$fn=30;
minkowski(){
hull() {
for (x = [0, size[0]]) {
for (y = [0, size[1]]) {
translate([x, y, 0])
cylinder(r=corner, h=size[2]);
}
}
}
//cylinder(r=radius);
// Using a sphere is possible, but will kill performance
sphere(r=chamfer);
}
}
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);
}
}
}
translate([rounding+under_round/2,
rounding+under_round/2,
under_round])
doubleround([width-2*rounding-under_round,
height-2*rounding-under_round,
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);
translate([0,0,under_round])
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.
No comments:
Post a Comment