mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Implement build volume checks on objects
Currently using a dynamic property on SceneNode since I have not found a better solution yet.
This commit is contained in:
parent
e8dc563c46
commit
4801233728
3 changed files with 15 additions and 3 deletions
|
@ -6,6 +6,7 @@ from UM.Mesh.MeshData import MeshData
|
|||
from UM.Mesh.MeshBuilder import MeshBuilder
|
||||
from UM.Math.Vector import Vector
|
||||
from UM.Math.Color import Color
|
||||
from UM.Math.AxisAlignedBox import AxisAlignedBox
|
||||
|
||||
import numpy
|
||||
|
||||
|
@ -27,6 +28,8 @@ class BuildVolume(SceneNode):
|
|||
self._disallowed_areas = []
|
||||
self._disallowed_area_mesh = None
|
||||
|
||||
self._calculate_aabb = False
|
||||
|
||||
def setWidth(self, width):
|
||||
self._width = width
|
||||
|
||||
|
@ -117,3 +120,5 @@ class BuildVolume(SceneNode):
|
|||
self._disallowed_area_mesh = mb.getData()
|
||||
else:
|
||||
self._disallowed_area_mesh = None
|
||||
|
||||
self._aabb = AxisAlignedBox(minimum = Vector(minW, minH, minD), maximum = Vector(maxW, maxH, maxD))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue