-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Cura 10475 engineplugin #15563
Merged
Merged
Cura 10475 engineplugin #15563
Conversation
This file contains 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
Contributes to CURA-10475
This would then default to default behaviour of slots Contributes to CURA-10475
Contributes to CURA-10475
This can currently be done by setting the environment variables: - SIMPLIFY_ENABLE: default disabled, setting this to any value will enable the plugin - SIMPLIFY_ADDRESS: defaults to localhost - SIMPLIFY_PORT: defaults to 33700 - POSTPROCESS_ENABLE: default disabled, setting this to any value will enable the plugin - POSTPROCESS_ADDRESS: defaults to localhost - POSTPROCESS_PORT: defaults to 33701 Hacky for now Contributes to CURA-10475
# Conflicts: # conanfile.py # resources/i18n/cs_CZ/cura.po # resources/i18n/cura.pot # resources/i18n/de_DE/cura.po # resources/i18n/es_ES/cura.po # resources/i18n/fi_FI/cura.po # resources/i18n/fr_FR/cura.po # resources/i18n/hu_HU/cura.po # resources/i18n/it_IT/cura.po # resources/i18n/ja_JP/cura.po # resources/i18n/ko_KR/cura.po # resources/i18n/nl_NL/cura.po # resources/i18n/pl_PL/cura.po # resources/i18n/pt_BR/cura.po # resources/i18n/pt_PT/cura.po # resources/i18n/ru_RU/cura.po # resources/i18n/tr_TR/cura.po # resources/i18n/zh_CN/cura.po # resources/i18n/zh_TW/cura.po
jellespijker
force-pushed
the
CURA-10475_engineplugin
branch
from
June 17, 2023 13:28
c6e21ae
to
9aa098f
Compare
I was running into abstraction issues when it was defined in Uranium. Instead of trying to fight those, it's just easier to move it to Cura CURA-10717
It's easier to understand what is going on if the signal definitions are not spread out CURA-10717
…ration' into CURA-10475_engineplugin # Conflicts: # plugins/CuraEngineBackend/Cura.proto # plugins/CuraEngineBackend/StartSliceJob.py
Contributes to CURA-10717 and CURA-10475
Contributes to CURA-10717 and CURA-10475
Contributes CURA-10475 and CURA-10625
Revert = Contributes CURA-10475 and CURA-10625
Solve version conflict with libnest2d
These are appended to project metadata. A warning can now be shown to the user when trying to load a project file while the correct plugins are not installed. These missing plugins can concequently be downloaded from the marketplace. To show the warning and install missing package dialog the same system we use to install missing materials is used. CURA-10719
Now more then just materials can be installed. Update copy to reflect this. CURA-10719
Contributes to CURA-10951
# Conflicts: # .github/workflows/linux.yml
Contributes to CURA-10951
Although not a direct dependency of Cura, still need to define it here, such that we can set it as shared for all dependencies. Needed to overcome the issues with glibc and static compiling of the gradual flow plugin on ubuntu 20.04 with gcc-13 Contributes to CURA-10951
fixes incompatible mismatch in versions between pyarcus and protobuf Contributes to CURA-10951
Contributes to CURA-10951
Contributes CURA-10951
Contributes CURA-10951
This commit simplifies the deploy method in conanfile.py by reducing the number of lines of code and refactor the handling of the Gradualflow plugin in the deploy method. In conandata.yml, the paths for the Gradualflow plugin resources have been adjusted for correct deployment. This update aims to fix the pyinstaller deployment failures associated with the Gradualflow plugin. It resolves the CURA-10951 tracking issue. Contributes CURA-10951
Added the configuration file `AppImageBuilder.yml.jinja`, the Python script `create_appimage.py`, and the shell script `entrypoint.sh.jinja` for AppImage building and packaging. These additions would enable the Cura application to be built into a single, standalone, executables file for Linux users, improving software deployment and distribution. Contributes CURA-10951
Contributes CURA-10951
Contributes CURA-10951
Contributes CURA-10951
Contributes CURA-10951
still ship other executables Contributes to CURA-10951
Issue before was the following: when placing objects within a grid cell there is a margin around the object. This margin comes from both the integer rounding of the cell and the defined min distance between objects. When trying to place object near the buildplate border we marked any cell that is not fully within the buildplate area as an invalid cell to place objects in. This was however too strict; there is the aforementioned margin around the object, and if only this margin would be outside the buildplate it is perfectly fine to place object in that cell. CURA-7951
CURA-10951 build plugin as bundled plugin on the GH runners
# Conflicts: # .github/workflows/installers.yml
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.
plugin system for CuraEngine
The Engine Plugin System uses Protobuf https://protobuf.dev/ and gRPC https://grpc.io/
Suggested Architecture
Cura container
Cura is responsible for starting the engine plugin service before the engine. In the local variant, this is done with a bash command adding the appropriate arguments (such as IP localhost and port number) these arguments are send along to the engine backend plugin which is responsible for starting engine, providing the settings, mesh and engine plugin (IP and port) data.
Engine plugin container
The engine plugin container can be written in any language, provided that it can handle Protobuf messages. The engine plugin service is started and will listen to any message on the specified socket. It should be able to respond to the following message types:
Identity: This should return at the very least the version and maybe in the future possible an authentication response, to ensure that we hook in to a valid plugin.
Process(data, args…): This is a request to process the data, with some additional arguments and return the modified data in the agreed upon format, if an error occurs it should respond with an error message instead.
Shutdown: This should stop listening and exit the program
CuraEngine container
CuraEngine is to be extended with a PluginRegistry, which will take care of the book keeping, coupling a slot, (which is a hook, defined by an certain operation, version range and call signature) with a PluginProxy (which provides an uniform API for the remote plugin service and acts like a regular C++ function object, with a default fallback behaviour if no valid plugin services is running.
Since we now have to take into account that the update cycle for engine plugins might differ from that of Cura and therefor CuraEngine, and that a user might still run an older version of a engine plugin, we also need to validate if a plugin is compatible; This is done with the PluginValidator which is a type that specifies the semver range. This validator can be extended in the future with additional checks, such as an authentication scheme, which would allows use to only run UltiMaker approved plugins (@remco Burema will look into this further)
Because the data transfer between a plugin and the engine is defined as a “generic” Protobuf message the engine also needs a way to convert that Protobuf type to CuraEngine native types. This is done with a Converter which maps the protobuf type to the native types (e.q. Polygons etc.). The converter throws a runtime error when it receives an error response from the plugin.
A slot is defined by a PluginValidator, a specialisation of the Converter<proto::Request, proto::Response> and a SlotID (e.q. POSTPROCESS, SIMPLIFY, etc.).
Proto definitions container
The common types between a plugin and the engine are the Protobuf messages. These messages should live as a single source of truth in their own repository (with a very loose license e.q. MIT).
The Protobuf definitions are:
SlotID (e.q. POSTPROCESS, SIMPLIFY, etc.), these describe the specific functionality of the plugin
Identity_Request request detailed information from a plugin
Identity_Response provides the version of the plugin, can be extended in the future with additional verification methods
Error_Response provides an error message if the plugin encounters an error
Each type of slot should have a corresponding Request and Response message in the definition file, e.q. Simplify_Request , Simplify_Response
Sequence diagram
To use the plugins from the front-end for now use environmental variables as below, while running this Cura branch: