mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07:00
CURA-4425 Avoid adding the center bounding box. Revert some previous changes.
This commit is contained in:
parent
433176d25a
commit
c432646908
1 changed files with 7 additions and 2 deletions
|
|
@ -24,10 +24,15 @@ class Snapshot:
|
||||||
camera = Camera("snapshot", root)
|
camera = Camera("snapshot", root)
|
||||||
|
|
||||||
# determine zoom and look at
|
# determine zoom and look at
|
||||||
bbox = AxisAlignedBox()
|
bbox = None
|
||||||
for node in DepthFirstIterator(root):
|
for node in DepthFirstIterator(root):
|
||||||
if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible():
|
if node.callDecoration("isSliceable") and node.getMeshData() and node.isVisible():
|
||||||
bbox = bbox + node.getBoundingBox()
|
if bbox is None:
|
||||||
|
bbox = node.getBoundingBox()
|
||||||
|
else:
|
||||||
|
bbox = bbox + node.getBoundingBox()
|
||||||
|
if bbox is None:
|
||||||
|
bbox = AxisAlignedBox()
|
||||||
|
|
||||||
look_at = bbox.center
|
look_at = bbox.center
|
||||||
size = max(bbox.width, bbox.height, bbox.depth * 0.5)
|
size = max(bbox.width, bbox.height, bbox.depth * 0.5)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue