Project: Nameplate Generator with OpenSCAD

Project: Nameplate Generator with OpenSCAD

thingiverse

In this project, students will learn and apply basic programming skills with the OpenSCAD language to style and customize a nametag. Visually, OpenSCAD is different from other types of 3D modeling programs. It’s a simple declarative computer language that was built specifically for designing 3D printable models. By modifying existing OpenSCAD code for a wavy nametag, students will explore parameters, dimensions, “for” loops, translations, and boolean operations. Standards CCSS Overview and Background Students will learn how to write basic code to generate objects with the OpenSCAD language. Once comfortable, they’ll explore a sample coding project that prompts them to discover how changing different variables affects their 3D model. Finally, they’ll add their own unique variables and functions to further customize a nametag. This project, found in MakerBot in The Classroom (http://www.makerbot.com/education), focuses on creating a parametric model using the program OpenSCAD. You can download OpenSCAD from http://openscad.org/ or use it online from http://openscad.net/. CCSS.MATH.CONTENT.HSF.TF.B.5 Choose trigonometric functions to model periodic phenomena with specified amplitude, frequency, and midline. CCSS.ELA-LITERACY.RST.11-12.7: Integrate and evaluate multiple sources of information presented in diverse formats and media (e.g., quantitative data, video, multimedia) in order to address a question or solve a problem. CCSS.MATH.CONTENT.HSF.IF.C.7 Graph functions expressed symbolically and show key features of the graph, by hand in simple cases and using technology for more complicated cases. Lesson Plan and Activity The entire lesson is laid out with pictures in the .PDF downloadable in the Thing Files. Step 1: Making a Parametric nametag with existing code Try to figure out what the code is doing Modify text and font parameters Adjust dimensions to match the text Style the wave of the nametag border Create a new parameter for the text height Create a new parameter for character spacing Output an STL mesh for 3D printing Step 2: Write OpenSCAD code from scratch to design a model Plan, Think, and Code Try new things Export, print, test, repeat Skills Learned Code Translation openscad modifying parameters measuring basic code writing code Duration of Lesson 1-2 class periods - Print time: 20-35 minutes per nametag Preparation To prepare for this lesson you will need the following supplies: Chromebook or computer per student Openscad.org or openscad.net open or installed openscad_project.pdf handout (in Thing Files) MakerBot_NametagCode_Project.scad downloaded (in Thing Files) Rubric and Assessment Knowledge Checks What are the benefits of a parametric design? How do you generate basic shapes with code? Why is it important to use variables in OpenSCAD code? What are examples of parameters you might change when designing an object? What do you need to change or add to your OpenSCAD file to allow it to be used in Customizer? References Reimann Sum - http://mathworld.wolfram.com/RiemannSum.html Custom Section Extension Activity Modify OpenSCAD code for thingiverse customizer Review documentation on making a customizable thing at http://customizer.makerbot.com/docs. Download code file MakerBot_NametagCode_Project.scad from the MakerBot Learning account on Thingiverse. Compare with the same OpenSCAD code used in the Thingiverse Customizer (select 4. View Source from the lower right corner of the Customizer at the MakerBot Learning account). Make modifications as you explore. Explore the trigonometry used in the nametag Have precalculus students investigate the function used in the wavy border design of the nametags: function f(x) = 2base + 0.5(height - 2base) (cos(frequencyx360/(steps-1)) + 1); In particular, what does each of the components of this function do to change the shape of the wave? Consider amplitude, frequency, and transformations. What would happen if the cosine function were replaced with the sine function? What other functions would make good nametag borders? Change and consider what amplitude, frequency, and transformations are doing. Try changing the cosine function to sine. What happens? Explore other functions that could affect the border. Explore Riemann Sums The wave shape on the border of the nametag design is actually a simple Riemann sum approximation of the area under the graph of the function f(x) on an interval. Here’s the code that produces the steps of the wave. for( i = [0:steps-1] ){ translate([ i*(length/steps), 0, 0 ]) cube([ length/steps, width, f(i) ]); Look at a small number of steps to get an idea of what is happening. What type of Riemann sum is being constructed? Something subtle is happening with the steps-1 part of the function definition. Why is that part of the code here and what does it do for the design? Replace steps-1 with a value (try 4, 8, etc.) and note what happens. What does it mean about the interval being used for the Riemann sum? Custom Section

Download Model from thingiverse

With this file you will be able to print Project: Nameplate Generator with OpenSCAD with your 3D printer. Click on the button and save the file on your computer to work, edit or customize your design. You can also find more 3D designs for printers on Project: Nameplate Generator with OpenSCAD.