Skip to content

Instantly share code, notes, and snippets.

View fieldOfView's full-sized avatar

Aldo Hoeben fieldOfView

View GitHub Profile
@fieldOfView
fieldOfView / Twist.py
Last active November 29, 2016 21:11
A Cura postprocessing script that twists prints around the buildplate center
# Copyright (c) 2016 Aldo Hoeben / fieldOfView
# The PostProcessingPlugin is released under the terms of the AGPLv3 or higher.
from ..Script import Script
from UM.Application import Application
import re
import math
class Twist(Script):
@fieldOfView
fieldOfView / rangeslider.py
Last active April 26, 2021 06:03
Draggable Range Slider
import sys
from PyQt5.QtCore import QUrl
from PyQt5.QtWidgets import QApplication
from PyQt5.QtQuick import QQuickView
# Main Function
if __name__ == '__main__':
# Create main app
myApp = QApplication(sys.argv)
# Create a label and set its properties
@fieldOfView
fieldOfView / ultimaker3_single.def.json
Last active February 14, 2018 10:56
A variation of the Ultimaker 3 definition for Cura 2.4 that only has a single extruder so it can use One at a Time printing
{
"id": "ultimaker3_single",
"version": 2,
"name": "Ultimaker 3 single extrusion",
"inherits": "ultimaker3",
"metadata": {
"quality_definition": "ultimaker3"
},
@fieldOfView
fieldOfView / theme.json
Last active November 5, 2019 19:00
A stub theme for Cura that uses the system default font instead of the supplied Open Sans
{
"metadata": {
"name": "Default font",
"inherits": "cura-light"
},
"fonts": {
"large": {
"size": 1.35,
"weight": 40
@fieldOfView
fieldOfView / theme.json
Created February 14, 2018 10:19
A stub theme for Cura that makes the sidebar more compact (at the cost of aesthtics)
{
"metadata": {
"name": "Compact sidebar",
"inherits": "cura-light"
},
"sizes": {
"sidebar": [30.0, 10.0],
"sidebar_margin": [1.71, 0.43],
@fieldOfView
fieldOfView / theme.json
Created March 15, 2018 19:17
A stub theme for Cura that has dark text on medium grey tooltips
{
"metadata": {
"name": "Grey tooltips",
"inherits": "cura-light"
},
"colors": {
"tooltip_text": [8, 0, 0, 255],
"button_tooltip": [225, 225, 225, 255],
"tooltip": [225, 225, 225, 255]
@fieldOfView
fieldOfView / custom_belt_printer.def.json
Created July 26, 2018 12:55
A definition for a custom belt-style printer, to be used with BlackBelt Cura 3.4.2
{
"version": 2,
"name": "Custom belt-printer",
"inherits": "beltprinter",
"metadata": {
"visible": true,
"author": "fieldOfView",
"manufacturer": "Custom",
"category": "Custom",
"file_formats": "text/x-gcode",
@fieldOfView
fieldOfView / Replacement_Patterns.html
Created July 30, 2018 21:37
A quick and dirty overview of available settings and replacement patterns
<html>
<head>
<meta charset="utf-8"/>
<title>Settings and replacement patterns</title>
<script type="text/javascript">
function showJSON(file) {
var xobj = new XMLHttpRequest();
xobj.overrideMimeType("application/json");
xobj.open('GET', file, false);
xobj.onreadystatechange = function () {
@fieldOfView
fieldOfView / ultimaker2_mag.def.json
Created August 27, 2018 13:02
A variation of the Ultimaker 2 definition for Cura 2 and newer that has no disallowed areas
{
"version": 2,
"name": "Ultimaker 2 Magnetic",
"inherits": "ultimaker2",
"metadata": {
"quality_definition": "ultimaker2"
},
"overrides": {
"machine_disallowed_areas": {
@fieldOfView
fieldOfView / NetworkMJPGImage
Created October 25, 2018 20:27
A PyQt 5 custom QML widget to display MJPEG streams such as those created by mjpegstreamer
# Copyright (c) 2018 Aldo Hoeben / fieldOfView
# NetworkMJPGImage is released under the terms of the LGPLv3 or higher.
from PyQt5.QtCore import QUrl, pyqtProperty, pyqtSignal, pyqtSlot, QRect, QByteArray
from PyQt5.QtGui import QImage, QPainter
from PyQt5.QtQuick import QQuickPaintedItem
from PyQt5.QtNetwork import QNetworkRequest, QNetworkReply, QNetworkAccessManager
from UM.Logger import Logger