Skip to content

Computer Aided Design

This week seemed pretty packed, so I started off by filling in my schedule and trying my best to follow it.

alt text


2D DESIGN

Introduction

Firstly, Neil talked about 2 types of images: a Raster image and a Vector image.

The main difference between these types of images is that a raster images (like photos) are made up of pixels, and when you enlarge these images, the pixels can stretch, making the image look pixelated or blurry. On the other hand, vector images, such as logos, are defined by mathematical equations, allowing them to be resized without losing quality, staying sharp and clear at any scale.

alt text


INKSCAPE

Inkscape is a free and open-source vector graphics editor that lets you create and edit scalable and precise illustrations.

I already had Inkscape installed on my computer, however, if you’re not like me, then you can follow this tutorial to download Inkscape.


Designing With Inkscape

I decided to use Inkscape to create a logo for my project. I wanted to create something that had a Y2K feeling to it. Before I get into the design process, here’s a basic introduction to the UI of Inkscape, as well as the tools that I used. alt text


I wanted a circular ring around the main logo because I thought that it would look pretty cool. So I used the circle tool to draw 2 circles (one white and one black), and then moved them around using my cursor. alt text There! I think it looks pretty good. Now it was time to make the main text, so I used the square tool to draw squares. Once you click on a square, some nodes will pop up, and I used these nodes to change the shape and look of my shapes. alt text Once I was done with the text, I grouped everything together and tilted the text a bit (using the nodes again). alt text

and we’re done !!!

(click on the image to open the actual file)

I’d say that I’m pretty satisfied with how the result came out considering no complicated tools were used, and my experience level. Also, I know the project is named TRACK but the logo says TRACKER, it’s just a test and frankly, I think it looks catchier.


GIMP

GIMP (or GNU Image Manipulation Program), is a powerful and free raster graphics editor, offering a wide range of tools for photo retouching, image editing, and graphic design.


Downloading GIMP

I’ve never used GIMP before, so I had to download it.

I went to this link, and I clicked on this tab.

Download GIMP

After that, the software automatically started to install.


Designing with GIMP

I didn’t know what I was going to make with GIMP. At first, I thought that I’d make more changes to the logo that I made on Inkscape (like visual effects), but then I remembered that the logo is going to be engraved on the casing, so it wouldn’t really make much of a difference. But I did it either way.

Once GIMP was installed, I created a new project and uploaded my logo from earlier. You can do this by cliking on file>open, and then selecting the file you’d like to open. alt text

alt text


This is what the GIMP interface looks like:

alt text alt text

I created a new layer in the “layers” panel, and then I displaced one layer slightly to the left (to create a shadow effect)

alt text

I then used the background select tool (red circle), and removed the background on my shadow layer, then I used the fill tool (blue circle) to fill in the details of my original layer.

alt text

alt text


Raster Manipulation

Then, I decided to work on some raster manipulation. For my reference imagage, I’m using a picture of this meme that’s been on my FYP for a while now; the “STOP BEING RATCHET” cat.

I started off by importing my image, and then creating an alpha layer in the “layer” tab. alt text alt text

Once you have your alpha layer, select the “fuzzy select” tool, and select the background. alt text

After selecting the area that I wanted to remove and deleting it, I was able to remove most of the background; alt text note; the end result was a bit rough, but that was because the background and the cat have similar colours, which makes it confusing for the tool to work properly.

AI Tools

While GIMP was downloading (which would take a while because Bhutanese internet is amazing), I decided to look into using Artificial Intelligence for 2D design. After some browsing, I found 2 promising AI software; Midjourney and Stability.ai

After creating accounts on both platforms, I started exploring their features, which I’ll be talking about below.


Midjourney

Midjourney is an independent research lab exploring new mediums of thought and expanding the imaginative powers of the human species.

We are a small self-funded team focused on design, human infrastructure, and AI. We have 11 full-time staff and an incredible set of advisors. -The Midjourney website

After creating an account, I came to the tragic realization that it was a paid software, so I couldn’t do much after that.


Stability.ai

Stability AI is the world’s leading open source generative AI company. We deliver breakthrough, open-access AI models with minimal resource requirements in imaging, language, code and audio. - © STABILITY AI LTD, 2024

After going through their (very user-friendly) page, I found their image-to-image tool, which I decided to use (since I already had a reference image).

alt text

