I started my deepdive into Kiri:Moto as a slicer, and I REALLY like the product.
I’d most likely use it self-hosted via its API: pass a range of variables + 3Dmodel and get back working gcode.
My question is now: How can I suport custom (extrusion-based) toolheads.
- Some printheads use a simple on/off operation instead of E values to deposit materials
- The printhead that uses E values for deposition: I have an E coefficient that tells me how much material to extrude [in mm] based on travelled length [in mm]. Is there a way to get the slicer to generate proper E value for each G1/G0 path based on this information?
Or would I have to do all of the above in a custom post-processing script?
Hi @hauschka and welcome. KM currently does the second method based on nozzle diameter and layer height. But if you want direct control in both cases, I can provide an API hook that passes you either segment coordinates or a distance and you return the E value.
Wow, yes please, that would be amazing!
I think both hooks would be really useful to get to the result.
Is there a more in-depth documentation available on how to deal with Km on such a low-level? Or exmaples? I’m very interested in what other possibilities could be unlocked by this.
I’ll work up an example. There is one checked in, I believe, but not with a lot of docs. Most projects and companies embedding KM or the KM engine are working with me directly. This is mostly because a) I just haven’t had time to properly doc and b) in the early days, the APIs were being developed rapidly.
@hauschka I’ve updated the module sample code. you will need this to inject new functions into KM’s browser or worker contexts. the
work.js file also shows how to override the FDM driver’s extrusion calculation.
and then directly overriding the driver function
if you exported gcode before this
and after this change