Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKostas Karmas <konskarm@gmail.com>2021-02-02 16:15:08 +0300
committerKostas Karmas <konskarm@gmail.com>2021-02-02 16:15:08 +0300
commitf7f331d8a24b885c5d86e0aabad08659b9f3300b (patch)
tree3070940765bb3cf114f15a2270755584115a1ebb
parent7826e89299fc61cd1ddfb0d332e6d9a053ea0c0b (diff)
Add information on the rest of the decorators
* ZOffsetDecorator * BlockSlicingDecorator * GCodeListDecorator CURA-7502
-rw-r--r--docs/scene/scene.md33
1 files changed, 29 insertions, 4 deletions
diff --git a/docs/scene/scene.md b/docs/scene/scene.md
index a504bbd104..98b4fe6bb6 100644
--- a/docs/scene/scene.md
+++ b/docs/scene/scene.md
@@ -109,7 +109,7 @@ As seen in the scene graph of the scene example, each CuraSceneNode that represe
In essence, the CuraSceneNode has a ConvexHullDecorator which points to the ConvexHullNode of the object. The data of the **object**'s convex hull can be accessed via
```python
-node.callDecoration("getConvexHull")
+convex_hull_polygon = node.callDecoration("getConvexHull")
```
The ConvexHullDecorator also provides convex hulls for the object that include the head, the fans, and the adhesion of the object. These are primarily used in One-at-a-time mode.
@@ -164,17 +164,42 @@ This CuraSceneNode is created once Cura has completed processing the Layer data
ZOffsetDecorator
----
-TODO
+The ZOffsetDecorator is added to an object in the scene when that object is moved below the build plate. It is primarily used when the "Automatically drop models to the build plate" preference is enabled, in order to make sure that the GravityOperation, which drops the mode on the build plate, is not applied when the object is moved under the build plate.
+
+The amount the object is moved under the build plate can be retrieved by calling the "getZOffset" decoration on the node:
+
+```python
+z_offset = node.callDecoration("getZOffset")
+```
+
+The ZOffsetDecorator is removed from the node when the node is move above the build plate.
BlockSlicingDecorator
----
-TODO
+The BlockSlicingDecorator is the opposite of the SliceableObjectDecorator. It is added on objects loaded on the scene which should not be sliced. This decorator is primarily added on objects loaded from ".gcode", ".ufp", ".g", and ".gz" files. Such an object already contains all the slice information and therefore should not allow Cura to slice it.
+
+If an object with a BlockSlicingDecorator appears in the scene, the backend (CuraEngine) and the print setup (changing print settings) become disabled, considering that G-code files cannot be modified.
+
+The BlockSlicingDecorator adds the following decoration function to the node:
+
+```python
+node.callDecoration("isBlockSlicing")
+```
GCodeListDecorator
----
-TODO
+The GCodeListDecorator is also added only when a file containing GCode is loaded in the scene. It's purpose is to hold a list of all the GCode data of the loaded object.
+The GCode list data is stored in the scene's gcode_dict attribute which then is used in other places in the Cura code, e.g. to provide the GCode to the GCodeWriter or to the PostProcessingPlugin.
+
+The GCode data becomes available by calling the "getGCodeList" decoration of the node:
+
+```python
+gcode_list = node.callDecoration("getGCodeList")
+```
+
+The CuraSceneNode with the GCodeListDecorator is destroyed when another object or project file is loaded in the Scene.
BuildPlateDecorator
----