Week 2 - computer-aided design¶
Assignment¶
- Evaluate and select 2D and 3D software
- Demonstrate and describe processes used in modelling with 2D and 3D softwares
- Demonstrate image and video compression {#compress}
Additional Learning¶
kdenlive
kdenlive was also suggested for being able to capture your screen work. I watched this kdenlive Youtube Video by David Mbugua to learn to use it.
OBS Studio
Free and open source software for video recording and live streaming. OBS Studio was suggested by instructor Garrett Nelson for capturing some of the onscreen things we were working on.
The Work - 3D software¶
Notable Tidbits from Class on Wednesday
-
You can make a 3D model from grey scale and then use a height command based on shades.
-
Make Fillets and Chamfers to help with manufacturing.
3D files can be downloaded here except the onshape one below.
My Onshape stl file is here.
Blender¶
We did a Blender lesson with our classmate Angela Horstman
She did a basic tutorial with us showing us how to play with shapes and modif the cube using the vertices, the edges, or the faces.

- She showed us how to use the physics button to create motion.
- add collision to the monkey so it stays staionary
- select use cloth
I chose to drop a cloth on the monkey head.
- add > mesh > monkey
- add > mesh > plane
- object > transform > move
- move the plan eabove the monkey
- object > transform > scale
- scale the plane large so it can drape over the shape
- switch to edit mode in the left hand corner
- select the plane and right click to get to subdivide

- subdivide a few times, if you do it too much the computer may crash
-
back to object mode - the select physics on the left side

-
select Suzanne (the monkey) and click collision to keep her in place.
- select the plane and choose cloth.
- different materials can be selected below in the settings that looks like a tuner or 3 volume level toggles
different materials will fall different ways.

- different materials can be selected below in the settings that looks like a tuner or 3 volume level toggles
different materials will fall different ways.
- click play under the main screen to see how they fall.
- if your plan is not big enough the cloth will slide off.
- if your monkey moves, you forgot to select collision.
Sculpt GL¶
Angela showed us another fun one called Sculpt GL which is like sculpting clay on the screen. We played with the differnt options on the right to make some interesting modifications to the surface.

ONSHAPE - 3D software¶
I have used onshape a good deal with my robotics team. Its very accessible even for my students that only have chrome books. Its a cloud based system that is also great for collaboration since it's easy to share files, and to work in them at the same time. We make parts in separate tabs and then bring those in to make assemblies in other tabs.
Basic Onshape CAD Model Workflow¶
For demonstration I made a spacer for the screw in our cabinet. The screw was tool long for the pull on the outside, so we needed a spacer.
- Check workspace units and set to inches
- In the assembly tab bring in the screw we are using from the standard library. #8-32 x 1.25 inches
- Measure the diameter of the shaft (.164) of the screw using the measuring tool.
- move to the parts tab,Create the sketch
- Create two center spaced circles on the origin, one diameter 0.5 inches, and another at diameter .205 inches.

- Extrude the spacer the needed distance (.23 inches)

Fusion 360 - 3D software¶
Fusion 360 was new to me and I was reluctant at first becuase of the download, the size and the fact that is wasn't free. After downloading and setting up, I started learning using the the Kevin Kennedy videos. This took a while, but was very comprehensive and helpful.
We even learned an animation in Fusion which not only taught me some animation skills, but also gave me an opportunity to learn how to change file types from AVI to mp3.
Some Key Points
- Different from Onshape, all components are in one file.Top Down.
- Internal component will live only in the current design file.
- External component can be used outside the design file. Called “xref” - they get a link icon in the browser - they can not be activated or worked on in the assembly file - you must go to the source file to work on them. If you get a warning .. you can right click and update. These are useful if you are using the same part in many files.
- Note: You can not relink if you break - you have to re-insert the part.
Kevin's Rules
RULE #1 - always start each design with a new component
Rule #2 - always name your components
I took this opportunity to sketch out my final project in Fusion 360.

The stl file can be downloaded here.
FreeCAD¶
In FreeCAD I started to model the base of the votive holder i am making for this week. I used the spreadsheet and made the dimensions parametric so they could modified later.

FreeCAD was a bit tougher to learn for me. I watched a little of this youtube and then I watched another youtube. I made thebase ring and decided the interface was more difficult for me that fusion or onshape.

I did like how you could mouse over the touch screen controls option and it showed you all the choices for mousepad navigation.

I may try this again when I have more time. Sine it's free and has a big following, its a great resource.
The Work - 2D Software¶
2D software types
-
Raster -represents an image as a rectangular grid of pixels (blender, zbrush)
-
Vector -graphics describe an image using mathematical definitions of geometric shapes. No matter how far you zoom in, you always see a clean line. (inskcape)
My 2D drawing files are here.
Inkscape¶
VECTOR I started at [Inkscapes learning tutorials] (https://inkscape.org/doc/tutorials/basic/tutorial-basic.html) to get a basic overview of how to move around.
I want to trace my image for making a sticker on week 3. I started by taking an photo of a plush toy named coconut that my friend Mingyuan brought me back from China as a gift. I took the photo and turned it into a cartoon image/sticker on my phone editor.

I found a tutorial online about making stickers with Inkscape. I uploaded to inkscape as instructed to work with it. The general work flow is as follows:
- Import Image
- Path > trace bitmap
- Select Multi-Color and choose how many colors you want. If you want one color, use the single scan choice.

- Then preview and apply
Unfortunately, this wasnt working for me. There was too much gradient in the green shades. I could not get a clean line. I was able to get bits but then i would lose the cream above. On the bright side, I did learn about the different options with bitmap tracing in inkscape and would use it with clipart like images in teh future.

Then I found another more helpful tutorial from TJ FREE. This helped me a bunch with all the basics, but they are a bit old - so sometimes finding the functions or how they work have changed. I have been trying to learn this program FOREVER. I keep trying to do it without watching any tutorial, and its not that intuitive to me. I am happy I finally made the time to work on learning it. NOTE: Bezier = Pen Tool , Freehand = Pencil Tool
Newer tutorial by Logos By Nick has some advanced feature tutorials after the basic one.
I love the text function and all the things you can do wtih moving around text, splitting it up by letter or by word.

I had some issues with the Stroke painting. I ended up having to close out and then start a new sketch to get my sketch of my lid going. The sscope indicator had it half on transparent. Not sure how I got there, but not even AI could get me out of there. I even did a hard reset.

Solution.. found from reddit...
| key cmds | description |
|---|---|
| object to path | will convert the object into a path where you can edit the nodes - no longer an object - it is a PATH |
| ctrl+click | rotate what you have selected |
| ctrl+space | while rotating /moving an object will make copies |
| ctrl+Alt+\ | cut path |
I followed a tutorial and learned to make an image and export it as a jpg.
GIMP for 2D Design¶
RASTER I opened a new sketch and then looked for a tutorial that would show me how to use the program.
I leraned how to erase backgrounds and played with my coconut picture.
Then I spent some time playing with the paint tools. I prefer using the sketch mode in the 3D tools of onshape and fusion becuase I can dimension and it just feels more natural to me. These would be great for working with photos or for painting digitally.
The Work - Image Compression¶
Tinypng¶
I took a screenshot from onshape. It saved as a png. In original format it is 192 kb. You can also change the actual image display size.
Then I used tinypng.com to make it smaller. Upload the oringal and download the smaller version that was 56kb.

### freeconvert.com
Then I practiced making jpg's smaller at freeconvert.com They can also convert png to jpg which I have heard will be useful in this course. I took a family picture that was originally 736kb , and ran it through the converter where it became much smaller 56kb.

There are many options at freeconvert.com including changing the size and the compressions.

image resizer¶
I then started using the image compression software shared with us by Barbara Morrow and Adam Stone written by Avery Horvath wrote it. This has been a game changer. It really compresses the images well and leaves them in a good size by default for our sites.
The key for getting this to work for me was to install pip.
python -m pip install Pillow
GIMP¶
From Neil's Link page, I found GIMP instructions. GIMP Is a cross platform image edito and can also be used to resize images.
I downloaded GIMP and opened an image on my screen, then used the scale function to shrink it down to 300 px x 400 px and then I cropped it. It was pretty easy to use. Reminds me of a free photoshop.

### Video Compression
freeconvert.com above also does video conversion. In this webpage, I used freeconvert to shrink most of the screenshots and the monkey video (which is above in the blender section )that I shot with my phone.
FFMPEG¶
FMPEG was suggested by Neil in the class but I really didn't understand what it was. I didn't even know that was the name of the program. I just saw a bunch of code lines and didn't really know what they were for. The class went fast and I was most likely still on the last subject when he moved to this part. In the help session on Saturday, Adrian Torres started showing it on the command line which gave me enough information to understand that it was a command line function called ffmpeg and use the correct prompts to find out how to use it.
explain how to use ffmpeg for a high schooler
The answer
#### FFmpeg: Your Swiss Army Knife for Video and Audio
FFmpeg is a free command-line tool that lets you convert, edit, and manipulate video and audio files. Think of it like a super-powered version of those online video converters, except it runs on your computer and can do way more.
##### Getting Started
First, you'll need to download FFmpeg from ffmpeg.org and install it. On Windows, you might need to add it to your PATH (there are guides online for this - it's not as scary as it sounds).
You run FFmpeg from the command line (Terminal on Mac/Linux, Command Prompt or PowerShell on Windows). The basic pattern is:
ffmpeg -i input_file output_file
#### Common Tasks
**Converting between formats** - Want to turn an MP4 into an AVI? Just change the extension:
ffmpeg -i myvideo.mp4 myvideo.avi
**Extracting audio from video** - Pull the audio track from a video file:
ffmpeg -i myvideo.mp4 audio.mp3
**Trimming a video** - Cut a clip from 10 seconds to 30 seconds:
ffmpeg -i input.mp4 -ss 00:00:10 -to 00:00:30 output.mp4
**Resizing video** - Make a video smaller (say, 720p wide):
ffmpeg -i input.mp4 -vf scale=720:-1 output.mp4
The `-1` automatically calculates the height to keep the same aspect ratio.
**Combining audio and video** - Merge separate audio and video files:
ffmpeg -i video.mp4 -i audio.mp3 -c copy output.mp4
#### Why Use FFmpeg?
It's fast, works offline, handles basically any format you can think of, and gives you precise control over quality settings. Once you get comfortable with the basics, you can chain commands together to do really complex edits - like adding watermarks, creating GIFs from videos, or batch-processing hundreds of files at once.
The command line interface might seem intimidating at first, but start with simple conversions and build up from there. The FFmpeg wiki has tons of examples for specific tasks.
When you get to FFMPEG.org:
- Select your download. I chose one from windows from Gyan.dev becuase Claude said it was more straight forward and would be simpler for me to use with less bloat of files I wouldn't need as a new user.
- Extract Files
- Find exe in BIN file
-
Copy contects (all .exe files) to a new folder
- C:\ffmpeg
- Add it to your PATH (so you can run it from anywhere) using the environmental variables
- check install
- ffmpeg -version
- Use the command line to run
-
ffmpeg -i FTC17346RevA.mp4 -vcodec libx264 -crf 25 -preset medium -vf scale=-2:1080 -acodec libmp3lame -q:a 4 -ar 48000 -ac 2 output_FTC.mp4 -
Copy the formula and then cd ffmpeg, and use the command line in the correct directory.
I compressed a video of the FTC 17346 Robot Reveal. First I editied it in google videos to get a smaller piece becuase it was 48 seconds long. Then I downloaded it in mp4. Then i used the converter as shown above to shrink it.
A bit more dig down on the actual FFMPEG command. I asked Claude to break it down for me.
PROMPT:
ffmpeg -i FTC17346RevA.mp4 -vcodec libx264 -crf 25 -preset medium -vf scale=-2:1080 -acodec libmp3lame -q:a 4 -ar 48000 -ac 2 output_FTC.mp4 please explain the pieces in this and how I could make a file even smaller
Claude Reply:
Let me break down each piece of that command:
The Command Breakdown:¶
ffmpeg -i FTC17346RevA.mp4 - Input file
-vcodec libx264 - Video codec (H.264 compression)
-crf 25 - Constant Rate Factor = quality setting
- Range: 0-51 (lower = better quality, bigger file)
- 18 = visually lossless, huge files
- 23 = default, high quality
- 25 = your current setting, good quality
- 28-30 = noticeable compression but still decent
- 35+ = pretty bad quality
-preset medium - Encoding speed vs compression efficiency
- ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow
- Slower presets = better compression (smaller files) but take longer to encode
- For an 11-second video, you could easily use slow or slower
-vf scale=-2:1080 - Resize video to 1080p height, auto-calculate width
- -2 ensures width is divisible by 2 (required for H.264)
- If your video is already smaller than 1080p, this upscales it (makes file bigger!)
-acodec libmp3lame - Audio codec (MP3)
-q:a 4 - Audio quality (0-9, where lower = better)
-ar 48000 - Audio sample rate (48kHz)
-ac 2 - Audio channels (2 = stereo)
output_FTC.mp4 - Output filename
To Make It SMALLER:¶
Option 1: Increase CRF (easiest)¶
ffmpeg -i FTC17346RevA.mp4 -vcodec libx264 -crf 28 -preset medium -vf scale=-2:1080 -acodec libmp3lame -q:a 4 -ar 48000 -ac 2 output_FTC.mp4
Going from 25→28 will noticeably reduce file size with acceptable quality loss.
Option 2: Use slower preset (better compression)¶
ffmpeg -i FTC17346RevA.mp4 -vcodec libx264 -crf 25 -preset slower -vf scale=-2:1080 -acodec libmp3lame -q:a 4 -ar 48000 -ac 2 output_FTC.mp4
Option 3: Reduce resolution¶
If it's 1080p or higher, scale it down to 720p:
ffmpeg -i FTC17346RevA.mp4 -vcodec libx264 -crf 25 -preset medium -vf scale=-2:720 -acodec libmp3lame -q:a 4 -ar 48000 -ac 2 output_FTC.mp4
Option 4: Reduce audio quality¶
ffmpeg -i FTC17346RevA.mp4 -vcodec libx264 -crf 25 -preset medium -vf scale=-2:1080 -acodec libmp3lame -q:a 6 -ar 44100 -ac 2 output_FTC.mp4
Changed audio quality to 6 and sample rate to 44.1kHz (still sounds fine for most purposes).
Option 5: Aggressive combo (smallest file)¶
ffmpeg -i FTC17346RevA.mp4 -vcodec libx264 -crf 28 -preset slower -vf scale=-2:720 -acodec libmp3lame -q:a 6 -ar 44100 -ac 2 output_FTC.mp4
Claude recommendation for Fab Academy documentation:¶
Since this is probably going on your documentation site, try:
ffmpeg -i FTC17346RevA.mp4 -vcodec libx264 -crf 26 -preset slow -vf scale=-2:720 -acodec libmp3lame -q:a 5 -ar 48000 -ac 2 output_FTC.mp4
This balances quality (still looks good) with file size (loads faster on your site). What's the current file size and what are you trying to get it down to?
I wanted to convert the AVI that I made from Fusion when I was doing the Kevin Kennedy videos. So I asked Claude for those commands.
PROMPT: how to convert from AVI to mp4
ANSWER:
Super simple - just change the input and output formats:
ffmpeg -i input.avi output.mp4
PROMPT: how about to remove audio
REPLY:
To remove audio completely, use the -an flag (audio: none)
ffmpeg -i input.avi -vcodec libx264 -crf 26 -preset slow -vf scale=-2:720 -an output.mp4