mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-13 17:19:00 +08:00
Merge remote-tracking branch 'origin/master' into feature_model_list
This commit is contained in:
commit
28172c9ad2
139
cura/API/Machines.py
Normal file
139
cura/API/Machines.py
Normal file
@ -0,0 +1,139 @@
|
||||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
from typing import Optional, Dict, List, TYPE_CHECKING, Any
|
||||
from PyQt5.QtCore import QObject, pyqtSignal, pyqtSlot, pyqtProperty
|
||||
from UM.i18n import i18nCatalog
|
||||
from UM.Logger import Logger
|
||||
if TYPE_CHECKING:
|
||||
from cura.CuraApplication import CuraApplication
|
||||
from cura.PrinterOutput.PrinterOutputDevice import PrinterOutputDevice
|
||||
|
||||
i18n_catalog = i18nCatalog("cura")
|
||||
|
||||
## The account API provides a version-proof bridge to use Ultimaker Accounts
|
||||
#
|
||||
# Usage:
|
||||
# ```
|
||||
# from cura.API import CuraAPI
|
||||
# api = CuraAPI()
|
||||
# api.machines.addOutputDeviceToCurrentMachine()
|
||||
# ```
|
||||
|
||||
## Since Cura doesn't have a machine class, we're going to make a fake one to make our lives a
|
||||
# little bit easier.
|
||||
class Machine():
|
||||
def __init__(self) -> None:
|
||||
self.hostname = "" # type: str
|
||||
self.group_id = "" # type: str
|
||||
self.group_name = "" # type: str
|
||||
self.um_network_key = "" # type: str
|
||||
self.configuration = {} # type: Dict[str, Any]
|
||||
self.connection_types = [] # type: List[int]
|
||||
|
||||
class Machines(QObject):
|
||||
|
||||
def __init__(self, application: "CuraApplication", parent = None) -> None:
|
||||
super().__init__(parent)
|
||||
self._application = application
|
||||
|
||||
@pyqtSlot(result="QVariantMap")
|
||||
def getCurrentMachine(self) -> Machine:
|
||||
fake_machine = Machine() # type: Machine
|
||||
global_stack = self._application.getGlobalContainerStack()
|
||||
if global_stack:
|
||||
metadata = global_stack.getMetaData()
|
||||
if "group_id" in metadata:
|
||||
fake_machine.group_id = global_stack.getMetaDataEntry("group_id")
|
||||
if "group_name" in metadata:
|
||||
fake_machine.group_name = global_stack.getMetaDataEntry("group_name")
|
||||
if "um_network_key" in metadata:
|
||||
fake_machine.um_network_key = global_stack.getMetaDataEntry("um_network_key")
|
||||
|
||||
fake_machine.connection_types = global_stack.configuredConnectionTypes
|
||||
|
||||
return fake_machine
|
||||
|
||||
## Set the current machine's friendy name.
|
||||
# This is the same as "group name" since we use "group" and "current machine" interchangeably.
|
||||
# TODO: Maybe make this "friendly name" to distinguish from "hostname"?
|
||||
@pyqtSlot(str)
|
||||
def setCurrentMachineGroupName(self, group_name: str) -> None:
|
||||
Logger.log("d", "Attempting to set the group name of the active machine to %s", group_name)
|
||||
global_stack = self._application.getGlobalContainerStack()
|
||||
if global_stack:
|
||||
# Update a GlobalStacks in the same group with the new group name.
|
||||
group_id = global_stack.getMetaDataEntry("group_id")
|
||||
machine_manager = self._application.getMachineManager()
|
||||
for machine in machine_manager.getMachinesInGroup(group_id):
|
||||
machine.setMetaDataEntry("group_name", group_name)
|
||||
|
||||
# Set the default value for "hidden", which is used when you have a group with multiple types of printers
|
||||
global_stack.setMetaDataEntry("hidden", False)
|
||||
|
||||
## Set the current machine's configuration from an (optional) output device.
|
||||
# If no output device is given, the first one available on the machine will be used.
|
||||
# NOTE: Group and machine are used interchangeably.
|
||||
# NOTE: This doesn't seem to be used anywhere. Maybe delete?
|
||||
@pyqtSlot(QObject)
|
||||
def updateCurrentMachineConfiguration(self, output_device: Optional["PrinterOutputDevice"]) -> None:
|
||||
|
||||
if output_device is None:
|
||||
machine_manager = self._application.getMachineManager()
|
||||
output_device = machine_manager.printerOutputDevices[0]
|
||||
|
||||
hotend_ids = output_device.hotendIds
|
||||
for index in range(len(hotend_ids)):
|
||||
output_device.hotendIdChanged.emit(index, hotend_ids[index])
|
||||
|
||||
material_ids = output_device.materialIds
|
||||
for index in range(len(material_ids)):
|
||||
output_device.materialIdChanged.emit(index, material_ids[index])
|
||||
|
||||
## Add an output device to the current machine.
|
||||
# In practice, this means:
|
||||
# - Setting the output device's network key in the current machine's metadata
|
||||
# - Adding the output device's connection type to the current machine's configured connection
|
||||
# types.
|
||||
# TODO: CHANGE TO HOSTNAME
|
||||
@pyqtSlot(QObject)
|
||||
def addOutputDeviceToCurrentMachine(self, output_device: "PrinterOutputDevice") -> None:
|
||||
if not output_device:
|
||||
return
|
||||
Logger.log("d",
|
||||
"Attempting to set the network key of the active machine to %s",
|
||||
output_device.key)
|
||||
global_stack = self._application.getGlobalContainerStack()
|
||||
if not global_stack:
|
||||
return
|
||||
metadata = global_stack.getMetaData()
|
||||
|
||||
# Global stack already had a connection, but it's changed.
|
||||
if "um_network_key" in metadata:
|
||||
old_network_key = metadata["um_network_key"]
|
||||
|
||||
# Since we might have a bunch of hidden stacks, we also need to change it there.
|
||||
metadata_filter = {"um_network_key": old_network_key}
|
||||
containers = self._application.getContainerRegistry().findContainerStacks(
|
||||
type = "machine", **metadata_filter)
|
||||
for container in containers:
|
||||
container.setMetaDataEntry("um_network_key", output_device.key)
|
||||
|
||||
# Delete old authentication data.
|
||||
Logger.log("d", "Removing old authentication id %s for device %s",
|
||||
global_stack.getMetaDataEntry("network_authentication_id", None),
|
||||
output_device.key)
|
||||
|
||||
container.removeMetaDataEntry("network_authentication_id")
|
||||
container.removeMetaDataEntry("network_authentication_key")
|
||||
|
||||
# Ensure that these containers do know that they are configured for the given
|
||||
# connection type (can be more than one type; e.g. LAN & Cloud)
|
||||
container.addConfiguredConnectionType(output_device.connectionType.value)
|
||||
|
||||
else: # Global stack didn't have a connection yet, configure it.
|
||||
global_stack.setMetaDataEntry("um_network_key", output_device.key)
|
||||
global_stack.addConfiguredConnectionType(output_device.connectionType.value)
|
||||
|
||||
return None
|
||||
|
@ -6,6 +6,7 @@ from PyQt5.QtCore import QObject, pyqtProperty
|
||||
|
||||
from cura.API.Backups import Backups
|
||||
from cura.API.Interface import Interface
|
||||
from cura.API.Machines import Machines
|
||||
from cura.API.Account import Account
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@ -44,6 +45,9 @@ class CuraAPI(QObject):
|
||||
# Backups API
|
||||
self._backups = Backups(self._application)
|
||||
|
||||
# Machines API
|
||||
self._machines = Machines(self._application)
|
||||
|
||||
# Interface API
|
||||
self._interface = Interface(self._application)
|
||||
|
||||
@ -58,6 +62,10 @@ class CuraAPI(QObject):
|
||||
def backups(self) -> "Backups":
|
||||
return self._backups
|
||||
|
||||
@pyqtProperty(QObject)
|
||||
def machines(self) -> "Machines":
|
||||
return self._machines
|
||||
|
||||
@property
|
||||
def interface(self) -> "Interface":
|
||||
return self._interface
|
||||
|
@ -1,4 +1,4 @@
|
||||
import warnings
|
||||
warnings.warn("Importing cura.PrinterOutput.PrintJobOutputModel has been deprecated since 4.1, use cura.PrinterOutput.Models.PrintJobOutputModel inststad", DeprecationWarning, stacklevel=2)
|
||||
warnings.warn("Importing cura.PrinterOutput.PrintJobOutputModel has been deprecated since 4.1, use cura.PrinterOutput.Models.PrintJobOutputModel instead", DeprecationWarning, stacklevel=2)
|
||||
# We moved the the models to one submodule deeper
|
||||
from cura.PrinterOutput.Models.PrintJobOutputModel import PrintJobOutputModel
|
@ -1,4 +1,4 @@
|
||||
import warnings
|
||||
warnings.warn("Importing cura.PrinterOutput.PrinterOutputModel has been deprecated since 4.1, use cura.PrinterOutput.Models.PrinterOutputModel inststad", DeprecationWarning, stacklevel=2)
|
||||
warnings.warn("Importing cura.PrinterOutput.PrinterOutputModel has been deprecated since 4.1, use cura.PrinterOutput.Models.PrinterOutputModel instead", DeprecationWarning, stacklevel=2)
|
||||
# We moved the the models to one submodule deeper
|
||||
from cura.PrinterOutput.Models.PrinterOutputModel import PrinterOutputModel
|
@ -1,4 +1,4 @@
|
||||
import warnings
|
||||
warnings.warn("Importing cura.PrinterOutputDevice has been deprecated since 4.1, use cura.PrinterOutput.PrinterOutputDevice inststad", DeprecationWarning, stacklevel=2)
|
||||
warnings.warn("Importing cura.PrinterOutputDevice has been deprecated since 4.1, use cura.PrinterOutput.PrinterOutputDevice instead", DeprecationWarning, stacklevel=2)
|
||||
# We moved the PrinterOutput device to it's own submodule.
|
||||
from cura.PrinterOutput.PrinterOutputDevice import PrinterOutputDevice, ConnectionState
|
@ -394,6 +394,7 @@ class MachineManager(QObject):
|
||||
@pyqtSlot(str)
|
||||
@pyqtSlot(str, str)
|
||||
def addMachine(self, definition_id: str, name: Optional[str] = None) -> None:
|
||||
Logger.log("i", "Trying to add a machine with the definition id [%s]", definition_id)
|
||||
if name is None:
|
||||
definitions = CuraContainerRegistry.getInstance().findDefinitionContainers(id = definition_id)
|
||||
if definitions:
|
||||
@ -464,6 +465,7 @@ class MachineManager(QObject):
|
||||
# \param key \type{str} the name of the key to delete
|
||||
@pyqtSlot(str)
|
||||
def clearUserSettingAllCurrentStacks(self, key: str) -> None:
|
||||
Logger.log("i", "Clearing the setting [%s] from all stacks", key)
|
||||
if not self._global_container_stack:
|
||||
return
|
||||
|
||||
@ -786,6 +788,7 @@ class MachineManager(QObject):
|
||||
|
||||
@pyqtSlot(str)
|
||||
def removeMachine(self, machine_id: str) -> None:
|
||||
Logger.log("i", "Attempting to remove a machine with the id [%s]", machine_id)
|
||||
# If the machine that is being removed is the currently active machine, set another machine as the active machine.
|
||||
activate_new_machine = (self._global_container_stack and self._global_container_stack.getId() == machine_id)
|
||||
|
||||
@ -1263,8 +1266,8 @@ class MachineManager(QObject):
|
||||
if self._global_container_stack is not None:
|
||||
if Util.parseBool(self._global_container_stack.getMetaDataEntry("has_materials", False)):
|
||||
for position, extruder in self._global_container_stack.extruders.items():
|
||||
if extruder.isEnabled and not extruder.material.getMetaDataEntry("compatible"):
|
||||
return False
|
||||
if not extruder.isEnabled:
|
||||
continue
|
||||
if not extruder.material.getMetaDataEntry("compatible"):
|
||||
return False
|
||||
return True
|
||||
@ -1273,7 +1276,7 @@ class MachineManager(QObject):
|
||||
def _updateQualityWithMaterial(self, *args: Any) -> None:
|
||||
if self._global_container_stack is None:
|
||||
return
|
||||
Logger.log("i", "Updating quality/quality_changes due to material change")
|
||||
Logger.log("d", "Updating quality/quality_changes due to material change")
|
||||
current_quality_type = None
|
||||
if self._current_quality_group:
|
||||
current_quality_type = self._current_quality_group.quality_type
|
||||
@ -1354,6 +1357,7 @@ class MachineManager(QObject):
|
||||
# instance with the same network key.
|
||||
@pyqtSlot(str)
|
||||
def switchPrinterType(self, machine_name: str) -> None:
|
||||
Logger.log("i", "Attempting to switch the printer type to [%s]", machine_name)
|
||||
# Don't switch if the user tries to change to the same type of printer
|
||||
if self._global_container_stack is None or self.activeMachineDefinitionName == machine_name:
|
||||
return
|
||||
|
@ -1,9 +1,11 @@
|
||||
# Copyright (c) 2018 Ultimaker B.V.
|
||||
# Copyright (c) 2019 Ultimaker B.V.
|
||||
# Cura is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import copy
|
||||
|
||||
from UM.Settings.constant_instance_containers import EMPTY_CONTAINER_ID, empty_container
|
||||
from UM.i18n import i18nCatalog
|
||||
catalog = i18nCatalog("cura")
|
||||
|
||||
|
||||
# Empty definition changes
|
||||
@ -28,7 +30,7 @@ empty_material_container.setMetaDataEntry("type", "material")
|
||||
EMPTY_QUALITY_CONTAINER_ID = "empty_quality"
|
||||
empty_quality_container = copy.deepcopy(empty_container)
|
||||
empty_quality_container.setMetaDataEntry("id", EMPTY_QUALITY_CONTAINER_ID)
|
||||
empty_quality_container.setName("Not Supported")
|
||||
empty_quality_container.setName(catalog.i18nc("@info:not supported profile", "Not supported"))
|
||||
empty_quality_container.setMetaDataEntry("quality_type", "not_supported")
|
||||
empty_quality_container.setMetaDataEntry("type", "quality")
|
||||
empty_quality_container.setMetaDataEntry("supported", False)
|
||||
|
@ -207,7 +207,7 @@ class CuraEngineBackend(QObject, Backend):
|
||||
self._createSocket()
|
||||
|
||||
if self._process_layers_job is not None: # We were processing layers. Stop that, the layers are going to change soon.
|
||||
Logger.log("d", "Aborting process layers job...")
|
||||
Logger.log("i", "Aborting process layers job...")
|
||||
self._process_layers_job.abort()
|
||||
self._process_layers_job = None
|
||||
|
||||
@ -222,7 +222,7 @@ class CuraEngineBackend(QObject, Backend):
|
||||
|
||||
## Perform a slice of the scene.
|
||||
def slice(self) -> None:
|
||||
Logger.log("d", "Starting to slice...")
|
||||
Logger.log("i", "Starting to slice...")
|
||||
self._slice_start_time = time()
|
||||
if not self._build_plates_to_be_sliced:
|
||||
self.processingProgress.emit(1.0)
|
||||
@ -517,9 +517,6 @@ class CuraEngineBackend(QObject, Backend):
|
||||
self._build_plates_to_be_sliced.append(build_plate_number)
|
||||
self.printDurationMessage.emit(source_build_plate_number, {}, [])
|
||||
self.processingProgress.emit(0.0)
|
||||
self.setState(BackendState.NotStarted)
|
||||
# if not self._use_timer:
|
||||
# With manually having to slice, we want to clear the old invalid layer data.
|
||||
self._clearLayerData(build_plate_changed)
|
||||
|
||||
self._invokeSlice()
|
||||
@ -563,10 +560,10 @@ class CuraEngineBackend(QObject, Backend):
|
||||
|
||||
## Convenient function: mark everything to slice, emit state and clear layer data
|
||||
def needsSlicing(self) -> None:
|
||||
self.determineAutoSlicing()
|
||||
self.stopSlicing()
|
||||
self.markSliceAll()
|
||||
self.processingProgress.emit(0.0)
|
||||
self.setState(BackendState.NotStarted)
|
||||
if not self._use_timer:
|
||||
# With manually having to slice, we want to clear the old invalid layer data.
|
||||
self._clearLayerData()
|
||||
|
@ -1,6 +1,9 @@
|
||||
[shaders]
|
||||
vertex =
|
||||
uniform highp mat4 u_modelViewProjectionMatrix;
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewMatrix;
|
||||
uniform highp mat4 u_projectionMatrix;
|
||||
|
||||
uniform lowp float u_active_extruder;
|
||||
uniform lowp float u_shade_factor;
|
||||
uniform highp int u_layer_view_type;
|
||||
@ -16,7 +19,7 @@ vertex =
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_modelViewProjectionMatrix * a_vertex;
|
||||
gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
|
||||
// shade the color depending on the extruder index
|
||||
v_color = a_color;
|
||||
// 8 and 9 are travel moves
|
||||
@ -76,7 +79,10 @@ fragment =
|
||||
|
||||
vertex41core =
|
||||
#version 410
|
||||
uniform highp mat4 u_modelViewProjectionMatrix;
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewMatrix;
|
||||
uniform highp mat4 u_projectionMatrix;
|
||||
|
||||
uniform lowp float u_active_extruder;
|
||||
uniform lowp float u_shade_factor;
|
||||
uniform highp int u_layer_view_type;
|
||||
@ -92,7 +98,7 @@ vertex41core =
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_modelViewProjectionMatrix * a_vertex;
|
||||
gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
|
||||
v_color = a_color;
|
||||
if ((a_line_type != 8) && (a_line_type != 9)) {
|
||||
v_color = (a_extruder == u_active_extruder) ? v_color : vec4(u_shade_factor * v_color.rgb, v_color.a);
|
||||
@ -154,7 +160,9 @@ u_show_skin = 1
|
||||
u_show_infill = 1
|
||||
|
||||
[bindings]
|
||||
u_modelViewProjectionMatrix = model_view_projection_matrix
|
||||
u_modelMatrix = model_matrix
|
||||
u_viewMatrix = view_matrix
|
||||
u_projectionMatrix = projection_matrix
|
||||
|
||||
[attributes]
|
||||
a_vertex = vertex
|
||||
|
@ -1,10 +1,10 @@
|
||||
[shaders]
|
||||
vertex41core =
|
||||
#version 410
|
||||
uniform highp mat4 u_modelViewProjectionMatrix;
|
||||
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewProjectionMatrix;
|
||||
uniform highp mat4 u_viewMatrix;
|
||||
uniform highp mat4 u_projectionMatrix;
|
||||
|
||||
uniform lowp float u_active_extruder;
|
||||
uniform lowp float u_max_feedrate;
|
||||
uniform lowp float u_min_feedrate;
|
||||
@ -104,7 +104,10 @@ vertex41core =
|
||||
geometry41core =
|
||||
#version 410
|
||||
|
||||
uniform highp mat4 u_viewProjectionMatrix;
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewMatrix;
|
||||
uniform highp mat4 u_projectionMatrix;
|
||||
|
||||
uniform int u_show_travel_moves;
|
||||
uniform int u_show_helpers;
|
||||
uniform int u_show_skin;
|
||||
@ -136,6 +139,8 @@ geometry41core =
|
||||
|
||||
void main()
|
||||
{
|
||||
highp mat4 viewProjectionMatrix = u_projectionMatrix * u_viewMatrix;
|
||||
|
||||
vec4 g_vertex_delta;
|
||||
vec3 g_vertex_normal_horz; // horizontal and vertical in respect to layers
|
||||
vec4 g_vertex_offset_horz; // vec4 to match gl_in[x].gl_Position
|
||||
@ -183,65 +188,83 @@ geometry41core =
|
||||
g_vertex_offset_vert = vec4(g_vertex_normal_vert * size_y, 0.0);
|
||||
|
||||
if ((v_line_type[0] == 8) || (v_line_type[0] == 9)) {
|
||||
vec4 va_head = viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head + g_vertex_offset_vert);
|
||||
vec4 va_up = viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert);
|
||||
vec4 va_down = viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert);
|
||||
vec4 vb_head = viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz_head + g_vertex_offset_vert);
|
||||
vec4 vb_down = viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert);
|
||||
vec4 vb_up = viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert);
|
||||
|
||||
// Travels: flat plane with pointy ends
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz_head + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_up);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_head);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_down);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_up);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_down);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_up);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_head);
|
||||
//And reverse so that the line is also visible from the back side.
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_up);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_down);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_up);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_down);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_head);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_up);
|
||||
|
||||
EndPrimitive();
|
||||
} else {
|
||||
vec4 va_m_horz = viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz);
|
||||
vec4 vb_m_horz = viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz);
|
||||
vec4 va_p_vert = viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_vert);
|
||||
vec4 vb_p_vert = viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_vert);
|
||||
vec4 va_p_horz = viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz);
|
||||
vec4 vb_p_horz = viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz);
|
||||
vec4 va_m_vert = viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_vert);
|
||||
vec4 vb_m_vert = viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_vert);
|
||||
vec4 va_head = viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head);
|
||||
vec4 vb_head = viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz_head);
|
||||
|
||||
// All normal lines are rendered as 3d tubes.
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, va_m_horz);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, vb_m_horz);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_p_vert);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_p_vert);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, va_p_horz);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, vb_p_horz);
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_vert, va_m_vert);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_vert, vb_m_vert);
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, va_m_horz);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, vb_m_horz);
|
||||
|
||||
EndPrimitive();
|
||||
|
||||
// left side
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz_head, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, va_m_horz);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_p_vert);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz_head, va_head);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, va_p_horz);
|
||||
|
||||
EndPrimitive();
|
||||
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz_head, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, va_p_horz);
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_vert, va_m_vert);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz_head, va_head);
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, va_m_horz);
|
||||
|
||||
EndPrimitive();
|
||||
|
||||
// right side
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz_head, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz_head));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, vb_p_horz);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_p_vert);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz_head, vb_head);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, vb_m_horz);
|
||||
|
||||
EndPrimitive();
|
||||
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz_head, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz_head));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, vb_m_horz);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_vert, vb_m_vert);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz_head, vb_head);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, vb_p_horz);
|
||||
|
||||
EndPrimitive();
|
||||
}
|
||||
@ -301,9 +324,9 @@ u_min_thickness = 0
|
||||
u_max_thickness = 1
|
||||
|
||||
[bindings]
|
||||
u_modelViewProjectionMatrix = model_view_projection_matrix
|
||||
u_modelMatrix = model_matrix
|
||||
u_viewProjectionMatrix = view_projection_matrix
|
||||
u_viewMatrix = view_matrix
|
||||
u_projectionMatrix = projection_matrix
|
||||
u_normalMatrix = normal_matrix
|
||||
u_lightPosition = light_0_position
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
[shaders]
|
||||
vertex41core =
|
||||
#version 410
|
||||
uniform highp mat4 u_modelViewProjectionMatrix;
|
||||
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewProjectionMatrix;
|
||||
uniform highp mat4 u_viewMatrix;
|
||||
uniform highp mat4 u_projectionMatrix;
|
||||
|
||||
uniform lowp float u_active_extruder;
|
||||
uniform lowp vec4 u_extruder_opacity; // currently only for max 4 extruders, others always visible
|
||||
|
||||
@ -58,7 +58,10 @@ vertex41core =
|
||||
geometry41core =
|
||||
#version 410
|
||||
|
||||
uniform highp mat4 u_viewProjectionMatrix;
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewMatrix;
|
||||
uniform highp mat4 u_projectionMatrix;
|
||||
|
||||
uniform int u_show_travel_moves;
|
||||
uniform int u_show_helpers;
|
||||
uniform int u_show_skin;
|
||||
@ -90,6 +93,8 @@ geometry41core =
|
||||
|
||||
void main()
|
||||
{
|
||||
highp mat4 viewProjectionMatrix = u_projectionMatrix * u_viewMatrix;
|
||||
|
||||
vec4 g_vertex_delta;
|
||||
vec3 g_vertex_normal_horz; // horizontal and vertical in respect to layers
|
||||
vec4 g_vertex_offset_horz; // vec4 to match gl_in[x].gl_Position
|
||||
@ -137,65 +142,83 @@ geometry41core =
|
||||
g_vertex_offset_vert = vec4(g_vertex_normal_vert * size_y, 0.0);
|
||||
|
||||
if ((v_line_type[0] == 8) || (v_line_type[0] == 9)) {
|
||||
vec4 va_head = viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head + g_vertex_offset_vert);
|
||||
vec4 va_up = viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert);
|
||||
vec4 va_down = viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert);
|
||||
vec4 vb_head = viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz_head + g_vertex_offset_vert);
|
||||
vec4 vb_down = viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert);
|
||||
vec4 vb_up = viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert);
|
||||
|
||||
// Travels: flat plane with pointy ends
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz_head + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_up);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_head);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_down);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_up);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_down);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_up);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_head);
|
||||
//And reverse so that the line is also visible from the back side.
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_up);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_down);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_up);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_down);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_head);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_up);
|
||||
|
||||
EndPrimitive();
|
||||
} else {
|
||||
vec4 va_m_horz = viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz);
|
||||
vec4 vb_m_horz = viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz);
|
||||
vec4 va_p_vert = viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_vert);
|
||||
vec4 vb_p_vert = viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_vert);
|
||||
vec4 va_p_horz = viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz);
|
||||
vec4 vb_p_horz = viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz);
|
||||
vec4 va_m_vert = viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_vert);
|
||||
vec4 vb_m_vert = viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_vert);
|
||||
vec4 va_head = viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head);
|
||||
vec4 vb_head = viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz_head);
|
||||
|
||||
// All normal lines are rendered as 3d tubes.
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, va_m_horz);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, vb_m_horz);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_p_vert);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_p_vert);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, va_p_horz);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, vb_p_horz);
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_vert, va_m_vert);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_vert, vb_m_vert);
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, va_m_horz);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, vb_m_horz);
|
||||
|
||||
EndPrimitive();
|
||||
|
||||
// left side
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz_head, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, va_m_horz);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_vert, va_p_vert);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz_head, va_head);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, va_p_horz);
|
||||
|
||||
EndPrimitive();
|
||||
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz_head, u_viewProjectionMatrix * (gl_in[0].gl_Position + g_vertex_offset_horz_head));
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[0].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz, va_p_horz);
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_vert, va_m_vert);
|
||||
myEmitVertex(v_vertex[0], v_color[0], g_vertex_normal_horz_head, va_head);
|
||||
myEmitVertex(v_vertex[0], v_color[0], -g_vertex_normal_horz, va_m_horz);
|
||||
|
||||
EndPrimitive();
|
||||
|
||||
// right side
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz_head, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz_head));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, vb_p_horz);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_vert, vb_p_vert);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz_head, vb_head);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, vb_m_horz);
|
||||
|
||||
EndPrimitive();
|
||||
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_vert, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_vert));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz_head, u_viewProjectionMatrix * (gl_in[1].gl_Position - g_vertex_offset_horz_head));
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, u_viewProjectionMatrix * (gl_in[1].gl_Position + g_vertex_offset_horz));
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz, vb_m_horz);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_vert, vb_m_vert);
|
||||
myEmitVertex(v_vertex[1], v_color[1], -g_vertex_normal_horz_head, vb_head);
|
||||
myEmitVertex(v_vertex[1], v_color[1], g_vertex_normal_horz, vb_p_horz);
|
||||
|
||||
EndPrimitive();
|
||||
}
|
||||
@ -246,9 +269,9 @@ u_show_skin = 1
|
||||
u_show_infill = 1
|
||||
|
||||
[bindings]
|
||||
u_modelViewProjectionMatrix = model_view_projection_matrix
|
||||
u_modelMatrix = model_matrix
|
||||
u_viewProjectionMatrix = view_projection_matrix
|
||||
u_viewMatrix = view_matrix
|
||||
u_projectionMatrix = projection_matrix
|
||||
u_normalMatrix = normal_matrix
|
||||
u_lightPosition = light_0_position
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
[shaders]
|
||||
vertex =
|
||||
uniform highp mat4 u_modelViewProjectionMatrix;
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewMatrix;
|
||||
uniform highp mat4 u_projectionMatrix;
|
||||
|
||||
uniform lowp float u_active_extruder;
|
||||
uniform lowp float u_shade_factor;
|
||||
uniform highp int u_layer_view_type;
|
||||
@ -16,7 +19,7 @@ vertex =
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_modelViewProjectionMatrix * a_vertex;
|
||||
gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
|
||||
// shade the color depending on the extruder index
|
||||
v_color = vec4(0.4, 0.4, 0.4, 0.9); // default color for not current layer;
|
||||
// 8 and 9 are travel moves
|
||||
@ -80,7 +83,10 @@ fragment =
|
||||
|
||||
vertex41core =
|
||||
#version 410
|
||||
uniform highp mat4 u_modelViewProjectionMatrix;
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewMatrix;
|
||||
uniform highp mat4 u_projectionMatrix;
|
||||
|
||||
uniform lowp float u_active_extruder;
|
||||
uniform lowp float u_shade_factor;
|
||||
uniform highp int u_layer_view_type;
|
||||
@ -96,7 +102,7 @@ vertex41core =
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_modelViewProjectionMatrix * a_vertex;
|
||||
gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
|
||||
v_color = vec4(0.4, 0.4, 0.4, 0.9); // default color for not current layer
|
||||
// if ((a_line_type != 8) && (a_line_type != 9)) {
|
||||
// v_color = (a_extruder == u_active_extruder) ? v_color : vec4(u_shade_factor * v_color.rgb, v_color.a);
|
||||
@ -159,7 +165,9 @@ u_show_skin = 1
|
||||
u_show_infill = 1
|
||||
|
||||
[bindings]
|
||||
u_modelViewProjectionMatrix = model_view_projection_matrix
|
||||
u_modelMatrix = model_matrix
|
||||
u_viewMatrix = view_matrix
|
||||
u_projectionMatrix = projection_matrix
|
||||
|
||||
[attributes]
|
||||
a_vertex = vertex
|
||||
|
@ -278,7 +278,7 @@ class Toolbox(QObject, Extension):
|
||||
for plugin_id in old_plugin_ids:
|
||||
# Neither the installed packages nor the packages that are scheduled to remove are old plugins
|
||||
if plugin_id not in installed_package_ids and plugin_id not in scheduled_to_remove_package_ids:
|
||||
Logger.log("i", "Found a plugin that was installed with the old plugin browser: %s", plugin_id)
|
||||
Logger.log("d", "Found a plugin that was installed with the old plugin browser: %s", plugin_id)
|
||||
|
||||
old_metadata = self._plugin_registry.getMetaData(plugin_id)
|
||||
new_metadata = self._convertPluginMetadata(old_metadata)
|
||||
@ -526,7 +526,7 @@ class Toolbox(QObject, Extension):
|
||||
# Make API Calls
|
||||
# --------------------------------------------------------------------------
|
||||
def _makeRequestByType(self, request_type: str) -> None:
|
||||
Logger.log("i", "Requesting %s metadata from server.", request_type)
|
||||
Logger.log("d", "Requesting %s metadata from server.", request_type)
|
||||
request = QNetworkRequest(self._request_urls[request_type])
|
||||
for header_name, header_value in self._request_headers:
|
||||
request.setRawHeader(header_name, header_value)
|
||||
|
@ -27,13 +27,14 @@ Cura.MachineAction
|
||||
{
|
||||
var printerKey = base.selectedDevice.key
|
||||
var printerName = base.selectedDevice.name // TODO To change when the groups have a name
|
||||
if (manager.getStoredKey() != printerKey)
|
||||
if (Cura.API.machines.getCurrentMachine().um_network_key != printerKey) // TODO: change to hostname
|
||||
{
|
||||
// Check if there is another instance with the same key
|
||||
if (!manager.existsKey(printerKey))
|
||||
{
|
||||
manager.associateActiveMachineWithPrinterDevice(base.selectedDevice)
|
||||
manager.setGroupName(printerName) // TODO To change when the groups have a name
|
||||
Cura.API.machines.addOutputDeviceToCurrentMachine(base.selectedDevice)
|
||||
Cura.API.machines.setCurrentMachineGroupName(printerName) // TODO To change when the groups have a name
|
||||
manager.refreshConnections()
|
||||
completed()
|
||||
}
|
||||
else
|
||||
@ -156,7 +157,7 @@ Cura.MachineAction
|
||||
var selectedKey = manager.getLastManualEntryKey()
|
||||
// If there is no last manual entry key, then we select the stored key (if any)
|
||||
if (selectedKey == "")
|
||||
selectedKey = manager.getStoredKey()
|
||||
selectedKey = Cura.API.machines.getCurrentMachine().um_network_key // TODO: change to host name
|
||||
for(var i = 0; i < model.length; i++) {
|
||||
if(model[i].key == selectedKey)
|
||||
{
|
||||
|
@ -30,6 +30,21 @@ UM.Dialog
|
||||
OutputDevice.forceSendJob(printer.activePrintJob.key)
|
||||
overrideConfirmationDialog.close()
|
||||
}
|
||||
visible:
|
||||
{
|
||||
if (!printer || !printer.activePrintJob)
|
||||
{
|
||||
return true
|
||||
}
|
||||
|
||||
var canOverride = false
|
||||
for (var i = 0; i < printer.activePrintJob.configurationChanges.length; i++)
|
||||
{
|
||||
var change = printer.activePrintJob.configurationChanges[i]
|
||||
canOverride = canOverride || change.typeOfChange === "material_change";
|
||||
}
|
||||
return canOverride
|
||||
}
|
||||
},
|
||||
Button
|
||||
{
|
||||
|
@ -34,7 +34,10 @@ class DiscoverUM3Action(MachineAction):
|
||||
|
||||
self.__additional_components_view = None #type: Optional[QObject]
|
||||
|
||||
CuraApplication.getInstance().engineCreatedSignal.connect(self._createAdditionalComponentsView)
|
||||
self._application = CuraApplication.getInstance()
|
||||
self._api = self._application.getCuraAPI()
|
||||
|
||||
self._application.engineCreatedSignal.connect(self._createAdditionalComponentsView)
|
||||
|
||||
self._last_zero_conf_event_time = time.time() #type: float
|
||||
|
||||
@ -50,7 +53,7 @@ class DiscoverUM3Action(MachineAction):
|
||||
def startDiscovery(self):
|
||||
if not self._network_plugin:
|
||||
Logger.log("d", "Starting device discovery.")
|
||||
self._network_plugin = CuraApplication.getInstance().getOutputDeviceManager().getOutputDevicePlugin("UM3NetworkPrinting")
|
||||
self._network_plugin = self._application.getOutputDeviceManager().getOutputDevicePlugin("UM3NetworkPrinting")
|
||||
self._network_plugin.discoveredDevicesChanged.connect(self._onDeviceDiscoveryChanged)
|
||||
self.discoveredDevicesChanged.emit()
|
||||
|
||||
@ -105,63 +108,27 @@ class DiscoverUM3Action(MachineAction):
|
||||
else:
|
||||
return []
|
||||
|
||||
@pyqtSlot(str)
|
||||
def setGroupName(self, group_name: str) -> None:
|
||||
Logger.log("d", "Attempting to set the group name of the active machine to %s", group_name)
|
||||
global_container_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
if global_container_stack:
|
||||
# Update a GlobalStacks in the same group with the new group name.
|
||||
group_id = global_container_stack.getMetaDataEntry("group_id")
|
||||
machine_manager = CuraApplication.getInstance().getMachineManager()
|
||||
for machine in machine_manager.getMachinesInGroup(group_id):
|
||||
machine.setMetaDataEntry("group_name", group_name)
|
||||
|
||||
# Set the default value for "hidden", which is used when you have a group with multiple types of printers
|
||||
global_container_stack.setMetaDataEntry("hidden", False)
|
||||
|
||||
@pyqtSlot()
|
||||
def refreshConnections(self) -> None:
|
||||
if self._network_plugin:
|
||||
# Ensure that the connection states are refreshed.
|
||||
self._network_plugin.refreshConnections()
|
||||
|
||||
# Associates the currently active machine with the given printer device. The network connection information will be
|
||||
# stored into the metadata of the currently active machine.
|
||||
@pyqtSlot(QObject)
|
||||
def associateActiveMachineWithPrinterDevice(self, printer_device: Optional["PrinterOutputDevice"]) -> None:
|
||||
if self._network_plugin:
|
||||
self._network_plugin.associateActiveMachineWithPrinterDevice(printer_device)
|
||||
|
||||
@pyqtSlot(result = str)
|
||||
def getStoredKey(self) -> str:
|
||||
global_container_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
if global_container_stack:
|
||||
meta_data = global_container_stack.getMetaData()
|
||||
if "um_network_key" in meta_data:
|
||||
return global_container_stack.getMetaDataEntry("um_network_key")
|
||||
|
||||
return ""
|
||||
|
||||
# TODO: Improve naming
|
||||
# TODO: CHANGE TO HOSTNAME
|
||||
@pyqtSlot(result = str)
|
||||
def getLastManualEntryKey(self) -> str:
|
||||
if self._network_plugin:
|
||||
return self._network_plugin.getLastManualDevice()
|
||||
return ""
|
||||
|
||||
# TODO: Better naming needed. Exists where? On the current machine? On all machines?
|
||||
# TODO: CHANGE TO HOSTNAME
|
||||
@pyqtSlot(str, result = bool)
|
||||
def existsKey(self, key: str) -> bool:
|
||||
metadata_filter = {"um_network_key": key}
|
||||
containers = CuraContainerRegistry.getInstance().findContainerStacks(type="machine", **metadata_filter)
|
||||
return bool(containers)
|
||||
|
||||
@pyqtSlot()
|
||||
def loadConfigurationFromPrinter(self) -> None:
|
||||
machine_manager = CuraApplication.getInstance().getMachineManager()
|
||||
hotend_ids = machine_manager.printerOutputDevices[0].hotendIds
|
||||
for index in range(len(hotend_ids)):
|
||||
machine_manager.printerOutputDevices[0].hotendIdChanged.emit(index, hotend_ids[index])
|
||||
material_ids = machine_manager.printerOutputDevices[0].materialIds
|
||||
for index in range(len(material_ids)):
|
||||
machine_manager.printerOutputDevices[0].materialIdChanged.emit(index, material_ids[index])
|
||||
|
||||
def _createAdditionalComponentsView(self) -> None:
|
||||
Logger.log("d", "Creating additional ui components for UM3.")
|
||||
|
||||
@ -170,10 +137,10 @@ class DiscoverUM3Action(MachineAction):
|
||||
if not plugin_path:
|
||||
return
|
||||
path = os.path.join(plugin_path, "resources/qml/UM3InfoComponents.qml")
|
||||
self.__additional_components_view = CuraApplication.getInstance().createQmlComponent(path, {"manager": self})
|
||||
self.__additional_components_view = self._application.createQmlComponent(path, {"manager": self})
|
||||
if not self.__additional_components_view:
|
||||
Logger.log("w", "Could not create ui components for UM3.")
|
||||
return
|
||||
|
||||
# Create extra components
|
||||
CuraApplication.getInstance().addAdditionalComponent("monitorButtons", self.__additional_components_view.findChild(QObject, "networkPrinterConnectButton"))
|
||||
self._application.addAdditionalComponent("monitorButtons", self.__additional_components_view.findChild(QObject, "networkPrinterConnectButton"))
|
||||
|
@ -67,11 +67,11 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
||||
self._zero_conf = None
|
||||
self._zero_conf_browser = None
|
||||
|
||||
self._application = CuraApplication.getInstance()
|
||||
self._api = self._application.getCuraAPI()
|
||||
|
||||
# Create a cloud output device manager that abstracts all cloud connection logic away.
|
||||
self._cloud_output_device_manager = CloudOutputDeviceManager()
|
||||
@ -96,7 +96,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||
self._cluster_api_prefix = "/cluster-api/v" + self._cluster_api_version + "/"
|
||||
|
||||
# Get list of manual instances from preferences
|
||||
self._preferences = CuraApplication.getInstance().getPreferences()
|
||||
self._preferences = self._application.getPreferences()
|
||||
self._preferences.addPreference("um3networkprinting/manual_instances",
|
||||
"") # A comma-separated list of ip adresses or hostnames
|
||||
|
||||
@ -116,7 +116,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||
self._service_changed_request_thread = Thread(target=self._handleOnServiceChangedRequests, daemon=True)
|
||||
self._service_changed_request_thread.start()
|
||||
|
||||
self._account = self._application.getCuraAPI().account
|
||||
self._account = self._api.account
|
||||
|
||||
# Check if cloud flow is possible when user logs in
|
||||
self._account.loginStateChanged.connect(self.checkCloudFlowIsPossible)
|
||||
@ -167,10 +167,11 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||
for address in self._manual_instances:
|
||||
if address:
|
||||
self.addManualDevice(address)
|
||||
self.resetLastManualDevice()
|
||||
self.resetLastManu
|
||||
|
||||
# TODO: CHANGE TO HOSTNAME
|
||||
def refreshConnections(self):
|
||||
active_machine = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
active_machine = self._application.getGlobalContainerStack()
|
||||
if not active_machine:
|
||||
return
|
||||
|
||||
@ -197,7 +198,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||
return
|
||||
if self._discovered_devices[key].isConnected():
|
||||
# Sometimes the status changes after changing the global container and maybe the device doesn't belong to this machine
|
||||
um_network_key = CuraApplication.getInstance().getGlobalContainerStack().getMetaDataEntry("um_network_key")
|
||||
um_network_key = self._application.getGlobalContainerStack().getMetaDataEntry("um_network_key")
|
||||
if key == um_network_key:
|
||||
self.getOutputDeviceManager().addOutputDevice(self._discovered_devices[key])
|
||||
self.checkCloudFlowIsPossible(None)
|
||||
@ -272,39 +273,14 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||
key, group_name, machine_type_id)
|
||||
|
||||
self._application.getMachineManager().addMachine(machine_type_id, group_name)
|
||||
|
||||
# connect the new machine to that network printer
|
||||
self.associateActiveMachineWithPrinterDevice(discovered_device)
|
||||
self._api.machines.addOutputDeviceToCurrentMachine(discovered_device)
|
||||
|
||||
# ensure that the connection states are refreshed.
|
||||
self.refreshConnections()
|
||||
|
||||
def associateActiveMachineWithPrinterDevice(self, printer_device: Optional["PrinterOutputDevice"]) -> None:
|
||||
if not printer_device:
|
||||
return
|
||||
|
||||
Logger.log("d", "Attempting to set the network key of the active machine to %s", printer_device.key)
|
||||
|
||||
machine_manager = CuraApplication.getInstance().getMachineManager()
|
||||
global_container_stack = machine_manager.activeMachine
|
||||
if not global_container_stack:
|
||||
return
|
||||
|
||||
for machine in machine_manager.getMachinesInGroup(global_container_stack.getMetaDataEntry("group_id")):
|
||||
machine.setMetaDataEntry("um_network_key", printer_device.key)
|
||||
machine.setMetaDataEntry("group_name", printer_device.name)
|
||||
|
||||
# Delete old authentication data.
|
||||
Logger.log("d", "Removing old authentication id %s for device %s",
|
||||
global_container_stack.getMetaDataEntry("network_authentication_id", None), printer_device.key)
|
||||
|
||||
machine.removeMetaDataEntry("network_authentication_id")
|
||||
machine.removeMetaDataEntry("network_authentication_key")
|
||||
|
||||
# Ensure that these containers do know that they are configured for network connection
|
||||
machine.addConfiguredConnectionType(printer_device.connectionType.value)
|
||||
|
||||
self.refreshConnections()
|
||||
|
||||
def _checkManualDevice(self, address: str) -> "QNetworkReply":
|
||||
def _checkManualDevice(self, address: str) -> Optional[QNetworkReply]:
|
||||
# Check if a UM3 family device exists at this address.
|
||||
# If a printer responds, it will replace the preliminary printer created above
|
||||
# origin=manual is for tracking back the origin of the call
|
||||
@ -312,6 +288,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||
name_request = QNetworkRequest(url)
|
||||
return self._network_manager.get(name_request)
|
||||
|
||||
## This is the function which handles the above network request's reply when it comes back.
|
||||
def _onNetworkRequestFinished(self, reply: "QNetworkReply") -> None:
|
||||
reply_url = reply.url().toString()
|
||||
|
||||
@ -426,7 +403,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||
self._discovered_devices[device.getId()] = device
|
||||
self.discoveredDevicesChanged.emit()
|
||||
|
||||
global_container_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
global_container_stack = self._application.getGlobalContainerStack()
|
||||
if global_container_stack and device.getId() == global_container_stack.getMetaDataEntry("um_network_key"):
|
||||
# Ensure that the configured connection type is set.
|
||||
global_container_stack.addConfiguredConnectionType(device.connectionType.value)
|
||||
@ -446,7 +423,7 @@ class UM3OutputDevicePlugin(OutputDevicePlugin):
|
||||
self._service_changed_request_event.wait(timeout = 5.0)
|
||||
|
||||
# Stop if the application is shutting down
|
||||
if CuraApplication.getInstance().isShuttingDown():
|
||||
if self._application.isShuttingDown():
|
||||
return
|
||||
|
||||
self._service_changed_request_event.clear()
|
||||
|
@ -4,6 +4,8 @@
|
||||
import threading
|
||||
import time
|
||||
import serial.tools.list_ports
|
||||
from os import environ
|
||||
from re import search
|
||||
|
||||
from PyQt5.QtCore import QObject, pyqtSignal
|
||||
|
||||
@ -112,6 +114,27 @@ class USBPrinterOutputDeviceManager(QObject, OutputDevicePlugin):
|
||||
port = (port.device, port.description, port.hwid)
|
||||
if only_list_usb and not port[2].startswith("USB"):
|
||||
continue
|
||||
|
||||
# To prevent cura from messing with serial ports of other devices,
|
||||
# filter by regular expressions passed in as environment variables.
|
||||
# Get possible patterns with python3 -m serial.tools.list_ports -v
|
||||
|
||||
# set CURA_DEVICENAMES=USB[1-9] -> e.g. not matching /dev/ttyUSB0
|
||||
pattern = environ.get('CURA_DEVICENAMES')
|
||||
if pattern and not search(pattern, port[0]):
|
||||
continue
|
||||
|
||||
# set CURA_DEVICETYPES=CP2102 -> match a type of serial converter
|
||||
pattern = environ.get('CURA_DEVICETYPES')
|
||||
if pattern and not search(pattern, port[1]):
|
||||
continue
|
||||
|
||||
# set CURA_DEVICEINFOS=LOCATION=2-1.4 -> match a physical port
|
||||
# set CURA_DEVICEINFOS=VID:PID=10C4:EA60 -> match a vendor:product
|
||||
pattern = environ.get('CURA_DEVICEINFOS')
|
||||
if pattern and not search(pattern, port[2]):
|
||||
continue
|
||||
|
||||
base_list += [port[0]]
|
||||
|
||||
return list(base_list)
|
||||
|
@ -1,12 +1,14 @@
|
||||
[shaders]
|
||||
vertex =
|
||||
uniform highp mat4 u_modelViewProjectionMatrix;
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewMatrix;
|
||||
uniform highp mat4 u_projectionMatrix;
|
||||
|
||||
attribute highp vec4 a_vertex;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_modelViewProjectionMatrix * a_vertex;
|
||||
gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
|
||||
}
|
||||
|
||||
fragment =
|
||||
@ -19,13 +21,15 @@ fragment =
|
||||
|
||||
vertex41core =
|
||||
#version 410
|
||||
uniform highp mat4 u_modelViewProjectionMatrix;
|
||||
uniform highp mat4 u_modelMatrix;
|
||||
uniform highp mat4 u_viewMatrix;
|
||||
uniform highp mat4 u_projectionMatrix;
|
||||
|
||||
in highp vec4 a_vertex;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = u_modelViewProjectionMatrix * a_vertex;
|
||||
gl_Position = u_projectionMatrix * u_viewMatrix * u_modelMatrix * a_vertex;
|
||||
}
|
||||
|
||||
fragment41core =
|
||||
@ -43,7 +47,9 @@ fragment41core =
|
||||
u_color = [0.02, 0.02, 0.02, 1.0]
|
||||
|
||||
[bindings]
|
||||
u_modelViewProjectionMatrix = model_view_projection_matrix
|
||||
u_modelMatrix = model_matrix
|
||||
u_viewMatrix = view_matrix
|
||||
u_projectionMatrix = projection_matrix
|
||||
|
||||
[attributes]
|
||||
a_vertex = vertex
|
||||
|
@ -38,7 +38,7 @@
|
||||
"speed_wall": { "value": "speed_print * 0.7" },
|
||||
"speed_topbottom": { "value": "speed_print * 0.7" },
|
||||
"speed_layer_0": { "value": "speed_print * 0.7" },
|
||||
"gantry_height": { "default_value": 0 },
|
||||
"gantry_height": { "value": "0" },
|
||||
"retraction_speed": { "default_value" : 10 },
|
||||
"retraction_amount": { "default_value" : 2.5 },
|
||||
"machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" },
|
||||
|
@ -45,7 +45,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 30
|
||||
"value": "30"
|
||||
},
|
||||
"machine_start_gcode": {
|
||||
"default_value": ";Sliced at: {day} {date} {time}\nM104 S{material_print_temperature} ;set temperatures\nM140 S{material_bed_temperature}\nM109 S{material_print_temperature} ;wait for temperatures\nM190 S{material_bed_temperature}\nG21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 Z0 ;move Z to min endstops\nG28 X0 Y0 ;move X/Y to min endstops\nG29 ;Auto Level\nG1 Z0.6 F{speed_travel} ;move the Nozzle near the Bed\nG92 E0\nG1 Y0 ;zero the extruded length\nG1 X10 E30 F500 ;printing a Line from right to left\nG92 E0 ;zero the extruded length again\nG1 Z2\nG1 F{speed_travel}\nM117 Printing...;Put printing message on LCD screen\nM150 R255 U255 B255 P4 ;Change LED Color to white" },
|
||||
|
@ -8,12 +8,12 @@
|
||||
"author": "TheUltimakerCommunity",
|
||||
"manufacturer": "Foehnsturm",
|
||||
"category": "Other",
|
||||
"weight": 0,
|
||||
"has_variants": true,
|
||||
"has_materials": true,
|
||||
"has_machine_materials": false,
|
||||
"has_machine_quality": false,
|
||||
"has_variant_materials": false,
|
||||
"weight": 2,
|
||||
"file_formats": "text/x-gcode",
|
||||
"icon": "icon_ultimaker.png",
|
||||
"platform": "ultimaker2_platform.obj",
|
||||
@ -37,7 +37,7 @@
|
||||
"default_value": 203
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 52
|
||||
"value": "52"
|
||||
},
|
||||
"machine_center_is_zero": {
|
||||
"default_value": false
|
||||
|
@ -39,7 +39,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 10
|
||||
"value": "10"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -36,7 +36,7 @@
|
||||
"retraction_enable": { "default_value": true },
|
||||
"retraction_amount": { "default_value": 5 },
|
||||
"retraction_speed": { "default_value": 45 },
|
||||
"gantry_height": { "default_value": 25 },
|
||||
"gantry_height": { "value": "25" },
|
||||
"machine_width": { "default_value": 220 },
|
||||
"machine_height": { "default_value": 250 },
|
||||
"machine_depth": { "default_value": 220 },
|
||||
|
@ -30,7 +30,7 @@
|
||||
"machine_height": { "default_value": 133 },
|
||||
"machine_depth": { "default_value": 100 },
|
||||
"machine_center_is_zero": { "default_value": false },
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"gantry_height": { "value": "55"},
|
||||
"retraction_amount": { "default_value": 1.5 },
|
||||
"support_enable": { "default_value": true},
|
||||
"machine_head_with_fans_polygon": {
|
||||
|
@ -30,7 +30,7 @@
|
||||
"machine_height": { "default_value": 170 },
|
||||
"machine_depth": { "default_value": 160 },
|
||||
"machine_center_is_zero": { "default_value": false },
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"gantry_height": { "value": "55"},
|
||||
"retraction_amount": { "default_value": 1.5 },
|
||||
"support_enable": { "default_value": true},
|
||||
"machine_head_with_fans_polygon": {
|
||||
|
@ -33,7 +33,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_start_gcode": {
|
||||
"default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nM84 ;steppers off\nM0 S12 ;wait 12 seconds\nM17 ;turn steppers on\nG1 Z10.0 F300 ;move the platform down 10mm\nG92 E0 ;zero the extruded length\nG1 F200 E8 ;extrude 8mm of feed stock\nG92 E0 ;zero the extruded length again\nM0 S5 ;wait 5 seconds\nG1 F9000\nM117 Printing..."
|
||||
|
@ -50,7 +50,7 @@
|
||||
"jerk_wall": { "value": "math.ceil(jerk_print * 10 / 25)" },
|
||||
"jerk_wall_0": { "value": "math.ceil(jerk_wall * 5 / 10)" },
|
||||
|
||||
"gantry_height": { "default_value": 25.0 },
|
||||
"gantry_height": { "value": "25.0" },
|
||||
"skin_overlap": { "value": "10" },
|
||||
|
||||
"acceleration_enabled": { "value": "True" },
|
||||
|
@ -52,7 +52,7 @@
|
||||
},
|
||||
"gantry_height":
|
||||
{
|
||||
"default_value": 35
|
||||
"value": "35"
|
||||
},
|
||||
"machine_head_with_fans_polygon":
|
||||
{
|
||||
|
@ -46,7 +46,7 @@
|
||||
},
|
||||
"gantry_height":
|
||||
{
|
||||
"default_value": 0
|
||||
"value": "0"
|
||||
},
|
||||
"machine_gcode_flavor":
|
||||
{
|
||||
|
@ -64,7 +64,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 12
|
||||
"value": "12"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -93,7 +93,7 @@
|
||||
"machine_nozzle_heat_up_speed": { "default_value": 2 },
|
||||
"machine_nozzle_cool_down_speed": { "default_value": 2 },
|
||||
"machine_head_polygon": { "default_value": [[-75, -18],[-75, 35],[18, 35],[18, -18]] },
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"gantry_height": { "value": "55" },
|
||||
"machine_max_feedrate_x": { "default_value": 300 },
|
||||
"machine_max_feedrate_y": { "default_value": 300 },
|
||||
"machine_max_feedrate_z": { "default_value": 40 },
|
||||
|
@ -93,7 +93,7 @@
|
||||
"machine_nozzle_heat_up_speed": { "default_value": 2 },
|
||||
"machine_nozzle_cool_down_speed": { "default_value": 2 },
|
||||
"machine_head_polygon": { "default_value": [[-75, -18],[-75, 35],[18, 35],[18, -18]] },
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"gantry_height": { "value": "55" },
|
||||
"machine_max_feedrate_x": { "default_value": 300 },
|
||||
"machine_max_feedrate_y": { "default_value": 300 },
|
||||
"machine_max_feedrate_z": { "default_value": 40 },
|
||||
|
@ -92,7 +92,7 @@
|
||||
"machine_nozzle_heat_up_speed": { "default_value": 2 },
|
||||
"machine_nozzle_cool_down_speed": { "default_value": 2 },
|
||||
"machine_head_polygon": { "default_value": [[-75, -18],[-75, 35],[18, 35],[18, -18]] },
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"gantry_height": { "value": "55" },
|
||||
"machine_max_feedrate_x": { "default_value": 300 },
|
||||
"machine_max_feedrate_y": { "default_value": 300 },
|
||||
"machine_max_feedrate_z": { "default_value": 40 },
|
||||
|
@ -35,7 +35,7 @@
|
||||
"machine_extruder_count": { "default_value": 2 },
|
||||
"machine_heated_bed": { "default_value": true },
|
||||
"machine_center_is_zero": { "default_value": false },
|
||||
"gantry_height": { "default_value": 35 },
|
||||
"gantry_height": { "value": "35" },
|
||||
"machine_height": { "default_value": 400 },
|
||||
"machine_depth": { "default_value": 270 },
|
||||
"machine_width": { "default_value": 430 },
|
||||
|
@ -39,7 +39,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 10
|
||||
"value": "10"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -30,7 +30,7 @@
|
||||
"retraction_amount": { "default_value": 3 },
|
||||
"retraction_speed": { "default_value": 70},
|
||||
"adhesion_type": { "default_value": "skirt" },
|
||||
"gantry_height": { "default_value": 30 },
|
||||
"gantry_height": { "value": "30" },
|
||||
"speed_print": { "default_value": 60 },
|
||||
"speed_travel": { "default_value": 120 },
|
||||
"machine_max_acceleration_x": { "default_value": 500 },
|
||||
|
@ -71,7 +71,7 @@
|
||||
"default_value": true
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 30
|
||||
"value": "30"
|
||||
},
|
||||
"acceleration_enabled": {
|
||||
"default_value": true
|
||||
|
@ -31,7 +31,7 @@
|
||||
"default_value": true
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 30
|
||||
"value": "30"
|
||||
},
|
||||
"machine_head_polygon": {
|
||||
"default_value": [
|
||||
@ -59,6 +59,9 @@
|
||||
"jerk_travel": {
|
||||
"value": "jerk_print"
|
||||
},
|
||||
"machine_max_jerk_z": {
|
||||
"default_value": 0.3
|
||||
},
|
||||
"layer_height_0": {
|
||||
"default_value": 0.2
|
||||
},
|
||||
@ -69,10 +72,10 @@
|
||||
"default_value": 0.6
|
||||
},
|
||||
"retraction_amount": {
|
||||
"default_value": 5
|
||||
"default_value": 6
|
||||
},
|
||||
"retraction_speed": {
|
||||
"default_value": 40
|
||||
"default_value": 25
|
||||
},
|
||||
"cool_min_layer_time": {
|
||||
"default_value": 10
|
||||
|
@ -25,7 +25,7 @@
|
||||
"machine_heated_bed": { "default_value": true },
|
||||
"machine_shape": { "default_value": "elliptic" },
|
||||
"machine_max_feedrate_z": { "default_value": 300 },
|
||||
"gantry_height": {"default_value": 43},
|
||||
"gantry_height": {"value": "43"},
|
||||
"layer_height": { "default_value": 0.1 },
|
||||
"relative_extrusion": { "default_value": false },
|
||||
"retraction_combing": { "default_value": "off" },
|
||||
|
@ -38,7 +38,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 10
|
||||
"value": "10"
|
||||
},
|
||||
"machine_start_gcode": {
|
||||
"default_value": ";Gcode by Cura\nG90\nM106 S255\nG28 X Y\nG1 X50\nM109 R90\nG28\nM104 S{material_print_temperature_layer_0}\nG29\nM107\nG1 X100 Y20 F3000\nG1 Z0.5\nM109 S{material_print_temperature_layer_0}\nM82\nG92 E0\nG1 F200 E10\nG92 E0\nG1 Z3\nG1 F6000\n"
|
||||
|
@ -38,7 +38,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 0
|
||||
"value": "0"
|
||||
},
|
||||
"machine_shape": {
|
||||
"default_value": "elliptic"
|
||||
|
@ -38,7 +38,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 0
|
||||
"value": "0"
|
||||
},
|
||||
"machine_shape": {
|
||||
"default_value": "elliptic"
|
||||
|
@ -28,7 +28,7 @@
|
||||
"machine_end_gcode": {
|
||||
"default_value": "M104 S0 ;extruder heater off\nM140 S0 ;heated bed heater off (if you have it)\nG91 ;relative positioning\nG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure\nG1 Z+0.5 E-3 X+5 Y+5 F5000 ;move Z up a bit and retract filament even more\n;end of the print\nM84 ;steppers off\nG90 ;absolute positioning\nM300 S2 ;FAB bep bep (end print)"
|
||||
},
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"gantry_height": { "value": "55" },
|
||||
"machine_width": { "default_value": 214 },
|
||||
"machine_height": { "default_value": 241.5 },
|
||||
"machine_depth": { "default_value": 234 },
|
||||
|
@ -1433,7 +1433,8 @@
|
||||
"z_seam_corner_none": "None",
|
||||
"z_seam_corner_inner": "Hide Seam",
|
||||
"z_seam_corner_outer": "Expose Seam",
|
||||
"z_seam_corner_any": "Hide or Expose Seam"
|
||||
"z_seam_corner_any": "Hide or Expose Seam",
|
||||
"z_seam_corner_weighted": "Smart Hiding"
|
||||
},
|
||||
"default_value": "z_seam_corner_inner",
|
||||
"enabled": "z_seam_type != 'random'",
|
||||
@ -2062,8 +2063,8 @@
|
||||
"description": "The temperature used for build volume. If this is 0, the build volume temperature will not be adjusted.",
|
||||
"unit": "°C",
|
||||
"type": "float",
|
||||
"default_value": 0,
|
||||
"resolve": "max(extruderValues('build_volume_temperature'))",
|
||||
"default_value": 35,
|
||||
"resolve": "min(extruderValues('build_volume_temperature'))",
|
||||
"minimum_value": "-273.15",
|
||||
"minimum_value_warning": "0",
|
||||
"maximum_value_warning": "285",
|
||||
@ -5249,7 +5250,7 @@
|
||||
"type": "bool",
|
||||
"enabled": "extruders_enabled_count > 1",
|
||||
"default_value": false,
|
||||
"resolve": "any(extruderValues('prime_tower_enable')) or (adhesion_type in ('none', 'skirt'))",
|
||||
"resolve": "(extruders_enabled_count > 1) and any(extruderValues('prime_tower_enable'))",
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
},
|
||||
@ -5352,6 +5353,7 @@
|
||||
"description": "Prime-towers might need the extra adhesion afforded by a brim even if the model doesn't. Presently can't be used with the 'Raft' adhesion-type.",
|
||||
"type": "bool",
|
||||
"enabled": "resolveOrValue('prime_tower_enable') and (resolveOrValue('adhesion_type') != 'raft')",
|
||||
"resolve": "resolveOrValue('prime_tower_enable') and (adhesion_type in ('none', 'skirt'))",
|
||||
"default_value": false,
|
||||
"settable_per_mesh": false,
|
||||
"settable_per_extruder": false
|
||||
|
@ -18,7 +18,7 @@
|
||||
"machine_width": { "default_value": 300 },
|
||||
"machine_height": { "default_value": 400 },
|
||||
"machine_depth": { "default_value": 300 },
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"gantry_height": { "value": "55" },
|
||||
|
||||
"machine_start_gcode": {
|
||||
"default_value": "G21 ;metric values\nG90 ;absolute positioning\nM82 ;set extruder to absolute mode\nM107 ;start with the fan off\nG28 X0 Y0 ;move X/Y to min endstops\nG28 Z0 ;move Z to min endstops\nG1 Z15.0 F9000 ;move the platform down 15mm\nG92 E0 ;zero the extruded length\nG1 F200 E3 ;extrude 3mm of feed stock\nG92 E0 ;zero the extruded length again\nG1 F9000\n;Put printing message on LCD screen\nM117 Printing..."
|
||||
|
@ -37,7 +37,7 @@
|
||||
"retraction_amount": { "default_value": 1 },
|
||||
"retraction_speed": { "default_value": 70},
|
||||
"adhesion_type": { "default_value": "skirt" },
|
||||
"gantry_height": { "default_value": 50 },
|
||||
"gantry_height": { "value": "50" },
|
||||
"speed_print": { "default_value": 50 },
|
||||
"speed_travel": { "default_value": 70 },
|
||||
"machine_max_acceleration_x": { "default_value": 600 },
|
||||
|
@ -35,7 +35,7 @@
|
||||
"retraction_amount": { "default_value": 1 },
|
||||
"retraction_speed": { "default_value": 70},
|
||||
"adhesion_type": { "default_value": "skirt" },
|
||||
"gantry_height": { "default_value": 50 },
|
||||
"gantry_height": { "value": "50" },
|
||||
"speed_print": { "default_value": 50 },
|
||||
"speed_travel": { "default_value": 70 },
|
||||
"machine_max_acceleration_x": { "default_value": 600 },
|
||||
|
@ -37,7 +37,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
"has_variants": true,
|
||||
"variants_name": "Tool",
|
||||
"preferred_variant_name": "0.8mm TP extruder",
|
||||
"preferred_variant_name": "0.4mm TP extruder",
|
||||
|
||||
"has_machine_quality": true,
|
||||
"preferred_quality_type": "normal",
|
||||
@ -39,24 +39,19 @@
|
||||
},
|
||||
|
||||
"overrides": {
|
||||
"machine_extruder_count": {"default_value": 1 },
|
||||
"machine_extruder_count": {"default_value": 2 },
|
||||
"material_diameter": {"default_value": 1.75 },
|
||||
"machine_heated_bed": {"default_value": true },
|
||||
"machine_center_is_zero": {"default_value": false },
|
||||
"gantry_height": {"default_value": 35 },
|
||||
"gantry_height": {"value": "35" },
|
||||
"machine_height": {"default_value": 400 },
|
||||
"machine_depth": {"default_value": 325 },
|
||||
"machine_width": {"default_value": 450 },
|
||||
"machine_gcode_flavor": {"default_value": "RepRap (RepRap)" },
|
||||
"material_print_temp_wait": {"default_value": true},
|
||||
"material_bed_temp_wait": {"default_value": true },
|
||||
"prime_tower_enable": {"default_value": false },
|
||||
"prime_tower_size": {"value": 20.6 },
|
||||
"prime_tower_position_x": {"value": 125 },
|
||||
"prime_tower_position_y": {"value": 70 },
|
||||
"prime_blob_enable": {"default_value": false },
|
||||
"machine_max_feedrate_z": {"default_value": 1200 },
|
||||
"machine_start_gcode": {"default_value": "\n;Neither HMS434 nor any of HMS434 Subsidiaries has any liabilities or gives any warrenties on this .gcode file,\n\n;or on any or all objects made with this .gcode file \nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\n\nG1 X-71 F9000;go to wipe point\nG1 Y-100 F9000\nG1 Z0 F900\n\nG1 Z0.2 F900\n\nG1 Y-65 F12000\nG1 X50 Y0 F9000\nM117 HMS434 Printing ...\n\n" },
|
||||
"machine_start_gcode": {"default_value": "\n;Neither MaukCC nor any of MaukCC representatives has any liabilities or gives any warranties on this .gcode file, or on any or all objects made with this .gcode file. \nM117 Homing Y ......\nG28 Y\nM117 Homing X ......\nG28 X\nM117 Homing Z ......\nG28 Z F100\nG1 Z10 F600\n\nG1 X-71 F9000;go to wipe point\nG1 Y-100 F9000\nG1 Z0 F900\n\nG1 Z0.2 F900\n\nG1 Y-65 F12000\nG1 X50 Y0 F9000\nM117 HMS434 Printing ...\n\n" },
|
||||
"machine_end_gcode": {"default_value": "" },
|
||||
|
||||
"retraction_extra_prime_amount": {"minimum_value_warning": "-2.0" },
|
||||
@ -127,7 +122,7 @@
|
||||
"cool_fan_enabled": {"value": true},
|
||||
"cool_min_layer_time_fan_speed_max": {"value": "cool_min_layer_time"},
|
||||
"cool_min_layer_time": {"value": 20},
|
||||
"cool_min_speed": {"value": "speed_wall_x"},
|
||||
"cool_min_speed": {"value": "10"},
|
||||
"cool_lift_head": {"value": false},
|
||||
|
||||
"support_z_distance": {"value": 0},
|
||||
@ -141,6 +136,12 @@
|
||||
"skirt_gap": {"value": 1},
|
||||
"skirt_brim_minimal_length": {"value": 50},
|
||||
|
||||
"prime_tower_enable": {"value": false },
|
||||
"prime_tower_size": {"value": 20.6 },
|
||||
"prime_tower_position_x": {"value": 125 },
|
||||
"prime_tower_position_y": {"value": 70 },
|
||||
"prime_blob_enable": {"default_value": false },
|
||||
|
||||
"coasting_enable": {"value": true},
|
||||
"coasting_volume": {"value": 0.1},
|
||||
"coasting_min_volume": {"value": 0.17},
|
||||
|
@ -41,7 +41,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 82.3
|
||||
"value": "82.3"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -39,7 +39,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 10
|
||||
"value": "10"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -41,7 +41,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 10
|
||||
"value": "10"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -39,7 +39,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 10
|
||||
"value": "10"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -39,7 +39,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 10
|
||||
"value": "10"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -41,7 +41,7 @@
|
||||
"default_value": 2
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 0
|
||||
"value": "0"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -42,7 +42,7 @@
|
||||
"default_value": 2
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 0
|
||||
"value": "0"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -29,7 +29,7 @@
|
||||
"machine_height": { "default_value": 190 },
|
||||
"machine_depth": { "default_value": 195 },
|
||||
"machine_center_is_zero": { "default_value": false },
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"gantry_height": { "value": "55" },
|
||||
"retraction_amount": { "default_value": 1 },
|
||||
"support_enable": { "default_value": true},
|
||||
"machine_head_with_fans_polygon": {
|
||||
|
@ -41,7 +41,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": -25
|
||||
"value": "25"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -41,7 +41,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -39,7 +39,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 330
|
||||
"value": "330"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -39,7 +39,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 200
|
||||
"value": "200"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -33,7 +33,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -53,7 +53,7 @@
|
||||
"default_value": 92
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -28,7 +28,7 @@
|
||||
[ 3, 3 ]
|
||||
]
|
||||
},
|
||||
"gantry_height": { "default_value": 0 },
|
||||
"gantry_height": { "value": "0" },
|
||||
"machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" },
|
||||
|
||||
"machine_start_gcode": {
|
||||
|
@ -68,7 +68,7 @@
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_head_with_fans_polygon":
|
||||
{
|
||||
|
@ -43,7 +43,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 30
|
||||
"value": "30"
|
||||
},
|
||||
"machine_heated_bed": {
|
||||
"default_value": false
|
||||
|
@ -27,7 +27,7 @@
|
||||
"retraction_speed": { "default_value": 45},
|
||||
"adhesion_type": { "default_value": "skirt" },
|
||||
"machine_head_with_fans_polygon": { "default_value": [[-32,999],[37,999],[37,-32],[-32,-32]] },
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"gantry_height": { "value": "55" },
|
||||
"speed_print": { "default_value": 50 },
|
||||
"speed_travel": { "default_value": 55 },
|
||||
"machine_max_feedrate_x": {"default_value": 125},
|
||||
|
@ -30,7 +30,6 @@
|
||||
[55, -99999]
|
||||
]
|
||||
},
|
||||
"gantry_height": { "default_value": 99999 },
|
||||
"machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" },
|
||||
|
||||
"machine_start_gcode": {
|
||||
|
@ -30,7 +30,7 @@
|
||||
[ -49, -20 ]
|
||||
]
|
||||
},
|
||||
"gantry_height": { "default_value": 99999 },
|
||||
"gantry_height": { "value": "99999" },
|
||||
"machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" },
|
||||
|
||||
"machine_start_gcode": {
|
||||
|
@ -27,7 +27,7 @@
|
||||
[60, -10]
|
||||
]
|
||||
},
|
||||
"gantry_height": { "default_value": 1000 },
|
||||
"gantry_height": { "value": "1000" },
|
||||
"machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" },
|
||||
|
||||
"machine_start_gcode": {
|
||||
|
@ -48,7 +48,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -31,7 +31,7 @@
|
||||
"retraction_prime_speed": { "default_value": 35 },
|
||||
"adhesion_type": { "default_value": "skirt" },
|
||||
"machine_head_with_fans_polygon": { "default_value": [[-31,31],[34,31],[34,-40],[-31,-40]] },
|
||||
"gantry_height": { "default_value": 28 },
|
||||
"gantry_height": { "value": "28" },
|
||||
"machine_max_feedrate_z": { "default_value": 12 },
|
||||
"machine_max_feedrate_e": { "default_value": 120 },
|
||||
"machine_max_acceleration_z": { "default_value": 500 },
|
||||
|
@ -40,7 +40,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -58,7 +58,7 @@
|
||||
"default_value": "skirt"
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -58,7 +58,7 @@
|
||||
"default_value": "skirt"
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -57,7 +57,7 @@
|
||||
"default_value": "skirt"
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -57,7 +57,7 @@
|
||||
"default_value": "skirt"
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -81,7 +81,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 25
|
||||
"value": "25"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap"
|
||||
|
@ -29,7 +29,7 @@
|
||||
"default_value": true
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 0
|
||||
"value": "0"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -29,7 +29,7 @@
|
||||
"default_value": true
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 0
|
||||
"value": "0"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -62,7 +62,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 25
|
||||
"value": "25"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -6,7 +6,6 @@
|
||||
"author": "Andrew Finkle, CTO",
|
||||
"manufacturer": "Structur3d.io",
|
||||
"visible": true,
|
||||
"weight": 1,
|
||||
"file_formats": "text/x-gcode",
|
||||
"platform": "ultimaker2_platform.obj",
|
||||
"platform_texture": "Ultimaker2Plusbackplate.png",
|
||||
@ -77,7 +76,7 @@
|
||||
"default_value": true
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 52
|
||||
"value": "52"
|
||||
},
|
||||
"machine_nozzle_head_distance": {
|
||||
"default_value": 5
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
"machine_heated_bed": { "default_value": true },
|
||||
"machine_head_with_fans_polygon": { "default_value": [ [ -35, 65 ], [ -35, -55 ], [ 55, 65 ], [ 55, -55 ] ] },
|
||||
"gantry_height": { "default_value": 35 },
|
||||
"gantry_height": { "value": "35" },
|
||||
"machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" },
|
||||
"machine_center_is_zero": { "default_value": false },
|
||||
|
||||
|
@ -44,7 +44,7 @@
|
||||
},
|
||||
"gantry_height":
|
||||
{
|
||||
"default_value": 0
|
||||
"value": "0"
|
||||
},
|
||||
"machine_gcode_flavor":
|
||||
{
|
||||
|
@ -33,7 +33,7 @@
|
||||
[18, -18]
|
||||
]
|
||||
},
|
||||
"gantry_height": { "default_value": 55 },
|
||||
"gantry_height": { "value": "55" },
|
||||
"machine_gcode_flavor": { "default_value": "RepRap (Marlin/Sprinter)" },
|
||||
"machine_acceleration": { "default_value": 2650 },
|
||||
"machine_max_jerk_xy": { "default_value": 15.0 },
|
||||
|
@ -70,7 +70,7 @@
|
||||
"default_value": true
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 30
|
||||
"value": "30"
|
||||
},
|
||||
"acceleration_enabled": {
|
||||
"default_value": false
|
||||
|
@ -32,7 +32,7 @@
|
||||
"machine_extruder_count": { "default_value": 1 },
|
||||
"machine_heated_bed": { "default_value": true },
|
||||
"machine_center_is_zero": { "default_value": false },
|
||||
"gantry_height": { "default_value": 500 },
|
||||
"gantry_height": { "value": "500" },
|
||||
"machine_height": { "default_value": 255 },
|
||||
"machine_depth": { "default_value": 255 },
|
||||
"machine_width": { "default_value": 255 },
|
||||
|
@ -33,7 +33,7 @@
|
||||
"machine_extruder_count": { "default_value": 2 },
|
||||
"machine_heated_bed": { "default_value": true },
|
||||
"machine_center_is_zero": { "default_value": false },
|
||||
"gantry_height": { "default_value": 500 },
|
||||
"gantry_height": { "value": "500" },
|
||||
"machine_height": { "default_value": 255 },
|
||||
"machine_depth": { "default_value": 255 },
|
||||
"machine_width": { "default_value": 255 },
|
||||
|
@ -30,7 +30,7 @@
|
||||
"machine_height": { "default_value": 255 },
|
||||
"machine_depth": { "default_value": 255 },
|
||||
"machine_center_is_zero": { "default_value": false },
|
||||
"gantry_height": { "default_value": 500 },
|
||||
"gantry_height": { "value": "500" },
|
||||
"machine_head_with_fans_polygon": {
|
||||
"default_value": [
|
||||
[25, 49],
|
||||
|
@ -34,7 +34,7 @@
|
||||
"machine_nozzle_heat_up_speed": { "default_value": 2 },
|
||||
"machine_nozzle_cool_down_speed": { "default_value": 2 },
|
||||
"machine_head_with_fans_polygon": { "default_value": [[-20,20],[10,10],[10,10],[10,10]] },
|
||||
"gantry_height": { "default_value": 275 },
|
||||
"gantry_height": { "value": "275" },
|
||||
"machine_max_feedrate_z": { "default_value": 15 },
|
||||
"machine_max_feedrate_e": { "default_value": 60 },
|
||||
"machine_max_acceleration_z": { "default_value": 1000 },
|
||||
|
@ -55,7 +55,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 48
|
||||
"value": "48"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -51,7 +51,7 @@
|
||||
"default_value": true
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 52
|
||||
"value": "52"
|
||||
},
|
||||
"machine_nozzle_head_distance": {
|
||||
"default_value": 5
|
||||
|
@ -63,7 +63,7 @@
|
||||
"machine_max_feedrate_y": { "default_value": 300 },
|
||||
"machine_max_feedrate_z": { "default_value": 40 },
|
||||
"machine_acceleration": { "default_value": 3000 },
|
||||
"gantry_height": { "default_value": 60 },
|
||||
"gantry_height": { "value": "60" },
|
||||
"machine_disallowed_areas": { "default_value": [
|
||||
[[92.8, -53.4], [92.8, -97.5], [116.5, -97.5], [116.5, -53.4]],
|
||||
[[73.8, 107.5], [73.8, 100.5], [116.5, 100.5], [116.5, 107.5]],
|
||||
|
@ -46,7 +46,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -48,7 +48,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_use_extruder_offset_to_offset_coords": {
|
||||
"default_value": true
|
||||
|
@ -31,7 +31,7 @@
|
||||
"supported_actions": [ "DiscoverUM3Action" ],
|
||||
"supports_usb_connection": false,
|
||||
"supports_network_connection": true,
|
||||
"weight": -1,
|
||||
"weight": -2,
|
||||
"firmware_update_info": {
|
||||
"id": 9051,
|
||||
"check_urls": ["http://software.ultimaker.com/releases/firmware/9051/stable/um-update.swu.version"],
|
||||
@ -62,7 +62,7 @@
|
||||
"machine_max_feedrate_y": { "default_value": 300 },
|
||||
"machine_max_feedrate_z": { "default_value": 40 },
|
||||
"machine_acceleration": { "default_value": 3000 },
|
||||
"gantry_height": { "default_value": 60 },
|
||||
"gantry_height": { "value": "60" },
|
||||
"machine_extruder_count": { "default_value": 2 },
|
||||
"extruder_prime_pos_abs": { "default_value": true },
|
||||
"machine_start_gcode": { "default_value": "" },
|
||||
|
@ -30,7 +30,7 @@
|
||||
"default_value": false
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 55
|
||||
"value": "55"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -31,7 +31,7 @@
|
||||
"default_value": "elliptic"
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 0
|
||||
"value": "0"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
@ -58,7 +58,7 @@
|
||||
]
|
||||
},
|
||||
"gantry_height": {
|
||||
"default_value": 18
|
||||
"value": "18"
|
||||
},
|
||||
"machine_gcode_flavor": {
|
||||
"default_value": "RepRap (Marlin/Sprinter)"
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user