mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Added cutoff distance
This commit is contained in:
parent
377d43942a
commit
49e39d637c
3 changed files with 15 additions and 7 deletions
|
@ -19,6 +19,7 @@ from . import ConvexHullJob
|
|||
|
||||
import time
|
||||
import threading
|
||||
import copy
|
||||
|
||||
class PlatformPhysics:
|
||||
def __init__(self, controller, volume):
|
||||
|
@ -53,16 +54,21 @@ class PlatformPhysics:
|
|||
self._change_timer.start()
|
||||
continue
|
||||
|
||||
build_volume_bounding_box = copy.deepcopy(self._build_volume.getBoundingBox())
|
||||
build_volume_bounding_box.setBottom(-9001) # Ignore intersections with the bottom
|
||||
|
||||
# Mark the node as outside the build volume if the bounding box test fails.
|
||||
if self._build_volume.getBoundingBox().intersectsBox(bbox) != AxisAlignedBox.IntersectionResult.FullIntersection:
|
||||
if build_volume_bounding_box.intersectsBox(bbox) != AxisAlignedBox.IntersectionResult.FullIntersection:
|
||||
node._outside_buildarea = True
|
||||
else:
|
||||
node._outside_buildarea = False
|
||||
|
||||
# Move the node upwards if the bottom is below the build platform.
|
||||
# Move it downwards if bottom is above platform
|
||||
move_vector = Vector()
|
||||
if not Float.fuzzyCompare(bbox.bottom, 0.0):
|
||||
if bbox.bottom > 0:
|
||||
move_vector.setY(-bbox.bottom)
|
||||
#if not Float.fuzzyCompare(bbox.bottom, 0.0):
|
||||
# pass#move_vector.setY(-bbox.bottom)
|
||||
|
||||
# If there is no convex hull for the node, start calculating it and continue.
|
||||
if not node.getDecorator(ConvexHullDecorator):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue