-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Add pause-at-layer functionality for 3092 #4177
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like that a test was added, but there are a few usability questions/issues.
Philosophical Questions
With custom conditional gcode, this is basically a shortcut to adding an (if [layer_num] == x) to before_layer_gcode (or after_layer_gcode) statements.
Does it come up enough to warrant yet another custom Gcode configuration option?
UI
While pausing at layer height X will probably be the most common use-case for this, it is more generically a before_layer_gcode that is only applied to specified Z heights. I think the configuration option name should suit this.
@@ -355,6 +357,8 @@ class GCodeConfig : public virtual StaticPrintConfig | |||
} | |||
|
|||
virtual ConfigOption* optptr(const t_config_option_key &opt_key, bool create = false) { | |||
OPT_PTR(pause_gcode); | |||
OPT_PTR(pause_heights); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move these so that they're in alphabetical order in the list.
@@ -314,6 +314,8 @@ class PrintRegionConfig : public virtual StaticPrintConfig | |||
class GCodeConfig : public virtual StaticPrintConfig | |||
{ | |||
public: | |||
ConfigOptionString pause_gcode; | |||
ConfigOptionString pause_heights; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please move these so that they're in alphabetical order in the list.
@@ -453,6 +453,16 @@ sub process_layer { | |||
$pp->set('layer_z' => $layer->print_z); | |||
$gcode .= Slic3r::ConditionalGCode::apply_math($pp->process($self->print->config->layer_gcode) . "\n"); | |||
} | |||
if ($self->print->config->pause_gcode && $self->print->config->pause_heights) { | |||
foreach my $height (split / /, $self->print->config->pause_heights) { | |||
if ($height && $height eq $layer->print_z) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't it be appropriate to round the effective height (either up or down, down may be the safer option) if the current layer doesn't land on the prescribed height?
It's something that can occur often with adaptive slicing turned on or if there's some oddball floating point math going on internally.
Obviously you'd want to extend the tooltip appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to play with how this interacts with Adaptive Slicing, but my gut says no. I also work with ideamaker, which has this feature and does such rouding ... and the end result is that I have to manually open my gcode after export to make sure it paused where I wanted it to. They have multiple bugs open because of this. (now ... I have to open the gcode anyway because they don't allow me to customize the code inserted, but that's a different story).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since logically this is intended to be a before-layer gcode, using floor() would seem to be safe (as opposed to round(), which could go up or down and definitely could confuse people).
That is, if layer 5 spans z=0.1 and z=0.3 and z=0.2 was requested, it would be inserted at 0.1. If z=0.299999999 was requested, it'd still be at z=0.1.
Implementing #4178 is another route to getting this PR with this functionality in ;) |
I'll look at some changes in the morning after coffee (never code before coffee!). |
In response to your Philosophical Question: |
@goofdad I did write #4178 with your use-case in mind ;) I also just edited the main description to put some notes on some places that would need to be touched to implement this (not an exhaustive list). I may have been thinking about collapsing Custom GCode into one UI element for months now (at least how it would work from the user's perspective). |
One possibility is to replace |
I actually like the layer mark idea, but I'd like it to be more general. Now I'm contemplating syntax between what belongs on the "Printer" side and what belongs on the "Print" side. |
I am down with both (hence overrides in Print and Filament).
On Nov 1, 2017 8:49 AM, "goofdad" <[email protected]> wrote:
I actually like the layer mark idea, but I'd like it to be more general.
Now I'm contemplating syntax between what belongs on the "Printer" side and
what belongs on the "Print" side.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4177 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAB8CkhQy8SFY0tn4LrDckEwhQnEBefFks5syHbigaJpZM4QNaTa>
.
|
@goofdad prod |
Christmas...and a hypercube build.
I'll beat my head on this again soon...
…On Dec 21, 2017 8:36 AM, "Joseph Lenox" ***@***.***> wrote:
@goofdad <https://github.com/goofdad> *prod*
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4177 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAZBwLfRdGnIp1SGpQLkj6NTdnUkmlTYks5tCokNgaJpZM4QNaTa>
.
|
'S okay. I have 53+ hours logged at work for the week so far.
…On Dec 21, 2017 10:38 AM, "goofdad" ***@***.***> wrote:
Christmas...and a hypercube build.
I'll beat my head on this again soon...
On Dec 21, 2017 8:36 AM, "Joseph Lenox" ***@***.***> wrote:
> @goofdad <https://github.com/goofdad> *prod*
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <#4177 (comment)>, or
mute
> the thread
> <https://github.com/notifications/unsubscribe-auth/
AAZBwLfRdGnIp1SGpQLkj6NTdnUkmlTYks5tCokNgaJpZM4QNaTa>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#4177 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAB8CrNqxZoNDxNam9-2QDzi0qKf-BCkks5tComIgaJpZM4QNaTa>
.
|
@goofdad still need those changes made to accept. |
@goofdad :) |
@goofdad any plans on making those changes? or should someone else take over? |
@tcurdt Probably should take a swing and/or make PRs against his branch. |
Added 2 new configuration parameters: pause_gcode and pause_heights.
pause_gcode is under the Custom G-Code section of Printer Configuration.
pause_heights is under Layers and perimeters section of Print Configuration.
also added a test case.