mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-10-10 07:17:52 -06:00
Merge branch 'master' of github.com:ultimaker/Cura into per_object_settings
* 'master' of github.com:ultimaker/Cura: (49 commits) 15.10 restyling of the sidebar header 15.10 restyling of the sidebar header 15.10 restyling of the sidebar split magic_mesh)surface_mode into Normal, Surface, Both Added preference to disable automatic scale Removed unused import Added changeLog plugin Added missing ) Merging of mine and Jaimes work Removed font from rectangle JSON: git diff! removed triangles and grid top/bottom skin options (though they are available) Code style & switch to translation catalog 15.10 re-alignment of the toolbar 15.10 New Icons 15.10 restyling of the savebutton Area Added message asking about sending data to server Added exception handling for checking overlap. Fixed default button for general and view page Fixed double ID in qml Removed unused import ...
This commit is contained in:
commit
57b2ce4f3e
55 changed files with 1753 additions and 927 deletions
|
@ -46,7 +46,6 @@ import platform
|
|||
import sys
|
||||
import os
|
||||
import os.path
|
||||
import configparser
|
||||
import numpy
|
||||
numpy.seterr(all="ignore")
|
||||
|
||||
|
@ -96,6 +95,7 @@ class CuraApplication(QtApplication):
|
|||
Preferences.getInstance().addPreference("cura/recent_files", "")
|
||||
Preferences.getInstance().addPreference("cura/categories_expanded", "")
|
||||
Preferences.getInstance().addPreference("view/center_on_select", True)
|
||||
Preferences.getInstance().addPreference("mesh/scale_to_fit", True)
|
||||
|
||||
JobQueue.getInstance().jobFinished.connect(self._onJobFinished)
|
||||
|
||||
|
@ -191,6 +191,9 @@ class CuraApplication(QtApplication):
|
|||
|
||||
return super().event(event)
|
||||
|
||||
def getPrintInformation(self):
|
||||
return self._print_information
|
||||
|
||||
def registerObjects(self, engine):
|
||||
engine.rootContext().setContextProperty("Printer", self)
|
||||
self._print_information = PrintInformation.PrintInformation()
|
||||
|
@ -269,8 +272,10 @@ class CuraApplication(QtApplication):
|
|||
for i in range(count):
|
||||
new_node = SceneNode()
|
||||
new_node.setMeshData(node.getMeshData())
|
||||
|
||||
new_node.translate(Vector((i + 1) * node.getBoundingBox().width, node.getPosition().y, 0))
|
||||
new_node.setOrientation(node.getOrientation())
|
||||
new_node.setScale(node.getScale())
|
||||
new_node.translate(Vector((i + 1) * node.getBoundingBox().width, 0, 0))
|
||||
new_node.setSelectable(True)
|
||||
op.addOperation(AddSceneNodeOperation(new_node, node.getParent()))
|
||||
op.push()
|
||||
|
|
|
@ -6,7 +6,6 @@ from PyQt5.QtCore import QTimer
|
|||
from UM.Scene.SceneNode import SceneNode
|
||||
from UM.Scene.Iterator.BreadthFirstIterator import BreadthFirstIterator
|
||||
from UM.Operations.TranslateOperation import TranslateOperation
|
||||
from UM.Operations.ScaleToBoundsOperation import ScaleToBoundsOperation
|
||||
from UM.Math.Float import Float
|
||||
from UM.Math.Vector import Vector
|
||||
from UM.Math.AxisAlignedBox import AxisAlignedBox
|
||||
|
@ -107,11 +106,15 @@ class PlatformPhysics:
|
|||
continue
|
||||
|
||||
# Check to see if the bounding boxes intersect. If not, we can ignore the node as there is no way the hull intersects.
|
||||
if node.getBoundingBox().intersectsBox(other_node.getBoundingBox()) == AxisAlignedBox.IntersectionResult.NoIntersection:
|
||||
continue
|
||||
#if node.getBoundingBox().intersectsBox(other_node.getBoundingBox()) == AxisAlignedBox.IntersectionResult.NoIntersection:
|
||||
# continue
|
||||
|
||||
# Get the overlap distance for both convex hulls. If this returns None, there is no intersection.
|
||||
overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_node.callDecoration("getConvexHull"))
|
||||
try:
|
||||
overlap = node.callDecoration("getConvexHull").intersectsPolygon(other_node.callDecoration("getConvexHull"))
|
||||
except:
|
||||
overlap = None #It can sometimes occur that the caclulated convex hull has no size, in which case there is no overlap.
|
||||
|
||||
if overlap is None:
|
||||
continue
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue