mirror of
https://github.com/meerk40t/meerk40t.git
synced 2025-02-27 20:30:12 +00:00
black+isort
This commit is contained in:
parent
8a5a78a615
commit
9b0d597a05
34 changed files with 239 additions and 150 deletions
meerk40t.pysetup.py
meerk40t
balormk
core
dxf
extra
grbl
gui
choicepropertypanel.pyicons.pymkdebug.pynavigationpanels.py
propertypanels
inputproperty.pyopbranchproperties.pyoperationpropertymain.pyoutputproperty.pypathproperty.pytextproperty.py
scenewidgets
simulation.pyspoolerpanel.pystatusbarwidgets
toolwidgets
wxmmain.pywxmscene.pywxutils.pykernel
lihuiyu
moshi/gui
|
@ -3,6 +3,7 @@
|
|||
|
||||
import re
|
||||
import sys
|
||||
|
||||
from meerk40t import main
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
@ -865,10 +865,12 @@ class BalorDevice(Service, ViewPort):
|
|||
"type": float,
|
||||
"label": _("Laser On"),
|
||||
"trailer": "µs",
|
||||
"tip": _("Start delay (Start TC) at the beginning of each mark command"),
|
||||
"tip": _(
|
||||
"Start delay (Start TC) at the beginning of each mark command"
|
||||
),
|
||||
"section": "_10_General",
|
||||
"subsection": "Delays",
|
||||
"priority" : "00",
|
||||
"priority": "00",
|
||||
},
|
||||
{
|
||||
"attr": "delay_laser_off",
|
||||
|
@ -877,10 +879,12 @@ class BalorDevice(Service, ViewPort):
|
|||
"type": float,
|
||||
"label": _("Laser Off"),
|
||||
"trailer": "µs",
|
||||
"tip": _("The delay time of the laser shutting down after marking finished"),
|
||||
"tip": _(
|
||||
"The delay time of the laser shutting down after marking finished"
|
||||
),
|
||||
"section": "_10_General",
|
||||
"subsection": "Delays",
|
||||
"priority" : "10",
|
||||
"priority": "10",
|
||||
},
|
||||
{
|
||||
"attr": "delay_polygon",
|
||||
|
@ -892,7 +896,7 @@ class BalorDevice(Service, ViewPort):
|
|||
"tip": _("Delay amount between different points in the path travel."),
|
||||
"section": "_10_General",
|
||||
"subsection": "Delays",
|
||||
"priority" : "30",
|
||||
"priority": "30",
|
||||
},
|
||||
{
|
||||
"attr": "delay_end",
|
||||
|
@ -904,7 +908,7 @@ class BalorDevice(Service, ViewPort):
|
|||
"tip": _("Delay amount for the end TC"),
|
||||
"section": "_10_General",
|
||||
"subsection": "Delays",
|
||||
"priority" : "20",
|
||||
"priority": "20",
|
||||
},
|
||||
{
|
||||
"attr": "delay_jump_long",
|
||||
|
@ -946,7 +950,7 @@ class BalorDevice(Service, ViewPort):
|
|||
"label": _("Open MO delay"),
|
||||
"trailer": "ms",
|
||||
"tip": _("OpenMO delay in ms"),
|
||||
"section": "_90_Other"
|
||||
"section": "_90_Other",
|
||||
},
|
||||
]
|
||||
self.register_choices("balor-global-timing", choices)
|
||||
|
@ -959,7 +963,9 @@ class BalorDevice(Service, ViewPort):
|
|||
"type": int,
|
||||
"label": _("First Pulse Killer"),
|
||||
"trailer": "µs",
|
||||
"tip": _("First Pulse Killer (F.P.K): the lasting time for the first pulse suppress"),
|
||||
"tip": _(
|
||||
"First Pulse Killer (F.P.K): the lasting time for the first pulse suppress"
|
||||
),
|
||||
"section": "First Pulse Killer",
|
||||
"hidden": 1,
|
||||
},
|
||||
|
|
|
@ -27,11 +27,11 @@ class BalorConfiguration(MWindow):
|
|||
)
|
||||
|
||||
options = (
|
||||
("balor", "Balor"),
|
||||
("balor-redlight", "Redlight"),
|
||||
("balor-global", "Global"),
|
||||
("balor-global-timing", "Timings"),
|
||||
("balor-extra", "Extras"),
|
||||
("balor", "Balor"),
|
||||
("balor-redlight", "Redlight"),
|
||||
("balor-global", "Global"),
|
||||
("balor-global-timing", "Timings"),
|
||||
("balor-extra", "Extras"),
|
||||
)
|
||||
self.panels = []
|
||||
for item in options:
|
||||
|
@ -78,7 +78,7 @@ class BalorConfiguration(MWindow):
|
|||
for item in choices:
|
||||
try:
|
||||
dummy = str(item["hidden"])
|
||||
if dummy == "" or dummy=="0":
|
||||
if dummy == "" or dummy == "0":
|
||||
hidden = False
|
||||
else:
|
||||
hidden = False if devmode else True
|
||||
|
|
|
@ -705,19 +705,23 @@ class Elemental(Service):
|
|||
def calc_dx_dy():
|
||||
dx = 0
|
||||
dy = 0
|
||||
if positionx=="min":
|
||||
if positionx == "min":
|
||||
dx = alignbounds[0] - left_edge
|
||||
elif positionx=="max":
|
||||
elif positionx == "max":
|
||||
dx = alignbounds[2] - right_edge
|
||||
elif positionx=="center":
|
||||
dx = (alignbounds[2] + alignbounds[0]) / 2 - (right_edge + left_edge) / 2
|
||||
elif positionx == "center":
|
||||
dx = (alignbounds[2] + alignbounds[0]) / 2 - (
|
||||
right_edge + left_edge
|
||||
) / 2
|
||||
|
||||
if positiony=="min":
|
||||
if positiony == "min":
|
||||
dy = alignbounds[1] - top_edge
|
||||
elif positiony=="max":
|
||||
elif positiony == "max":
|
||||
dy = alignbounds[3] - bottom_edge
|
||||
elif positiony=="center":
|
||||
dy = (alignbounds[3] + alignbounds[1]) / 2 - (bottom_edge + top_edge) / 2
|
||||
elif positiony == "center":
|
||||
dy = (alignbounds[3] + alignbounds[1]) / 2 - (
|
||||
bottom_edge + top_edge
|
||||
) / 2
|
||||
return dx, dy
|
||||
|
||||
# Selection boundaries
|
||||
|
@ -772,7 +776,6 @@ class Elemental(Service):
|
|||
continue
|
||||
self.signal("tree_changed")
|
||||
|
||||
|
||||
def _init_commands(self, kernel):
|
||||
|
||||
_ = kernel.translation
|
||||
|
@ -2509,7 +2512,9 @@ class Elemental(Service):
|
|||
input_type=("elements", None),
|
||||
output_type="align",
|
||||
)
|
||||
def subtype_align_elements(command, channel, _, data=None, remainder=None, **kwargs):
|
||||
def subtype_align_elements(
|
||||
command, channel, _, data=None, remainder=None, **kwargs
|
||||
):
|
||||
if not remainder:
|
||||
channel(
|
||||
"top\nbottom\nleft\nright\ncenter\ncenterh\ncenterv\nspaceh\nspacev\n"
|
||||
|
@ -2548,7 +2553,9 @@ class Elemental(Service):
|
|||
output_type="align",
|
||||
)
|
||||
def subtype_align_top(command, channel, _, data=None, **kwargs):
|
||||
alignbounds = None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
alignbounds = (
|
||||
None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
)
|
||||
self.align_elements(data, alignbounds, "", "min", True)
|
||||
return "align", data
|
||||
|
||||
|
@ -2559,7 +2566,9 @@ class Elemental(Service):
|
|||
output_type="align",
|
||||
)
|
||||
def subtype_align_bottom(command, channel, _, data=None, **kwargs):
|
||||
alignbounds = None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
alignbounds = (
|
||||
None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
)
|
||||
self.align_elements(data, alignbounds, "", "max", True)
|
||||
return "align", data
|
||||
|
||||
|
@ -2570,7 +2579,9 @@ class Elemental(Service):
|
|||
output_type="align",
|
||||
)
|
||||
def subtype_align_left(command, channel, _, data=None, **kwargs):
|
||||
alignbounds = None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
alignbounds = (
|
||||
None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
)
|
||||
self.align_elements(data, alignbounds, "min", "", True)
|
||||
return "align", data
|
||||
|
||||
|
@ -2581,7 +2592,9 @@ class Elemental(Service):
|
|||
output_type="align",
|
||||
)
|
||||
def subtype_align_right(command, channel, _, data=None, **kwargs):
|
||||
alignbounds = None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
alignbounds = (
|
||||
None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
)
|
||||
self.align_elements(data, alignbounds, "max", "", True)
|
||||
return "align", data
|
||||
|
||||
|
@ -2592,7 +2605,9 @@ class Elemental(Service):
|
|||
output_type="align",
|
||||
)
|
||||
def subtype_align_center(command, channel, _, data=None, **kwargs):
|
||||
alignbounds = None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
alignbounds = (
|
||||
None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
)
|
||||
self.align_elements(data, alignbounds, "center", "center", True)
|
||||
return "align", data
|
||||
|
||||
|
@ -2668,7 +2683,9 @@ class Elemental(Service):
|
|||
output_type="align",
|
||||
)
|
||||
def subtype_align_centerh(command, channel, _, data=None, **kwargs):
|
||||
alignbounds = None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
alignbounds = (
|
||||
None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
)
|
||||
self.align_elements(data, alignbounds, "center", "", True)
|
||||
return "align", data
|
||||
|
||||
|
@ -2679,7 +2696,9 @@ class Elemental(Service):
|
|||
output_type="align",
|
||||
)
|
||||
def subtype_align_centerv(command, channel, _, data=None, **kwargs):
|
||||
alignbounds = None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
alignbounds = (
|
||||
None if self.first_emphasized is None else self.first_emphasized.bounds
|
||||
)
|
||||
self.align_elements(data, alignbounds, "", "center", True)
|
||||
return "align", data
|
||||
|
||||
|
@ -4208,7 +4227,9 @@ class Elemental(Service):
|
|||
name = name[:50] + "…"
|
||||
if not hasattr(e, "stroke"):
|
||||
pass
|
||||
elif hasattr(e, "stroke") and e.stroke is None or e.stroke == "none":
|
||||
elif (
|
||||
hasattr(e, "stroke") and e.stroke is None or e.stroke == "none"
|
||||
):
|
||||
channel(f"{i}: stroke = none - {name}")
|
||||
else:
|
||||
channel(f"{i}: stroke = {e.stroke.hex} - {name}")
|
||||
|
@ -4687,7 +4708,9 @@ class Elemental(Service):
|
|||
name = str(node)
|
||||
if len(name) > 50:
|
||||
name = name[:50] + "…"
|
||||
channel(f"{i}: translate({node.matrix.value_trans_x():.1f}, {node.matrix.value_trans_y():.1f}) - {name}")
|
||||
channel(
|
||||
f"{i}: translate({node.matrix.value_trans_x():.1f}, {node.matrix.value_trans_y():.1f}) - {name}"
|
||||
)
|
||||
i += 1
|
||||
channel("----------")
|
||||
return
|
||||
|
@ -8092,7 +8115,7 @@ class Elemental(Service):
|
|||
# if hasattr(e, "object"):
|
||||
# self.target_clones(self._tree, e, e.object)
|
||||
self.highlight_children(e)
|
||||
if count>1 and old_first is None:
|
||||
if count > 1 and old_first is None:
|
||||
# It makes no sense to define a 'first' here, as all are equal
|
||||
self.first_emphasized = None
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ from copy import copy
|
|||
from math import sqrt
|
||||
|
||||
from meerk40t.core.node.node import Node
|
||||
from meerk40t.core.units import Length, UNITS_PER_POINT
|
||||
from meerk40t.core.units import UNITS_PER_POINT, Length
|
||||
from meerk40t.svgelements import Matrix
|
||||
|
||||
REGEX_CSS_FONT = re.compile(
|
||||
|
|
|
@ -21,6 +21,7 @@ Tree Functions are to be stored: tree/command/type. These store many functions l
|
|||
from enum import Enum
|
||||
from time import time
|
||||
|
||||
|
||||
# LINEJOIN
|
||||
# Value arcs | bevel |miter | miter-clip | round
|
||||
# Default value miter
|
||||
|
|
|
@ -4,7 +4,7 @@ from meerk40t.core.cutcode import RasterCut
|
|||
from meerk40t.core.element_types import *
|
||||
from meerk40t.core.node.node import Node
|
||||
from meerk40t.core.parameters import Parameters
|
||||
from meerk40t.core.units import Length, UNITS_PER_MM
|
||||
from meerk40t.core.units import UNITS_PER_MM, Length
|
||||
from meerk40t.svgelements import Color, Path, Polygon
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ from meerk40t.core.element_types import *
|
|||
from meerk40t.core.node.elem_image import ImageNode
|
||||
from meerk40t.core.node.node import Node
|
||||
from meerk40t.core.parameters import Parameters
|
||||
from meerk40t.core.units import Length, UNITS_PER_MM
|
||||
from meerk40t.core.units import UNITS_PER_MM, Length
|
||||
from meerk40t.svgelements import Color, Matrix, Path, Polygon
|
||||
|
||||
|
||||
|
@ -256,7 +256,11 @@ class RasterOpNode(Node, Parameters):
|
|||
step_y = node.step_x
|
||||
step_x = node.step_y
|
||||
estimate += (
|
||||
node.image.width * node.image.height * step_x / UNITS_PER_MM * self.speed
|
||||
node.image.width
|
||||
* node.image.height
|
||||
* step_x
|
||||
/ UNITS_PER_MM
|
||||
* self.speed
|
||||
)
|
||||
estimate += node.image.height * step_y / UNITS_PER_MM * self.speed
|
||||
if self.passes_custom and self.passes != 1:
|
||||
|
@ -288,10 +292,13 @@ class RasterOpNode(Node, Parameters):
|
|||
return
|
||||
|
||||
# Calculate raster steps from DPI device context
|
||||
self.raster_step_x, self.raster_step_y = context.device.dpi_to_steps(self.dpi, matrix=matrix)
|
||||
self.raster_step_x, self.raster_step_y = context.device.dpi_to_steps(
|
||||
self.dpi, matrix=matrix
|
||||
)
|
||||
|
||||
make_raster = context.lookup("render-op/make_raster")
|
||||
if make_raster is None:
|
||||
|
||||
def strip_rasters():
|
||||
self.remove_node()
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ from ..svgelements import (
|
|||
Viewbox,
|
||||
)
|
||||
|
||||
|
||||
class DxfLoader:
|
||||
@staticmethod
|
||||
def load_types():
|
||||
|
|
|
@ -27,7 +27,10 @@ def plugin(kernel, lifecycle=None):
|
|||
path.transform *= Matrix(matrix)
|
||||
paths.append(
|
||||
elements.elem_branch.add(
|
||||
path=abs(path), stroke_width=0, stroke_scaled=False, type="elem path"
|
||||
path=abs(path),
|
||||
stroke_width=0,
|
||||
stroke_scaled=False,
|
||||
type="elem path",
|
||||
)
|
||||
)
|
||||
return "elements", paths
|
||||
|
|
|
@ -577,7 +577,12 @@ class GRBLDriver(Parameters):
|
|||
# preprocess queue to establish steps
|
||||
assessment_start = time.time()
|
||||
dummy_planner = PlotPlanner(
|
||||
self.settings, single=True, smooth=False, ppi=False, shift=False, group=True
|
||||
self.settings,
|
||||
single=True,
|
||||
smooth=False,
|
||||
ppi=False,
|
||||
shift=False,
|
||||
group=True,
|
||||
)
|
||||
|
||||
for q in self.queue:
|
||||
|
|
|
@ -181,7 +181,9 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
trailer = c.get("trailer")
|
||||
# Do we have a parameter to hide the control unless in expert mode
|
||||
hidden = c.get("hidden", False)
|
||||
hidden = bool(hidden) if hidden != "False" else False # bool("False") = True
|
||||
hidden = (
|
||||
bool(hidden) if hidden != "False" else False
|
||||
) # bool("False") = True
|
||||
# Do we have a parameter to affect the space consumption?
|
||||
weight = int(c.get("weight", 1))
|
||||
if weight < 0:
|
||||
|
@ -276,6 +278,7 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
|
||||
control.Bind(wx.EVT_CHECKBOX, on_checkbox_check(attr, control, obj))
|
||||
if platform.system() == "Linux" and not context.root.disable_tool_tips:
|
||||
|
||||
def on_mouse_over_check(ctrl, tooltip):
|
||||
def mouse(event=None):
|
||||
ctrl.SetToolTip(tooltip)
|
||||
|
@ -328,9 +331,7 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
wx.EVT_BUTTON,
|
||||
on_button_filename(attr, control, obj, c.get("wildcard", "*")),
|
||||
)
|
||||
current_sizer.Add(
|
||||
control_sizer, expansion_flag * weight, wx.EXPAND, 0
|
||||
)
|
||||
current_sizer.Add(control_sizer, expansion_flag * weight, wx.EXPAND, 0)
|
||||
elif data_type in (int, float) and data_style == "slider":
|
||||
control_sizer = wx.StaticBoxSizer(
|
||||
wx.StaticBox(self, wx.ID_ANY, label), wx.HORIZONTAL
|
||||
|
@ -367,9 +368,7 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
wx.EVT_SLIDER,
|
||||
on_slider(attr, control, obj, data_type),
|
||||
)
|
||||
current_sizer.Add(
|
||||
control_sizer, expansion_flag * weight, wx.EXPAND, 0
|
||||
)
|
||||
current_sizer.Add(control_sizer, expansion_flag * weight, wx.EXPAND, 0)
|
||||
elif data_type in (str, int, float) and data_style == "combo":
|
||||
control_sizer = wx.StaticBoxSizer(
|
||||
wx.StaticBox(self, wx.ID_ANY, label), wx.HORIZONTAL
|
||||
|
@ -412,9 +411,7 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
wx.EVT_COMBOBOX,
|
||||
on_combo_text(attr, control, obj, data_type),
|
||||
)
|
||||
current_sizer.Add(
|
||||
control_sizer, expansion_flag * weight, wx.EXPAND, 0
|
||||
)
|
||||
current_sizer.Add(control_sizer, expansion_flag * weight, wx.EXPAND, 0)
|
||||
elif data_type in (str, int, float) and data_style == "combosmall":
|
||||
control_sizer = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
|
@ -467,9 +464,7 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
wx.EVT_COMBOBOX,
|
||||
on_combosmall_text(attr, control, obj, data_type),
|
||||
)
|
||||
current_sizer.Add(
|
||||
control_sizer, expansion_flag * weight, wx.EXPAND, 0
|
||||
)
|
||||
current_sizer.Add(control_sizer, expansion_flag * weight, wx.EXPAND, 0)
|
||||
elif data_type == int and data_style == "binary":
|
||||
mask = c.get("mask")
|
||||
|
||||
|
@ -551,9 +546,7 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
bit_sizer.Add(control, 0, wx.EXPAND, 0)
|
||||
control_sizer.Add(bit_sizer, 0, wx.EXPAND, 0)
|
||||
|
||||
current_sizer.Add(
|
||||
control_sizer, expansion_flag * weight, wx.EXPAND, 0
|
||||
)
|
||||
current_sizer.Add(control_sizer, expansion_flag * weight, wx.EXPAND, 0)
|
||||
elif data_type in (str, int, float):
|
||||
# str, int, and float type objects get a TextCtrl setter.
|
||||
control_sizer = wx.StaticBoxSizer(
|
||||
|
@ -596,9 +589,7 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
control.Bind(
|
||||
wx.EVT_TEXT_ENTER, on_textbox_text(attr, control, obj, data_type)
|
||||
)
|
||||
current_sizer.Add(
|
||||
control_sizer, expansion_flag * weight, wx.EXPAND, 0
|
||||
)
|
||||
current_sizer.Add(control_sizer, expansion_flag * weight, wx.EXPAND, 0)
|
||||
elif data_type == Length:
|
||||
# Length type is a TextCtrl with special checks
|
||||
control_sizer = wx.StaticBoxSizer(
|
||||
|
@ -635,9 +626,7 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
control.Bind(
|
||||
wx.EVT_TEXT_ENTER, on_textbox_text(attr, control, obj, data_type)
|
||||
)
|
||||
current_sizer.Add(
|
||||
control_sizer, expansion_flag * weight, wx.EXPAND, 0
|
||||
)
|
||||
current_sizer.Add(control_sizer, expansion_flag * weight, wx.EXPAND, 0)
|
||||
elif data_type == Angle:
|
||||
# Angle type is a TextCtrl with special checks
|
||||
control_sizer = wx.StaticBoxSizer(
|
||||
|
@ -674,9 +663,7 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
control.Bind(
|
||||
wx.EVT_TEXT_ENTER, on_textbox_text(attr, control, obj, data_type)
|
||||
)
|
||||
current_sizer.Add(
|
||||
control_sizer, expansion_flag * weight, wx.EXPAND, 0
|
||||
)
|
||||
current_sizer.Add(control_sizer, expansion_flag * weight, wx.EXPAND, 0)
|
||||
elif data_type == Color:
|
||||
# Color data_type objects are get a button with the background.
|
||||
control_sizer = wx.StaticBoxSizer(
|
||||
|
@ -716,9 +703,7 @@ class ChoicePropertyPanel(ScrolledPanel):
|
|||
control_sizer.Add(control, 0, wx.EXPAND, 0)
|
||||
|
||||
control.Bind(wx.EVT_BUTTON, on_button_color(attr, control, obj))
|
||||
current_sizer.Add(
|
||||
control_sizer, expansion_flag * weight, wx.EXPAND, 0
|
||||
)
|
||||
current_sizer.Add(control_sizer, expansion_flag * weight, wx.EXPAND, 0)
|
||||
else:
|
||||
# Requires a registered data_type
|
||||
continue
|
||||
|
|
|
@ -3023,52 +3023,56 @@ icons8_menu_50 = PyEmbeddedImage(
|
|||
)
|
||||
|
||||
icons8_reference = PyEmbeddedImage(
|
||||
b'iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAIAAACRXR/mAAAABnRSTlMA/wD/AP83WBt9AAAA'
|
||||
b'CXBIWXMAAA7EAAAOxAGVKw4bAAADI0lEQVRYhe2Zv08iQRSA35qLQCLNhcqYmBAIgWZXQ2F2'
|
||||
b'/QdAIVdZ2FxosITmOsvrroHS7WwsLhQUnvwD7la7EQrYGGhIdmzoFgjGAq4YRG528JadJWDi'
|
||||
b'V20mL2++zI83zMBNJhPYPLbWLUDnU2sZPohWLpf7auPo6Kjf77N3ZlkWz/P2/Llcjgyd/Eso'
|
||||
b'FKJmrNfrE2bq9To1e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yrQ'
|
||||
b'QKtYfo0v4xymRSNM443fX8YhMcxZVJmJdlHkQfHeN4vOmhFtOpkE/wP8AkxqjwP00UznAAAA'
|
||||
b'AElFTkSuQmCC')
|
||||
b"iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAYAAADE6YVjAAAABmJLR0QA/wD/AP+gvaeTAAAC"
|
||||
b"EElEQVRIieXVy0tVURQG8N+VIoomPRQqTSGopqWDNGdp4wrqbwiKIGhe82gi6aiJ2tNBCI0q"
|
||||
b"SocR9BrWyLymRZREFiSVDda+dDjuC6eG9cHmcr671vr2Outx+FdQq2DTgaMYRCc2YREzuI9J"
|
||||
b"1P/2Am0YwTJWUqCHmEi/c4lfxjBa/1SgJwX5gVHsz9jU0I2xZFdPz5UFvmAeByr69GEBSzmh"
|
||||
b"ck3a8BQt6MVrHMI5rCnYLeIOrossiHo9wneR+ftmNxpJTr0F7pZ497kzhQ0F24PJ/3IzgQ5R"
|
||||
b"xNESP5ECXsFxnMAFfEp8OeB4itOeEzmTnMpFboicKvEDif+K9QW+J/GnG0RL4c9B0VHPcjfI"
|
||||
b"4AE+J4HOAv9ENM3hnMhOvEq3qILt2Jjs3xX4FbxM8VaJbMHHigJ7cUN0513RbUV8wNac4wsx"
|
||||
b"yWU0apI78+jK+EzheeOhmMksdqu2zxo4JnZYETXsETO2SuQedsivEDiPXek8TtwlrC3Z9WBb"
|
||||
b"ircK7aK/x0p8roW7RP1WcLFkfxXf0oWzGBYT21fgbqZgJ0u2R/AznY7E9Sf/oWYCxLqui2XX"
|
||||
b"6P0B3Jaf4LMi83Uiu7eittnOKqJbbNMFsYuqoD8JLGle06xQXaQ+LopZ7rpa4q8lu1nsqyrQ"
|
||||
b"QKtYfo0v4xymRSNM443fX8YhMcxZVJmJdlHkQfHeN4vOmhFtOpkE/wP8AkxqjwP00UznAAAA"
|
||||
b"AElFTkSuQmCC"
|
||||
)
|
||||
|
||||
icons8_r_black = PyEmbeddedImage(
|
||||
b'iVBORw0KGgoAAAAN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AAABJRU5ErkJggg=="
|
||||
)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import time
|
||||
import time
|
||||
|
||||
import wx
|
||||
from wx import aui
|
||||
|
||||
|
@ -96,7 +96,10 @@ class DebugTreePanel(wx.Panel):
|
|||
txt1 += str(node) + "\n"
|
||||
data = self.context.elements.flat(emphasized=True)
|
||||
for node in data:
|
||||
txt2 += f"{node.id} - {node.type} {node.label} - {timestr(node._emphasized_time)}" + "\n"
|
||||
txt2 += (
|
||||
f"{node.id} - {node.type} {node.label} - {timestr(node._emphasized_time)}"
|
||||
+ "\n"
|
||||
)
|
||||
node = self.context.elements.first_emphasized # (data)
|
||||
if node is None:
|
||||
txt3 = ""
|
||||
|
|
|
@ -47,6 +47,7 @@ from meerk40t.svgelements import Angle
|
|||
|
||||
_ = wx.GetTranslation
|
||||
|
||||
|
||||
def register_panel_navigation(window, context):
|
||||
panel = Drag(window, wx.ID_ANY, context=context)
|
||||
iconsize = get_default_icon_size()
|
||||
|
|
|
@ -55,4 +55,4 @@ class InputPropertyPanel(wx.Panel):
|
|||
continue
|
||||
if hasattr(node, item_att):
|
||||
item_value = getattr(node, item_att)
|
||||
self.context.signal(item_att, item_value)
|
||||
self.context.signal(item_att, item_value)
|
||||
|
|
|
@ -74,4 +74,4 @@ class OpBranchPanel(wx.Panel):
|
|||
continue
|
||||
if hasattr(node, item_att):
|
||||
item_value = getattr(node, item_att)
|
||||
self.context.signal(item_att, item_value)
|
||||
self.context.signal(item_att, item_value)
|
||||
|
|
|
@ -348,7 +348,7 @@ class SpeedPpiPanel(wx.Panel):
|
|||
power_max = None
|
||||
|
||||
op = node.type
|
||||
if op.startswith("op "): # Should, shouldnt it?
|
||||
if op.startswith("op "): # Should, shouldnt it?
|
||||
op = op[3:]
|
||||
else:
|
||||
op = ""
|
||||
|
|
|
@ -55,4 +55,4 @@ class OutputPropertyPanel(wx.Panel):
|
|||
continue
|
||||
if hasattr(node, item_att):
|
||||
item_value = getattr(node, item_att)
|
||||
self.context.signal(item_att, item_value)
|
||||
self.context.signal(item_att, item_value)
|
||||
|
|
|
@ -2,11 +2,11 @@ import wx
|
|||
|
||||
from meerk40t.gui.wxutils import ScrolledPanel
|
||||
|
||||
from ...core.units import Length
|
||||
from ...svgelements import Color
|
||||
from ..icons import icons8_vector_50
|
||||
from ..laserrender import swizzlecolor
|
||||
from ..mwindow import MWindow
|
||||
from ...core.units import Length
|
||||
|
||||
_ = wx.GetTranslation
|
||||
|
||||
|
@ -59,7 +59,7 @@ class PathPropertyPanel(ScrolledPanel):
|
|||
# Property display
|
||||
self.lbl_info_points = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY)
|
||||
self.lbl_info_length = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY)
|
||||
self.lbl_info_area = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY)
|
||||
self.lbl_info_area = wx.TextCtrl(self, wx.ID_ANY, "", style=wx.TE_READONLY)
|
||||
self.btn_info_get = wx.Button(self, wx.ID_ANY, _("Retrieve"))
|
||||
|
||||
self.__set_properties()
|
||||
|
|
|
@ -357,7 +357,9 @@ class TextPropertyPanel(ScrolledPanel):
|
|||
sizer_attrib.Add(self.button_attrib_bold, 0, wx.ALIGN_CENTER_VERTICAL, 0)
|
||||
sizer_attrib.Add(self.button_attrib_italic, 0, wx.ALIGN_CENTER_VERTICAL, 0)
|
||||
sizer_attrib.Add(self.button_attrib_underline, 0, wx.ALIGN_CENTER_VERTICAL, 0)
|
||||
sizer_attrib.Add(self.button_attrib_strikethrough, 0, wx.ALIGN_CENTER_VERTICAL, 0)
|
||||
sizer_attrib.Add(
|
||||
self.button_attrib_strikethrough, 0, wx.ALIGN_CENTER_VERTICAL, 0
|
||||
)
|
||||
|
||||
sizer_colors = wx.BoxSizer(wx.HORIZONTAL)
|
||||
|
||||
|
|
|
@ -1828,7 +1828,9 @@ class SelectionWidget(Widget):
|
|||
else:
|
||||
posy = "center"
|
||||
|
||||
data = [e for e in elements.flat(types=elem_nodes, emphasized=True) if e != refob]
|
||||
data = [
|
||||
e for e in elements.flat(types=elem_nodes, emphasized=True) if e != refob
|
||||
]
|
||||
|
||||
elements.align_elements(data, alignbounds, posx, posy, False)
|
||||
for q in data:
|
||||
|
|
|
@ -364,7 +364,9 @@ class SimulationPanel(wx.Panel, Job):
|
|||
|
||||
def fit_scene_to_panel(self):
|
||||
bbox = self.context.device.bbox()
|
||||
self.widget_scene.widget_root.focus_viewport_scene(bbox, self.view_pane.Size, 0.1)
|
||||
self.widget_scene.widget_root.focus_viewport_scene(
|
||||
bbox, self.view_pane.Size, 0.1
|
||||
)
|
||||
self.widget_scene.request_refresh()
|
||||
|
||||
def on_mouse_right_down(self, event=None):
|
||||
|
|
|
@ -4,7 +4,11 @@ from math import isinf
|
|||
import wx
|
||||
from wx import aui
|
||||
|
||||
from meerk40t.gui.icons import icons8_route_50, icons8_emergency_stop_button_50, icons8_pause_50
|
||||
from meerk40t.gui.icons import (
|
||||
icons8_emergency_stop_button_50,
|
||||
icons8_pause_50,
|
||||
icons8_route_50,
|
||||
)
|
||||
from meerk40t.gui.mwindow import MWindow
|
||||
from meerk40t.gui.wxutils import disable_window
|
||||
from meerk40t.kernel import signal_listener
|
||||
|
@ -399,10 +403,10 @@ class SpoolerPanel(wx.Panel):
|
|||
hours, remainder = divmod(t, 3600)
|
||||
minutes, seconds = divmod(remainder, 60)
|
||||
runtime = f"{int(hours)}:{str(int(minutes)).zfill(2)}:{str(int(seconds)).zfill(2)}"
|
||||
if list_id<self.list_job_spool.GetItemCount():
|
||||
if list_id < self.list_job_spool.GetItemCount():
|
||||
self.list_job_spool.SetItem(list_id, 6, runtime)
|
||||
except (AttributeError, AssertionError):
|
||||
if list_id<self.list_job_spool.GetItemCount():
|
||||
if list_id < self.list_job_spool.GetItemCount():
|
||||
self.list_job_spool.SetItem(list_id, 6, "-")
|
||||
|
||||
# Estimate Time
|
||||
|
@ -411,10 +415,10 @@ class SpoolerPanel(wx.Panel):
|
|||
hours, remainder = divmod(t, 3600)
|
||||
minutes, seconds = divmod(remainder, 60)
|
||||
runtime = f"{int(hours)}:{str(int(minutes)).zfill(2)}:{str(int(seconds)).zfill(2)}"
|
||||
if list_id<self.list_job_spool.GetItemCount():
|
||||
if list_id < self.list_job_spool.GetItemCount():
|
||||
self.list_job_spool.SetItem(list_id, 7, runtime)
|
||||
except (AttributeError, AssertionError):
|
||||
if list_id<self.list_job_spool.GetItemCount():
|
||||
if list_id < self.list_job_spool.GetItemCount():
|
||||
self.list_job_spool.SetItem(list_id, 7, "-")
|
||||
|
||||
|
||||
|
|
|
@ -39,7 +39,9 @@ class ColorWidget(StatusBarWidget):
|
|||
wx_button.SetBackgroundColour(wx.Colour(colors[idx]))
|
||||
wx_button.SetMinSize(wx.Size(10, -1))
|
||||
if idx == 0:
|
||||
wx_button.SetToolTip(_("Clear stroke-color (right click clear fill color)"))
|
||||
wx_button.SetToolTip(
|
||||
_("Clear stroke-color (right click clear fill color)")
|
||||
)
|
||||
else:
|
||||
wx_button.SetToolTip(_("Set stroke-color (right click set fill color)"))
|
||||
wx_button.Bind(wx.EVT_LEFT_DOWN, self.on_button_color_left)
|
||||
|
@ -148,9 +150,11 @@ class StrokeWidget(StatusBarWidget):
|
|||
|
||||
self.chk_scale = wx.CheckBox(self.parent, wx.ID_ANY, _("Scale"))
|
||||
self.chk_scale.SetToolTip(
|
||||
_("Toggle the behaviour of stroke-growth.") + "\n" +
|
||||
_("Active: stroke width remains the same, regardless of the element size") + "\n" +
|
||||
_("Inactive: stroke grows/shrink with scaled element")
|
||||
_("Toggle the behaviour of stroke-growth.")
|
||||
+ "\n"
|
||||
+ _("Active: stroke width remains the same, regardless of the element size")
|
||||
+ "\n"
|
||||
+ _("Inactive: stroke grows/shrink with scaled element")
|
||||
)
|
||||
|
||||
self.parent.Bind(wx.EVT_COMBOBOX, self.on_stroke_width, self.combo_units)
|
||||
|
|
|
@ -5,7 +5,7 @@ import wx
|
|||
from meerk40t.core.units import UNITS_PER_PIXEL
|
||||
from meerk40t.gui.fonts import wxfont_to_svg
|
||||
from meerk40t.gui.icons import icons8_type_50
|
||||
from meerk40t.gui.laserrender import swizzlecolor, LaserRender
|
||||
from meerk40t.gui.laserrender import LaserRender, swizzlecolor
|
||||
from meerk40t.gui.mwindow import MWindow
|
||||
from meerk40t.svgelements import Color, Matrix
|
||||
|
||||
|
@ -472,7 +472,14 @@ class TextEntry(MWindow):
|
|||
x = 0 if len(args) <= 3 else float(args[3])
|
||||
y = 0 if len(args) <= 4 else float(args[4])
|
||||
default_string = "" if len(args) <= 5 else " ".join(args[5:])
|
||||
self.panel = TextEntryPanel(self, wx.ID_ANY, context=self.context, x=x, y=y, default_string=default_string)
|
||||
self.panel = TextEntryPanel(
|
||||
self,
|
||||
wx.ID_ANY,
|
||||
context=self.context,
|
||||
x=x,
|
||||
y=y,
|
||||
default_string=default_string,
|
||||
)
|
||||
self.add_module_delegate(self.panel)
|
||||
_icon = wx.NullIcon
|
||||
_icon.CopyFromBitmap(icons8_type_50.GetBitmap())
|
||||
|
@ -513,7 +520,9 @@ class TextEntry(MWindow):
|
|||
color = Color(color, 1.0)
|
||||
node = elements.elem_branch.add(
|
||||
text=text,
|
||||
matrix=Matrix(f"translate({self.panel.x}, {self.panel.y}) scale({UNITS_PER_PIXEL})"),
|
||||
matrix=Matrix(
|
||||
f"translate({self.panel.x}, {self.panel.y}) scale({UNITS_PER_PIXEL})"
|
||||
),
|
||||
anchor=anchor,
|
||||
fill=color,
|
||||
type="elem text",
|
||||
|
|
|
@ -407,9 +407,7 @@ class MeerK40t(MWindow):
|
|||
"trailer": "px",
|
||||
"type": float,
|
||||
"label": _("Default pan factor:"),
|
||||
"tip": _(
|
||||
"Default pan factor controls how quick panning happens."
|
||||
),
|
||||
"tip": _("Default pan factor controls how quick panning happens."),
|
||||
"page": "Gui",
|
||||
"section": "Zoom",
|
||||
},
|
||||
|
@ -449,7 +447,8 @@ class MeerK40t(MWindow):
|
|||
"type": bool,
|
||||
"label": _("Auto-select element after creation"),
|
||||
"tip": _(
|
||||
"Active: selects a newly created element (via one of the tools in the toolbar)"),
|
||||
"Active: selects a newly created element (via one of the tools in the toolbar)"
|
||||
),
|
||||
"page": "Scene",
|
||||
"section": "General",
|
||||
},
|
||||
|
|
|
@ -8,11 +8,11 @@ from meerk40t.core.units import Length
|
|||
from meerk40t.gui.icons import (
|
||||
STD_ICON_SIZE,
|
||||
icon_meerk40t,
|
||||
icons8_bed_50,
|
||||
icons8_menu_50,
|
||||
icons8_r_black,
|
||||
icons8_r_white,
|
||||
icons8_reference,
|
||||
icons8_bed_50,
|
||||
icons8_ungroup_objects_50,
|
||||
)
|
||||
from meerk40t.gui.laserrender import DRAW_MODE_GUIDES, LaserRender
|
||||
|
|
|
@ -442,6 +442,7 @@ class TextCtrl(wx.TextCtrl):
|
|||
allok = 2
|
||||
self.warn_status = allok
|
||||
|
||||
|
||||
class ScrolledPanel(SP):
|
||||
"""
|
||||
We sometimes delete things fast enough that they call _SetupAfter when dead and crash.
|
||||
|
|
|
@ -1875,7 +1875,7 @@ class Kernel(Settings):
|
|||
ct += 1
|
||||
listen_funct, listen_lso = listen
|
||||
if (listen_funct == remove_funct or remove_funct is None) and (
|
||||
listen_lso is remove_lso or remove_lso is None
|
||||
listen_lso is remove_lso or remove_lso is None
|
||||
):
|
||||
del listeners[i]
|
||||
removed = True
|
||||
|
@ -1886,7 +1886,9 @@ class Kernel(Settings):
|
|||
# This should not occur, if it does, something is desynced attempting
|
||||
# to double remove. Which could also mean listeners are stuck listening
|
||||
# to places they should not which can cause other errors.
|
||||
print(f"Error in {signal}, no {str(remove_funct)} matching {str(remove_lso)}")
|
||||
print(
|
||||
f"Error in {signal}, no {str(remove_funct)} matching {str(remove_lso)}"
|
||||
)
|
||||
for index, listener in enumerate(listeners):
|
||||
print(f"{index}: {str(listener)}")
|
||||
|
||||
|
|
|
@ -1364,8 +1364,7 @@ class LihuiyuDriver(Parameters):
|
|||
|
||||
suffix_c = None
|
||||
if (
|
||||
not self.service.twitches
|
||||
or self.settings.get("_force_twitchless", False)
|
||||
not self.service.twitches or self.settings.get("_force_twitchless", False)
|
||||
) and not self.step:
|
||||
suffix_c = True
|
||||
if self._request_leftward is not None:
|
||||
|
|
|
@ -244,7 +244,12 @@ class ConfigurationTcp(wx.Panel):
|
|||
sizer_13.Add(sizer_port, 1, wx.EXPAND, 0)
|
||||
|
||||
self.text_port = TextCtrl(
|
||||
self, wx.ID_ANY, "", limited=True, check="int", style=wx.TE_PROCESS_ENTER,
|
||||
self,
|
||||
wx.ID_ANY,
|
||||
"",
|
||||
limited=True,
|
||||
check="int",
|
||||
style=wx.TE_PROCESS_ENTER,
|
||||
)
|
||||
self.text_port.SetToolTip(_("Port for tcp connection on the server computer"))
|
||||
sizer_port.Add(self.text_port, 1, wx.EXPAND, 0)
|
||||
|
@ -839,7 +844,11 @@ class ConfigurationSetupPanel(ScrolledPanel):
|
|||
h_sizer_y3.Add(h_sizer_y5, 0, wx.EXPAND, 0)
|
||||
|
||||
self.text_minimum_jog_distance = TextCtrl(
|
||||
self, wx.ID_ANY, "", limited=True, style=wx.TE_PROCESS_ENTER,
|
||||
self,
|
||||
wx.ID_ANY,
|
||||
"",
|
||||
limited=True,
|
||||
style=wx.TE_PROCESS_ENTER,
|
||||
)
|
||||
h_sizer_y5.Add(self.text_minimum_jog_distance, 1, wx.EXPAND, 0)
|
||||
|
||||
|
@ -849,7 +858,7 @@ class ConfigurationSetupPanel(ScrolledPanel):
|
|||
_("Jog Method"),
|
||||
choices=[_("Default"), _("Reset"), _("Finish")],
|
||||
majorDimension=3,
|
||||
style=wx.RA_SPECIFY_COLS, # wx.RA_SPECIFY_ROWS,
|
||||
style=wx.RA_SPECIFY_COLS, # wx.RA_SPECIFY_ROWS,
|
||||
)
|
||||
self.radio_box_jog_method.SetToolTip(
|
||||
_(
|
||||
|
@ -876,7 +885,12 @@ class ConfigurationSetupPanel(ScrolledPanel):
|
|||
)
|
||||
|
||||
self.text_rapid_x = TextCtrl(
|
||||
self, wx.ID_ANY, "", limited=True, check="float", style=wx.TE_PROCESS_ENTER,
|
||||
self,
|
||||
wx.ID_ANY,
|
||||
"",
|
||||
limited=True,
|
||||
check="float",
|
||||
style=wx.TE_PROCESS_ENTER,
|
||||
)
|
||||
sizer_36.Add(self.text_rapid_x, 1, wx.EXPAND, 0)
|
||||
|
||||
|
|
|
@ -20,10 +20,20 @@ class MoshiConfigurationPanel(ScrolledPanel):
|
|||
self.checkbox_home_right = wx.CheckBox(self, wx.ID_ANY, _("Home Right"))
|
||||
self.checkbox_home_bottom = wx.CheckBox(self, wx.ID_ANY, _("Home Bottom"))
|
||||
self.text_home_x = TextCtrl(
|
||||
self, wx.ID_ANY, "0mm", check="length", style=wx.TE_PROCESS_ENTER, limited=True,
|
||||
self,
|
||||
wx.ID_ANY,
|
||||
"0mm",
|
||||
check="length",
|
||||
style=wx.TE_PROCESS_ENTER,
|
||||
limited=True,
|
||||
)
|
||||
self.text_home_y = TextCtrl(
|
||||
self, wx.ID_ANY, "0mm", check="length", style=wx.TE_PROCESS_ENTER, limited=True,
|
||||
self,
|
||||
wx.ID_ANY,
|
||||
"0mm",
|
||||
check="length",
|
||||
style=wx.TE_PROCESS_ENTER,
|
||||
limited=True,
|
||||
)
|
||||
self.button_home_by_current = wx.Button(self, wx.ID_ANY, _("Set Current"))
|
||||
# self.checkbox_random_ppi = wx.CheckBox(self, wx.ID_ANY, _("Randomize PPI"))
|
||||
|
|
1
setup.py
1
setup.py
|
@ -1,4 +1,5 @@
|
|||
from setuptools import setup
|
||||
|
||||
setup(
|
||||
install_requires=[
|
||||
"pyusb>=1.0.0",
|
||||
|
|
Loading…
Reference in a new issue