How can we ground abstract concepts through the creation of objects? How do mental models translate to physical models? Does integrating a fabrication process at this stage of learning make sense? Does it make the concepts more memorable?
Building on a project I began in 2018, I represent abstract programming concepts like data structures through 3D objects. Code modules support learning by integrating making via 3D printing of the very concepts learned.
This project seeks to teach data structures in an introductory Python programming class through the use of 3D models representing the data structures. The 3D models are generated through SolidPython2, the Python package wrapper of OpenSCAD, an open-source parametric 3D modeling tool. After users learn the basics of a data structure, they are given generated examples of a 3D model of that data structure and taught how to make modifications to the form. They can export the models to their computer to be opened in OpenSCAD, converted to .stl files, and loaded into a slicing software for 3D printing, such as Ultimaker Cura.

The notebook runs several additional functions that handle the conversion to OpenSCAD code, resulting in an outputted object that serves as a data structure model, generated from random numbers or from an inputted dataset supplied by the user. In addition to the creation of these models, the code walks users through the basic properties of each of the data structures as well as their advantages and drawbacks. Users can experiment with the data structures themselves through adding to the code blocks and generate additional versions of the models to test their functionality and to see the results of changing parameters. The models are viewable from within the IPython notebook through the jupyterscad package, which handles viewing OpenSCAD code in notebooks.
Back to Top