mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -06:00
Merge branch '2.1'
* 2.1: Do not round convex hull points to nearest int Use fdmprinter.json If we have no active machine instead of returning None JSON fix: max value of infill_sparse_thickness based on engine MAX_COMBINE_COUNT hardcoded value (CURA-1374)
This commit is contained in:
commit
d5bf9b3733
2 changed files with 6 additions and 3 deletions
|
@ -42,7 +42,7 @@ class ConvexHullJob(Job):
|
||||||
# Don't use data below 0.
|
# Don't use data below 0.
|
||||||
# TODO; We need a better check for this as this gives poor results for meshes with long edges.
|
# TODO; We need a better check for this as this gives poor results for meshes with long edges.
|
||||||
vertex_data = vertex_data[vertex_data[:,1] >= 0]
|
vertex_data = vertex_data[vertex_data[:,1] >= 0]
|
||||||
hull = Polygon(numpy.rint(vertex_data[:, [0, 2]]).astype(int))
|
hull = Polygon(vertex_data[:, [0, 2]])
|
||||||
|
|
||||||
# First, calculate the normal convex hull around the points
|
# First, calculate the normal convex hull around the points
|
||||||
hull = hull.getConvexHull()
|
hull = hull.getConvexHull()
|
||||||
|
|
|
@ -90,10 +90,13 @@ class CuraEngineBackend(Backend):
|
||||||
# \return list of commands and args / parameters.
|
# \return list of commands and args / parameters.
|
||||||
def getEngineCommand(self):
|
def getEngineCommand(self):
|
||||||
active_machine = Application.getInstance().getMachineManager().getActiveMachineInstance()
|
active_machine = Application.getInstance().getMachineManager().getActiveMachineInstance()
|
||||||
|
json_path = ""
|
||||||
if not active_machine:
|
if not active_machine:
|
||||||
return None
|
json_path = Resources.getPath(Resources.MachineDefinitions, "fdmprinter.json")
|
||||||
|
else:
|
||||||
|
json_path = active_machine.getMachineDefinition().getPath()
|
||||||
|
|
||||||
return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", active_machine.getMachineDefinition().getPath(), "-vv"]
|
return [Preferences.getInstance().getValue("backend/location"), "connect", "127.0.0.1:{0}".format(self._port), "-j", json_path, "-vv"]
|
||||||
|
|
||||||
## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished.
|
## Emitted when we get a message containing print duration and material amount. This also implies the slicing has finished.
|
||||||
# \param time The amount of time the print will take.
|
# \param time The amount of time the print will take.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue