... | ... | @@ -11,6 +11,7 @@ This is the official documentation of the IceSL plugin system. In here you will |
|
|
2. [Infill Plugin](#infill)
|
|
|
3. [Post-processing Plugin](#post-processing)
|
|
|
4. [Machine Code Plugin](#machinecode)
|
|
|
5. [Inerface Structures](#structures)
|
|
|
|
|
|
4. [Creating Your Own Plugin](#creating)
|
|
|
1. [The Shared Library Interface]
|
... | ... | @@ -361,4 +362,77 @@ protected: |
|
|
|
|
|
### Post-processing Plugin <a name="post-processing"></a>
|
|
|
|
|
|
### Machine Code Plugin <a name="machinecode"></a> |
|
|
\ No newline at end of file |
|
|
A post-processing plugin implements infill patterns that are applied for each resulting printing layer. Derive from class `IPostProcessingPlugin` when creating one.
|
|
|
|
|
|
```c++
|
|
|
namespace IceSLInterface
|
|
|
{
|
|
|
class IPostProcessingPlugin : public IPlugin
|
|
|
{
|
|
|
public:
|
|
|
|
|
|
IPostProcessingPlugin() = default;
|
|
|
~IPostProcessingPlugin() override = default;
|
|
|
|
|
|
// Creates and returns an Post-processing Interface
|
|
|
virtual std::unique_ptr<IPostProcessingInterface> createPostProcessing(
|
|
|
const IceSLInterface::EnumerableSettingsInterface* settings
|
|
|
) = 0;
|
|
|
|
|
|
// Called by IceSL to save the internal name assigned to this plugin. Do not use.
|
|
|
void setInternalName(const std::string& internal_name) { m_InternalName = internal_name; }
|
|
|
|
|
|
protected:
|
|
|
// Printing setting's internal name assigned by IceSL to this plugin
|
|
|
std::string m_InternalName;
|
|
|
};
|
|
|
}
|
|
|
```
|
|
|
|
|
|
The interface for a post-processing plugin is rather simple.
|
|
|
|
|
|
```c++
|
|
|
namespace IceSLInterface
|
|
|
{
|
|
|
class IPostProcessingInterface
|
|
|
{
|
|
|
public:
|
|
|
|
|
|
IPostProcessingInterface(const EnumerableSettingsInterface* settings) :
|
|
|
EnumerableSettings(settings)
|
|
|
{}
|
|
|
virtual ~IPostProcessingInterface() = default;
|
|
|
|
|
|
/// \brief PostProcess layer on a per-extruder basis. This function is called by IceSL for each layer (top to bottom) for each extruder that deposits material.
|
|
|
/// \param extruder extruder used in subset '_layer' of the whole layer
|
|
|
/// \param layerID layer number
|
|
|
/// \param spiral if layer is to be spiralized
|
|
|
/// \param start starting point of layer
|
|
|
/// \param layer subset of layer to post-process (add paths + reorder existing paths)
|
|
|
/// \result true post-processing successful
|
|
|
// 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.
|
|
|
virtual bool postProcessLayer(
|
|
|
const int extruder, // Extruder used in the layer being post-processed
|
|
|
const int layerID, // Layer number (0 means lowest layer)
|
|
|
const bool spiral, // 'true' if layer is to be spiralized
|
|
|
const v2i& start, // Starting point of the layer
|
|
|
std::vector<std::shared_ptr<IceSLInterface::IPath>>& _layerprocessed // Deposition paths to post-process.
|
|
|
) = 0;
|
|
|
|
|
|
protected:
|
|
|
|
|
|
// Use this interface to access or add printing settings as well as query
|
|
|
// the number of brushes or extruders (where applicable)
|
|
|
const EnumerableSettingsInterface* m_EnumerableSettings;
|
|
|
};
|
|
|
}
|
|
|
```
|
|
|
|
|
|
In function 'postProcessLayer', the parameter '_layerprocessed' contains the deposition trajectories whereupon the plugin can post-process (re-order or add more deposition trajectories). It is worth mentioning that a post-processing plugin **should not** add traveling trajectories (i.e., trajectories without material deposition), IceSL takes care of this.
|
|
|
|
|
|
### Machine Code Plugin <a name="machinecode"></a>
|
|
|
|
|
|
### Interface Structures <a name="structures"></a>
|
|
|
|
|
|
IPath, ILayer, ILayerSet |
|
|
\ No newline at end of file |