fix folder structure

This commit is contained in:
2025-04-21 22:23:57 +02:00
parent 3bd7a07563
commit e9c90ab8d0
301 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,242 @@
# CAD Lecture notes Thursday
## What is cad software and why do we need it so much?
CAD stands for Computer aided design. It's one of the core programs used to make stuff. There are all sorts of flavours of cad software. Some are designed for general purpose design and some for industrial design.
## Global things for 3D software
Using a mouse for 3D software is a necessity.
## Blender
The first lecture was about blender.
### Enable emulate numpad
To start off with
If you don't have a numpad you should enable `emulate numpad` in Edit > preferences > input
If you want to you can set other preferences that you'd maybe like
### Shortcuts
Zoom: scroll mousewheel
Orbit: Press mousewheel and move mouse
Pan: Shift + press mouse wheel
It's recommended to keep default shortcuts
| Key | What does it do |
| :------------------ | --------------------------------------------------------------- |
| T | Open Toolbar in 3D Window |
| Control + N | Create new file |
| G | Grab |
| R | Rotate |
| S | Scale |
| Shift + Right click | 3D cursor |
| Right click | Works the same as escape |
| Shift A | Add a mesh on your cursor |
| 1 | front view |
| 3 | side view |
| 7 | top view |
| S + Axis | Scale the object on that axis |
| G + Number | Move object that number of blocks |
| G + Axis | Only rotate on that axis |
| G + Axis + number | Move object on the axis for the amount of numbers |
| R + Axis + number | Rotate object on Number of degrees on the Axis |
| ALT + G | Clear location |
| ALT + S | Clear scale |
| ALT + R | Clear rotation |
| N | Transform menu |
| F3 | Look up shortcuts |
| S + Shift + Z | Scale in all axises except Z axis |
| Tab | Switch between Object and Edit mode |
| E | Extrude (Extrude can also be mixed with alot of other commands) |
| E + C | Free move Extrude |
| E + S | Makes the plane move inward or outward |
### The 4 windows in blender
* top left: is the 3d view
* top right: is the objects the tree's of everything in the 3d view
* bottom right: buttons window
* bottom left:
![alt text](../../assets/assets_week_2/image--21.jpg)
#### Moving windows around
You can pull a window out of blender by grabbing it in the top right corner.
To spawn a new window you can go into the Window tab and then select new window
#### Blender knows where your mouse is
Shortcuts are different when your mouse is in another window.
### Building a monkey tower
Add a cylinder
![alt text](../../assets/assets_week_2/image--10.jpg)
Press `Shift A` to get a mesh menu on your 3d cursor. You can move the 3D cursor with `Shift + Right click`. Right after you add the mesh a small menu will appear. The menu will only appear one time.
Now make the create a monkey mesh and a Torus
Press `1`, `3` and `7` to build the tower and use `G` to grab the objects.
When you press `S` you can scale the objects
All commands work sequential. You can press `S` and then `X`. Then only stuff works on the `X` axis
G + number move that amount of blocks
![alt text](../../assets/assets_week_2/image--14.jpg)
`Pressing mouse wheel `will guess which axis you want to move an object in.
### Modifiers
Modifiers can be applied on the bottom right corner of your screen. There you need to press on on the wrench. There you can add modifiers.
#### Subdivision modifier
Make the object smoother. Warning: Don't increase it too much because it will crash your pc.
![alt text](../../assets/assets_week_2/image--15.jpg)
### Scenes
There are multiple scenes in blender that can be found in the top of your screen. Each screen has it's own tools and functionalities.
### Precision
If you press `N` in blender you can open the Transform menu. Where you can precisely place objects.
![alt text](../../assets/assets_week_2/image--16.jpg)
### Camera
If you press `0` you can see what the camera is seeing
### Hiding objects
You can hide objects by pressing the eye in the top right menu.
![alt text](../../assets/assets_week_2/image--17.jpg)
### Looking up keybinds
With `F3` You can look up anything.
![alt text](../../assets/assets_week_2/image--18.jpg)
### Edit mode
All the shortcuts work the same except now it works with points.
![alt text](../../assets/assets_week_2/image--19.jpg)
#### Select mode
Up here you can edit the select modes. You can select Points, Lines and Surfaces
![alt text](../../assets/assets_week_2/image--20.jpg)
## Fusion 360
### Intro
* Characteristics
* Engineering tool
* Surface modeler, Sheet metal and mesh available
* Great for working with assemblies and construction
* Very good at parametric design
* Lots of additional tools like machining, analysis and post processing
* Fusion can make gcode for machining
### Managing projects
In the top right there is a project management tab where you can manage all your projects. ![alt text](../../assets/assets_week_2/image--0.jpg)
When you import parts from other files you can change the imported files and then you can update it in the other designs.
Don't forget to label your parts. Don't join everything into one body
### Modeling
Best way to start a design is to start with a sketch. After you've clicked the sketch button you can select a plane. The best plane to start with is the bottom plane
![alt text](../../assets/assets_week_2/image--1.jpg)
#### Sketches
When in sketch mode you can draw you design with the top buttons above create.
![alt text](../../assets/assets_week_2/image--2.jpg)
Whenever you have a body you can also create a sketch on surface of that body to modify it even more.
#### Sketch dimensions
In sketch mode you can set dimensions for lines so they are locked to that size.![alt text](../../assets/assets_week_2/image--4.jpg)
#### Extruding
When done with the sketch you can select all the surfaces you want to extrude and then press `E` to extrude. Within the extrude menu you can change what kind of operation you wanna do.
#### Filet
You can make corners smooth by using Filet on in the top menu of the screen when in solid edit mode. To Filet you need to select the corners of the body
![alt text](../../assets/assets_week_2/image--3.jpg)
#### Timeline
At the bottom you can see the Timeline. There you can see every action that you did and if you right click actions you can edit them or delete them and then that operation will be undone. If something breaks in the timeline you can right click it to re-define the faces or delete it because maybe it's not needed anymore.
#### Designing with parameters
Under the Modify tab you can open the parameter menu and then add parameters to the design
When you're in the parameter menu you can click the `+` icon and then add a parameter. The name is the parameter name and the expression is the value. ![alt text](../../assets/assets_week_2/image--5.jpg)
When you've added a parameter you can use that parameter instead of setting a value. You can also add calculations within expressions and values like this.
#### Creating a hole
You can create a hole by going to create and the Hole
In there you can define the hole.
![alt text](../../assets/assets_week_2/image--6.jpg)
## Design principles
* List requirements
* List what everything does
* List how everything is connected
* List what everything does and what it needs to do
#### Inspect tool
You can inspect length and how big it is with the inspect tool. The inspect tool is found in the top menu. There is also a automatic inspect tool in the bottom right. If you select 2 edges or faces you can see the distance between them.
#### Offset plane
The offset plane can be used as a tool for other tools. For example you can place a offset plane and then do a split body using that plane as a reference.
![alt text](../../assets/assets_week_2/image--7.jpg)
![alt text](../../assets/assets_week_2/image--11.jpg)
![alt text](../../assets/assets_week_2/image--12.jpg)
![alt text](../../assets/assets_week_2/image--12.jpg)
![alt text](../../assets/assets_week_2/image--8.jpg)
#### Functional breakdown structure (FBS)
What your product has to do
What (sub)functions you need fo that
which functions can be combined and which not
what requirements fo these functions are
#### Product breakdown structure (PBS)
* defining your product structure
* Defining the parts and (sub)systems you need
* the way the product should be build
* managing interfaces between parts
* defining specifications for the components
* finding the design strategy for parts assemblies
* making risk assessments (FMEA)
#### Work Breakdown Structure (FBS)
* Which activities you have to do
### Designing
* Design on paper or get visuals of what you want.
* All 3D tools are different. Blender is useful for visualization, organic structures. Fusion is very much used for production environment and making solid models, assemblies, re-use parts in the structure.
* Which 3D tool you use is a personal preference.
#### Design strategy
* Example: if you want to make a hole in a part you can do that in different ways. Define the structure with a hole. Or drill it through the part. The sequence affects the way it behaves.
## Freecad
You first need to create a body and a sketch
FreeCad library with parts.
Freecad has build in CAM tools
Importing SVG is difficult in freecad
### CAM
Next week maybe.
## Links
* [blender tutorial](https://feadi.de/en/tutorials/blender/)

View File

@@ -0,0 +1,311 @@
# Designing the drone
## Drawing the drone
I have a few concept images above and this is the result my drawings.
![alt text](../../assets/assets_week_2/fusion360/IMG_7688.jpg)
![alt text](../../assets/assets_week_2/fusion360/IMG_7686-min.jpg)
![alt text](../../assets/assets_week_2/fusion360/IMG_7712-min.jpg)
![alt text](../../assets/assets_week_2/fusion360/IMG_7711-min.jpg)
In the second picture you can see that I wanted to make the drone 30 cm in length. But then I looked at the prices for bigger batteries and it started to get super expansive real fast. So I decided to make it smaller. So now im planning on making a drone 10 cm in length. Im still going for the design in the third image.
## Designing the drone
When designing the drone I wanted to do everything parametric. So im going to try to use as much variables as possible and make everything depend on each other so everything automatically scales when I change one parameter.
## Fusion
I've had a little bit of experience in fusion. Mostly with making basic cases. But now I wanna learn how to design everything perfectly parametric so if I need to change a length everything will scale with it without me needing to fix some things
### Previous experience with Fusion360
I've had some experience using fusion with my university for making cases in projects. but it was never explicitly thought to me.
### Designing parametrically
Designing parametrically is very hard because every constraint needs to be perfect. Otherwise when changing lengths the design will fold into itself like this.
![alt text](../../assets/assets_week_2/fusion360/image.jpg)
#### What is parametric design?
Parametric design is the practice of using variables in your cad software, so if you wanna change something. Other parts of the design scale with it. It is very handy if you wanna make last minute changes to your design so you don't have to redo the entire design.
### Offset planes
Offset planes are something completely new for me. After the lecture I finally knew what they where and how to use them.
#### What are offset planes?
Offset planes are a way to tell fusion where you want something to happen. For example the splice tool needs a plane to cut through. For that is a offset plane required. For example I wanna cut this design in half.
### Using the the offset planes
For simplicity im gonna start using the normal Offset Plane.
![alt text](../../assets/assets_week_2/fusion360/image-14.jpg)
Once that's selected you can select a face to create the offset from.
![alt text](../../assets/assets_week_2/fusion360/image-15.jpg)
![alt text](../../assets/assets_week_2/fusion360/image-16.jpg)
Now we can press split body and select the body and use the offset as a tool to split along to.
![alt text](../../assets/assets_week_2/fusion360/image-17.jpg)
The offset planes can be used for almost everything in fusion. You can reference sketches from them and many other stuff.
### Constraints
There are a few different constraints. When placing things Fusion360 often makes constraints by itself. But additional constraints are needed when making designs parametric.
![alt text](../../assets/assets_week_2/fusion360/image-1.jpg)
![alt text](../../assets/assets_week_2/fusion360/image-2.jpg)
You know when something is fully constrained is when all the blue lines turn black. Sometimes you don't wanna constrain some parts of the sketch because they need to move freely when changing a parameter. For example:
![alt text](../../assets/assets_week_2/fusion360/image-3.jpg)
![alt text](../../assets/assets_week_2/fusion360/image-4.jpg)
In the first image in fusion 360 you can see what happens when I over constrained it. It didn't scale well with the rest of the design. I solved this issue by removing all existing constraints and from the ground up using the basic shape.
![alt text](../../assets/assets_week_2/fusion360/image-5.jpg)
#### Center constraint
I started off centering the bottom of the design to the center point. I did that by using the Midpoint constraint. Then clicking the origin point and the bottom line.
![alt text](../../assets/assets_week_2/fusion360/image-6.jpg)
#### Lock constraint
Then I locked the bottom line so it can't change rotation or go down when scaling the sketch. When using the lock/unlock constraint the line will turn green and then you know that line is locked in place.
#### Equal constraint
After that I made both sides of the line equal because the drone always needs to be symmetrical and otherwise you get off angles and that doesn't look nice.
![alt text](../../assets/assets_week_2/fusion360/image-7.jpg)
#### Perpendicular constraint
After that I added a line from Top to bottom and added a perpendicular constraint to both sides so the sketch would always push up and down straight. Once I've made sure both the top and bottom parts of the line.
![alt text](../../assets/assets_week_2/fusion360/image-8.jpg)
#### Sketch Dimensions
Sketch dimensions are one of the most important things to use. They tell a line how long it needs to be and it makes sure it can't be any other length. I want the bottom and top of my sketch to always be a certain value. For the sides it doesn't matter because if the top and bottom are defined the rest can be calculated if everything is constrained right. I also want the height to work parametrically so that's why I added a center line with a dimensions.
![alt text](../../assets/assets_week_2/fusion360/image-9.jpg)
### Extruding
After making all the sketches it's finally time to extrude. To extrude you first need to click a face. What is a face? A face is the light blue part of a sketch or it can be a part of a body.
![alt text](../../assets/assets_week_2/fusion360/image-10.jpg)
When you've selected a face you can press `E` and then you can extrude. A new menu will pop up with all the details of the operation.
![alt text](../../assets/assets_week_2/fusion360/image-11.jpg)
In the menu you will find what type of operation you wanna do, You can join the extrude, create a new body from it, intersect or remove part of a body using extrude. You can also specify the length and how you wanna extrude.
### Adding in components
I wanted a digital reference on how the drone would look so I have looked for online components so I wouldn't have to make them myself.
I first searched for `Brushless motor 3d design` and instantly found a model on grabcad and downloaded it. After downloading it I imported it into fusion360 using the import button in the top left of the project menu.
![alt text](../../assets/assets_week_2/fusion360/image-12.jpg)
After importing it I dragged it into my design and positioned it in the right location.
![alt text](../../assets/assets_week_2/fusion360/image-13.jpg)
### Result
After some time modeling this is my result.
![alt text](../../assets/assets_week_2/fusion360/image-18.jpg)
## Onshape
Onshape is completely new for me. I've heard engineering youtubers talk about it and promote it but I've never used it myself. That's also why I took some interest in it. So im going to start off with a [tutorial](https://www.youtube.com/watch?v=2utLjjkXpIg).
The first thing im gonna say off the bat is that I like the parameter menu of Onshape way more than fusion. In Onshape it's on the side instead of a new window that you can't use while sketching or modeling like in fusion. The thing that I don't like is that the camera rotates around the center point of the project and that you can't move it freely like in fusion.
### Sketching
Another thing thats different from fusion is that you can't instantly give lines variables. You first need to define a length before being able to put in a variable.
I first created the same sketch as in fusion so I could loft the sketches together. ![alt text](../../assets/assets_week_2/Onshape/image.jpg)
The top sketch was made using a offset plane first and then defining the sketch on top of that.
![alt text](../../assets/assets_week_2/Onshape/image-2.jpg)
You can draw lines by pressing the button with the red arrow and set the dimensions using the button with the green arrow. It feels very similar to fusion360
### Extruding
With Onshape I noticed there are more extrude options available.
You can choose through how much walls it should go or you can define the dimensions yourself.
To connect the 2 sketches I used loft.
![alt text](../../assets/assets_week_2/Onshape/image-4.jpg)
Loft creates a smooth solid body between 2 surfaces.
![alt text](../../assets/assets_week_2/Onshape/image-1.jpg)
After that I created a sketch on the front surface with a offset so I could extrude the inside
![alt text](../../assets/assets_week_2/Onshape/image-3.jpg)
After that I sketched the motor arms and sketched holes on top to cut the holes.
### Parameters
The parameter menu is very nice in Onshape It is on the side of the screen and it doesn't close automatically when modeling. Which is very nice.
![alt text](image.png)
### Other notes
I think Onshape is a solid to fusion360 but the part that im missing is that I can instantly assign variables to anything. On another note Onshape is a lot nicer when working parametrically because you can slide the parameter menu on the side next to the design.
## Blender
I wanted to make a render of the drone so I could visualize my idea to everyone. I don't have any experience with blender. The only experience i have is from the lecture we had.
### Animating in blender
To learn animating I used [this](https://www.youtube.com/watch?v=CBJp82tlR3M) video.
#### Animating the rotors.
I have imported rotors from grabcad and aligned them on top of the motors. Using the `G` key. If you wanna grab something in blender you need to use `G`. The rest of the model I imported from fusion360.
![alt text](../../assets/assets_week_2/blender/image.jpg)
Then I opened the animation menu and pressed `N` to get the extended menu.
![alt text](../../assets/assets_week_2/blender/image-1.jpg)
After that I selected all the rotors using shift click and pressed `k` to get to the keyframes menu.
![alt text](../../assets/assets_week_2/blender/image-2.jpg)
In there I selected the Rotation option to save that information inside the keyframes.
Then the Z Euler rotation should appear.
![alt text](../../assets/assets_week_2/blender/image-3.jpg)
After clicking that I went into the modifiers menu and added a Generator and enabled additive. This makes sure that the Z angle only keeps going up. So it keeps spinning indefinitely.
After that you can select everything and press `Control + L` and then link animation data so all the propellors do the same. Then it should look like this. And if you press space they should start spinning.
![alt text](../../assets/assets_week_2/blender/image-4.jpg)
<video controls src="/assets/assets_week_2/blender/droneAnimation1.mp4" title="Title" type="video/mp4"></video>
##### Issue with rotor animation
When I try to angle the drone for an animation the rotors go spinning in a weird direction and I don't know why.
<video controls src="/assets/assets_week_2/blender/droneRenderWhackyRotors.mp4" title="Title" type="video/mp4"></video>
##### Quirks of the animation timeline
The keyframes only show up when you've selected the part/parts that have keyframes. Otherwise your timeline would be empty. Don't get confused by it.
#### Animating the drone
When animating the drone I ran into some issues. When adding keyframes my drone was flying away without it's propellors.
![alt text](../../assets/assets_week_2/blender/image-5.jpg)
![alt text](../../assets/assets_week_2/blender/image-6.jpg)
I fixed the issue by right clicking the location data in the Transform menu and clicking clear keyframes. Animating in blender is really straight forward. You move the objects and then press `k` and choose the keyframes that you wanna store.
### Rendering in blender
#### Making a scene
The first thing I did is make a floor. I did that by placing a flat plane and scaling it by a lot so it covers the floor.
When you want to give objects textures or colors you need to assign materials to them. You can assign a material by going into the material tab on the bottom right.
![alt text](../../assets/assets_week_2/blender/image-7.jpg)
In there you can change colors and do all other sorts of fun things. If you press `Z` and then select render you can see the rendered project.
#### Rendering with images
I've struggled with rendering images. But I found out you can import images as materials and then they do get rendered. If you import it as image it doesn't get rendered in the 3d environment.
First you wanna go to the material and import the image into the material. When you the box next to base color a big menu appears with a lot of options.
![alt text](../../assets/assets_week_2/blender/image-8.jpg)
![alt text](../../assets/assets_week_2/blender/image-7.jpg)
In the menu you wanna select image texture. When you've done that it will probably look something like this.
![alt text](../../assets/assets_week_2/blender/image-10.jpg)
To fix this we need to do some UV-mapping? A UV-map is a way to tell blender how and where textures should be rendered. First start off creating a second view by dragging the top left corner of the 3d viewer to the middle. Then open the UV-editor using the top left button.
![alt text](../../assets/assets_week_2/blender/image-11.jpg)
Then you can press the object you wanna edit on the right and edit it on the left. To get the object in the uv editor you need to select it and then press `tab`.
![alt text](../../assets/assets_week_2/blender/image-12.jpg)
Then you will get something like this. Now drag over everything and press `unwrap`
![alt text](../../assets/assets_week_2/blender/image-13.jpg)
That will make everything disappear.
![alt text](../../assets/assets_week_2/blender/image-14.jpg)
Now you can select faces in your 3d editor you want the image on. And right click and press `UV unwrap faces -> Unwrap -> Smart UV project`
Now you have a couple of face on the image and you can see your changes directly reflect on the 3d model. ![alt text](../../assets/assets_week_2/blender/image-15.jpg)
You can move and edit the faces around on the uv map using `G` `R` `S`.
Result:
![alt text](../../assets/assets_week_2/blender/image-16.jpg)
#### Setting the camera and lighting
For a render to look good the camera needs to be positioned well and there needs to be lights.
When in object mode you can move your cursor using `shift + right click` and then press `shift + a` to create a light. When you've created a light or selected one you can change the settings of the light. For now i've used `Sun` as light type because I couldn't get any other to work.
![alt text](../../assets/assets_week_2/blender/image-19.jpg)
#### Rendering
To start rendering a video or image you first need to set the render settings. That can be found on the left bar at the tv icon. I was searching a lot to figure out where it was until I searched a video explaining that you can define the output location and type.
![alt text](../../assets/assets_week_2/blender/image-17.jpg)
After that you need to set the output location and file type. That can be done in the menu right under the first menu. Otherwise your render will get saved in a random location.
![alt text](../../assets/assets_week_2/blender/image-20.jpg)
In there you can change render settings for this project. There are multiple render engines. Eevee is the fastest but lowest quality and Cycles is the slowest and heaviest one but looks the nicest. Workbench is somewhere in between.
After setting all your settings you can go to the top menu and press `render` and choose if you wanna render an image or video.
![alt text](../../assets/assets_week_2/blender/image-18.jpg)
#### Result:
<video controls src="/assets/assets_week_2/blender/droneRender.mp4" title="Title" type="video/mp4"></video>
##### Issue with adding videos
When trying to view videos on the web my firefox says no MIME type.
![alt text](../../assets/assets_week_2/MIME.jpg)
I fixed it by searching basic video tag documentation. Then I added `type="video/mp4"` to every video tag. Because when pasting in images in markdown vscode forgets to add it.
source : `https://www.w3schools.com/tags/tag_video.asp`
What I also needed to do is set the absolute path instead of the relative path. For some reason it added `Assignment` in the link when trying to load the video
![alt text](../../assets/assets_week_2/browserconsole.jpg)
Its supposed the be `link.org/assets/video` instead of `link.org/assignment/assets`. But for some unknown reason it changes it. The fix now is to set the absolute path starting with `/assets/video.mp4` So now its referenced like this. ```html
<video controls src="/assets/assets_week_2/blender/droneRender.mp4" title="Title" type="video/mp4"></video>
```
instead of
```html
<video controls src="../../assets/assets_week_2/blender/droneRender.mp4" title="Title" type="video/mp4"></video>
```
## Conclusion/My thoughts
I liked this week. I learned a lot about blender and OnShape at the start of the week I really hated Onshape because I didn't like how to camera feels and finding all the tools is frustrating but after a while I got comfortable with it and I liked some aspects of it. I also worked with Fusion360 also learned a couple of new things in there like the offset planes.
## Files
* [drone fbx file](../../../3D-files/Drone%20v9.fbx)
* [drone step file](../../../3D-files/Drone%20v9.step)
* [drone fusion project file](../../../3D-files/Drone%20v8.f3z)
## Sources:
* [Exporting blender renders](https://www.youtube.com/watch?v=JPkzmWpZbLw)
* [Importing photos and videos into blender](https://www.youtube.com/watch?v=jLGWE335J28)
* [How to create animations in blender](https://www.youtube.com/watch?v=syg2Oy43zJ0)
* [Onshape crash course to get to know the UI](https://www.youtube.com/watch?v=2utLjjkXpIg)

View File

@@ -0,0 +1,50 @@
# Lecture notes Wednesday
## Notes regional
Parametric design - scalable objects (so that if you change one parameter everything changes with it)
Try as much design softwares as possible
Parametric design is different in every design software
## Notes global
### Constraints
equality constraints to make things the same size
dimension constraints force something to a length
* imperative design (click and drag)
* generative design (describe how you want something and it generates it)
#### Freecad
Different snaps to snap to grid of vertices or edges
#### loft
2 lines on different planes that get connected by loft.
#### Parametric design
Use of spreadsheet
### Integrate 3d view in website
https://grabcad.com/
### Video encoding
Use H.264 to encode videos with
ffmpeg -i input_video -vcodec libx264 -crf 25 -preset medium -vf scale=-2:1080 -acodec libmp3lame -3q:a output_video
#### Assignment
* model a possible final project with cad in 2d and 3d
* make photorealistic render
* make a movie
* make a simulation that it works
* compress them
* post the description with the design files to the class page
#### Next week
* next week parametric press fit construction kit.
* focus on constrains and parametric