Helpful script for scaling prints for 3D printers

I recently bought my first coreXY printer, the Creality K1 SE, mainly because it's cheap and really fast (like shockingly more so). The downside is the K1 SE is not enclosed and since I really like to make problems to solve want to print ABS and ASA, I'll need to make it enclosed.

The K1 SE is an open frame, however Creality built it using the same parts of a K1, a few things are missing from it for example a exhaust fan (though the mounts and holes are still there so) and external part cooler. Oh and also the acrylic sides. But it also means that it doesn't take much to enclose a K1 SE, you just go about doing it in a very DIY way.

I have found a few models on Printables that attempt to solve it, for example Wilderness' “K1 SE sealing plate”.

But that's not the topic of this post, the topic is based on the fact that 3D printers are not exact, that is they do not print 1-to-1 from the CAD drawing. This normally isn't a problem as most of the time they are “good enough”.

But if you want proper 1-to-1 printing you'll need to measure the differences of a scaled printed part and adjust your slicer's scaling as needed.

This is not difficult and here is how do it.

1) Print this XYZ Accuracy Test model, leaving the scaling as is in your slicer. 2) Measure the model while it's still on the print bed, images on the Printables page show how. All dimensions should be 100mm, if they are not then write down the measurement. 3) If the measurement is not exactly 100mm then you'll need to divide the taken measurement by 100, so for example if 100.20mm was what you got then 100/100.20 = 0.998. Keep that value. 4) Multiply the result of the above step to the scaling of that the same axis.

So as an example, for my K1 SE I got the following values. 1.003=X=(100mm/100.30mm) 0.999=Y=(100mm/99.99mm) 0.997=Z=(100mm/99.70mm)

So if I want to print something 1-to-1 I'll need to scale the model in my slicer by multiplying the axis by the most left hand value.

To help with this (aka I'm lazy) I wrote a small script that takes the XYZ size of the model and outputs the scaled values.

#!/usr/bin/env bash
set -eu

## script to correct scaling for my k1 se

readonly _xScale="1.003"
readonly _yScale="0.999"
readonly _zScale="0.997"

_x="$(echo "${1} * $_xScale" | bc)"
_y="$(echo "${2} * $_yScale" | bc)"
_z="$(echo "${3} * $_zScale" | bc)"


echo "X:${_x}"
echo "Y:${_y}"
echo "Z:${_z}"

This script uses bc because bash can't do floating point math.

Why

Well, if you are like me and have several printers all doing parts of the same job (aka an assembly line) then you'll want to make sure that all the parts are interchangeable. Granted my script only works for one printer, and that's because I don't have my other printers doing jobs yet (because the K1 SE is so goddamn fast). It wouldn't take much to add support for multiple printers to the script.

Another reason for doing this scaling is that most models for the K1 family, at least on Printables, are based on CAD files that represent the printers. Since the printers are exact manufactured, meaning very little variance from the drawings, you'd want to make sure the models are printed to the correct scale so that they work as intended.

This same logic applies to pretty much any printed part, Prusa for example most likely uses this method to bootstrap their parts.

Closing

Now you don't really need to do this process if you just want to print, most of the time printers can produce “good enough” prints that you wouldn't realize it's not to scale.

But for the beings that need to have interchangeability and scaled models, this is a very useful method.