After entering all of my information, I pressed generate, and the image started to generate, but it never finished. I’m not sure if it was the internet, but the screen was stuck on loading for 30+ minutes. It was at this point I decided to look into another AI software.


Pixlr

5 minutes of Googling later, I found another AI software that seemed quite promising; Pixlr

I created an account on their website, and then opened my project.

After entering the prompt;

don't change any shapes, just change the black to a dark blue-purple gradient, thanks.

this is what I got (not very promising):

alt text


Epiphany

AI clearly isn’t ready to be working on my amazing logo yet, so I stopped there, and decided to ask some AI modules to create some random 2D designs.

alt text

I asked the Pixlr AI to generate “Star Wars but it’s cats”, and the AI didn’t let me down.

alt text


3D DESIGN

FUSION360

For this week, I decided on using Fusion360 because it has a lot of mechanics and I find it quite user friendly.

I started off by setting up my user parameters. This is to create certain variables that have specific values. If you use these variables in your design dimensions, you can change your project dimensions without having to worry about scaling issues.

You can change your user parameters here:

alt text

alt text


Once I set my parameters, I started off my design by creating a sketch.

alt text

I created 2 circles on my sketch using the circle sketch feature.

alt text

When setting the size of the circles, this is where those user parameters that we set earlier come handy.

alt text

After using the different constraint options, I was able to lock my circles so that they moved with each other.

alt text

alt text

Then, using the “line” feature, I created a box that surrounded the bottom half of the circles.

alt text


I then made this sketch 3-Dimensional using the extrude tool.

alt text

alt text

This was what I had so far. I needed side panels to hold the batteries in place, so I created another sketch on those faces and extruded them.

alt text


I also needed to make those little panels on the side to make contact with the battery terminals as well as locking the battery so that it doesn’t move. But before that, I needed to create space.

So I created 2 rectangular sketches that fit the panel size, and then extruded them, but with different settings.

alt text

alt text

This was the main body of my project so far.

alt text


Now that I had slots to place the panels, I created a midplane in the middle of ONE battery slot.

alt text alt text

I created a sketch ON that new plane which would fit the design of the panel.

alt text


Sheet Metal Rules

Before I did anything else with my panel sketch, I went to the “rules” tab under the “SHEET METAL” tab.

alt text

I was going to use Aluminum for the panels, so I adjusted the dimensions for the Aluminum tab.

alt text


After that, I reopened my panel sketch and then used the “create flange” function to give it some dimension.

alt text

alt text

After that, I used the “mirror” tool to duplicate that design onto the other panels.

alt text

I created a hollow lid with the same dimensions as the base, and then connected them.

alt text

Lastly, I followed this video to create a hinge mechanism.

After adding the hinge mechanism, I added some textures and this is what the project looks like once rendered.


BLENDER

Downloading Blender

I decided to explore some alternate 3D editing tools (definitely not because we had to), and I came across Blender. It seemed pretty promising, so I decided to use it to practice some random designs.

But first, I needed to download it. I went to this Blender page, and selected my OS (Windows). The download then started automatically.

alt text

While Blender was installing, I decided to go through some online tutorials to get familiarized with the software and user interface. I found this Youtuber really interesting, and I followed this tutorial.


I started off by creating a new project, and then importing the SVG file that I made on Inkscape.

alt text

I extruded the sketch that I imported, and then I experimented with the different textures and colours.

alt text

After rendering, this is the model that I had. (click the image to access its file)


3D Design with AI

Lastly, I wanted to see if AI was capable of 3D design, so I went to the Text-to-CAD website. alt text After signing up, I opened a project and gave the AI this prompt:

“Create a 3D model of the TRACK (The Royal Academy Card Keeper) morning physical attendance machine. The main body should have dimensions of 30cm x 20cm x 5cm (height x width x depth). Design a sleek touchscreen panel on the front with dimensions of 15cm x 10cm, featuring a slot or scanner for personal student cards.

The panel should be inclined at a 45-degree angle for easy visibility. Incorporate vibrant colors, with a gradient from energetic red at the top to dynamic blue at the bottom. Include a 5cm x 5cm motivational display or health tips screen beside the card slot. Ensure the machine has a streamlined and futuristic appearance. Please provide detailed textures for the touchscreen, card slot, and any additional features.”

To which I received this design:

alt text

Okay, maybe the complexity of the prompt was the problem. So I changed things up and gave the AI a much simpler prompt:

create a card reader

alt text

I wasn’t that impressed considering this was AI, but then again, in hindsight, the fact that the AI was able to do that much from a text prompt in THAT amount of time was quite impressive.


File Compression

File compression helps when uploading to GitLab because it makes files smaller, so they take up less space, upload faster, and use less internet data. It also helps GitLab work more efficiently by reducing the amount of data it needs to manage.

As a Fab Academy student, file compression is an important part of my documentation, so this is how I compress my files:

ImageMagick (Image Compression)

ImageMagick is a powerful open-source software used for viewing, editing, and converting images. Our local instructor already introduced this software to us in the past, so I already had it downloaded, however, you can go to the Image Magick Website and follow the instructions on there (it’s pretty self explanatory).

First of all, I ran a magick -version command to see if I actually had Image Magick installed. If a really long message comes up, it means that it’s installed.

alt text

So now that we know that it’s running, say that you have the image that you want to compress/modify (mine is the screenshot of the magick -version command that you just saw), you can open the image directory, and enter this command:

magick convert input_image.png -quality 80 output_image.jpg

  • The “input_image.png” would be the name of your file and its file type.
  • The “-quality 80” would be the percentage by which you’d like to compress your file.
  • “output_image.jpg” would be whatever you’d like your image to be named after the modification, and the file type that you’d like to have.

For Fab Academy, JPG is the best choice of file type for your images.

alt text

For more commands, you can check out the Image Magick Commands website.


FFMPEG (Video Compression)

FFmpeg is a powerful command-line tool used for manipulating audio and video files. Similarly to Image Magick, I already had this software installed, but you can download it at their Official Download Page.


After asking ChatGPT for a code and explanation, this is the information I had.

Could you give me an FFMPEG code to compress a video? (add instructions and an explanation too, thanks)

Output:

Certainly! Below is a basic FFmpeg command to compress a video:

`ffmpeg -i input_video.mp4 -vf "scale=1280:-2" -crf 23 -preset medium -c:a aac -b:a 128k output_video.mp4`

Here's a breakdown of the command and its components:

`ffmpeg` This is the command to invoke FFmpeg.

`-i input_video.mp4` This specifies the input video file (input_video.mp4 in this example). Replace input_video.mp4 with the name of your input video file.

`-vf "scale=1280:-2"` This is a video filter (-vf) option that scales the video to a width of 1280 pixels while preserving the aspect ratio. The -2 means that FFmpeg will automatically calculate the height based on the aspect ratio of the input video.

`-crf 23` This sets the Constant Rate Factor (CRF) for video compression. Lower values result in higher quality but larger file sizes, while higher values result in lower quality but smaller file sizes. Adjust the CRF value as needed.

`-preset medium` This option sets the encoding preset, which affects the compression efficiency and encoding speed. The medium preset provides a good balance between compression efficiency and encoding speed. You can adjust the preset based on your priorities (e.g., fast, medium, slow).

`-c:a aac -b:a 128k` These options specify the audio codec (aac) and audio bitrate (128k) for the output video. Adjust the bitrate as needed to achieve the desired audio quality and file size.

`output_video.mp4` This specifies the output video file (output_video.mp4 in this example). Replace output_video.mp4 with the desired name for your compressed video file.

So, I changed the code according to what I needed, and then I compressed this video:


Reflection

This week was pretty fun icl. I spent a lot of time exploring new software and having fun with it. I’m pretty impressed with how many image editing and development softwares are out there, and I’m definitely going to be using these softwares in the future. I definitely prefer Inkscape from the 2D desgin software, it just makes sense to me, and I feel quite comfortable with how it works, even though other softwares have more tools. From the 3D desgin software, my heart belongs to Fusion 360. I’ve been using it the longest, and I’m the most comfortable with it. I don’t think it’s the BEST, but I’m definitely the most familiar with it, and I know how to use it’s tools the best.

Comparison Table

Software Pros Cons
Fusion360 - High precision modeling suitable for engineering tasks -Good support and learning resources - Integrated with other Autodesk products - Not as intuitive to use for beginners -Requires high system specs
Blender - Free and open-source -Has a large and active community - Steep learning curve -Interface can be overwhelming
AI Websites - Easy to use and access -No software installation is needed - Often limited in features -Usually requires a subscription for full functionality

The Mentioned Files

Inkscape Logo SVG

Fusion 360 Battery Pack

Blender 3D Logo

Ratchet Cat


*This website was created using a template provided by Mr. Anith Ghalley and was used with his permission.


Last update: May 8, 2024