2. Computer Aided Design (CAD)¶
Task for the week 02
-
Modelling (raster, vector, 2D, 3D, render, animate, simulate, …) a possible final project
-
Compressing your images and videos using different softwares and apps
-
Post the design files on your class page.
This week we are introduced to various 2D and 3D designing softwares. We are asked to explore different softwares and choose the softwares that we are comfortable working with.
The Following are the softwares that I explored for the week:
2D design¶
Raster Vs Vector Image¶
There are two types of images the vector and raster images. And most of the machine in Fablab uses the vector and raster images and it is essential to know where and when to use them. Give below are the differences between raster and vector images.
Raster Images:
-
This image is composed of a grid of individual pixels, each with a specific color value
-
The image will lose quality when enlarged, resulting in pixelation or blurriness.
-
The more pixels an image has, the higher the quality it will possess.
-
Common file types are .jpg, .png, .gif, .bmp, .tiff, .psd
Vector Images
-
This Images is Made up of mathematical paths, points, curves, and shapes (e.g., lines, polygons).
-
This image is infinitely scalable without losing quality
-
The image is resolution-independent
-
Vector files are best format for generating tool path for cutting in machines like laser cutter, vinyl cutter, and CNC router.
- Common file types are svg, eps, .ai, .dae, .ps, .emf.
Photo Courtsey: Google
Inkscape¶
Inkscape is a open software tool that is used to create a vector images from the raster images. Inkscape Usally supports the file formats like SVG,PNG,DXF AND PDF. I have been using Inkscape for quite long but never explore its different features and this is great chance for me to explore its different features.
Inkscape is a:
-
Vector graphics editor tools
-
Open/ free source tools
-
Offers tools for drawing, shape creation, text manipulation, and path editing
-
Primarily works with SVG, but supports import/export for formats like PNG, PDF, and EPS.
Inkscape Interface:
Inkscape Workflow:
-
Download and install the inkscape
-
As you open the inkscape you will find the imgae shown below and click on new document
-
You can either import image or create a new file
-
I import the raster images from my downloaded location using the file menu
-
With the image selected >> Click On path >> Select the trace bitmap >>
-
Click On update and then apply, once you are satisfied with the editing and tracing adjustment.
The image shows before and after the bitmap tracing
-
We can adjust the brightness and threshold as per the image
-
I deleted the raster image and kept the vector one and export for the cutting.
Path operation or Boolean Operation inkscape:
These are some of the simple path operation that i tried and I refer this link to understand its shortcut keys.
-
Union (Ctrl++): Union to combine them into a single shape
-
Difference (Ctrl+-):Difference to subtract the top most path from the one beneath it.
-
Intersection (Ctrl+*): To produce intersection of one or more path
-
Exclusion (Ctrl+^): to create a shape excluding the overlapping areas of the selected paths.
-
Division (Ctrl+/): Divison among two or more path
GIMP¶
GIMP is as a free and open-source image editing software. It’s often compared to Photoshop because it offers powerful tools for photo retouching, image composition, and graphic design. Its is also a great tool for the photo editing like removing background and edting the photo for laser engraving.
-
Free to use, modify, and distribute
-
Can be used to change the file size
-
Works with pixel-based images (Raster images), making it suitable for photo editing and detailed image manipulation.
GIMP Interfaces:
Removing the background with GIMP
There are so many ways to remove the background in GIMP, however I find it easier to use scissor tool to remove the background.I will show how it done.
-
Open Gimp
-
To edit your photo, click on file, click open and selct the file you want to edit and select open.
I used the image from the google
-
I am going use scissor tool to remove the background, eventhough there is different tools to do, How ever I find scissors tool easier to remove the background compare to other tool.Image below shows how it look when you select the scissor tool and select the area that needs to be removed.
-
Next I am going to click on my selected area. and the image below shows how it look when you hit key enter.
- Follow the step as shown in the image below. Click On select> invert > hit Delete key. Your background will be removed.
The above image shows how it look after removing the bacground
I followed this Link to learn about the GIMP
3D Design and Modelling¶
Fusion360¶
Fusion 360 is a cloud-based 3D CAD, CAM, and CAE (Computer-Aided Design, Manufacturing, and Engineering) software developed by Autodesk. It is widely used for product design, engineering, and manufacturing.
Fusion360 User Interface:
Photo Courtsey: Google
Getting started with Fusion 360
-
You can start by creating a sketch, followed by selecting the plane to where you want to perform the sketch.
-
Firstly i set the parameters, Go to Modify < Select the parameters< click the use parameters< enter your desired dimension< click ok>
-
Firstly created a component. (Create >new component) or (Go to Assembly> New component) and rename your component (Cabinet top,width, height,right and left)
-
Then I added the parameters to my editing the dimension and calling the user defined values
-
Next I did extruded (Press E OR you can use from the command), gave the extrude height using my user defined values.
-
I create a new sketch to make top cover my cabinet, extrude it
-
I created a sketch on top of the my cover cabinet to make a joint slot fot my cabinet
- Then I combined my two bodies by selecting the command assembly and click > Combine.
-
Created all the components and extruded using the same method.
-
Then I add the apperance values to my model. You can either select the command Modify to add the appearance or right click the face of the model and drop downlist will dsiplay and selected the appearance. You can select the appearances color as per your choices and drop in your design. T
-
To make a handle for my cabinet, I offset the plane and create the sketch on top of the door. I added the fillet to make smooth edges.
-
Next thing I did was to make a box where I can keep my RFID things, I followed the same procedure as above and add the appearances.
-
I want to add logo to my box, for that I insert the svg logo from the insert button and then scale up my logo.
A short video of how I did my designing
Tinkercad¶
Tinkercad is a free, web-based 3D modeling tool developed by Autodesk. It’s designed for beginners, making it an excellent choice for learning the basics of 3D design, electronics, and coding.
Tinkercad Interface:
-
To copy,paste, delete, undo and redo
-
Navigation: change all the view according to x.y,z axes.
-
Workplane
-
Edit Grids and snapping Option
-
To change the shapes colors and to create hole in the shapes/objects
-
To group,ungroup,align and mirror the selected shapes
-
Import and export the CAD files
-
Various geometric object from which we can drag and drop on the workplane
Tinkercad Workflow
Using a Tinkercad, I have design a hanger which can be attached with my RFID reader or tag
-
You can login to TinkerCad or if you are new user you can sign up and create new account in the browser
-
Click on 3D desiging and click on start tinkering
-
Drag and Drop the required shapes
-
Give the dimension and changed the radius to give fillet like looks.
-
I changes the colors
- I imported my RFID logo
-
I placed that on top my shapes i.e rectangle shape
-
Made some placement postion and I selected both the design and group it
-
I want to create a hole to hang my hanger. I choose the cylinder hole and placed on top my hangers
-
I selected all the shapes and group
- I exported my files.For 3D printing you can choose STL.OBJ extension and for cutting you can choose SVG.
- You can choose the desired location to save your file
Blender¶
Blender is a free and open-source 3D creation suite used for creating 3D models, animations, visual effects, and more. It’s super versatile and widely used in fields like 3D printing, game development, animation, virtual reality (VR), and visual effects (VFX).
This is my first time using blender, actually there is two ways of using blender one with geometry node and one directly, however i find it confusing to remember all the steps. So I explore to use blender without having to use geometry node.I went by making a cabinet.
-
Open the Blender, As you open the blender this layout will pops up.
-
Click on General. It will open the new page with the default cube.
-
Enter X to delete the default cube
-
Shift+ A to add the new cube.
-
I want to sacle up my cube, I used key S followed by my axes or following the steps as shown in image below.
-
To create a hole on a body select the body using key tab followed by numpad 3
-
Select a face where you want to create a hole and enter key I to offset
-
Select on inset body enter key E to create hole
- To add the fillet or bevel to the box, I selected all the edges and did ctrl+b to make edge smooth
-
To make door for my cabinet, I added the new cube using the key shift+A
-
Scale up my cube using the key S followed by the axes X,Y,Z
-
Then duplicated my door using the key Shift+D to make door into two parts then I set orgin
- To align the body door with the edge: Tab> select the edge of my door >shit+s> selected the cursor to selected faces> tap out>
To Animate the video
- To set the angle at which the door to open and close, I selected the face and used key R to rotate the door.Then I drag and opened the door at 90 degree, kept that
-
Click on my door and the set the time at which i want my door 1 to open
-
Click on time frame and set the time to open the closed the door and Then i did the same for my door 2
-
Before rendering my video, I want to set my camera view, this will show the intensity of the light on your object.
-
To add the light > Press Shift+A >light>sun
- I made some adjustment with the light angles.(The image below shows how i adjsut my sun angle)
Adding appearances to My Cabinet:
-
Select Object Mode
-
Select the faces or body you want to add color
-
Go to material properties> add new> select the base colors>choose the colors you want to apply
Adding plane to my background
- Use key Shift+A >Mesh>Plane and then i added the colors to my plane to my plane as shown in the image below. I followed the same procedure to add colors to my cabinet.
Rendering my Video
-
Open the render properties
-
There are three types of rendering under render engine drop down list, I am going to select EEVEE
-
Next I want to do render animation
-
Once you click the render animation, the video will saved to your desired location
-
The video that i render is just 1 sec, so i want to make the video of 10 sec so i play with the time frame as shown below
Here is the simple animation video that i design in blender
Some of the shortcut key that i used are:
-
X - to delete
-
Shift + A - To select the new shapes,curve etc..
-
I(inset)- To create offset
-
E -extrude cut/extrude
-
Middle Mouse Button (MMB) + Drag- Rotate view
-
Numpad 0,1,3, 5 - to change the view camera, front,side,top
-
Ctrl+B- to add fillet/Bevel
-
G - to move freely
-
R - Rotate
-
S + X → Scale along the X-axis.
-
S + Y → Scale along the Y-axis.
-
S + Z → Scale along the Z-axis.
-
Shift+D - Duplicate
Video Compression¶
FFMPEG¶
FFMPEG is a open source tool that is used to edit,record and convert the video and audio.
-
Download the FFMPEG or copy url and clone to you local server
-
I watched this tutorial to install ffmpeg in my laptop
-
I carried out all the step for installing the ffmpeg, however i encounter issue as shown in picture below.
-
then I did the whole things again by first deleting my all ffmpeg files and extracting the files
-
Kept location of my ffmpeg file to desktop
-
I copied the ffmpeg folder path
-
Search for “Environment Variables” in the Windows Start menu.
-
Under System Variables, select and double clik the Path
-
Click on new and paste your ffmpeg file path
-
Click ok
Video Compression using FFMPEG
-
To run the command, open the command prompt
-
Enter this code:
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -c:a aac -b:a 128k output_compressed.mp4
-
i input.mp4: Specifies the input video file.
-
c:v libx264: Sets the video codec to H.264, a commonly used codec for compression.
-
crf 23 : Adjusts the video quality. Lower values (e.g., 18) result in higher quality but larger file sizes.
-
c:a aac -b:a 128k : Sets the audio codec to AAC with a bitrate of 128 kbps.
-
output_compressed.mp4: Specifies the name of the compressed output file.
Here is the link to the cheatsheet for the ffmpeg
Hand Brake¶
HandBrake is a free, open-source tool that is used to convert and edit the video. It has an easy-to-use interface and is built on top of powerful tools like FFmpeg. HandBrake is a favorite for anyone who wants to reduce video size or change video formats without needing advanced technical skills.
-
Download and install the handbrake
-
Upload or drag or drop the video you want to compress
-
You can select the setting with the dimension,video and also with the audio.
Once you hit the Start encode, the video will start downloading
The Video has been compressed
After exploring both the video compression tool,I prefer handbrake for the video compression because it is user friendly and use to use tools. Unlike ffmpeg, we can directly drag and drop the video to compress the video.
Image Compression¶
XnConvert¶
Xn Converter is open source tool that convert/compress the image and wide range of image formats. Also it is user friendly.
Getting started with Xn Convert:
- Download and Intall the XnConvert
-
Open the xnconvert
-
In the Input you can select the folder of image or just image you want to convert
-
Click on action and reize the image
change the image pixels accordingly
-
Click on the output, you can give the location for your compressed images
-
Click on convert to apply compression.
Image shows the difference between before and after compression
Online Image Compressor¶
The Online image compressor is easy and simple to use. It is also a free tool that enables you tom compress or convert your image without any distortion in file quality. It also simple and easy to use.
It also have different features like image tools like image to diffrent file extension and convert tools and pdf tools. You can also resize the image as per your requiremnt.
Design Files¶
Design Files for the week is attached here:
Issue faced this week
After pushing the video, I was not able to view my video in website, eventhough the video is there in the git, so i used drag method to upload the video:
-
Fist I open all my folder in vs code
-
I open my video files and Enter Shift with drag button and paste on my vs code
-
Ctrl+ S to save my work
-
Then did git push from the vs code clicking on stage changes> added the commit message> clcik git push
-
I checked the website and then still the video was not able to views
-
I tired using different code,but still not able to load my video.
-
I also tired to changed my video directory, but it didnt worked.
-
Then I compressed my video using hand Brake becuase the video uploaded before was compressed using ffmpeg and it didnt worked.
-
Changed the video directory
Finally the first two code worked👏💪. Thanks to my Instructor Tshering💙
*Disclaimer: I used the definition from chagpt for fusion,blender and tinkercad *