August 22, 2022
Description
I saw this (quite old) challenge online: https://www.makerbot.com/media-center/2011/10/11/openscad-challenge-klein-bottle
I could not resist making my own! I'm perfectionist, I made it as perfect as I could.
I made it using bezier curves because that was a lot easier than trying to model the shape by removing "donnut" shapes around it (I could not see a neat solution to do this). Since there is no bezier functionality in OpenSCAD, I had to create my own, from an existing library found on thingiverse.
The bottle is easy to customise. I added 4 variables at the beginning of the files:
The "precision" (number of polygons generated) is also configurable. I set it to 180 to generate the STL files. I might have exaggerated, the STL files are quite large!
I also uploaded a "cut" version to see inside the bottle. That one is for education purpose, and also to prove that I didn't "cheated".
Bezier library: http://www.thingiverse.com/thing:2170645
NOTE: The library is quite small, I uploaded it with the model for simplicity.
[2017-03-13] This model doesn't print well. I need to adjust the wall thickness and flatten the bottom. I will upload a version 2 very soon.
[2017-03-14] Uploaded v2 - Updated version of the library bezier.scad, thicker walls and flat bottom. The bottle body is now entirely made with bezier. I also fixed the "2-manifold" warning which was due to floating point noise. If you prefer the round bottom (as it was before), you can edit the file klein-bottle_v2.scad and change bottleBezier(true); to bottleBezier(false); in module bottle(). Hopefully it will be easier to print with these adjustments.
[2017-03-18] Today, I started experimenting with Slic3r. I discovered that my "floating point" correction was good to get rid of OpenSCAD warning, but made my STL unusable in Slic3r. I tried to use to "Fix STL file" function in Slic3r but it made it worse. I re-generated my version 2 without the floating point correction, and now it works nicely in Slic3r. Having a warning in OpenSCAD is better than having a STL file that can't be printed.
NOTE: Use version 2 for printing. The walls of the other version are too thin, the bottle is not waterproof.
I never printed it; I'm still waiting for my Prusa i3 MK2 printer. I'm very new with 3D printing and 3D modelling in general. Comments and suggestions are very welcomed.
[FIXED] When OpenSCAD render it for STL export, it complains that the object might need repair. I'm not sure what that means, I could not find information about how to fix this (if that even needs to be fixed). I will upload a fixed version if that causes any issues. Object may not be a valid 2-manifold and may need repair!
NOTE: The warning was due to the faces of 2 shapes mathematically touching, but not quite touching due to floating point imprecision (noise). I fixed the issue by increasing the length of the object by a very small amount, just enough to cover the floating point noise without altering the look of the shape.
NOTE2: The fix introduced issues that make the STL file unprintable with Slic3r (and probably most slicer programs). I reverted it to the mathematical solution, ignoring the warning in OpenSCAD.
According to those who printed it, no supports are required.
If you print it, I would love to know how it went.
Category: Math ArtLicense:
Creative Commons — Attribution