Skip to content

Commit

Permalink
Merge pull request #16 from VileBrigandier/master
Browse files Browse the repository at this point in the history
Fixes, sans the .md additions
  • Loading branch information
TheBrigandier committed Aug 29, 2018
2 parents b61f865 + 47d9da7 commit 062d06a
Show file tree
Hide file tree
Showing 16 changed files with 1,858 additions and 472 deletions.
2 changes: 1 addition & 1 deletion Bed_Leveling_with_Wave_Springs.md
Expand Up @@ -60,7 +60,7 @@ Leveling Your Bed

Now that we have the springs in place, we are ready to perform the actual bed leveling procedure. You could tell the printer to perform the bed leveling procedure by sending it a g-code (G80), and then read the values back out using another g-code (G81), and then use the returned values to figure out which screws to tighten or loosen. But it's considerably easier if you have some software to do this task.

The software we will discuss here is a plug-in for the popular Octoprint software. Several of the Discord users collaborated on a [Octoprint plug-in](https://github.com/ff8jake/OctoPrint-PrusaMeshMap) that shows a representation of the mesh bed leveling points, and the interpolated contour that the Prusa firmware uses. This plugin requires stock Prusa firmware as of right now, with Klipper support hopefully coming soon. Indications are that the Klipper support will be even better because it will measure more than 9 points!
The software we will discuss here is a plug-in for the popular Octoprint software. Several of the Discord users collaborated on a [Octoprint plug-in](https://github.com/PrusaOwners/OctoPrint-PrusaMeshMap) that shows a representation of the mesh bed leveling points, and the interpolated contour that the Prusa firmware uses. This plugin requires stock Prusa firmware as of right now, with Klipper support hopefully coming soon. Indications are that the Klipper support will be even better because it will measure more than 9 points!

Some sample output from this plug-in can be seen in the screenshot below.
<img src="images/Octoprint-MeshMap-Screenshot.PNG" title="SpringInstalled.PNG" alt="SpringInstalled.PNG" height="400" />
Expand Down
57 changes: 28 additions & 29 deletions Bed_Leveling_without_Wave_Springs.md
Expand Up @@ -111,33 +111,32 @@ in marlin_main.cpp search for “G81”

and make the following additions (highlighted in bold)

'''

`       /**`
`        * G81: Print mesh bed leveling status and bed profile if activated`
`        */`
`       case 81:`
`           if (mbl.active) {`
`               SERIAL_PROTOCOLPGM("Num X,Y: ");`
`               SERIAL_PROTOCOL(MESH_NUM_X_POINTS);`
`               SERIAL_PROTOCOLPGM(``,``);`
`               SERIAL_PROTOCOL(MESH_NUM_Y_POINTS);`
`               SERIAL_PROTOCOLPGM("\nZ search height: ");`
`               SERIAL_PROTOCOL(MESH_HOME_Z_SEARCH);`
`               SERIAL_PROTOCOLLNPGM(``\nMeasured`` ``points:``);`
`               `
`               `**`float`` ``midPoint`` ``=`` ``mbl.z_values[((MESH_NUM_Y_POINTS+1)/2)-1][((MESH_NUM_Y_POINTS+1)/2)-1];`**
`               for (int y = MESH_NUM_Y_POINTS-1; y >= 0; y--) {`
`                   for (int x = 0; x < MESH_NUM_X_POINTS; x++) {`
`                       SERIAL_PROTOCOLPGM("  ");`
`                       SERIAL_PROTOCOL_F(mbl.z_values[y][x] `**`-`` ``midPoint`**`, 5);`
`                   }`
`                   SERIAL_PROTOCOLPGM(``\n``);`
`               }`
`           }`
`           else`
`               SERIAL_PROTOCOLLNPGM(``Mesh`` ``bed`` ``leveling`` ``not`` ``active.``);`
`           break;`

'''
```
/**
* G81: Print mesh bed leveling status and bed profile if activated
*/
case 81:
if (mbl.active) {
SERIAL_PROTOCOLPGM("Num X,Y: ");
SERIAL_PROTOCOL(MESH_NUM_X_POINTS);
SERIAL_PROTOCOLPGM(",");
SERIAL_PROTOCOL(MESH_NUM_Y_POINTS);
SERIAL_PROTOCOLPGM("\nZ search height: ");
SERIAL_PROTOCOL(MESH_HOME_Z_SEARCH);
SERIAL_PROTOCOLLNPGM("\nMeasured points:");
float midPoint = mbl.z_values[((MESH_NUM_Y_POINTS+1)/2)-1][((MESH_NUM_Y_POINTS+1)/2)-1];
for (int y = MESH_NUM_Y_POINTS-1; y >= 0; y--) {
for (int x = 0; x < MESH_NUM_X_POINTS; x++) {
SERIAL_PROTOCOLPGM(" ");
SERIAL_PROTOCOL_F(mbl.z_values[y][x] - midPoint, 5);
}
SERIAL_PROTOCOLPGM("\n");
}
}
else
SERIAL_PROTOCOLLNPGM("Mesh bed leveling not active.");
break;
```

Compile the firmware changes, and flash to the Mk3. You should now always see the center point in the G81 output be 0.0
118 changes: 58 additions & 60 deletions Building_Slic3r_PE_from_Source.md
Expand Up @@ -5,63 +5,61 @@ Linux

### Ubuntu 18.x and 16.04

``
``
`#!/bin/bash`
``
`## Build Slic3r P.E. from source`
``
`## install system dependencies`
``
`apt-get update && apt-get install -y \`
`    build-essential \`
`    cmake \`
`    cpanminus \`
`    freeglut3-dev \`
`    git \`
`    libboost-all-dev \`
`    libboost-filesystem-dev \`
`    libboost-system-dev \`
`    libboost-thread-dev \`
`    libcurl4-openssl-dev \`
`    libeigen3-dev \`
`    libextutils-cppguess-perl \`
`    libextutils-typemaps-default-perl \`
`    libextutils-xspp-perl \`
`    libglew-dev \`
`    libgtk2.0-dev \`
`    liblocal-lib-perl \`
`    libmodule-build-perl \`
`    libopengl-perl \`
`    libtbb-dev \`
`    libwx-glcanvas-perl \`
`    libwx-perl \`
`    libwxgtk-media3.0-dev \`
`    libwxgtk3.0-dev \`
`    libxmu-dev \`
`    libxmu-dev \`
`    wx-common `
``
`## WX requires a X DISPLAY to run its tests.   Configure this appropriately`
`## if you plan on build with gui funcionality`
`#export DISPLAY=:0.0`
`export DISPLAY=192.168.5.33:0.0`
``
`## if compiling headless add these: `
`## apt-get install -y mesa-utils and libgl1-mesa-glx`
``
`## clone Slic3r from Prusa3d`
`git clone https://github.com/prusa3d/Slic3r.git`
`cd Slic3r`
`git checkout -b origin/master`
``
`export LDLOADLIBS=-lstdc++`
`perl Build.PL`
`perl Build.PL --gui`
``
`mkdir build && cd build`
`cmake .. -DCMAKE_BUILD_TYPE=Release`
`make`
`ctest --verbose`
``
` `
```
#!/bin/bash
## Build Slic3r P.E. from source
## install system dependencies
apt-get update && apt-get install -y \
build-essential \
cmake \
cpanminus \
freeglut3-dev \
git \
libboost-all-dev \
libboost-filesystem-dev \
libboost-system-dev \
libboost-thread-dev \
libcurl4-openssl-dev \
libeigen3-dev \
libextutils-cppguess-perl \
libextutils-typemaps-default-perl \
libextutils-xspp-perl \
libglew-dev \
libgtk2.0-dev \
liblocal-lib-perl \
libmodule-build-perl \
libopengl-perl \
libtbb-dev \
libwx-glcanvas-perl \
libwx-perl \
libwxgtk-media3.0-dev \
libwxgtk3.0-dev \
libxmu-dev \
libxmu-dev \
wx-common
## WX requires a X DISPLAY to run its tests. Configure this appropriately
## if you plan on build with gui funcionality
#export DISPLAY=:0.0
export DISPLAY=192.168.5.33:0.0
## if compiling headless add these:
## apt-get install -y mesa-utils and libgl1-mesa-glx
## clone Slic3r from Prusa3d
git clone https://github.com/prusa3d/Slic3r.git
cd Slic3r
git checkout -b origin/master
export LDLOADLIBS=-lstdc++
perl Build.PL
perl Build.PL --gui
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
ctest --verbose
```
4 changes: 2 additions & 2 deletions Community_To_Do_List_for_i3_MK3.md
Expand Up @@ -23,8 +23,8 @@ N/A

#### ALPHA

- Mesh Bed Leveling - See [Klipper\#.5BAlpha.5D_Configuring_Mesh_Bed_Leveling](Klipper#.5BAlpha.5D_Configuring_Mesh_Bed_Leveling "wikilink")
- Pinda Drift Compensation - See[Klipper\#.5BAlpha.5D_Probe_Temperature_Compensation](Klipper#.5BAlpha.5D_Probe_Temperature_Compensation "wikilink")
- Mesh Bed Leveling - See [Klipper#configuring-mesh-bed-leveling](Klipper#configuring-mesh-bed-leveling "wikilink")
- Pinda Drift Compensation - See [Klipper#alpha-probe-temperature-compensation](Klipper#alpha-probe-temperature-compensation "wikilink")

#### Todo (ordered by priority)

Expand Down

0 comments on commit 062d06a

Please sign in to comment.