Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Simplifying 3D Printing with OpenSCAD

You're reading from   Simplifying 3D Printing with OpenSCAD Design, build, and test OpenSCAD programs to bring your ideas to life using 3D printers

Arrow left icon
Product type Paperback
Published in Mar 2022
Publisher Packt
ISBN-13 9781801813174
Length 320 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Colin Dow Colin Dow
Author Profile Icon Colin Dow
Colin Dow
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Preface 1. Part 1: Exploring 3D Printing
2. Chapter 1: Getting Started with 3D Printing FREE CHAPTER 3. Chapter 2: What Are Slicer Programs? 4. Chapter 3: Printing Our First Object 5. Part 2: Learning OpenSCAD
6. Chapter 4: Getting Started with OpenSCAD 7. Chapter 5: Using Advanced Operations of OpenSCAD 8. Chapter 6: Exploring Common OpenSCAD Libraries 9. Part 3: Projects
10. Chapter 7: Creating a 3D-Printed Name Badge 11. Chapter 8: Designing and Printing a Laptop Stand 12. Chapter 9: Designing and Printing a Model Rocket 13. Part 4: The Future
14. Chapter 10: The Future of 3D Printing and Design 15. Other Books You May Enjoy

Creating our own OpenSCAD library

One way to turn our desk drawer code into a library file is to add it to our OpenSCAD installation's libraries directory. We can open this location on our computer by clicking on File | Show Library Folder... in OpenSCAD.

Before we do that, we should take note of how we will be using this library. If we were to simply copy the code as we left it in the Using the BOSL to design a desk drawer section, we could see the whole drawer with the sliders generated. This would happen when using an include statement for importing:

include <desk_drawer.scad>

This is due to the non-module code at the end of the file that creates the drawer and the sliders we added in the Using the BOSL to design a desk drawer section. We will, however, be able to change the size of the drawer and sliders, as we will have access to the non-module variables declared at the beginning of the desk_drawer.scad library file. This may seem like the way we should approach...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime