2
$\begingroup$

I realized that with current Marlin I cannot use Junction Deviation with Linear Advance, see [BUG] Rapid changes of acceleration break linear advance when using Junction Deviation #15473.

Yet, it is very much beneficial to not stop at the corners with high acceleration but rather do a small curve. Is it possible on a G-code level?

Is there a feature or plugin in Cura which replaces sharp corners with arcs to remove need for Junction Deviation in firmware?

$\endgroup$
  • $\begingroup$ Can you clarify whether you are actually having a problem matching the one described in the linked bug report, or just concerned that you might? I use junction deviation and linear advance, K=0.6 for regular PLA, K=3.8 for flex material, and did not observe this problem whatsoever with the former but might be encountering it with the latter. $\endgroup$ – R.. GitHub STOP HELPING ICE Dec 31 '19 at 1:46
  • $\begingroup$ Also, what junction deviation parameter are you using? $\endgroup$ – R.. GitHub STOP HELPING ICE Dec 31 '19 at 1:47
  • 1
    $\begingroup$ @R.. I am the reporter of that bug... With K=2 there issue is very serious. What board do you have? It is possible that it happens only on AVR... Anyways, it is beneficial to make corners a little less sharp. $\endgroup$ – BarsMonster Dec 31 '19 at 16:31
  • 1
    $\begingroup$ Junction deviation does not produce round corners. It just performs the math for the allowable instantaneous change in velocity components as if it were going around a rounded corner with the configured deviation. See blog.kyneticcnc.com/2018/10/… $\endgroup$ – R.. GitHub STOP HELPING ICE Jan 2 at 2:53
  • 1
    $\begingroup$ Short of using the arc movement commands (G2/G3), I'm not sure it would be very helpful. Doing a rounded corner with radius 0.1-0.2 mm is going to involve some utterly tiny segments, which Marlin and other firmware don't really like - they make the planner math a lot more expensive and potentially produce compounding jerk, allowing the cornering to happen faster than it's supposed to. The G2/G3 approach may be promising, but I've actually had to omit support for them from my builds to fit Marlin in 128k. :-( $\endgroup$ – R.. GitHub STOP HELPING ICE Jan 3 at 19:12
1
$\begingroup$

Cura's solution can be found in the "Jerk Control" settings.

Short analogy; when driving, and a corner is coming up, you basically have two options to take the corner smoothly; you can take the corner with a wide turning radius, or you can slow down. Taking a neighborhood street corner at highway speeds just doesn't work even if there's nobody else on the road; you'll very likely overshoot the corner, if you're in a RWD car you'll likely lose the back end and fishtail (or worse), and the occupants of the car, yourself included, are going to be thrown around violently, to no-one's real advantage other than to say you took that turn at 70.

Back in 3D printing land, something similar applies; as the extruder approaches a sharp corner, it will be disadvantageous all around for the extruder to try to maintain 70mm/s around what's basically an instantaneous turn. Your jerk (stopping the moving axis) and acceleration (starting the non-moving axis) settings are going to exceed the physical capabilities of your steppers and drive belts, making the corner less accurate (and in the extreme, losing steps causing layer shifts), and if your belts are not perfectly tensioned, and really even if they are, you'll get "ringing" (the 3D equivalent of fishtailing as you straighten out after the apex of a turn while driving).

The first option, cutting the corner, is your corner-to-arc replacement; rather than try for an instantaneous turn, just soften that corner by enough that you're within what's possible for the stepper motors in terms of acceleration. This keeps the speed and surface quality high, but necessarily reduces the accuracy of the print to the model.

So instead, Cura encourages the second option; slow down before the turn. Enabling Jerk Control and tweaking the associated settings lets the Cura slicer reduce head speed gradually as the extruder approaches a sharp corner, thus reducing the torque required to stop motion in one axis and start it in another, to something the steppers can actually accomplish at a rate you'd call "instantaneous". This keeps the corners sharp and avoids ringing along straight lines after a corner, at the cost of a slower overall print speed (though not as much as reducing overall print speed to the speed at which the extruder will take corners).

Now, I realize that this is the opposite of "increasing corner speed"; jerk control exists to slow the extruder near corners. However, increasing corner speed is rarely what you actually want, for the reasons stated above. If you really want nicely-rounded corners, fillet them in CAD, and then the slicer will generate a sequence of arbitrarily short linear movements (true G2/G3/G5 curve interpolation from the purely polygonal STL geometry has been experimented with, but currently more trouble than it's worth) which limit the change of velocity of the extruder as it rounds the corner, instead of making the rounding an "artifact" of printer limitations. At fine enough detail levels of conversion to an STL, the results are indistinguishable from a true curve.

| improve this answer | |
$\endgroup$
  • $\begingroup$ Please explain more about which slicer will generate G2 moves from an STL file composed completely of flat triangles. $\endgroup$ – Davo Feb 5 at 21:50
  • $\begingroup$ @Davo Actually, both Slic3r and Simplify3D have experimented with exactly that. But, I will edit to clarify that what really happens is a sequence of polygonal lines of arbitrarily small length (based on a number of variables in both CAD and the slicer), where each move accomplishes the overall goal of limiting acceleration around the corner. $\endgroup$ – KeithS Feb 5 at 22:07
  • 1
    $\begingroup$ I think this answer completely misunderstands/misrepresents what "jerk control" in Cura is. It simply means that Cura will issue gcode commands to set the printer firmware's jerk limits, possibly with different values for different parts of the print (outer walls, inner walls, skin, infill, etc.), rather than leaving the firmware's default setting in place. It does not mean Cura does any alteration of the movement paths or speed to reduce the physical jerk experienced by the toolhead. It's the printer's firmware that actually applies these settings to how it controls the stepper motors. $\endgroup$ – R.. GitHub STOP HELPING ICE Feb 6 at 0:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.