... | ... | @@ -495,7 +495,7 @@ Intuitively, IceSL preemptively calls 'startWriting' before proceeding with 'ste |
|
|
|
|
|
### Interface Structures <a name="structures"></a>
|
|
|
|
|
|
IceSL elies on data structures to pass information to plugins about deposition trajectories and sliced layers. There are three classes; `IPath`, `ILayer` and `ILayerSet`.
|
|
|
IceSL relies on data structures to pass information to plugins about deposition trajectories and sliced layers. There are three classes; `IPath`, `ILayer` and `ILayerSet`. In them we refer to _World Space_ as the space where geometry is constructed (e.g., CSG lua script). We also refer to _Build Space_ as the space where the geometry is printed (e.g., printing bed).
|
|
|
|
|
|
```c++
|
|
|
namespace IceSLInterface
|
... | ... | @@ -567,7 +567,7 @@ public: |
|
|
|
|
|
// Sets the value of the path attribute.
|
|
|
virtual void setPathAttributeValue(
|
|
|
int pathAttribute, // Path attribute index
|
|
|
int pathAttributeIndex, // Path attribute index
|
|
|
double pathAttributeValue // Path attribute value
|
|
|
) = 0;
|
|
|
|
... | ... | @@ -583,15 +583,15 @@ public: |
|
|
|
|
|
// Gets the value of the per-vertex attribute for the i-th vertex.
|
|
|
virtual void getPerVertexAttributeValue(
|
|
|
int vertexAttribute, // Per-vertex attribute index
|
|
|
int vertexIndex, // Vertex index
|
|
|
int vertexAttributeIndex, // Per-vertex attribute index
|
|
|
int vertexIndex, // Vertex index
|
|
|
double& vertexAttributeValue // Per-vertex attribute value
|
|
|
) const = 0;
|
|
|
|
|
|
// Sets the value of the per-vertex attribute for the i-th vertex.
|
|
|
virtual void setPerVertexAttributeValue(
|
|
|
int vertexAttribute, // Per-vertex attribute index
|
|
|
int vertexIndex, // Vertex index
|
|
|
int vertexAttribute, // Per-vertex attribute index
|
|
|
int vertexIndex, // Vertex index
|
|
|
double vertexAttributeValue // Per-vertex attribute value
|
|
|
) = 0;
|
|
|
};
|
... | ... | @@ -606,4 +606,77 @@ Paths created by IceSL (e.g., when producing Machine Code) support the following |
|
|
* `"flow_multiplier"`
|
|
|
* `"zoffset"`
|
|
|
|
|
|
As 'IPath' is a pure virtual class, it is sometimes necessary to have an implementation of it when creating a path. For this purpose, the plugin interface provides the class 'Path'. |
|
|
\ No newline at end of file |
|
|
As 'IPath' is a pure virtual class, it is sometimes necessary to have an implementation of it when constructing a path. For this purpose, the plugin interface provides the class 'Path'.
|
|
|
|
|
|
The `ILayer`
|
|
|
|
|
|
```c++
|
|
|
namespace IceSLInterface
|
|
|
{
|
|
|
class ILayer
|
|
|
{
|
|
|
public:
|
|
|
|
|
|
ILayer() = default;
|
|
|
virtual ~ILayer() = default;
|
|
|
|
|
|
// Return the position of this layer top in build space.
|
|
|
virtual double zTopBuildSpace() const = 0;
|
|
|
|
|
|
// Returns the position of this layer top in world space.
|
|
|
virtual double zTopWorldSpace() const = 0;
|
|
|
|
|
|
// Returns the thickness of this layer (i.e., top - bottom) in millimeters.
|
|
|
virtual double thickness() const = 0;
|
|
|
|
|
|
// Returns the number of trajectories in this layer.
|
|
|
virtual int getNumPaths() const = 0;
|
|
|
|
|
|
// Returns the i-th trajectory in this layer.
|
|
|
virtual const IPath& getPath(
|
|
|
int path_indx // Path index
|
|
|
) const = 0;
|
|
|
|
|
|
// Returns whether this layer is spiralized (no travel, continuous deposition).
|
|
|
virtual bool isSpiral() const = 0;
|
|
|
|
|
|
// Gets this layer attributes' names.
|
|
|
virtual void getLayerAttributes(
|
|
|
std::vector<std::string>& layerAttributes // Layer attributes' names
|
|
|
) const = 0;
|
|
|
|
|
|
// Returns the index of the layer attribute, -1 if unknown.
|
|
|
virtual int getLayerAttributeIndex(
|
|
|
const std::string& layerAttribute
|
|
|
) const = 0;
|
|
|
|
|
|
// Gets the value of the layer attribute.
|
|
|
virtual void getLayerAttributeValue(
|
|
|
int layerAttributeIndex,
|
|
|
double& layerAttributeValue
|
|
|
) const = 0;
|
|
|
|
|
|
// Adds a trajectory to the end of this layer.
|
|
|
virtual void addPath(
|
|
|
const AutoPtr<IPath> path // Path to add
|
|
|
) = 0;
|
|
|
|
|
|
// Inserts a trajectory in the j-th position of this layer.
|
|
|
virtual void insertPath(
|
|
|
int j, // Index position to insert path
|
|
|
const AutoPtr<IPath> path // Path to insert
|
|
|
) = 0;
|
|
|
|
|
|
// Replaces the trajectory in the j-th position of this layer.
|
|
|
virtual void replacePath(
|
|
|
int j, // Index position of path to replace
|
|
|
const AutoPtr<IPath> path // Path to replace with
|
|
|
) = 0;
|
|
|
|
|
|
// Removes the trajectory in the j-th position of this layer.
|
|
|
virtual void removePath(
|
|
|
int j // Index position of path to remove
|
|
|
) = 0;
|
|
|
};
|
|
|
}
|
|
|
``` |
|
|
\ No newline at end of file |