# 3D printing

## Hero shot

## Introduction
I'm already familiar with 3D printing. I owned 2 3D printers. The ender 3 and the Bambu A1. With the Ender 3 I really learned how to repair the machines and how to configure them. With the Bambu A1 that's all kind of thrown out of the window because it does everything for you.

## Things to do before and after printing
Before we started printing we need to clean the buildplate otherwise there is a chance that the print won't stick to the bed properly. And then the print would fail. Thats why we have 70% Ethanol. After printing we need to make sure the nozzle is empty, because if someone else wants to use the printer and wants to use a different filament there is a chance it will get clogged or the filament will burn because they have different melting points.

## Filament sizes
On the market there are 2 different filament sizes 1,75 is currenctly the most used one. It's used in Ender, Prusa and Bambu. There is also 2.85

## Our printers and design rules
We have 4 printers where ~~3~~ 2 work. We have an Ender 3, Prusa MK3S, Voron and a INFI-20.
The Prusa works amazingly and has calibration out of the box. The ender is a bit harder to calibrate. You need to hold a piece of paper under the nozzle and rotate the knob under the bed till you feel a small bit of friction on the paper. Then that corner is calibrated.
We also have the INFI 20 which is a bit more confusing to calibrate and I don't have expierence with it. We also have the Voron printer but Henk still needs to do some stuff with it.

### Design rules tests.
#### Prusa MK3S.
![alt text](IMG_8363.jpg)
These 3 prints where done on the Prusa printer. There are still some differences between the tests. So filament also matters when printing. They where all PLA but I don't know how old the filament was. So that could also be a variable on why it printed like this.

#### Ender 3
This print was made on the ender 3.
During printing the Ender got clogged and we couldn't continue testing on the printer.
![alt text](IMG_8373.jpg)

#### Repairing the ender
During the design rules 3D print the ender got clogged and we needed to repair it.s 
![alt text](IMG_8347.jpg)
When I tried unloading the filament the motors ripped out the filament from the tube and broke it on the inside.
![alt text](IMG_8291.jpg)

According to Henk you see that it has under extrusion and that the cause could be that the filament got stuck. That could be a possibility because the filament leader got undone during the print.

![alt text](IMG_8348.jpg)
![alt text](IMG_8349.jpg)

While unscrewing the PTFE tube from the hotend it didn't come off and was stuck. After heating the nozzle up and a lot of pulling I finally got it out. 
![alt text](IMG_8344.jpg)
This was inside the filament tube. I tried pushing on the other side with filament and it didn't come out. After that I tried pushing with an alan key and that also didn't work. After that Henk told me he would look at it.


## Extra assignment from Henk
Because I found the brick laying layer printer on github I'm gonna test the strength of the this way of 3d printing.

The test object. Im going to hold it on a Table and put on weights till it breaks
![alt text](image.jpg)

