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

Feature Request: Simple Arithmetic with variables in start/end gcode? #2407

Closed
lordofhyphens opened this issue Dec 9, 2014 · 5 comments
Closed
Assignees
Labels
Feature request This is an idea for a new feature in Slic3r
Milestone

Comments

@lordofhyphens
Copy link
Member

I'd like to be able to issue a M190 command in the start Gcode so that it waits until the bed is 1 or 2C lower than [first_layer_bed_temperature], then issue a M140 to let it heat up the rest of the way while my hotend gets up to temp.

Near as I can tell, this behavior isn't supported in Slic3r.

@lordofhyphens
Copy link
Member Author

I think I can get a workaround by postprocessing the gcode through a perl regexp looking for the M190 command, but it's not very pretty.

's/M190 S([0-9]+)([+-][0-9]+);/"M190 S".($1+$2).";"/e'

@lordofhyphens
Copy link
Member Author

Yeah, I've got workaround in the form of a sh script that calls perl with that regexp. It supports the format S[temp]-offset, and addition too.

entire script:
#!/bin/sh
perl -p -i -e 's/M190 S([0-9]+)([+-][0-9]+);/"M190 S".($1+$2).";"/e' $1

@alranel
Copy link
Member

alranel commented Dec 13, 2014

I have considered implementing arithmetics. I have also considered implementing custom variables that you could associate to print and filament presets, so that you could call them in your Start G-code like [my_custom_temporary_bed_temperature].

@simonkuehling
Copy link

Yes, that is a beautiful idea, @alexrj!
This would enable us to set a custom "chamber_temperature" in filament presets to use in the start gcode - a feature that isn't needed for the majority of the other 3D printers and therefore probably won't justify its own native parameter.

I really like the custom variable idea - sleek solution that can integrate well into the UI

@lordofhyphens lordofhyphens added the Feature request This is an idea for a new feature in Slic3r label Jul 11, 2016
@lordofhyphens lordofhyphens self-assigned this Jul 11, 2016
@lordofhyphens lordofhyphens added this to the 1.4.0 milestone Jul 11, 2016
@lordofhyphens
Copy link
Member Author

@lordofhyphens lordofhyphens modified the milestones: 1.4.0, 1.3.0 Apr 13, 2018
@slic3r slic3r locked as resolved and limited conversation to collaborators Apr 13, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature request This is an idea for a new feature in Slic3r
Projects
None yet
Development

No branches or pull requests

3 participants