ebook img

Programming with OpenSCAD PDF

206 Pages·10.934 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Programming with OpenSCAD

FULL COLOR P R O G R A M M I N G W I T H O P E N S C A D A B E G I N N E R ’ S G U I D E T O C O D I N G 3 D - P R I N T A B L E O B J E C T S J U S T I N G O H D E A N D M A R I U S K I N T E L Z Y X PROGRAMMING WITH OPENSCAD P R O G R A M M I N G W I T H O P E N S C A D A Beginner’s Guide to Coding 3D-Printable Objects by Justin Gohde and Marius Kintel San Francisco PROGRAMMING WITH OPENSCAD. Copyright © 2021 by Justin Gohde and Marius Kintel.   All rights reserved. No part of this work may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval system, without the prior written permission of the copyright owner and the publisher. ISBN-13: 978-1-59327-954-7 (print) ISBN-13: 978-1-59327-927-1 (ebook) Publisher: William Pollock Production Manager: Rachel Monaghan Production Editor: Dapinder Dosanjh Developmental Editor: Jill Franklin Cover Illustrator: Gina Redman Interior Design: Octopod Studios Technical Reviewer: Miro Hrončok Copyeditor: Sharon Wilkey Compositor: Maureen Forys, Happenstance Type-O-Rama Proofreader: Emelie Battaglia Indexer: Beth Nauman-Montana The following images are reproduced with permission: Figure 1 in the introduction was created by Gustavb and is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. The photo of the Leaning Tower of Pisa featured in Figures 7-1 to 7-4 is by Svetlana Tikhonova. The image is covered by the CC0 1.0 Universal (CC0 1.0) Public Domain Dedication license. For information on book distributors or translations, please contact No Starch Press, Inc. directly: No Starch Press, Inc. 245 8th Street, San Francisco, CA 94103 phone: 1.415.863.9900; [email protected] www.nostarch.com Library of Congress Cataloging-in-Publication Data LCCN: 2020943329 No Starch Press and the No Starch Press logo are registered trademarks of No Starch Press, Inc. Other product and company names mentioned herein may be the trademarks of their respective owners. Rather than use a trademark symbol with every occurrence of a trademarked name, we are using the names only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The information in this book is distributed on an “As Is” basis, without warranty. While every precaution has been taken in the preparation of this work, neither the author nor No Starch Press, Inc. shall have any liability to any person or entity with respect to any loss or damage caused or alleged to be caused directly or indirectly by the information contained in it. [V] About the Authors Justin Gohde has been teaching math and computer science for more than 20 years. He is the head of computer science at Trinity School in Manhattan, New York, where he oversees the computer science curriculum and programs, including the Design Lab makerspace, which features a wide collection of rapid prototyping tools for supporting computer science, robotics, and other STEAM-focused projects. Marius Kintel is the primary author and maintainer of OpenSCAD. He is a software engineer with more than 20 years of professional experience in diverse fields such as 3D visualization, physical computing, manufactur- ing automation, and cloud computing. In 2007, he became involved in the RepRap project out of an interest in learning electronics and the opportu- nity to transfer his knowledge of 3D graphics into the creation of tangible objects. Together with the rest of the local RepRap team at the Metalab hackerspace in Vienna, Austria, he created OpenSCAD out of a need for an open source multiplatform design tool more suitable for 3D printing. The project was adopted by the maker community at large and has since grown to become one of the most popular open source 3D modeling tools for 3D printing. About the Technical Reviewer Miro Hrončok is a software engineer mostly working on integrating the Python ecosystem into Fedora Linux. Besides that, he also takes care of the 3D printing stack (including OpenSCAD) in Fedora. He teaches Python and 3D printing basics at the Faculty of Information Technology, Czech Technical University in Prague. BRIEF CONTENTS Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Chapter 1: 3D Drawing with OpenSCAD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1 Chapter 2: More Ways to Transform Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .25 Chapter 3: 2D Shapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Chapter 4: Using Loops and Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 Chapter 5: Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79 Chapter 6: Dynamic Designs with if Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Chapter 7: Designing Big Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 Afterword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143 Appendix A: OpenSCAD Language Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 Appendix B: OpenSCAD Visual Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.