From dce6c1c871ded2618e8b3a34a3e0f7d2b6315057 Mon Sep 17 00:00:00 2001 From: Kostas Karmas Date: Mon, 1 Feb 2021 15:54:55 +0100 Subject: Add information on the GroupDecorator CURA-7502 --- docs/scene/scene.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'docs') diff --git a/docs/scene/scene.md b/docs/scene/scene.md index c2ea52577f..ace31763fa 100644 --- a/docs/scene/scene.md +++ b/docs/scene/scene.md @@ -72,6 +72,35 @@ Example result when iterating the above scene graph: * 17 = {CuraSceneNode} * 18 = {CuraSceneNode} +SceneNodeDecorators +---- + +SceneNodeDecorators are decorators that can be added to the nodes of the scene to provide them with additional functions. + +Cura provides the following classes derived from the SceneNodeDecorator class: + 1. GroupDecorator + 2. ConvexHullDecorator + 3. SettingOverrideDecorator + 4. SliceableObjectDecorator + 5. BuildPlatedecorator + 6. LayerDataDecorator + 7. ZOffsetDecorator + 8. BlockSlicingDecorator + 9. GCodeListDecorator + +GroupDecorator +---- + +Whenever objects on the buildplate are grouped together, a new node is added in the scene as the parent of the grouped objects. Group nodes can be identified when traversing the SceneGraph by running the following: + +```python +node.callDecoration("isGroup") == True +``` + +Group nodes decorated by GroupDecorators are added in the scene either by reading project files which contain grouped objects, or when the user selects multiple objects and groups them together (Ctrl + G). + +Group nodes that are left with only one child are removed from the scene, making their only child a child of their parent. Group nodes without any remaining children are removed from the scene. + Layer Data ---- -- cgit v1.2.3