mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Fix review comments
CURA-7502
This commit is contained in:
parent
e23c1799b0
commit
d2c1dc6f6c
BIN
docs/scene/images/scene_example.jpg
Normal file
BIN
docs/scene/images/scene_example.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 196 KiB |
Binary file not shown.
Before Width: | Height: | Size: 493 KiB |
@ -24,7 +24,7 @@ Cura's scene has a few nodes that are always present, and a few nodes that are r
|
||||
|
||||
Let's take the following example Scene:
|
||||
|
||||

|
||||

|
||||
|
||||
The scene graph in this case is the following:
|
||||
|
||||
@ -99,20 +99,20 @@ 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 the group's parent. Group nodes without any remaining children are removed from the scene.
|
||||
Group nodes that are left with only one child are removed from the scene, making their only child a child of the group's parent. In addition, group nodes without any remaining children are removed from the scene.
|
||||
|
||||
ConvexHullDecorator
|
||||
----
|
||||
|
||||
As seen in the scene graph of the scene example, each CuraSceneNode that represents an object on the build plate is linked to a ConvexHullNode that provides the convex hull of the object as a shadow on the build plate. The ConvexHullDecorator is the link between these two nodes.
|
||||
As seen in the scene graph of the scene example, each CuraSceneNode that represents an object on the build plate is linked to a ConvexHullNode which is rendered as the object's shadow on the build plate. The ConvexHullDecorator is the link between these two nodes.
|
||||
|
||||
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
|
||||
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
|
||||
convex_hull_polygon = node.callDecoration("getConvexHull")
|
||||
convex_hull_polygon = object_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.
|
||||
The ConvexHullDecorator also provides convex hulls that include the head, the fans, and the adhesion of the object. These are primarily used and rendered when One-at-a-time mode is activated.
|
||||
|
||||
For more information on the functions added to the node by this decorator, visit the [ConvexHullDecorator.py](https://github.com/Ultimaker/Cura/blob/master/cura/Scene/ConvexHullDecorator.py).
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user