![]() This is due to how OpenSCAD renders arcs, and ultimately will affect how it outputs to the STL file and thus how the object is printed. ![]() Now the design of the tamper is complete, but you’ll notice that OpenSCAD draws the surfaces of the cylinders and sphere rather polygonal and not smooth. Remember that the translation is reset after the previous cylinder, so we need to account for both the tamper base and body when drawing the handle: translate() translate()Ĭylinder(h = TamperMidSectionHeight, r1 = TamperRadius, r2 = TamperThinRadius) įinally, we can create the handle using sphere(). Note that the transformation will only apply to the next statement and will be reset afterwards. In this case, we’ll be using translate(). In order to place the cylinder above, we must apply a transformation before drawing it. Next, I want to add another cylinder directly above this, that tapers from the overall width of the tamper to a smaller width for the handle to attach to. This will place the cylinder directly where we want it: above z=0. Since the base needs to a simple cylinder, and OpenSCAD provides the cylinder() function, we are in luck: cylinder(h = TamperBaseHeight, TamperRadius) TamperThinRadius = TamperThinDiameter * 0.5 TamperHandleRadius = TamperHandleDiameter * 0.5 Now, OpenSCAD functions like cylinder() and sphere() expect to be provided a radius, so we need to do some simple calculations: TamperThinDiameter = TamperHandleDiameter * 0.5 I started off by creating some variables to describe the tamper: // In milimiters: Creating a Tamper in OpenSCAD Defining the Tamper Attributes In this case, my tamper needs to have a diameter of 52mm. The slicers used by MakerWare interpret units from STL files as as millimeters, so for our purposes, we can rely on all numbers expressing millimeters. Note that OpenSCAD itself assigns no units to the numbers it uses. OpenSCAD supports variable assignment, mathematical calculation, and includes some functions for creating basic shapes. ![]() For editing within vim, the openscad.vim syntax script might be useful. The syntax used by OpenSCAD vaguely C-like and thus pretty simple to pick up. Besides being useful, it’s also something very simple to design: a flat, circular base with a handle for pushing down on. One of the things I’ve been meaning to design and 3D print has been a tamper for my espresso machine. This lets me use vim as my editor, something I’m quite comfortable with, while letting me see a live preview of my object as I save. Essentially, it provides you a programming language for defining objects. ![]() Unfortunately, I haven’t had enough time to truly familiarize myself with any CAD program, which tend to be considerably complex and have steep learning curves.įortunately, for those of us with a programmer’s mindset, there is OpenSCAD. Since getting our 3D printer, I’ve made a few attempts to learn how to properly use CAD software to design my own objects. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |