Turning 2D shapes into 3D objects
Part of constructing our PVC Hook in Chapter 4, Getting Started with OpenSCAD, involved using the linear_extrude
command to turn a 2D shape into a 3D shape. We created the 2D shape in OpenSCAD using the shapes it had available.
Although the result was what we needed, there will be times when we may require a shape that is a little difficult to create in OpenSCAD. For these situations, we must import a .svg
file and then extrude it.
In this section, we will do just that. We will create a 3D printable Thumbs Up award, import it as a .svg
file, and then extrude it.
Importing SVG files into OpenSCAD
To import a .svg
file into OpenSCAD, we can use the import
command. To import the Thumbs Up graphic for our design, do the following:
- Download the
ThumbsUp.svg
file from the following GitHub location: https://github.com/PacktPublishing/Simplifying-3D-Printing-with-OpenSCAD/tree/main/Chapter5/images. - Create a new OpenSCAD file called...