## Bricks!
### How do I create it using the python script?
The [python script]((https://github.com/TengerTechnologies/Bricklayers)) is really easy to use. You need to run it in the cli and give it a path to a file and then it will convert it.

```bash
python3 bricklayers.py test_1h21m_0.08mm_205C_PLA_ENDER3.gcode -extrusionMultiplier 1.2 
```
### The prints
#### With planar infills
The first one I printed with an extrusionMultiplier of 1.6x.
```bash
python3 bricklayers.py test_1h21m_0.08mm_205C_PLA_ENDER3.gcode -extrusionMultiplier 1.6 
```

Infill settings
![alt text](image-1.jpg)
These settings apply to all test prints to keep consistency.
I first printed the baseline. So I have a reference point to how strong the normal prints are.

![alt text](IMG_8277.jpg)

This is the second print
![alt text](IMG_8278.jpg)
In the second print you can see that it messed with the layer heights. But it doesn't really look like bricks. Only small portions of the print have these artifacts.

After that I tried breaking it and measuring how much kg of force it needs using this device. It was too much and we got Err. So we needed to make it structurally weaker. So we decided to print the rectangles upright so it would be easier to break.

### Prints with NonPlanar infill
There is also a script in the github repo with NonPlanar infill. Im going to try that with these settings:
```bash
python3 bricklayersNonPlanarInfill.py Brick-EM1.4-WR1-NP1-AMP-0.6-FREQ1.4.gcode -extrusionMultiplier 1.4 -wallReorder 1 -nonPlanar 1 -amplitude 0.6 -frequency 1.4
``` 

With Planar infill you don't see the Z axis move as much but with the NonPlanar Infill you can see the Z axis move a lot more.
<video controls src="../../../Assignments/week_5_3dprinting_and_scanning/IMG_8367 (3).mp4" title="Title"></video>


#### Getting good prints
Getting good prints on nonplanar infill is a lot harder than planar infill because the layers the printer is printing are constantly changing.
 
![alt text](IMG_8381.jpg)
With this print I increased the raft. It helped a bit but at some point the print got loose from the raft. Here are all the failed bricklaying prints.

![alt text](IMG_8383.jpg)
First I increased the brim size of the print but that also didn't work out. After that I used a cube as base and let it stick out 5mm above the build plate like this.
![alt text](image-18.jpg) 
So I have a even bigger and stronger raft. After the print I knocked the small little platform off with a hammer and then I had a print I could test.

### Testing the strength
To test the strength I made a makeshift setup with a scale on a hook. Then I put the plastic test subject on the bar and pulled really hard until it broke. Then I could read the amount of kg needed to break it from the scale.

![alt text](IMG_8421.jpg)

I made 3 prints. One normal using normal settings. One with brick using `Bricklayers.py` and one using `bricklayersNonPlanarInfill.py` using the commands above.

![alt text](image-15.jpg)
This is the end result. At the bottom are all the failed prints. At the top are the finished and tested prints. On the left there is the `bricklayers.py` print. The 2 in the middle have no modifications. The one on the right has the `bricklayersNonPlanarInfill.py` modification. The 2 on the left broke in the middle at the same point. Of the left one I got a measurement of 27,75kg. The one in the middle and right I didn't get the measurement because my phone couldn't record the screen of the scale. That's why im doing them again.

| Which Print                   | Force down needed to break it |
| :---------------------------- | ----------------------------- |
| No modifications              | 24Kg                          |
| Planar infill bricks          | 27,75Kg                       |
| Non planar infill with bricks | 31,4Kg                        |

I also noticed that the non planar infill broke at the same point twice. It could be because the print was getting unstable up there. Because the print failed a couple of times at that point when I was printing it without a solid platform.

![alt text](IMG_8462.jpg)
So if it was more stable during printing it may have been even stronger.

![alt text](image-17.jpg)

## Creating something that can't be made subtractively
I wanted to make something simple because my University has been giving a lot of assignments to do during my internship. So I wanted to focus on that. I created a cube with a hole in it and in there another hole on another axis. That way it can't be made subtractively.

Result:
![alt text](image-9.jpg)
![alt text](IMG_8414.jpg)

## 3D scanning
For this week we also needed to do 3D scanning. When other people where doing it it looked very easy. But when I tried myself it was hard to do and to get everything right.

Assembling the scanner is really straight forward. First screw on the adapter and then you can screw on the camera
![alt text](image-4.jpg)
After that you can plug the usb-c to A cable in the side of the camera and then screw in the locks.
![alt text](IMG_8353.jpg)
After that we can go to the software. Since it's an creality camera we also need the crealityScan software. 
![alt text](image-5.jpg)
Then I was greeted with this screen. I pressed start and left all the default settings for the camera. Then I could start scanning.
The first object I was trying to scan was a ESP32S3 but apparently pcb's are too reflective for the camera to pick up on. So I got this error a lot.
![alt text](image-6.jpg)
Then I grabbed a fume extractor for soldering and that worked like a charm.
![alt text](image-2.jpg)
After I pressed that I was done scanning. I could click one click process and that processes the entire scan to a 3D model with textures.
![alt text](image-7.jpg)

![alt text](image-8.jpg)
After it fully processed the scanning I could export it as a object file and then I can do various other things with it. For example import it into blender and use it.

![alt text](image-3.jpg)
This is the end result of the scan. Maybe in hindsight it wasn't smart to use the mat to scan because the scanner needs reference points and with a mat you take that all away because it looks the same all over the mat.

## SLA printer (resin)
Henk showed us how to ELEGOO Mars 3 worked. First we sliced the model in CHITUBOX. CHITUBOX is a program to slice 3d models for SLA/resin printers. Then we went to the printer to prep it and after that we needed to clean it.

### Slicing
For slicing we used CHITUBOX. It's a slicer that's supports the ELEGOO resin printers.
![alt text](image-10.jpg)
It looks like this. I wanted to slice something so could also do it later on myself.
First we need to import the file using the Open button at the top. 
Once you've imported the file you wanna make sure your part is not touching the plate. ![alt text](image-11.jpg)
Because if you are printing direct to the plate it will be very hard to remove later on according to Henk.
Because we don't want to touch the build plate we are going to need supports.
![alt text](image-12.jpg)
To add supports we need to press this button to go to the support screen.
After entering the screen we can press auto support to automatically generate supports.
![alt text](image-13.jpg)
Once we pressed that we can go back to the other tab and press slice to slice it all to a file.
![alt text](image-14.jpg)
Then we can put it on a USB stick and start preparing the machine

### Preparing the printer
![alt text](IMG_8395.jpg)
First Henk showed how to calibrate the plate for printing. You need a piece of paper and a alan key to calibrate the plate.

![alt text](IMG_8399.jpg)
Once the plate is on the bottom you can set the Z axis on the screen to 0. And pull the paper up to straighten the plate out. 

![alt text](IMG_8398.jpg)

After that Henk poured in the resin. Always make sure when you're working with resin to use gloves.
![alt text](IMG_8404.jpg)

After that we where trying to get the file loaded on the machine but it didn't show up. So first Henk formatted the drive to FAT32. Then I also did it on my machine. But after re-plugging the drive in my machine after putting the file back on. The file disappeared so we grabbed another usb stick. With the new usb stick it did read the file so we had a bad usb stick. 

### Cleaning the printer
When we where cleaning the machine it got really messy. We needed lot's of paper towels.

Once the print was done we needed to remove the build plate so the print could cure in the vat of alcohol. 
![alt text](IMG_8426.jpg)
When removing the plate Henk told us to be careful with the Resin on top to let it drip into the resin reservoir.

After that he submerged the print in alcohol and tied the wire on the top around the lid so the soft resin print didn't touch the bottom or the sides.

When the print was curing Henk told us that we needed a funnel and a filter to put the rest of the resin back in the container so it can be re-used later.

![alt text](IMG_8432.jpg)
The filter is needed because there could be loose cured parts in the resin which can mess up prints later on if they go into the bottle.

![alt text](image-16.jpg)

![alt text](IMG_8434.jpg)
Henk also told us to use the plastic scraper when scraping the leftover resin out of the tray.
After the print finished curing we could remove it from the plate and put it in the curing chamber without the vat of alcohol. 
![alt text](IMG_8436.jpg)
![alt text](IMG_8440.jpg)

Then we needed to clean everything we used thoroughly with isopropanol. Otherwise the resin will harden over time and it will be very hard to get it off.
![alt text](IMG_8442.jpg)
![alt text](IMG_8441.jpg)


![alt text](IMG_8445.jpg)
![alt text](IMG_8449.jpg)
![alt text](IMG_8452.jpg)
Also make sure to clean the bottom of the tray. Otherwise it can harden when it's attached to the resin printer and that could break the printer.

End result:
![alt text](IMG_8454.jpg)


Resin printers are very nice because they are extremely accurate but the only downside is the cleanup after printing.
## Assignment
* [x] Create something that can't be made subtractively
* [x] Test printer design rules

* [x] 3D scanning
* [x] Test strength brick laying print
* [x] Test strength brick laying non planar infill print
* [x] Test strength normal print 


## Files
* [Rectangle for brick test](rectangle.3mf) 
* [Rectangle for brick test with baseplate](BiggerBasePlate.3mf)


## Links
* [Github project bricklaying printing](https://github.com/TengerTechnologies/Bricklayers)