this post was submitted on 04 Aug 2024
17 points (94.7% liked)

3DPrinting

15591 readers
60 users here now

3DPrinting is a place where makers of all skill levels and walks of life can learn about and discuss 3D printing and development of 3D printed parts and devices.

The r/functionalprint community is now located at: !functionalprint@kbin.social or !functionalprint@fedia.io

There are CAD communities available at: !cad@lemmy.world or !freecad@lemmy.ml

Rules

If you need an easy way to host pictures, https://catbox.moe/ may be an option. Be ethical about what you post and donate if you are able or use this a lot. It is just an individual hosting content, not a company. The image embedding syntax for Lemmy is ![](URL)

Moderation policy: Light, mostly invisible

founded 1 year ago
MODERATORS
 

Hi all, got a bit of a technical problem I'm trying to solve and I've got very little programming experience.

Basically, I'm trying to create a folder with a bunch of filament profile cfg files, with things like retraction distance, temperature, flow rate etc preloaded into them. That way, I can slice a model for a 0.6mm nozzle, send it to Klipper, and run it with any filament I want without having to re-slice, just change which cfg file is loaded.

This is going pretty well and I've figured out how to get most of what I want into the cfg. However, I want to limit my print speed by my maximum volumetric flow rate, a variable that Klipper does not support (and Kevin has more or less denied requests to have it added). To solve this issue, I want to limit the max speed instead, using a formula like this:

print speed = (max vol. flow) / (nozzle width) / (layer height)

(max vol. flow) and (nozzle width) would be defined manually by me for each profile. The only issue is (layer height), which of course can change from print to print. I know that my slicer puts the layer height and total number of layers in the header of the gcode, I also understand that that's where Klipper gets this info from and how it displays those numbers once you've selected a file. What I'm having trouble figuring out is how I can send that number into the above formula; I found this which seems to be almost what I need, but I can't figure out how to use the "print_stats object" in my cfg.

A potential workaround is to find my maximum layer height for each nozzle/filament combo and set the max speed assuming that later height, but if I'm printing something at say half my maximum layer height that's going to severely unnecessarily reduce my print speed.

Any advice?

you are viewing a single comment's thread
view the rest of the comments
[–] fhein@lemmy.world 1 points 3 months ago (1 children)

The only issue is (layer height), which of course can change from print to print.

Technically not the only issue 😀 it can also change from layer to layer.

Maybe calculate it from the length of filament being pushed out / the length of the movement * filament cross section? I'm on my phone so I can't check right now but that info should be possible to extract from the gcode iirc

[–] papalonian@lemmy.world 1 points 3 months ago

Technically not the only issue 😀 it can also change from layer to layer.

I realized a little bit into finding a solution that this would be a limitation. I'm using Cura which AFAIK doesn't support traditional "variable layer height" like prusaslicer. It does however allow for different layer height for infill; if I ever decide to do that, I can just adjust the infill print speed accordingly.

I actually got this working btw, I had to learn a bit about how variables work in Python/gcode but it's working like I charm! I find my max volumetric flow, set it in the material cfg, and it just runs prints right below my max extrusion rate. Everything has come off the printer looking perfect in between filament types, no re-slicing required!