CURA-13049 process the end variable replacement in the engine#2313
Open
wawanbreton wants to merge 22 commits intomainfrom
Open
CURA-13049 process the end variable replacement in the engine#2313wawanbreton wants to merge 22 commits intomainfrom
wawanbreton wants to merge 22 commits intomainfrom
Conversation
…-the-end-variable-replacement-in-the-engine
Contributor
CURA-13049 Calculating the initial extruder number on engine side allows fixing a few issues where the pre-supposed initial extruder ended up not being the same as actually generated by the engine. Now we calculate it after slicing, so we are really sure this is the correct one, then send it to the front-end.
CURA-13049 Code was already correct regarding previous behavior, see https:// github.com/Ultimaker/Cura/blob/2cb536439c84ec5f4169008c5682a75d7d6db11a/ plugins/CuraEngineBackend/CuraEngineBackend.py#L876
CURA-13049 In a worst-case-ish scenario, in debug mode, I measured a total resolving time of 600ms. This time was cut down by half with the multi- threading, so good to take. The GCodeTemplateResolver has been designed so that the resolving is a const method, that can be safely be called in parallel.
…ent-in-the-engine
…-the-end-variable-replacement-in-the-engine
9c354e8 to
b45f19f
Compare
…e-end-variable-replacement-in-the-engine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR proposes a few changes to process the end-of-line variables replacement in the engine. It implements the following changes:
FixedGCodePartinstanceResolvedGCodePartinstanceCommunicationobject to send the different pieces of information at the proper times, so that the proces is more repeateable across different implementations, and this also removes some facade code in theFffProcessorandFffGCodeWriter.ℹ️ Some technical notes:
EmscriptenCommunicationhas been updated to reach feature parity. However it is to note that theCommunication::beginGCodemethod has been removed, and its content has been placed in the constructor instead. The previous behavior can be restored if necessary.Since this is now easily possible, it also adds a few useful variables to the resolvable GCode:
initial_layer_bb_{min_x, max_x, min_y, max_y, width, height}containing the 2D bounding box of the effective print on the first layer (this includes every helper e.g. brim, skirt, prime tower, ...)total_bb_{min_x, max_x, min_y, max_y, min_z, max_y, width, depth, height}containing the 3D bounding box of the models to be printedis_extruder_usedcontaining a list of 16 booleans, indicating which extruder is effectively used during the printRequires Ultimaker/Cura#21500
Requires Ultimaker/CuraFormulaeEngine#2
CURA-13049