New York State Learning Standards
-
STANDARD 1
Analysis, Inquiry, and Design: MATHEMATICAL ANALYSIS
Key Idea 1: details
Abstraction and symbolic representation are used to communicate mathematically.Elementary M1.1 Use special mathematical notation and symbolism to communicate in mathematics and to compare and describe quantities, express relationships, and relate mathematics to their immediate environment. M1.1a Use plus, minus, greater than, less than, equal to, multiplication, and division signs M1.1b Select the appropriate operation to solve mathematical problems M1.1c Apply mathematical skills to describe the natural world
Intermediate M1.1 Extend mathematical notation and symbolism to include variables and algebraic expressions in order to describe and compare quantities and express mathematical relationships. M1.1a Identify independent and dependent variables M1.1b Identify relationships among variables including: direct, indirect, cyclic, constant; identify non-related material M1.1c Apply mathematical equations to describe relationships among variables in the natural world
Physics M1.1 Use algebraic and geometric representations to describe and compare data. √ M1.1a Use scaled diagrams to represent and manipulate vector quantities √ M1.1b Represent physical quantities in graphical form √ M1.1c Construct graphs of real-world data (scatterplots,line or curve of best fit) M1.1d Manipulate equations to solve for unknowns M1.1e Use dimensional analysis to confirm algebraic solutions -
STANDARD 1
Analysis, Inquiry, and Design: MATHEMATICAL ANALYSIS
Key Idea 3: details
Critical thinking skills are used in the solution of mathematical problems.Elementary M3.1 Explore and solve problems generated from school, home, and community situations, using concrete objects or manipulative materials when possible. √ M3.1a Use appropriate scientific tools, such as metric rulers, spring scale, pan balance, graph paper, thermometers [Fahrenheit and Celsius], graduated cylinder to solve problems about the natural world √
Intermediate M3.1 Apply algebraic and geometric concepts and skills to the solution of problems. √ M3.1a Explain the physical relevance of properties of a graphical representation of real-world data, e.g., slope, intercepts, area under the curve
Physics M3.1 Apply mathematical knowledge to solve real-world problems and problems that arise from the investigation of mathematical ideas, using representations such as pictures, charts, and tables. M3.1a Use appropriate scientific tools to solve problems about the natural world √ -
STANDARD 1
Analysis, Inquiry, and Design SCIENTIFIC INQUIRY:
Key Idea 2: details
Beyond the use of reasoning and consensus, scientific inquiry involves the testing of proposed explanations involving the use of conventional techniques and procedures and usually requiring considerable ingenuity.Elementary S2.1 Develop written plans for exploring phenomena or for evaluating explanations guided by questions or proposed explanations they have helped formulate. S2.1a Indicate materials to be used and steps to follow to conduct the investigation and describe how data will be recorded (journal, dates and times, etc.) √ S2.2 Share their research plans with others and revise them based on their suggestions. √ S2.2a Explain the steps of a plan to others, actively listening to their suggestions for possible modification of the plan, seeking clarification and understand- ing of the suggestions and modifying the plan where appropriate √ S2.3 Carry out their plans for exploring phenomena through direct observation and through the use of simple instruments that permit measurement of quantities, such as length, mass, volume, temperature, and time. √ S2.3a Use appropriate "inquiry and process skills" to collect data. √ S2.3b Record observations accurately and concisely √
Intermediate S2.1 Use conventional techniques and those of their own design to make further observations and refine their explanations, guided by a need for more information. √ S2.1a Demonstrate appropriate safety techniques. S2.1b Conduct an experiment designed by others. S2.1c Design and conduct an experiment to test a hypothesis. S2.1d Use appropriate tools and conventional techniques to solve problems about the natural world, including: - measuring
- observing
- describing
- classifying
- sequencing
√ S2.2 Develop, present, and defend formal research proposals for testing their own explanations of common phenomena, including ways of obtaining needed observations and ways of conducting simple controlled experiments S2.2a Include appropriate safety procedures. S2.2b Design scientific investigations (e.g., observing, describing, and comparing; collecting samples; seeking more information, conducting a controlled experiment; discovering new objects or phenomena; making models) S2.2c Design a simple controlled experiment. S2.2d Identify independent variables (manipulated), dependent variables (responding), and constants in a simple controlled experiment. S2.2e Choose appropriate sample size and number of trials. S2.3 Carry out their research proposals, recording observations and measurements (e.g., lab notes, audiotape, computer disk, videotape) to help assess the explanation. √ S2.3a Use appropriate safety procedures. S2.3b Conduct a scientific investigation. S2.3c Collect quantitative and qualitative data. √
Physics S2.1 Devise ways of making observations to test proposed explanations. √ S2.1a Design an experiment to investigate the relationship between physical phenomena. S2.2 Refine research ideas through library investigations, including electronic information retrieval and reviews of the literature, and through peer feedback obtained from review and discussion. S2.3 Develop and present proposals including formal hypotheses to test explanations; i.e., predict what should be observed under specific conditions if the explanation is true. S2.4 Carry out a research plan for testing explanations, including selecting and developing techniques, acquiring and building apparatus, and recording observations as necessary. (Note: This could apply to many activities from simple investigations to long-term projects.) √ -
STANDARD 1
Analysis, Inquiry, and Design: ENGINEERING DESIGN
Key Idea 1: details
Engineering design is an iterative process involving modeling and optimization (finding the best solution within given constraints); this process is used to develop technological solutions to problems within given constraints. (Note: The design process could apply to activities from simple investigations to long-term projects.)Elementary 1.1 Describe objects, imaginary or real, that might be modeled or made differently and suggest ways in which the objects can be changed, fixed, or improved √ 1.2 Investigate prior solutions and ideas from books, magazines, family, friends, neighbors, and community members √ 1.3 Generate ideas for possible solutions, individually and through group activity; apply age-appropriate mathematics and science skills; evaluate the ideas and determine the best solution; and explain reasons for the choices √ 1.4 Plan and build, under supervision, a model of the solution using familiar materials, processes, and hand tools √ 1.5 Discuss how best to test the solution; perform the test under teacher supervision; record and portray results through numerical and graphic means; discuss orally why things worked or didn't work; and summarize results in writing, suggesting ways to make the solution better √
Intermediate T1.1 Identify needs and opportunities for technical solutions from an investigation of situations of general or social interest. T1.1a Identify a scientific or human need that is subject to a technological solution which applies scientific principles √ T1.2 Locate and utilize a range of printed, electronic, and human information resources to obtain ideas. √ T1.2a Use all available information systems for a preliminary search that addresses the need. √ T1.3 Consider constraints and generate several ideas for alternative solutions, using group and individual ideation techniques (group discussion, brainstorming, forced connections, role play); defer judgment until a number of ideas have been generated; evaluate (critique) ideas; and explain why the chosen solution is optimal. √ T1.3a Generate ideas for alternative solutions √ T1.3b Evaluate alternatives based on the constraints of design. √ T1.4 Develop plans, including drawings with measurements and details of construction, and construct a model of the solution, exhibiting a degree of craftsmanship. √ T1.4a Design and construct a model of the product or process √ T1.4b Construct a model of the product or process √ T1.5 In a group setting, test their solution against design specifications, present and evaluate results, describe how the solution might have been modified for different or better results, and discuss trade-offs that might have to be made. √ T1.5a Test a design √ T1.5b Evaluate a design √
Commencement 1.1 Initiate and carry out a thorough investigation of an unfamiliar situation and identify needs and opportunities for technological invention or innovation. 1.2 Identify, locate, and use a wide range of information resources including subject experts, library references, magazines, videotapes, films, electronic data bases and online services, and discuss and document through notes and sketches how findings relate to the problem √ 1.3 Generate creative solution ideas, break ideas into the significant functional elements, and explore possible refinements; predict possible outcomes using mathematical and functional modeling techniques; choose the optimal solution to the problem, clearly documenting ideas against design criteria and constraints; and explain how human values, economics, ergonomics, and environmental considerations have influenced the solution √ 1.4 Develop work schedules and plans which include optimal use and cost of materials, processes, time, and expertise; construct a model of the solution, incorporating developmental modifications while working to a high degree of quality (craftsmanship) √ 1.5 In a group setting, devise a test of the solution relative to the design criteria and perform the test; record, portray, and logically evaluate performance test results through quanitative, graphic, and verbal means; and use a variety of creative verbal and graphic techniques effectively and persuasively to present conclusions, predict impacts and new problems, and suggest and pursue modifications √ -
STANDARD 2
INFORMATION SYSTEMS
Key Idea 1: details
Information technology is used to retrieve, process, and communicate information as a tool to enhance learning.Elementary 1.1 Use computer technology,traditional paper-based resources,and interpersonal discussions to learn, do, and share science in the classroom √ 1.2 Select appropriate hardware and software that aids in word-processing, creating databases, telecommunications, graphing, data display, and other tasks √ 1.3 Use information technology to link the classroom to world events.
Intermediate 1.1 Use a range of equipment and software to integrate several forms of information in order to create good-quality audio, video, graphic, and text-based presentations. √ 1.2 Use spreadsheets and database software to collect, process, display, and analyze information. Students access needed information from electronic databases and on-line telecommunication services. 1.3 Systematically obtain accurate and relevant information pertaining to a particular topic from a range of sources, including local and national media, libraries, muse- ums, governmental agencies, industries, and individuals. √ 1.4 Collect data from probes to measure events and phenomena. 1.4a Collect the data, using the appropriate, available tool. √ 1.4b Organize the data. 1.4c Use the collected data to communicate a scientific concept √ 1.5 Use simple modeling programs to make predictions. √
Physics 1.1 Understand and use the more advanced features of word processing, spreadsheets, and database software. √ 1.2 Prepare multimedia presentations demonstrating a clear sense of audience and purpose. (Note: Multimedia may include posters, slides, images, presentation software, etc.) √ 1.2a Extend knowledge of physical phenomena through independent investigation, e.g., literature review, electronic resources, library research 1.2b Use appropriate technology to gather experimental data, develop models,and present results. √ 1.3 Access, select, collate, and analyze information obtained from a wide range of sources such as research databases, foundations, organizations, national libraries, and electronic communication networks, including the Internet. √ 1.3a Use knowledge of physics to evaluate articles in the popular press on contemporary scientific topics. 1.4 Utilize electronic networks to share information. √ 1.5 Model solutions to a range of problems in mathematics, science, and technology, using computer simulation software. √ 1.5a Use software to model and extend classroom and laboratory experiences,recognizing the differences between the model used for understanding and real-world behavior √ -
STANDARD 2
INFORMATION SYSTEMS:
Key Idea 2: details
Knowledge of the impacts and limitations of information systems is essential to its effective and ethical use.Elementary 2.1 Use a variety of media to access scientific information 2.2 Consult several sources of information and points of view before drawing conclusions √ 2.3 Identify and report sources in oral and written communications √
Intermediate 2.1 Understand the need to question the accuracy of information displayed on a computer because the results produced by a computer may be affected by incorrect data entry. 2.1a Critically analyze data to exclude erroneous information 2.1b Identify and explain sources of error in a data collection 2.2 Understand the need to question the accuracy of information displayed on a computer because the results produced by a computer may be affected by incorrect data entry. 2.2a Critically analyze data to exclude erroneous information 2.2b Identify advantages and limitations of data-handling programs and graphics programs. √ 2.3 Understand why electronically stored personal information has greater potential for misuse than records kept in conventional form.
-
STANDARD 5
Technology: Engineering Design
Key Idea 1:
(See STANDARD 1 Analysis, Inquiry, and Design: ENGINEERING DESIGN)
-
STANDARD 5
Technology: Engineering Design
Key Idea 2: details
Technological tools, materials, and other resources should be selected on the basis of safety, cost, availability, appropriateness, and environmental impact; technological processes change energy, information, and material resources into more useful forms.Elementary 2.1 Explore, use, and process a variety of materials and energy sources to design and construct things. √ 2.2 Understand the importance of safety, cost, ease of use, and availability in selecting tools and resources for a specific purpose. 2.3 Develop basic skill in the use of hand tools 2.4 Use simple manufacturing processes (e.g., assembly, multiple stages of production, quality control) to produce a product √ 2.5 Use appropriate graphic and electronic tools and techniques to process information. √
Intermediate 2.1 Choose and use resources for a particular purpose based upon an analysis and understanding of their properties, costs, availability, and environmental impact √ 2.2 Use a variety of hand tools and machines to change materials into new forms through forming, separating, and combining processes, and processes which cause internal change to occur √ 2.3 Combine manufacturing processes with other technological processes to produce, market, and distribute a product 2.4 Process energy into other forms and information into more meaningful information.
Commencement 2.1 Test, use, and describe the attributes of a range of material (including synthetic and composite materials), information, and energy resources √ 2.2 Select appropriate tools, instruments, and equipment and use them correctly to process materials, energy, and information √ 2.3 Explain tradeoffs made in selecting alternative resources in terms of safety, cost, properties, availability, ease of processing, and disposability 2.4 Describe and model methods (including computer-based methods) to control system processes and monitor system outputs √ -
STANDARD 5
Technology: Computer Technology
Key Idea 3: details
Computers, as tools for design, modeling, information processing, communication, and system control, have greatly increased human productivity and knowledge.Elementary 3.1 Identify and describe the function of the major components of a computer system. 3.2 Use the computer as a tool for generating and drawing ideas. √ 3.3 Control computerized devices and systems through programming. √ 3.4 Model and simulate the design of a complex environment by giving direct commands. √
Intermediate 3.1 Assemble a computer system including keyboard, central processing unit and disc drives, mouse, modem, printer, and monitor 3.2 Use a computer system to connect to and access needed information from various Internet sites √ 3.3 Use computer hardware and software to draw and dimension prototypical designs √ 3.4 Use a computer as a modeling tool √ 3.5 Use a computer system to monitor and control external events and/or systems √
Commencement 3.1 Understand basic computer architecture and describe the function of computer subsystems and peripheral devices 3.2 Select a computer system that meets personal needs 3.3 Attach a modem to a computer system and telephone line, set up and use communications software, connect to various online networks, including the Internet, and access needed information using email, telnet, gopher, ftp, and web searches √ 3.4 Use computer-aided drawing and design (CADD) software to model realistic solutions to design problems √ 3.5 Develop an understanding of computer programming and attain some facility in writing computer programs √ -
STANDARD 6
Interconnectedness: Common Themes MODELS:
Key Idea 2: details
Models are simplified representations of objects, structures, or systems used in analysis, explanation, interpretation, or design.Elementary 2.1 Analyze,construct,and operate models in order to discover attributes of the real thing √ 2.2 Discover that a model of something is different from the real thing but can be used to study the real thing √ 2.3 Use different types of models, such as graphs,sketches,diagrams,and maps,to represent various aspects of the real world
Intermediate 2.1 Select an appropriate model to begin the search for answers or solutions to a question or problem. 2.2 Use models to study processes that cannot be studied directly (e.g., when the real process is too slow, too fast, or too dangerous for direct observation). √ 2.3 Demonstrate the effectiveness of different models to represent the same thing and the same model to represent different things.
Physics 2.1 Revise a model to create a more complete or improved representation of the system. 2.2 Collect information about the behavior of a system and use modeling tools to represent the operation of the system. √ 2.2a Use observations of the behavior of a system to develop a model 2.3 Find and use mathematical models that behave in the same manner as the processes under investigation. 2.3a Represent the behavior of real-world systems,using physical and mathematical models √ 2.4 Compare predictions to actual observations, using test models. √ 2.4a Validate or reject a model based on collated experimental data √ 2.4b Predict the behavior of a system,using a model √ -
STANDARD 7
Interdisciplinary Problem Solving STRATEGIES:
Key Idea 2: details
Solving interdisciplinary problems involves a variety of skills and strategies, including effective work habits; gathering and processing information; generating and analyzing ideas; realizing ideas; making connections among the common themes of mathematics, science, and technology; and presenting results.Physics 2.1 Collect,analyze,interpret,and present data,using appropriate tools √ 2.2 When students participate in an extended,culminating mathematics,science,and technology project, then students should: Work effectively—Contributing to the work of a brainstorming group, laboratory partnership, cooperative learning group, or project team; planning procedures; identify and managing responsibilities of team members; and staying on task, whether working alone or as part of a group. √ Gather and process information —Accessing information from printed media, electronic data bases, and community resources and using the information to develop a definition of the problem and to research possible solutions. √ Generate and analyze ideas — Developing ideas for proposed solutions, investigating ideas, collecting data, and showing relationships and patterns in the data. √ Observe common themes—Observing examples of common unifying themes, applying them to the problem, and using them to better understand the dimensions of the problem. √ Realize ideas—Constructing components or models, arriving at a solution, and evaluating the result. √ Present results—Using a variety of media to present the solution and to communicate the results. √
CDOS
- Standard 2: Integrated Learning details
Students will demonstrate how academic knowledge and skills are applied in the workplace and other settings.
Integrated learning encourages students to use essential academic concepts, facts, and procedures in applications related to life skills and the world of work. This approach allows students to see the usefulness of the concepts that they are being asked to learn and to understand their potential application in the world of work.
Elementary 2.1 Identify academic knowledge and skills that are required in specific occupations 2.2 Demonstrate the difference between the knowledge of a skill and the ability to use the skill 2.3 Solve problems that call for applying academic knowledge and skills. √
Intermediate 2.1 Apply academic knowledge and skills using an interdisciplinary approach to demonstrate the relevance of how these skills are applied in work-related situations in local, state, national, and international communities 2.2 Solve problems that call for applying academic knowledge and skills √ 2.3 Use academic knowledge and skills in an occupational context, and demonstrate the application of these skills by using a variety of communication techniques (e.g., sign language, pictures, videos, reports, and technology).
Commencement 2.1 Demonstrate the integration and application of academic and occupational skills in their school learning, work, and personal lives. √ 2.2 Use academic knowledge and skills in an occupational context, and demonstrate the application of these skills by using a variety of communication techniques (e.g., sign language, pictures, videos, reports, and technology) √ 2.3 Research, interpret, analyze, and evaluate information and experiences as related to academic knowledge and technical skills when completing a career plan. - Standard 3a: Universal Foundation Skills details
Students will demonstrate mastery of the foundation skills and competencies essential for success in the workplace.
- Basic skills
Basic skills include the ability to read, write, listen, and speak as well as perform arithmetical and mathematical functions.
Elementary 3.1.1 Listen to and read the ideas of others and express themselves both orally and in writing; they use basic mathematical concepts and computations to solve problems. √
Intermediate 3.1.1 Listen to and read the ideas of others and analyze what they hear and read; acquire and use information from a variety of sources; and apply a combination of mathematical operations to solve problems in oral or written form. √
Commencement 3.1.1 Use a combination of techniques to read or listen to complex information and analyze what they hear or read; convey information confidently and coherently in written or oral form; and analyze and solve mathematical problems requiring use of multiple computational skills. √ - Thinking skills
Thinking skills lead to problem solving, experimenting, and focused observation and allow the application of knowledge to new and unfamiliar situations.
Elementary 3.2.1 Use ideas and information to make decisions and solve problems related to accomplishing a task. √
Intermediate 3.2.1 Evaluate facts, solve advanced problems, and make decisions by applying logic and reasoning skills. √
Commencement 3.2.1 Demonstrate the ability to organize and process information and apply skills in new ways. √
- Personal Qualities
Personal qualities generally include competence in self-management and the ability to plan, organize, and take independent action.
Elementary 3.3.1 Demonstrate the personal qualities that lead to responsible behavior. √
Intermediate 3.3.1 Demonstrate the ability to work with others, present facts that support arguments, listen to dissenting points of view, and reach a shared decision. √
Commencement 3.3.1 Demonstrate leadership skills in setting goals, monitoring progress, and improving their performance. √
- Interpersonal Skills
Positive interpersonal qualities lead to teamwork and cooperation in large and small groups in family, social, and work situations.
Elementary 3.4.1 Relate to people of different ages and from diverse backgrounds.
Intermediate 3.4.1 Demonstrate the ability to work with others, present facts that support arguments, listen to dissenting points of view, and reach a shared decision. √
Commencement 3.4.1 Communicate effectively and help others to learn a new skill. √
- Technology
Technology is the process and product of human skill and ingenuity in designing and creating things from available resources to satisfy personal and societal needs and wants.
Elementary 3.5.1 Demonstrate an awareness of the different types of technology available to them and of how technology affects society.
Intermediate 3.5.1 Select and use appropriate technology to complete a task. √
Commencement 3.5.1 Apply their knowledge of technology to identify and solve problems. √
- Managing Information
Information management focuses on the ability to access and use information obtained from other people, community resources, and computer networks.Elementary 3.6.1 Describe the need for data and obtain data to make decisions. √
Intermediate 3.6.1 Select and communicate information in an appropriate format (e.g., oral, written, graphic, pictorial, multimedia). √
Commencement 3.6.1 Use technology to acquire, organize, and communicate information by entering, modifying, retrieving, and storing data. √
- Managing Resources
Using resources includes the application of financial and human factors, and the elements of time and materials to successfully carry out a planned activity.Elementary 3.7.1 Demonstrate an awareness of the knowledge, skills, abilities, and resources needed to complete a task. √
Intermediate 3.7.1 Understand the material, human, and financial resources needed to accomplish tasks and activities. √
Commencement 3.7.1 Allocate resources to complete a task. √
- Systems
Systems skills include the understanding of and ability to work within natural and constructed systems.Elementary 3.8.1 Demonstrate understanding of how a system operates and identify where to obtain information and resources within the system. √
Intermediate 3.8.1 Understand the process of evaluating and modifying systems within an organization. √
Commencement 3.8.1 Demonstrate an understanding of how systems performance relates to the goals, resources, and functions of an organization. √
- Basic skills
- Standard 3b: Career Majors
Students who choose a career major will acquire the career-specific technical knowledge/skills necessary to progress toward gainful employment, career advancement, and success in postsecondary programs.
Introduction
OpenSCAD is software for creating solid 3D CAD objects. It is free software and available for Linux/UNIX, MS Windows and Mac OS X.
OpenSCAD focuses on the CAD aspects of 3D modeling and is good for creating 3D models of machine parts.
OpenSCAD is not an interactive modeller. Instead it reads in statements that describes the object and renders the 3D model from that code. This gives you full control over the modelling process and enables you to easily change any step in the modelling process or make designs that are defined by configurable parameters.
OpenSCAD provides two main modelling techniques:
- Constructive solid geometry
- Extrusion of 2D outlines
The numbers in OpenSCAD are in millimeters. So circle(5); or circle(r=5); draws a circle with a radius of 5mm.
Basics
- Open OpenSCAD. And type the following into the editing window:
cube([5,5,4]);
- Press F6 to compile and render
- Change the numbers to see how it effects the model
- To create another cube, you could copy and paste the line of code, but you won't see the second cube. Why not? They are occupying the same space. To move the second cube away, you have to call translate. This line is a bit weird because it does not end in a semi-colon. The translate call is part of the cube statement:
cube([5,5,4]); translate([6,0,0]) cube([5,5,4]);
- color like translate
is part of the object statement.
Here is how you would make the second object red:
cube([5,5,4]); translate([6,0,0]) color([1,0,0]) cube([5,5,4]);
- Replace the cube with the following lines of code. Then compile and render:
difference() { cube(30, center=true); sphere(20, $fn=100); } translate([0, 0, 30]) { cylinder(h=40, r=10); } - Move the rendered object by:
- Dragging with left mouse button to rotate the view. The bottom line will change the rotate values.
- Also try dragging with the left mouse while holding down the SHIFT key
-
Dragging with the right mouse button to translate (move) the view. The bottom line will change translate values.
- Also try dragging with the right mouse while holding down the SHIFT key
-
Using the mouse scroll to zoom in and out. The Viewport line at the bottom of the window will show a change in the distance value.
- Also try dragging with the right mouse while holding down the SHIFT key. Notice this does the same thing as when you drag with the right mouse while holding SHIFT. You can also use the + (SHIFT+=) and - (minus) keys to zoom in and out.
- Dragging with left mouse button to rotate the view. The bottom line will change the rotate values.
Exercise
- The following lines of code will create a cylinder 5mm high with a diameter of. An 8mm cylinder is cut out of the center. Notice that the second cylinder has a height of 7 and is translated by -1 on the z-axis. This ensures that the cut is not exactly aligned with the first cylinder and the cut is clean:
difference(){ cylinder(h = 5, r = 20); translate(v=[0,0,-1]) cylinder(h = 7, r = 4); }
- Use translate To move the smaller cylinder to the right:

