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
path: root/docs
diff options
context:
space:
mode:
authorKostas Karmas <konskarm@gmail.com>2021-02-01 11:34:35 +0300
committerKostas Karmas <konskarm@gmail.com>2021-02-01 11:34:35 +0300
commit383e599f4e22acb51fb22682e1b01af35dbccc9c (patch)
treecbed0fdd6150e7fd1a0215ca2cc4f3df3b5a32c7 /docs
parent48d4488eb15e987571d6f33199129858ed9051b7 (diff)
Add notes under the scene_example_scene_graph.jpg
CURA-7502
Diffstat (limited to 'docs')
-rw-r--r--docs/scene/scene.md13
1 files changed, 8 insertions, 5 deletions
diff --git a/docs/scene/scene.md b/docs/scene/scene.md
index 6a624d3641..c2ea52577f 100644
--- a/docs/scene/scene.md
+++ b/docs/scene/scene.md
@@ -9,7 +9,7 @@ Cura's scene graph is a mere tree data structure. This tree contains all scene n
The main idea behind the scene tree is that each scene node has a transformation applied to it. The scene nodes can be nested beneath other scene nodes. The transformation of the parents is then also applied to the children. This way you can have scene nodes grouped together and transform the group as a whole. Since the transformations are all linear, this ensures that the elements of this group stay in the same relative position and orientation. It will look as if the whole group is a single object. This idea is very common for games where objects are often composed of multiple 3D models but need to move together as a whole. For Cura it is used to group objects together and to transform the collision area correctly.
Class Diagram
-====
+----
The following class diagram depicts the classes that interact with the Scene
@@ -20,7 +20,7 @@ The scene lives in the Controller of the Application, and it is primarily intera
A Typical Scene
----
-Cura's scene has a few nodes that are always present, and a few nodes that are repeated for every object that the user loads onto their build plate. The root of the scene graph is a SceneNode that lives inside the Scene and contains all the other children SceneNodes of the scene. Typically, inside the root you can find the SceneNodes that are always loaded, such as the Cameras and the [BuildVolume](build_volume.md) (which contains the Platform), and the objects that are loaded on the platform.
+Cura's scene has a few nodes that are always present, and a few nodes that are repeated for every object that the user loads onto their build plate. The root of the scene graph is a SceneNode that lives inside the Scene and contains all the other children SceneNodes of the scene. Typically, inside the root you can find the SceneNodes that are always loaded (the Cameras, the [BuildVolume](build_volume.md), and the Platform), the objects that are loaded on the platform, and finally a ConvexHullNode for each object and each group of objects in the Scene.
Let's take the following example Scene:
@@ -31,8 +31,11 @@ The scene graph in this case is the following:
![scene_example_scene_graph.png](images/scene_example_scene_graph.jpg)
-As it is visible, aside from the BuildVolume, the Cameras, and the objects, the root SceneNode also contains all the ConvexHullNodes, which are used to display the convex hull of each object and each group of objects. A ConvexHullNode is always loaded for each of the existing CuraSceneNodes
+**Note 1:** The Platform is actually a child of the BuildVolume.
+
+**Note 2:** The ConvexHullNodes are not actually named after the object they decorate. Their names are used in the image to convey how the ConvexHullNodes are related to the objects in the scene.
+**Note 3:** The CuraSceneNode that holds the layer data (inside the BuildVolume) is created and destroyed according to the availability of sliced layer data provided by the CuraEngine. See [Layer Data](#layer-data) for more information.
Accessing SceneNodes in the Scene
----
@@ -47,7 +50,7 @@ for node in BreadthFirstIterator(scene.getRoot()):
Example result when iterating the above scene graph:
```python
-[i for i in BreadthFirstIterator(self._root)]
+[i for i in BreadthFirstIterator(CuraApplication.getInstance().getController().getScene().getRoot()]
```
* 00 = {SceneNode} <SceneNode object: 'Root'>
* 01 = {BuildVolume} <BuildVolume object '0x2e35dbce108'>
@@ -76,4 +79,4 @@ Once the Slicing has completed and the CuraEngine has returned the slicing data,
![Layer Data Scene Node](images/layer_data_scene_node.jpg)
-**Note:** This CuraSceneNode is created once Cura has completed processing the Layer data (after the user clicks on the Preview tab after slicing). The CuraSceneNode then is destroyed once any action that changes the Scene occurs (e.g. if the user moves/rotates/scales an object or changes a setting value). \ No newline at end of file
+This CuraSceneNode is created once Cura has completed processing the Layer data (after the user clicks on the Preview tab after slicing). The CuraSceneNode then is destroyed once any action that changes the Scene occurs (e.g. if the user moves/rotates/scales an object or changes a setting value). \ No newline at end of file