Elephant’s Foot Compensator

Elephants Foot:

Have you ever had a model that refused to print without Elephants Foot? Have you tried PrusaSlicer or Curas first layer compensation, but you still get Elephants Foot that extends several layers up into your print? This openSCAD script will take your existing model and will offset the bottom of your print for “n” number of layers. In other words, it will effectively make a custom chamfer around all perimeters. It will make outer perimeters “smaller” and inner perimeters (holes) “bigger”.

Note: This is an openSCAD script. To use it, you must have openSCAD installed on your computer. There will be an online version “soon” but for now, the openSCAD works well.

Note: This assumes you have an otherwise calibrated printer. It assumes that if, for example, you are printing a 20mm x 20mm x 20mm test cube that your results are really close to the desired measurements. But now, you have a specific model or specific filament that is causing you issues with Elephants Foot.

Note: Once you have this script running in openSCAD, literally drag your desired STL into the openSCAD Editor in the place that says “// LITERALLY DRAG and DROP your STL here”.

Note: There is a “customizer”. First, make sure that in “View”, “Hide Customizer ” is not checked. Then make sure that the arrow where it says Parameters is pointed down and you will see the list of adjustable parameters.

Note: openSCAD has no idea where your STL is in 3d space. So, I recommend saving your model from Cura or PrusaSlicer. If it was centered in the slicer and saved from there, then this script “knows” where it is. So, save your model once from the slicer as a .STL file. Additionally, this script can compensate for several models at once. So, if you have 2 or 3 or more models on your build plate in Cura, select them all, and “save selected” as .STL, then all will be saved as one model

Note: This script uses “Offset” in openSCAD. It is totally possible, in the case of fine lines, that this could create ares of the model which no longer exist.

PARAMETERS

Number of Affected Layers – This is the number of layers that are seemingly affected by Elephants Foot. The script has a default of 4 but you can set this value to 1 or as high as you like. Please note that the higher the value, the longer it will take to render.

First Layer Height – Your Slicer Setting for First Layer. Default is 0.2, but it should work with any reasonable layer height.

LayerHeight – Your Slicer Setting for Layer Thickness. Default is 0.2, but it should work with any reasonable layer height.

Amount_To_Compensate = How Much Elephants Foot. Default is 0.4 but should work with nearly any reasonable value.

Printer_X_Dimension – Your Slicer Setting for Printer X Dimension. Default is 220, but should work for other printer bed dimensions. Use what ever value you use in your slicer.

Printer_Y_Dimension – Your Slicer Setting for Printer Y Dimension. Default is 220, but should work for other printer bed dimensions. Use what ever value you use in your slicer.

HOW TO USE:
1 Determine the amount of compensation needed

I would load model into Cura or PrusaSlicer. Other slicers should work. Make a test print with No Elephants Foot Compensation. Now measure the bottom. If the bottom is larger than it is supposed to be, then you have Elephants Foot and that is why you are here.

Let’s say the model is supposed to measure 30mm directly across the X dimension. But the measured amount is 30.8mm, so we’d take the 30.8mm and subtract 30.00mm to get a total difference of 0.8mm. Since 0.8mm represents an amount on both sides of the model, we divide that by 2 to get an amount of elephants foot of 0.4mm. So 0.4 is the amount to compensate.

Now look at the test print from the side. Roughly, how many layers does that elephants foot creep up into the print? The worst I’ve had is 5 layers, but common is 3 or 4 layers. Just make a guess. 3 or 4 layers seem to render pretty fast, but much higher and it could take minutes to render. Still faster than trying to manually add a chamfer on any otherwise complex model

2 – Load model into openSCAD and set values

Now launch openSCAD. Once you have this script running in openSCAD, literally drag your desired STL into the openSCAD Editor in the place that says “// LITERALLY DRAG and DROP your STL here”.

There is a “customizer”. Make sure that the arrow where it says Parameters is pointed down and you will see the list of adjustable parameters.

-Set NumberOfAffectedLayers to the number of layers affected. Try 3 or 4 to start.

-Set FirstLayerHeight to the same value you use in your slicer. Mine is 0.2mm but set this to whatever value you will be slicing the model with.

-Set LayerHeight to the same value you use in your slicer. Mine is 0.2mm but set this to whatever value you will be slicing the model with.

-Set Amount_To_Compensate to the amount you calculated. I often use 0.4mm

-Set Printer_X_Dimension – Your Slicer Setting for Printer X Dimension. Default is 220

-Set Printer_Y_Dimension – Your Slicer Setting for Printer Y Dimension. Default is 220

3 – Render

Press F6 to render (or click on Design, then Render). Depending on the values, this may take several seconds or several minutes to render. But, it will create a new model with effectively a chamfer at the bottom

4 – Save model as STL

Be Sure to SPECIFY a NEW NAME so that you don’t overwrite your original model.

Now you are done compensating. You can go back to PrusaSlicer or Cura and load the new model and print it.

All the best – PLAnkles be gone!