- Cut out another cylinder on the left:

- Create 4 holes:

- Now make this shape:

You'll have to remove a sphere: sphere(r=5,$fn=100); - Compile and Render (F6)
- Export as STL (Design>Export as STL). Save the file when it tells you to.
View Options
Show Edges (CTRL/⌘+1)
If Show Edges is enabled, both OpenCSG and CGAL mode will render edges as well as faces, CGAL will even show vertices. In CGAL grid mode, this option has no effect.
Enabling this option shows the difference between OpenCSG and CGAL quite clearly: While in CGAL mode you see an edge drawn everywhere it belongs, OpenCSG will not show edges resulting from boolean operations – this is because they were never explicitly calculated but are just where one object's Z clipping begins or ends.
Show Axes (CTRL/⌘+2)
If Show Axes is enabled, the origin of the global coordinate system will be indicated by an orthogonal axes indicator. Additionally, a smaller axes indicator with axes names will be shown in the lower left corner of the viewing area. The smaller axes indicator is marked x, y, z and coloured red, green, blue respectively.Show Crosshairs (CTRL/⌘+3)
If Show Crosshairs is enabled, the center of the viewport will be indicated by four lines pointing in the room diagonal directions of the global coordinate system. This is useful when aligning the viewing area to a particular point in the model to keep it centered on screen during rotation.Animation
The Animate option adds an animation bar to the lower edge of the screen. As soon as FPS and Steps are set (reasonable values to begin with are 10 and 100, respectively), the current Time is incremented by 1/Steps, FPS times per second, until it reaches 1, when it wraps back to 0.Every time Time is changed, the program is re-evaluated with the variable $t set to the current time.
Syntax
Comments
OpenSCAD uses C++-style comments:// This is a comment
myvar = 10; // The rest of the line is a comment
/*
Multi-line comments
can span multiple lines.
*/Variables
Variables in OpenSCAD are simply a name followed by an assignment via an expressionmyvar = 5 + 4;
Strings
Explicit double quotes or backslashes needs to be escaped (\" and \\ respectively). Other escaped special characters are newlines (\n), tabs (\t) and carriage returns (\r). echo("The quick brown fox \tjumps \"over\" the lazy dog.\rThe quick brown fox.\nThe \\lazy\\ dog.");
ECHO:"The quick brown fox jumps "over" the lazy dog. The quick brown fox. The \lazy\ dog."
Loops
Iterate over the values in a vector or range.
for (z = [-1, 1]){
translate([0, 0, z])
cube(size = 1, center = false);
}for ( i = [0 : 5] ){
rotate( i * 360 / 6, [1, 0, 0])
translate([0, 10, 0])
sphere(r = 1);
}
// Note: The middle parameter in the range designation ('0.2' in this case) is the 'increment-by' value
for ( i = [0 : 0.2 : 5] ){
rotate( i * 360 / 6, [1, 0, 0])
translate([0, 10, 0])
sphere(r = 1);
}
Conditionals
Conditionally evaluate a sub-tree.
if (x > y)
{
cube(size = 1, center = false);
} else {
cube(size = 2, center = true);
}Assignment
Set variables to a new value for a sub-tree.
for (i = [10:50])
{
assign (angle = i*360/20, distance = i*10, r = i*2)
{
rotate(angle, [1, 0, 0])
translate([0, distance, 0])
sphere(r = r);
}
}Module
A module is like a function that you define and then can call:
module hole(distance, rot, size) {
rotate(a = rot, v = [1, 0, 0]) {
translate([0, distance, 0]) {
cylinder(r = size, h = 100, center = true);
}
}
}
module myModel(){
color([1,0,0])
linear_extrude(height=12)
square([12,12]);
color([1,0,0])
linear_extrude(height=12)
translate([6,0,0])
circle(r=6);
color([1,0,0])
linear_extrude(height=12)
translate([12,6,0])
circle(r=6);
}
myModel();
hole(0, 90, 10);
module lineup(num, space) {
for (i = [0 : num-1])
translate([ space*i, 0, 0 ]) child(0);
}
lineup(5, 65) sphere(30);
module elongate() {
for (i = [0 : $children-1])
scale([10 , 1, 1 ]) child(i);
}
elongate() { sphere(30); cube([10,10,10]); cylinder(r=10,h=50); }
Here you have a module saved as a separate file:
module ring(r1, r2, h) {
difference() {
cylinder(r = r1, h = h);
translate([ 0, 0, -1 ]) cylinder(r = r2, h = h+2);
}
}
ring(5, 4, 10);include <ring.scad> rotate([90, 0, 0]) ring(10, 1, 1);
use <ring.scad> rotate([90, 0, 0]) ring(10, 1, 1);
You can also extrude 2D forms:
linear_extrude(height=4) square([4,4]);
Exercise
module ShellSphere(r, ratio1, ratio2){
difference(){
sphere(r, $fn=100);
scale([ratio1, ratio1, ratio2])
sphere(r, $fn=100);
scale([ratio1, ratio2, ratio1])
sphere(r, $fn=100);
scale([ratio2, ratio1, ratio1])
sphere(r, $fn=100);
}
}
ShellSphere(10,.5,1.2);- Open OpenSCAD and paste in the lines of code above.
- Press F5
- Describe what each line is doing.
- Change the parameters and build the model again
Exercise 2
Here is code for part of a heart. See if you can complete it:linear_extrude(height=12) square([12,12]); linear_extrude(height=12) translate([6,0,0]) circle(r=6);
Exercise 2
Using modules create a heart and an arrow. Your arrow can be a simple cylinder. Try to get a similar model to this:
Primitives
cube
Creates a cube at the origin of the coordinate system. When center is true the cube will be centered on the origin, otherwise it is created in the first octant. The argument names are optional if the arguments are given in the same order as specified in the parametersParameters
sizeDecimal or 3 value array. If a single number is given, the result will be a cube with sides of that length. If a 3 value array is given, then the values will correspond to the lengths of the X, Y, and Z sides. Default value is 1.
center
Boolean. This determines the positioning of the object. If true, object is centered at (0,0,0). Otherwise, the cube is placed in the positive quadrant with one corner at (0,0,0). Defaults to false Usage examples:
cube(size = 1, center = false); cube(size = [1,2,3], center = true);
sphere
Creates a sphere at the origin of the coordinate system. The argument name is optional.Parameters
rDecimal. This is the radius of the sphere. The resolution of the sphere will be based on the size of the sphere and the $fa, $fs and $fn variables. Usage examples:
sphere(r = 1); sphere(r = 5); sphere(r = 10); sphere(2, $fn=100); // this will create a high resolution sphere with a 2mm radius sphere(2, $fa=5, $fs=0.1); // will also create a 2mm high resolution sphere but this one does not have as many small triangles on the poles of the sphere
cyclinder
Creates a cylinder at the origin of the coordinate system. When both radii are same it is also possible to specify a single radius using the argument name r. The argument names are optional if the arguments are given in the same order as specified above.Parameters
hDecimal. This is the height of the cylinder. Default value is 1.
r1
Decimal. This is the radius of the cylinder/cone on bottom end. Default value is 1.
r2
Decimal. This is the radius of the cylinder/cone on top end. Default value is 1.
r
Decimal. The radius of both top and bottom ends of the cylinder. Use this parameter if you want a non-cone shaped cylinder. Default value is 1.
$fa
Angle in degrees
$fs
Angle in mm Usage examples:
cylinder(h = 10, r1 = 10, r2 = 20, center = false); cylinder(h = 10, r1 = 20, r2 = 10, center = true); cylinder(h = 10, r=20); cylinder(h = 10, r=20, $fs=6);
polyhedron
Creates a cylinder at the origin of the coordinate system. When both radii are same it is also possible to specify a single radius using the argument name r. The argument names are optional if the arguments are given in the same order as specified above. Usage examples:polyhedron(points = [ [x, y, z], ... ], triangles = [ [p1, p2, p3..], ... ], convexity = N); polyhedron(points=[[0,0,0],[100,0,0],[0,100,0],[0,100,100]], triangles=[[0,1,2],[1,0,3],[0,2,3],[2,1,3]]); polyhedron ( points = [[0, -10, 60], [0, 10, 60], [0, 10, 0], [0, -10, 0], [60, -10, 60], [60, 10, 60]], triangles = [[0,3,2], [0,2,1], [3,0,4], [1,2,5], [0,5,4], [0,1,5], [5,2,4], [4,2,3], ]);
Transforms
Transforms
scale
Scales child elements using the specified vector. The argument name is optional.Usage Example:
scale(v = [x, y, z]) { ... }rotate
Rotates its child a degrees around the specified vector (rooted in the origin of the coordinate system). The argument names are optional if the arguments are given in the same order as specified above.Usage example:
rotate(a = deg, v = [x, y, z]) { ... }Alternatively the a parameter may be a vector of three degrees. In this case the child nodes are rotated around the positive x, y and z axis (in this order) by the specified number of degrees and the v argument is ignored and may be left unspecified. For example, to flip an object upside-down, you might do this:
rotate(a=[0,180,0]) { ... }translate
Translates (moves) its child elements along the specified vector. The argument name is optional.Usage example:
translate(v = [x, y, z]) { ... }mirror
Mirrors the child element on a plane thru the origin. The argument to mirror() is the normal vector on that plane.Usage example:
mirror([ 0, 1, 0 ]) { ... }multmatrix
Multiplies the geometry of all child elements with the given 4x4 transformation matrix.Usage:
multmatrix(m = [...]) { ... }
multmatrix(m = [ [1, 0, 0, 10],
[0, 1, 0, 20],
[0, 0, 1, 30],
[0, 0, 0, 1]
]) cylinder();color
Displays the child elements using the specified RGB color + alpha value. This is only used for the OpenCSG and Thrown Together display modes. The alpha value will default to 1.0 (opaque) if not specified.Usage example:
color([r, g, b, a]) { ... }
Note that the r, g, b, a values are limited to floating point values in the range { 0.0 ... 1.0 } rather than the more traditional integers { 0 ... 255 }. However you can specify the values as fractions, e.g. for R,G,B integers in {0 ... 255} you can use:
color([ R/255, G/255, B/255 ]) { ... }minkowski
Displays the minkowski sum of child nodes.Usage example:
$fn=50;
minkowski()
{
cube([10,10,1]);
cylinder(r=2,h=1);
}hull
Displays the convex hull of child nodes.Usage example:
hull() {
translate([15,10,0]) circle(10);
circle(10);
}CSG Modeling
union
Creates a union of all its child nodes. This is the sum of all children. Usage example:union() {
cylinder (h = 4, r=1, center = true, $fn=100);
rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}
difference
Subtracts the 2nd (and all further) child nodes from the first one.Usage example:
difference() {
cylinder (h = 4, r=1, center = true, $fn=100);
rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}
intersection
Creates the intersection of all child nodes. This keeps the overlapping portionUsage example:
intersection() {
cylinder (h = 4, r=1, center = true, $fn=100);
rotate ([90,0,0]) cylinder (h = 4, r=0.9, center = true, $fn=100);
}
render
Always calculate the CSG model for this tree (even in OpenCSG preview mode). The convexity parameter specifies the maximum number of front sides (back sides) a ray intersecting the object might penetrate. This parameter is only needed for correctly displaying the object in OpenCSG preview mode and has no effect on the polyhedron rendering.Usage example:
render(convexity = 1) { ... }
Exercise 1
Build a character using at least 1 primitive and one CSG modeling method.
module head(){
union(){
difference(){
union(){
sphere(r=20);
for ( i = [1 : 1 : 2] ){
rotate( i * 360 / 6, [1, 0, 0])
translate([-4, 20, 0])
sphere(r = 5);
}
color([1,1,1])
for ( i = [1 : 1 : 2] ){
rotate( i * 360 / 6, [0, 0, 1])
translate([0, 16, 10])
sphere(r = 5);
}
}
intersection(){
translate([-10,0,-2])
sphere(r=11);
translate([-10,0,-2])
sphere(r=10);
}
}
}
}
module body(){
translate([20,0,0])
sphere(r=25);
translate([45,-2,0])
sphere(r=10);
translate([30,10,-22])
sphere(r=5);
translate([30,-10,-22])
sphere(r=5);
translate([10,-10,-22])
sphere(r=5);
translate([10,10,-22])
sphere(r=5);
}
head();
body();
Sources:http://www.3dtin.com/
http://www.alphaprototypes.com/how-to-create-stereolithography-files.aspx
http://bastech.com/sla/techtips/STLfiles.asp
http://www.alphaprototypes.com/how-to-create-stereolithography-files.aspx
http://bastech.com/sla/techtips/STLfiles.asp