Week 2
AI prompt:
“This image is a painting of me, and I would like you to create a new image with a computer-aided design theme showing this grandmother using CAD tools.”
Computer-Aided Design
This week, we had a wide range of materials to explore related to new tools and technologies. From these, I selected several tools that are closely aligned with the idea of my final project and focused on learning the specific features and details that could be useful for my design and development process.
The tools I used are:
During my university years, I had some limited exposure to computer-aided design (CAD), but it was quite a long time ago, and I no longer clearly remember the details. Because of that, I decided to approach these studies from the beginning and refresh my knowledge step by step.
GIMP
To avoid spending additional time and resources, I decided to use the online version of GIMP, especially since I do not require many tools. My workflow is limited to removing the background of selected images, adding text on top of the images, and apply a small amount of styling to the text.
By opening this link, I can immediately access the GIMP interface, where I can upload the image I plan to work on.
In the following images, it is shown how I upload the image and view it within the GIMP working area.
First, I need to remove the red background. Using the Magic Wand(W) tool, I select the entire background area and then press the Delete key to remove it. These steps can be seen in the images below.
Next, I select the Type Tool(T) and click on the area where I want to place the text. After typing the text, I right-click on the text layer and choose Warp.
In the opened window, under the Style: section, I select the Arc option and then adjust the curvature using the Bend: parameter. In my case, I set the bend value to 35%.
The image is now ready to be exported. To do this, I go to File → Export As and choose either .png or .jpg format. If the .jpg format is selected, the image transparency will be preserved. However, since my compress.py script converts all images to .png format regardless of the original file type, I saved the image directly as .png.
OpenSCAD
It would have been logical to continue describing my work with Inkscape, however, at this stage I decided to explain how I worked with OpenSCAD. Since Inkscape is not a parametric design tool and I want to design parts related to my final project, I chose to start modeling the parts in OpenSCAD. After that, I convert the model into a 2D format using Inkscape. This workflow allows me to prepare the design for laser cutting.
OpenSCAD is an open-source, script-based 3D CAD modeler often referred to as a "3D compiler". Unlike traditional interactive software, we create models by writing code that describes the object's geometry.
Since I want to create a maze for my game, where my robot overcomes obstacles and collects coins, I decided to design a game board in the form of a labyrinth.
First, I downloaded the OpenSCAD software using the official link. After completing the installation, I created a new file where I could start writing code to generate the board.
To design the labyrinth, I used the OpenSCAD Cheat Sheet as a reference guide. Here is a quick reference guide to the most essential commands and syntax for parametric 3D modeling.
I used the concept of functions (modules) in OpenSCAD, along with several core features such as difference, translate, and color. I also worked with basic 3D primitives like cube, as well as transformations and Boolean operations.
Here is the first module, which I use to define the area where the robot will be controlled using a joystick.
module labyrint(x, y, z, length, width, height) {
difference() {
translate([x, y, z])
color("#472d02ad")
cube([length, width, height]);
translate([x+1, y+1, z+1])
color("#f7b03ead")
cube([length-2, width-2, height]);
};
}
Below is the code used to draw the walls and give the board a labyrinth structure.
module wall(x, y, z, length, width, height) {
translate([x, y, z])
color("red")
cube([length, width, height]);
}
By calling the modules at the bottom of the file, the entire labyrinth is generated inside the board.
labyrint(5, 5, 0, 100, 100, 8);
wall(10, 10, 1, 2, 20, 5);
wall(....)..
By passing different parameters to the modules, it is possible to create labyrinths of various sizes and layouts.
This second module can be called multiple times, depending on how many walls are needed inside the board.
To avoid calling the wall() method many times, I grouped the parameters passed to the walls into a single array. Although this approach works, it is not ideal. In the future, I plan to implement an algorithm to generate the labyrinth automatically, instead of manually entering a large amount of data.
wall_data = [
[10, 10, 1, 2, 20, 5], [10, 30, 1, 10, 2, 5], [20, 30, 1, 2, 5, 5],
[20, 35, 1, 10, 2, 5], [30, 45, 1, 20, 2, 5], [30, 45, 1, 2, 15, 5],
[20, 60, 1, 12, 2, 5], [20, 60, 1, 2, 10, 5], [20, 70, 1, 5, 2, 5],
[15, 80, 1, 15, 2, 5], [15, 80, 1, 2, 20, 5], [15, 100, 1, 15, 2, 5],
[30, 100, 1, 2, 5, 5], [50, 90, 1, 20, 2, 5], [70, 82, 1, 2, 10, 5],
[70, 80, 1, 10, 2, 5], [80, 60, 1, 2, 22, 5], [80, 60, 1, 10, 2, 5],
[90, 50, 1, 2, 12, 5], [90, 50, 1, 5, 2, 5], [95, 50, 1, 2, 35, 5],
[50, 70, 1, 2, 20, 5], [50, 70, 1, 12, 2, 5], [60, 45, 1, 2, 25, 5],
[60, 45, 1, 20, 2, 5], [80, 20, 1, 2, 27, 5], [80, 20, 1, 20, 2, 5],
[100, 20, 1, 2, 20, 5], [100, 40, 1, 5, 2, 5], [35, 6, 1, 2, 20, 5],
[35, 20, 1, 20, 2, 5], [55, 20, 1, 2, 10, 5], [55, 30, 1, 10, 2, 5],
[65, 15, 1, 2, 20, 5]
];
Here is the sketch I used to calculate the positions and orientations of the walls and to design the labyrinth.
Here is the final result generated in OpenSCAD.
At this stage, it was necessary to save the file in SVG format in order to open and process it in Inkscape. To do this, I attempted to use Render and then Export as SVG.
However, during rendering, I encountered an error message.
After a brief search, I realized that OpenSCAD requires the 3D model to be explicitly flattened into a 2D plane before it can generate a vector file such as SVG.
To solve this issue, I used the projection(cut = true) module, which takes a 3D object and projects it onto the X-Y plane.
I also added a translate([0, 0, -2]) transformation inside the projection. Since the walls of my model start at Z = 1, a cut at Z = 0 might not intersect them correctly. By shifting the model downward, I ensured that the OpenSCAD projection “cutting plane” properly intersects the walls and produces a correct 2D projection.
Below is the full module call wrapped inside the projection() function:
projection(cut = true) {
translate([0, 0, -2]) {
board(5, 5, 0, 100, 100, 8);
for (w = wall_data) {
wall(w[0], w[1], w[2], w[3], w[4], w[5]);
}
}
}
Here are the steps to render the model and export it as an SVG file.
Inkscape
Next, I performed a few basic operations in Inkscape. First, I downloaded Inkscape from the official website. After completing the installation, the software was ready to use. Inkscape is a powerful, professional-grade, free and open-source vector graphics editor.
Since I already had the 2D .svg file of the game labyrinth board, I opened it in Inkscape by navigating to File → Open → select file.svg.
In Inkscape, I performed the following operations:
-
Scale
By selecting the object, handles appear on the corners and edges. These can be dragged to resize the object and adjust the thickness of the elements. I selected corner nodes and scaled them slightly to achieve a more visually distinct layout.
-
Stroke
To access the Stroke settings, I used
Ctrl + Shift + F. In the Fill tab, it is possible to change the color of the filled areas inside the shapes. The Stroke Paint option allows changing the stroke color, while Stroke Style is used to adjust the stroke width and appearance. The applied changes can be seen in the following screenshots.
-
Cleanup (Refining Paths)
By pressing
Ctrl + L, Inkscape automatically reduces the number of nodes, making the file smaller and smoothing the curves.
FreeCAD
Now, I will move on to exploring FreeCAD and present the work I have done.
FreeCAD is a free, open-source, parametric 3D computer-aided design (CAD) software that allows ideas to be designed and, at least conceptually, realized. Using FreeCAD, I created a model of my robot’s wheel, which I plan to further improve later by making it fully parametric.
After downloading and installing FreeCAD, I created a new empty file. Inside it, I created a Body and a Sketch.
A Body is a container that holds all sketches and 3D features related to a single solid object. A Sketch can be added when the Body is active and is used to define the shape of the object. After creating the Sketch, I selected the plane on which I wanted to draw the 2D projection of my object.
Below is my initial concept sketch of the wheel, which I then implemented in the software. I am not sure whether a similar wheel design already exists, whether it could support weight, or whether it would perform optimally in rotation. However, this represents my current idea and is subject to change and improvement.
After defining the main circles, I used the Pocket tool to subtract the smaller circle from the larger one, forming the basic structure of the wheel.
Next, I selected the Pad feature and created a new Sketch on top of it to add additional geometry. I drew another circle and applied a small extrusion depth—not a full one—mainly for visual enhancement.
Then, I selected a new plane and created another Sketch for further constructions.
I created two additional circles, inside which I planned to design the main internal patterns of the wheel. Using the Create Line tool, I drew a triangle.
By applying constraints, I ensured that the triangle remained consistently positioned between the two circles, which is indicated by the sketch turning green.
After the triangle turned green (fully constrained), I used the Create Arc by Center tool to draw an arc along the edge of the triangle. Then, I removed the unnecessary remaining segments.
After closing the sketch, when I tried to create a Pocket, I encountered an issue.
By returning to the Sketch, I noticed that some edge points were disconnected. I fixed this by reconnecting them using the Constrain Coincident constraint.
When creating the Pocket, I set the Type to Through All in order to generate a complete hole.
Next, I wanted to create an additional shape inside the existing geometry and fill it. To do this, I designed another shape using a logical construction approach, which can be seen in the images below.
After closing the Sketch, I selected it and applied the Pad tool, setting the Type to Two Dimensions, which resulted in the following shape.
After creating either a Pad or a Pocket, I used the Polar Pattern tool to generate symmetry around the center, with as many repetitions as needed.
Then, I added another Sketch to create holes near the center. I drew a small circle with a defined diameter and created another Pocket. After closing it, I selected the created Pocket and used Polar Pattern, setting the number of Occurrences to 5.
Since I cannot create a Sketch directly on a curved surface (“You need a planar face as support for a sketch!”), I decided to create the patterns on a flat edge first and then apply curvature to that edge.
The images below show this process.
conclusion
During this week 2, I explored multiple digital design tools, including OpenSCAD, Inkscape, and FreeCAD. I learned how to create parametric designs using OpenSCAD, convert 3D models into 2D SVG files, and prepare them for laser cutting using Inkscape.
This week helped me better understand the importance of parametric design, proper workflow between different tools, and how to troubleshoot common modeling issues. The skills gained here will be directly useful for developing and improving components of my final project.
Files for download
AI prompt:
“And when finished second week.”