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

Multiextruder gcode snippet replacement patterns #3068

Conversation

fieldOfView
Copy link
Collaborator

@fieldOfView fieldOfView commented Dec 31, 2017

This PR allows specifying the extruder stack to use for each replacement pattern. The replacement pattern is (optionally) extended with an extruder_nr: {setting_key,extruder_nr}. The extruder_nr can either be a number (-1 for the global stack, 0 or higher for an extruder), or a setting keyword such as support_extruder_nr etc. If an extruder_nr is not specified, the value is taken from the same stack as the current implementation.

  • {material_standby_temperature} in start gcode gets the (resolved) setting value from the default stack (the first used extruder), as before
  • {material_standby_temperature, 1} gets the value from the 2nd extruder (extruder nrs start by 0)
  • {material_standby_temperature, support_extruder_nr} gets the value from whatever extruder is set as support extruder

Contributes to #1296 (see #1296 (comment) and on)

The replacement pattern is (optionally) extended with an extruder_nr: {setting_key,extruder_nr}. The extruder_nr can either be a number (-1 for the global stack, 0 or higher for an extruder), or a setting keyword such as support_extruder_nr etc.

Contributes to Ultimaker#1296
@fieldOfView fieldOfView force-pushed the feature_multiextruder_replacement_patterns branch from 3cefe67 to 7a0b49c Compare December 31, 2017 10:29
@ChrisTerBeke
Copy link

Good solution. No regression as the default behaviour stays the same, and adding an extruder index as stack indicator seems like the simplest solution to me.

@stuartpb
Copy link

stuartpb commented Jan 2, 2018

I want this functionality more than I care about having it implemented the particular way that I'm describing it, so I don't want this to be a blocker without an alternative implementation to pull, but I really think this should be done by importing all variables from all stacks with prefixes (either using named prefixes or nested replacement for the role-based stack selection) instead of introducing a variadic replacement construct, as I described here.

The simple answer as to why I think it should work this way is that this is how Simplify3D does it (numbered prefixes and role variables), it's how Slic3r does it (numbered suffixes and nested role variables), and it's how MatterControl does it (role prefixes). There are enough translation headaches involved in developing profiles across different slicer environments, and it'd be nice to avoid creating one more pointlessly divergent construct that can't reuse procedures developed for everything else.

@nallath
Copy link
Member

nallath commented Jan 3, 2018

For our reference; CURA-4757

@ChrisTerBeke ChrisTerBeke merged commit 8032490 into Ultimaker:master Jan 3, 2018
@fieldOfView fieldOfView deleted the feature_multiextruder_replacement_patterns branch January 5, 2018 20:45
fieldOfView added a commit to fieldOfView/Cura that referenced this pull request Feb 3, 2018
Since Ultimaker#3068, replacement patterns can take the form of {setting_nr, extruder_nr}. This form was not being recognised when determining if CuraEngine should prepend its own preheat sequence.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants