|
|
# IceSL Plugin System
|
|
|
|
|
|
This is the official documentation of the IceSL plugin system. In here you will find general information of the plugin system, how to set up the framework to create a plugin, the technical specification of the interface to IceSL and a small guide on how to create a plugin together with a break-down of the examples packaged in the repo.
|
|
|
This is the official documentation of the IceSL plugin system. In here you will find general information of the plugin system, how to set up a framework to create a plugin and the technical specification of the interface to IceSL. Additionally, a small guide on how to create a plugin together with a break-down of the examples packaged in the source code are also featured here.
|
|
|
|
|
|
1. [The Plugin System](#general)
|
|
|
|
... | ... | @@ -27,10 +27,10 @@ An IceSL plugin is a shared library file (`.dll` on Windows platforms and `.so` |
|
|
|
|
|
![use_plugins](uploads/73413f12ee27399d5bcd6bd072a6d9dc/image.png)
|
|
|
|
|
|
These plugin files will be automatically picked up by IceSL at startup. They, however, could be ignored for the following two reasons:
|
|
|
Plugin files are automatically picked up by IceSL at startup. They, however, could be ignored for the following two reasons:
|
|
|
|
|
|
* Missing or incorrect shared interface functions.
|
|
|
* Interface version mismatch.
|
|
|
1. Missing or incorrect shared interface functions.
|
|
|
2. Interface version mismatch.
|
|
|
|
|
|
Make sure you're using the latest interface as well as the latest version of IceSL.
|
|
|
|
... | ... | @@ -53,11 +53,11 @@ Make sure you're using the latest interface as well as the latest version of Ice |
|
|
- [Windows] run CMake-gui on the *icesl-interface* folder and choose the build folder created in the last step
|
|
|
- Or execute:
|
|
|
1. `cd build/icesl-interface`
|
|
|
2. `cmake /src_dir/IceSL-interface` where `src_dir` is the folder where you cloned the repo.
|
|
|
2. `cmake /src_dir/IceSL-interface` where `src_dir` is the folder where you cloned the repository.
|
|
|
9. Compile a sample plugin:
|
|
|
- Either open the Visual Studio project produced by CMake and compile the `sampleInfillerPlugin` project.
|
|
|
- Or execute in the icesl-interface source folder `make sampleInfillerPlugin`.
|
|
|
10. Place the resulting `sampleInfillerPlugin.dll` [Windows] or `sampleInfillerPlugin.so` [Linux] on the `icesl-plugins` folder contained in the IceSL installation directory.
|
|
|
- Or execute in the icesl-interface build folder `make sampleInfillerPlugin`.
|
|
|
10. Place the resulting `sampleInfillerPlugin.dll` [Windows] or `sampleInfillerPlugin.so` [Linux] on the `icesl-plugins` folder contained in the IceSL assets directory (i.e., File → Open assets folder).
|
|
|
11. Open IceSL and select `SampleInfiller` as the infill type (remember that the option _Use Plugins_ needs to be activated).
|
|
|
|
|
|
![select_plugin](uploads/e1e78313293c62dc910ca685db503817/image.png)
|
... | ... | @@ -94,9 +94,9 @@ public: |
|
|
|
|
|
// Adds printing settings specific to the plugin to IceSL's settings panel.
|
|
|
virtual bool addPluginSettings(
|
|
|
// 'enumarable_settings' controls the printing setttings of IceSL.
|
|
|
// 'enumarable_settings' controls the printing settings of IceSL.
|
|
|
// The `EnumerableSettingsInterface` class is the interface through which the user
|
|
|
// can query existing parameters or add new parameteres specific to the plugin.
|
|
|
// can query existing parameters or add new parameters specific to the plugin.
|
|
|
// It is explained in detail on the next section.
|
|
|
EnumerableSettingsInterface& enumerable_settings
|
|
|
) = 0;
|
... | ... | @@ -239,7 +239,7 @@ Finally, to query or add a printing parameter, the interface is as follows: |
|
|
...
|
|
|
|
|
|
// Gets a setting by its internal name. For a complete list of internal names
|
|
|
// and their descriptions (english, spanish and french) please refer to
|
|
|
// and their descriptions (English, Spanish and French) please refer to
|
|
|
// https://icesl.loria.fr/parameters/
|
|
|
virtual std::unique_ptr<SettingInterface> getSettingByName(
|
|
|
const std::string& internalName // setting's internal name
|
... | ... | @@ -363,7 +363,7 @@ protected: |
|
|
|
|
|
### Post-processing Plugin <a name="post-processing"></a>
|
|
|
|
|
|
A post-processing plugin can alter, reorder or add deposition trajectories that resulted from the slicing process. Derive from class `IPostProcessingPlugin` when creating one.
|
|
|
A post-processing plugin can alter, reorder or add deposition trajectories that resulted from the slicing process. Altering a deposition trajectory is not possible, rather clone it, change it and replace it. Derive from class `IPostProcessingPlugin` when creating one.
|
|
|
|
|
|
```c++
|
|
|
namespace IceSLInterface
|
... | ... | @@ -405,7 +405,8 @@ public: |
|
|
virtual ~IPostProcessingInterface() = default;
|
|
|
|
|
|
// Post-process (per-extruder) the layer. This function is called by IceSL for each layer
|
|
|
// (top to bottom) for each extruder that deposits material. Return 'true' if successful.
|
|
|
// (top to bottom) for each extruder that deposits material in that layer.
|
|
|
// Return 'true' if successful.
|
|
|
virtual bool postProcessLayer(
|
|
|
const int extruder, // Extruder used in the layer being post-processed
|
|
|
const int layerID, // Layer number (0 means lowest layer)
|
... | ... | @@ -439,7 +440,7 @@ public: |
|
|
IMachineCodePlugin() = default;
|
|
|
~IMachineCodePlugin() override = default;
|
|
|
|
|
|
// Output file extension or "DIR" if outputing to a folder
|
|
|
// Output file extension or "DIR" if outputting to a folder
|
|
|
virtual std::string extension() const = 0;
|
|
|
|
|
|
// Creates and returns an Machinde Code Interface
|
... | ... | |