🧩 Introducing CuraEngine Plug-ins ~ Input is welcome #15629
Replies: 9 comments 24 replies
-
Some exciting changes are coming to the Cura and the Marketplace. 😊 Or @BagelOrb @ThomasRahm, @wawanbreton, @Piezoid, @ckvsoft @Cycov @richfelker, @smartavionics I'm not trying to play favorites, but you jumped into my mind when I saw the proposal. |
Beta Was this translation helpful? Give feedback.
-
The basic idea of having the slicer splitted in plugins is really amazing... Now some thoughts about the options :
Overall, I would prefer option A because it seems to open some possibilities that option B closes. If you start integrating this architecture, it will be a choice to be assumed for a few years, so you have to make sure that what you will do later is not limited. If I'm correct, option B is actually a subset of option A, so you can still have option B working by implementing option A 😃
|
Beta Was this translation helpful? Give feedback.
-
I think the plugin system needs to be very flexible in what data the plugin has access to. So instead of having slots that come with a limited, fixed set of setting values, provide a way for the plugin to access the full settings relevant to the current mesh/meshgroup. |
Beta Was this translation helpful? Give feedback.
-
Could there be a wrapper of type A, which offers type B interface for type B plug-ins? Easy implementation for simple tasks and new developers, without sacrificing At least IMO (engine) development should become less "impossible" and while How would these plugins alter / react with UI? |
Beta Was this translation helpful? Give feedback.
-
How are you going to handle security/validation of plugins for the Marketplace if they contain executable backend plugins (for multiple platforms)? |
Beta Was this translation helpful? Give feedback.
-
Will the gcode postprocessing slot be called before or after print time estimation? It could be interesting to see the results of postprocessed gcode in the print time estimation. Come to think of it, it could also be interesting to replace the print time estimation altogether with something better. |
Beta Was this translation helpful? Give feedback.
-
Looking at Ultimaker/CuraEngine_plugin_postprocess#1 (wow, that's a lot of boilerplate for a "simple" gcode postprocessing plugin), I can't help but wonder how this will scale to a situation where a user has multiple plugins installed. Will all of those be executables that launch with Cura, or are plugin authors supposed to launch the plugin executable before a slice and then close it immediately after? How will port numbers be handled? Should a plugin just keep trying open a port until it finds a port that does not conflict (similar to how the Curaengine backend does it now in case of a conflict)? |
Beta Was this translation helpful? Give feedback.
-
For a project I'm looking to gain more granular control over filaments with temperature dependent foaming capabilities. These filaments contain particles which expand to varying degrees based on the temperature they are exposed to (in this case a range of 170-230C). There are many interesting use cases in research where local differing degrees of foaming intensity within a geometry is desired; lightweight structural optimizations, local fluid/gas permeability, compliant mechanisms, local hardness control in TPU, promote cell growth in specific regions, density control for imaging phantoms etc. etc. For this to be fully leveraged there would need to be a full spatial control of extrusion temperature. Unfortunately, there are no suitable workflows for realizing these use cases. As someone who is specializing in material science I'm not too familiar with writing software. But I just want to throw this idea out here to maybe get the ball rolling! For now, just assuming a fully solid print, I think there'd be two possibilities of tackling this. Either changing the hotend temperature in real time during extrusion of the toolpath, or segmenting each layer into 'temperature regions' where every temperature step is printed separately until the layer is fully printed. The former might not be feasible in practice, since I doubt the hotend is able to change its temperature so quickly during extrusion. Then there's the fronted part on configuring which regions of the geometry should have which temperature. In a simple form you might be able to segment a geometry into sections in CAD before you generate the STL file, and have this be split into different regions assigned with different temperature in the slicer? (I think SuperSlicer can do something like this for multi material printing). On the more extreme part of the spectrum it would be cool to be able to import files for very granular temperature changes; think of converting a bicycle seat or foot sole measurement pressure map into corresponding temperature regions in the geometry for controlling the hardness. Or, currently I'm playing with structural optimization where the geometry isn't optimized based on taking away volume (like topology optimization), but rather into assigning temperature regions (which because of the foaming corresponds to different mechanical properties and density) for creating an optimal lightweight structure based on load conditions. A simulation likes this generates a tetrahedral mesh with a a specific temperature for each element of the mesh. I wonder if something like this could be imported into a slicer and generate a .gcode that takes these temperature regions into account? Anyway, a lot of spit balling and a lack of knowledge on how to implement this. But seeing the news of CuraEngine plug-ins there might be some possibilities here? I'd love to hear feedback or talk further, or a push in the right direction on how to implement this would be really appreciated! Thanks! |
Beta Was this translation helpful? Give feedback.
-
i had problems slicing the bottom part of https://angrygriffin.net/product/3d-printable-stl-token-dice-and-card-holder-for-warcry-heart-of-ghur with as less material as possible but ensure that the walls are not "too weak". It took me a long time working with the infill settings, support blockers and per model settings - the result was that i needed (afair) around 240g filament after many hours of playing around with all settings instead of ~350g with normal ~12% zigzag infill (3 layer raft included) - that was a frustrating experience ^^ so it would be cool do improve a few things for the infill and support settings. My ideas:
just my thoughts and sorry for my bad english...! if you have questions feel free to ask (maybe i will use a translator for the answer... :) ) thx! |
Beta Was this translation helpful? Give feedback.
-
Cura Engine Plug-ins
Since the launch of the Cura Marketplace we've received around 80 different plug-ins for Cura. These have all been modifications limited to Cura's front-end and post-processing scripts. We are planning to expand the possible plug-in options.
We want to allow for plugins to extend/replace certain operations within CuraEngine. 🎉
We've been working on detangling the CuraEngine to lower the threshold for anyone to start working plug-ins that influence what actually happens when Cura is slicing. These plugins can influence specific steps in the slicing process like generating the Platform Adhesion, the Skin Generation, or recognizing the Support+Overhang areas.
In our first tests, we proved that these plugins can be written in a different languages (Python, Rust, Java etc.).
We predict that it's possible for the following plug-ins to be developed and loaded into Cura if when we unlock this possibility.
Two alternatives
For the last few weeks, we've been brainstorming on different ways to implement the option to write plug-ins for the CuraEngine. We found two potential alternatives on how to enable plug-ins to extend/replace certain operations within CuraEngine. We cannot promise that we are actually going to implement it like this, but unless we get different insights, these seem like the best options.
The main difference between the alternatives is that for alternative A we allow for more flexibility on the plugin side whereas alternative B is a bit more restrictive. This is due to the fixed input data for alternative B. With the experience of building an engine, we know what input data is expected for each step. For alternative B we only provide that input data. For alternative A we don’t provide any input data with a step, but instead broadcast more generic information at various points during slicing, and a plugin can choose to receive data from multiple origins and use that to generate data for a specific step. The downside of this is that it requires a bit more bookkeeping on the plugin side.
Alternative A:
Slicing involves certain sequential steps (think of slicing the model into outlines, generating the various infill-regions etc). Using the plugin system each of these steps can be overwritten, we refer to these steps as slots.
For each slot there are 3 operations, these are:
Note: not all operations are implemented for all slots.
Alternative B:
Slicing involves specific sequential steps (think of slicing the model into outlines, generating the various infill-regions etc). Using the plugin system each of these steps can be overwritten, we refer to these steps as slots. For each, there is some input data that is relevant to produce the data required for that slot.
Examples of slots
Below a few examples of plugin slots are listed. If you are interested in other steps please let us know, we can try to provide more examples
Alternative A:
Model: Only the Modify and Broadcast operations exist for the model slot. The Modify slot could be used to for instance alter the model to have embossed text on the surface. Model is a triangle soup representation of the slice-model.
Generate areas: Generate the various infill areas for each layer. These areas include: skin, infill areas for the various infill densities, the inner wall areas, and the outer wall areas.
Skin: For each layer generate the skin-toolpaths
In order to generate data for this slot the plugin should probably listen to at least the settings and slice broadcast-slots.
Alternative B:
Support: Input is the and the overhang and the disallowed areas areas. Result will be the support areas for each layer
Infill areas: Input for this slot are the model outlines for each layer, then the various infill areas are generated
Skin: Based on the skin-area generate toolpaths that fill the skin
SkinService(settings: Settings, skin_area_per_layer: [Polygons]) -> [Toolpaths]
How can you help?
We cannot make any promises on the actual implementation. But we do want to work together with our amazing plug-in developers and community members to create something that enables you to make all the amazing things you want.
You can help us by sharing your feedback on the proposal. Especially by providing answers to the following two questions:
1. Which of these alternatives has your preference, and why?
2. When reading through this proposal, what kind of potential for plugins jump to mind?
Beta Was this translation helpful? Give feedback.
All reactions