Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative E option for Gcode #514

Closed
richgain opened this issue Jul 27, 2013 · 25 comments
Closed

Relative E option for Gcode #514

richgain opened this issue Jul 27, 2013 · 25 comments
Assignees

Comments

@richgain
Copy link

I would like to request an option, which seems to be standard in most others slicers, to export gcode using Absolute coordinates for X, Y and Z, but Relative coordinates for E movements.

@nallath
Copy link
Collaborator

nallath commented Mar 4, 2014

Why would you want such an option? We would like some more reasoning before implementing new features. See; https://github.com/daid/Cura/wiki/Issue-policies

@nallath nallath closed this as completed Mar 4, 2014
@nophead
Copy link

nophead commented Mar 4, 2014

With relative E it is much easier to pause and change filament then continue. It is also much easier to hand edit the g-code and for example slice twice with different settings and then pick some bits from one version and the others from the other.

@hg42
Copy link
Contributor

hg42 commented Mar 7, 2014

I second that...

I think, in general E-movement isn't an absolute thing like x/y/z.
It doesn't matter how much filament was extruded measured from the start of the print.
It only matters how much is extruded in a time unit, so this is a relative concept.

Relative E allows all kinds of gcode manipulations (e.g. by plugins), and most of them get very complicated with absolute E.
With absolute E you are usually forced to recalculate all E-values in the whole gcode, whereas with relative E you can simply insert some E-movement here and there without invalidating all following E-values.

@Kenzu
Copy link

Kenzu commented Mar 7, 2014

+1 from here too. I use Relative E with Simplify3D and would like to se it
in Cura.

2014-03-07 2:30 GMT+01:00 hg42 notifications@github.com:

I second that...

I think, in general E-movement isn't an absolute thing like x/y/z.
It doesn't matter how much filament was extruded measured from the start
of the print.
It only matters how much is extruded in a time unit, so this is a relative
concept.

Relative E allows all kinds of gcode manipulations (e.g. by plugins), and
most of them get very complicated with absolute E.
With absolute E you are usually forced to recalculate all E-values in the
whole gcode, whereas with relative E you can simply insert some E-movement
here and there without invalidating all following E-values.

Reply to this email directly or view it on GitHubhttps://github.com/daid/Cura/issues/514#issuecomment-36959090
.

Mvh Jesper Lindeberg

@averter
Copy link

averter commented Aug 27, 2016

+1 from me too. Whenever I have to pause a print the lack of this feature is a pain.

@BagelOrb
Copy link
Collaborator

@averter can you specify your problem more clearly?

It sounds to me to be more of a problem of the printer that it cannot
handle pausing correctly.
What type of printer do you have?

Op 27 aug. 2016 22:39 schreef "Averter" notifications@github.com:

+1 from me too. Whenever I have to pause a print the lack of this feature
is a pain.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/daid/Cura/issues/514#issuecomment-242939531, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AIe9EX8qvS7h8ZyZ2Qf3MJ9hCvcqGPQ_ks5qkKB1gaJpZM4A2gZj
.

@averter
Copy link

averter commented Aug 31, 2016

@BagelOrb If you see this related issue OctoPrint/OctoPrint#779 (comment) mentioned above by nophead you'll see. Essentially most people want the flexibility to retract and extrude filament during pause, without rewinding back to the same E position after unpausing. I have a Prusa i3 Rework controlled by Octoprint.

@BagelOrb
Copy link
Collaborator

Interesting.
I still think this should be solved in the printer, though.
The printer should not count the extrusion made during a pause as real extrusion.

This will probably be fixed in our next generation of printers.

@Ghostkeeper
Copy link

As I understand it, this issue is not specific to any single problem (like retract and unretract at pausing) but to make the g-code more easy to modify by hand, to tinker with it more easily.

@BagelOrb
Copy link
Collaborator

BagelOrb commented Sep 5, 2016

I think people should use G92 Ex more.
I don't think it's that hard to tinker with the gcode once you know how to
properly use it.

2016-09-05 1:13 GMT+02:00 Ghostkeeper notifications@github.com:

As I understand it, this issue is not specific to any single problem (like
retract and unretract at pausing) but to make the g-code more easy to
modify by hand, to tinker with it more easily.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#514 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIe9EeY-QAQ1dEFQ11eaU5rHTJzAbjvmks5qm1CKgaJpZM4A2gZj
.

Kind regards,

Tim Kuipers

Ultimaker BV

www.ultimaker.com

@hg42
Copy link
Contributor

hg42 commented Sep 5, 2016

I already said above:
"
Relative E allows all kinds of gcode manipulations (e.g. by plugins), and most of them get very complicated with absolute E.
With absolute E you are usually forced to recalculate all E-values in the whole gcode, whereas with relative E you can simply insert some E-movement here and there without invalidating all following E-values.
"

it's simply more modular.
You are right, that G92 can help (I use it myself, when fiddling with generated gcode, e.g. continuing a failed print), but it's a workaround more like a trick, not a clean solution.

Also, relative E should be easy to implement, I think.
I assume the absolute value being an additional step in the slicer engine?
Just make summation optional.

@daid
Copy link
Owner

daid commented Sep 5, 2016

You are right, that relative GCode can help, but it's a workaround more like a trick, not a clean solution.

@hg42
Copy link
Contributor

hg42 commented Sep 5, 2016

:-)

with relative E you can insert gcode without correcting the E position before and after by G92.
It makes the gcode parts independent from each other.
The correction steps are fixes to a problem only existing because of using absolute E.

On the other hand, what are advantages of absolute E?
I don't see any...

@daid
Copy link
Owner

daid commented Sep 5, 2016

With absolute E, the E axis behaves like a normal axis, just like all the other. You also don't have a rounding conversion error buildup due to float->string->float conversions.
It's also the default standard behavior that does not depend on any custom M codes that haven't been standardized in any way.

@hg42
Copy link
Contributor

hg42 commented Sep 5, 2016

ok, thanks for the answer, seems there are some good reasons.
However, an option would not hurt...

@daid
Copy link
Owner

daid commented Sep 5, 2016

image
An option wouldn't hurt?

@averter
Copy link

averter commented Sep 6, 2016

@daid is that a screenshot from Simplify3D? XD

@nallath
Copy link
Collaborator

nallath commented Sep 6, 2016

No, its from skeinforge.

@hg42
Copy link
Contributor

hg42 commented Sep 6, 2016

I am not familiar with skeinforge, because I skipped it because it is way too slow for me.

But these options are very well structured.
E.g. you have a set of parameters for interface, first layer and so on.
Each set is clearly defined and understandable (flow rate multiplier, infill density etc.).

IMHO, the sheer amount of options doesn't hurt as long as you understand what they mean.

I like that several parameters are separated by physical meaning.
E.g. filament diameter is separated from filament packing density instead of joining them into one.

Skeinforge is very old. Those parameters seem to be directly from the algorithm. So all the slicer can do is accessible. It's low level. This makes it very powerful. So, I often heard sentences like "in skeinforge we can set parameter x" to solve problems other slicers have.

Most modern slicers try to simplify the user experience, but they fail here and there.
E.g. holes are still too small. Skeinforge has a parameter for this.

Komplex algorithms have complex parameters. That's it.

It's all about good defaults and ways of hiding most parameters for non experts.

@hg42
Copy link
Contributor

hg42 commented Sep 6, 2016

I think we are still pioneers.
In this phase we don't fully understand what's going on.

So you cannot determine all parameters of the algorithm automatically (which generally should be possible using all physical knowledge).

Another problem is that most printers have severe problems.
And you never know all physical parameters of them.
You would need a kind of calibration procedure. Probably a very complex procedure.

Given that, you need access to lower levels of the algorithm.

@hg42
Copy link
Contributor

hg42 commented Sep 6, 2016

@daid I thought a bit about your arguments.

"With absolute E, the E axis behaves like a normal axis"

this probably simplifies programming. But in this case the calculation can be the same with an additional step at the end (determining the relative value). Or, in the other case, if the absolute value is calculated from the last value and a relative amount, you simply use the relative value instead.

"You also don't have a rounding conversion error buildup due to float->string->float conversions"

seems to be unbeatable. But...there is a difference between XYZ and E.
For XYZ which are absolute in nature, summing up many small errors would result in wrong positions.
Instead the E value is relative in nature. Each error only results in a wrong flow in this segment.

"It's also the default standard behavior that does not depend on any custom M codes that haven't been standardized in any way."

this is plain true given the reprap definition on
G-code - RepRapWiki
http://reprap.org/wiki/G-code

However, if your printer firmware can handle relative E, you have a code for that and can configure it in start.gcode
Also, there already is an option for the gcode flavour or firmware.

@Ghostkeeper
Copy link

The floating point problem would be lessened in relative E because the numbers are closer to 0, where floats are more accurate.

The trade-off is that the total material cost/weight can float off due to rounding errors, instead of compensating for one round-up by rounding down in the next move.

@nophead
Copy link

nophead commented Sep 6, 2016

ASCII gcode is actually fixed point. I.e. there are a fixed number of
digits after the decimal point, so small values are not more accurate.

The slicer could keep track of the sum of the rounded values it has output
and always send the difference between that and the new absolute value.
That way there would be no cumulative error.

On 6 September 2016 at 10:28, Ghostkeeper notifications@github.com wrote:

The floating point problem would be lessened in relative E because the
numbers are closer to 0, where floats are more accurate.

The trade-off is that the total material cost/weight can float off due to
rounding errors, instead of compensating for one round-up by rounding down
in the next move.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#514 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAijhUNfMTxcHKlnuOo3fUzGO2JRtB3Pks5qnTIjgaJpZM4A2gZj
.

@BagelOrb
Copy link
Collaborator

BagelOrb commented Sep 6, 2016

This idea is never going to be fixed in legacy Cura. As for Cura 2, please submit your pull request at https://github.com/Ultimaker/CuraEngine and https://github.com/Ultimaker/Cura

@Ghostkeeper
Copy link

This feature was just rejected by our change control board.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants