meerk40t 0.9.7020__py2.py3-none-any.whl → 0.9.7040__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- meerk40t/balormk/clone_loader.py +3 -2
- meerk40t/balormk/controller.py +28 -11
- meerk40t/balormk/cylindermod.py +1 -0
- meerk40t/balormk/device.py +13 -9
- meerk40t/balormk/driver.py +9 -2
- meerk40t/balormk/galvo_commands.py +3 -1
- meerk40t/balormk/gui/gui.py +6 -0
- meerk40t/balormk/livelightjob.py +338 -321
- meerk40t/balormk/mock_connection.py +4 -3
- meerk40t/balormk/usb_connection.py +11 -2
- meerk40t/camera/camera.py +19 -14
- meerk40t/camera/gui/camerapanel.py +6 -0
- meerk40t/core/cutcode/cutcode.py +1 -1
- meerk40t/core/cutplan.py +169 -43
- meerk40t/core/elements/element_treeops.py +444 -147
- meerk40t/core/elements/elements.py +100 -9
- meerk40t/core/elements/grid.py +8 -1
- meerk40t/core/elements/offset_mk.py +2 -1
- meerk40t/core/elements/shapes.py +618 -279
- meerk40t/core/elements/tree_commands.py +10 -5
- meerk40t/core/node/elem_ellipse.py +18 -8
- meerk40t/core/node/elem_image.py +51 -19
- meerk40t/core/node/elem_line.py +18 -8
- meerk40t/core/node/elem_path.py +18 -8
- meerk40t/core/node/elem_point.py +10 -4
- meerk40t/core/node/elem_polyline.py +19 -11
- meerk40t/core/node/elem_rect.py +18 -8
- meerk40t/core/node/elem_text.py +11 -5
- meerk40t/core/node/filenode.py +2 -8
- meerk40t/core/node/groupnode.py +11 -11
- meerk40t/core/node/image_processed.py +11 -5
- meerk40t/core/node/image_raster.py +11 -5
- meerk40t/core/node/node.py +70 -19
- meerk40t/core/node/refnode.py +2 -1
- meerk40t/core/planner.py +23 -0
- meerk40t/core/svg_io.py +91 -34
- meerk40t/core/undos.py +1 -1
- meerk40t/core/wordlist.py +1 -0
- meerk40t/device/dummydevice.py +7 -1
- meerk40t/dxf/dxf_io.py +6 -0
- meerk40t/extra/mk_potrace.py +1959 -0
- meerk40t/extra/param_functions.py +1 -1
- meerk40t/extra/potrace.py +14 -10
- meerk40t/extra/vtracer.py +222 -0
- meerk40t/grbl/device.py +81 -8
- meerk40t/grbl/interpreter.py +1 -1
- meerk40t/gui/about.py +21 -3
- meerk40t/gui/basicops.py +3 -3
- meerk40t/gui/choicepropertypanel.py +1 -4
- meerk40t/gui/devicepanel.py +20 -16
- meerk40t/gui/gui_mixins.py +8 -1
- meerk40t/gui/icons.py +330 -253
- meerk40t/gui/laserpanel.py +8 -3
- meerk40t/gui/laserrender.py +41 -21
- meerk40t/gui/magnetoptions.py +158 -65
- meerk40t/gui/materialtest.py +229 -39
- meerk40t/gui/navigationpanels.py +229 -24
- meerk40t/gui/propertypanels/hatchproperty.py +2 -0
- meerk40t/gui/propertypanels/imageproperty.py +160 -106
- meerk40t/gui/ribbon.py +6 -1
- meerk40t/gui/scenewidgets/gridwidget.py +29 -32
- meerk40t/gui/scenewidgets/rectselectwidget.py +190 -192
- meerk40t/gui/simulation.py +75 -77
- meerk40t/gui/spoolerpanel.py +6 -9
- meerk40t/gui/statusbarwidgets/defaultoperations.py +84 -48
- meerk40t/gui/statusbarwidgets/infowidget.py +2 -2
- meerk40t/gui/themes.py +7 -1
- meerk40t/gui/tips.py +15 -1
- meerk40t/gui/toolwidgets/toolpointmove.py +3 -1
- meerk40t/gui/wxmeerk40t.py +26 -0
- meerk40t/gui/wxmmain.py +242 -114
- meerk40t/gui/wxmscene.py +180 -4
- meerk40t/gui/wxmtree.py +4 -2
- meerk40t/gui/wxutils.py +60 -15
- meerk40t/image/imagetools.py +130 -66
- meerk40t/internal_plugins.py +4 -0
- meerk40t/kernel/kernel.py +49 -22
- meerk40t/kernel/settings.py +29 -8
- meerk40t/lihuiyu/device.py +30 -12
- meerk40t/main.py +22 -5
- meerk40t/moshi/device.py +20 -6
- meerk40t/network/console_server.py +22 -6
- meerk40t/newly/device.py +10 -3
- meerk40t/newly/gui/gui.py +10 -0
- meerk40t/ruida/device.py +22 -2
- meerk40t/ruida/gui/gui.py +6 -6
- meerk40t/ruida/gui/ruidaoperationproperties.py +1 -10
- meerk40t/ruida/loader.py +6 -3
- meerk40t/ruida/rdjob.py +3 -3
- meerk40t/tools/geomstr.py +195 -39
- meerk40t/tools/rasterplotter.py +179 -93
- {meerk40t-0.9.7020.dist-info → meerk40t-0.9.7040.dist-info}/METADATA +1 -1
- {meerk40t-0.9.7020.dist-info → meerk40t-0.9.7040.dist-info}/RECORD +98 -96
- {meerk40t-0.9.7020.dist-info → meerk40t-0.9.7040.dist-info}/WHEEL +1 -1
- {meerk40t-0.9.7020.dist-info → meerk40t-0.9.7040.dist-info}/LICENSE +0 -0
- {meerk40t-0.9.7020.dist-info → meerk40t-0.9.7040.dist-info}/entry_points.txt +0 -0
- {meerk40t-0.9.7020.dist-info → meerk40t-0.9.7040.dist-info}/top_level.txt +0 -0
- {meerk40t-0.9.7020.dist-info → meerk40t-0.9.7040.dist-info}/zip-safe +0 -0
meerk40t/balormk/clone_loader.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
"""
|
2
2
|
This code initializes the FPGA on cloned boards.
|
3
3
|
"""
|
4
|
+
|
4
5
|
import hashlib
|
5
6
|
import struct
|
6
7
|
|
@@ -422,7 +423,7 @@ def load_sys(sys_file, channel=None):
|
|
422
423
|
channel(f"{len(devices)} devices need initializing.")
|
423
424
|
for i, device in enumerate(devices):
|
424
425
|
if channel:
|
425
|
-
channel(f"Clone board #{i+1} detected. Sending Initialize.")
|
426
|
+
channel(f"Clone board #{i + 1} detected. Sending Initialize.")
|
426
427
|
_send_device_sys(device, sys_file, channel=channel)
|
427
428
|
except usb.core.USBError as e:
|
428
429
|
channel(str(e))
|
@@ -446,7 +447,7 @@ def load_chunks(chunks=None, channel=None):
|
|
446
447
|
channel(f"{len(devices)} devices need initializing.")
|
447
448
|
for i, device in enumerate(devices):
|
448
449
|
if channel:
|
449
|
-
channel(f"Clone board #{i+1} detected. Sending Initialize.")
|
450
|
+
channel(f"Clone board #{i + 1} detected. Sending Initialize.")
|
450
451
|
_write_chunks(device, chunks)
|
451
452
|
except usb.core.USBError as e:
|
452
453
|
channel(str(e))
|
meerk40t/balormk/controller.py
CHANGED
@@ -9,6 +9,7 @@ import struct
|
|
9
9
|
import threading
|
10
10
|
import time
|
11
11
|
from copy import copy
|
12
|
+
|
12
13
|
from usb.core import NoBackendError
|
13
14
|
|
14
15
|
from meerk40t.balormk.mock_connection import MockConnection
|
@@ -391,10 +392,15 @@ class GalvoController:
|
|
391
392
|
self.usb_log("Could not connect to the LMC controller.")
|
392
393
|
self.usb_log("Automatic connections disabled.")
|
393
394
|
from platform import system
|
395
|
+
|
394
396
|
osname = system()
|
395
397
|
if osname == "Windows":
|
396
|
-
self.usb_log(
|
397
|
-
|
398
|
+
self.usb_log(
|
399
|
+
"Did you install the libusb driver via Zadig (https://zadig.akeo.ie/)?"
|
400
|
+
)
|
401
|
+
self.usb_log(
|
402
|
+
"Consult the wiki: https://github.com/meerk40t/meerk40t/wiki/Install%3A-Windows"
|
403
|
+
)
|
398
404
|
raise ConnectionRefusedError(
|
399
405
|
"Could not connect to the LMC controller."
|
400
406
|
)
|
@@ -404,22 +410,25 @@ class GalvoController:
|
|
404
410
|
self._abort_open = False
|
405
411
|
|
406
412
|
def send(self, data, read=True):
|
413
|
+
ERR = (-1, -1, -1, -1) # Error return value
|
407
414
|
if self.is_shutdown:
|
408
|
-
return
|
415
|
+
return ERR
|
409
416
|
try:
|
410
417
|
self.connect_if_needed()
|
411
418
|
except (ConnectionRefusedError, NoBackendError):
|
412
|
-
return
|
419
|
+
return ERR
|
420
|
+
if not self.connection:
|
421
|
+
return ERR
|
413
422
|
try:
|
414
423
|
self.connection.write(self._machine_index, data)
|
415
424
|
except ConnectionError:
|
416
|
-
return
|
425
|
+
return ERR
|
417
426
|
if read:
|
418
427
|
try:
|
419
428
|
r = self.connection.read(self._machine_index)
|
420
429
|
return struct.unpack("<4H", r)
|
421
430
|
except ConnectionError:
|
422
|
-
return
|
431
|
+
return ERR
|
423
432
|
|
424
433
|
def status(self):
|
425
434
|
b0, b1, b2, b3 = self.get_version()
|
@@ -815,8 +824,14 @@ class GalvoController:
|
|
815
824
|
for nibble in serial_number:
|
816
825
|
content += f"{nibble:04x}"
|
817
826
|
self.usb_log(f"Serial Number: {serial_number} ({content})")
|
818
|
-
if
|
819
|
-
self.
|
827
|
+
if (
|
828
|
+
self.service.serial_enable
|
829
|
+
and self.service.serial
|
830
|
+
and not self.serial_confirmed
|
831
|
+
):
|
832
|
+
self.usb_log(
|
833
|
+
f"Requires serial number confirmation against {self.service.serial}."
|
834
|
+
)
|
820
835
|
if content == self.service.serial:
|
821
836
|
self.serial_confirmed = True
|
822
837
|
|
@@ -943,7 +958,9 @@ class GalvoController:
|
|
943
958
|
@return:
|
944
959
|
"""
|
945
960
|
# return int(speed / 2)
|
946
|
-
galvos_per_mm, _ = self.service.view.position(
|
961
|
+
galvos_per_mm, _ = self.service.view.position(
|
962
|
+
"1mm", "1mm", vector=True, margins=False
|
963
|
+
)
|
947
964
|
return abs(int(speed * galvos_per_mm / 1000.0))
|
948
965
|
|
949
966
|
def _convert_frequency(self, frequency_khz, base=20000.0):
|
@@ -1066,7 +1083,7 @@ class GalvoController:
|
|
1066
1083
|
y = int(y)
|
1067
1084
|
self._list_write(listJumpTo, x, y, angle, distance)
|
1068
1085
|
if self._signal_updates:
|
1069
|
-
view
|
1086
|
+
view = self.service.view
|
1070
1087
|
l_x, l_y = view.iposition(self._last_x, self._last_y)
|
1071
1088
|
n_x, n_y = view.iposition(x, y)
|
1072
1089
|
self.service.signal(
|
@@ -1101,7 +1118,7 @@ class GalvoController:
|
|
1101
1118
|
self._list_write(listMarkTo, x, y, angle, distance)
|
1102
1119
|
|
1103
1120
|
if self._signal_updates:
|
1104
|
-
view
|
1121
|
+
view = self.service.view
|
1105
1122
|
l_x, l_y = view.iposition(self._last_x, self._last_y)
|
1106
1123
|
n_x, n_y = view.iposition(x, y)
|
1107
1124
|
self.service.signal(
|
meerk40t/balormk/cylindermod.py
CHANGED
meerk40t/balormk/device.py
CHANGED
@@ -8,9 +8,9 @@ from meerk40t.balormk.driver import BalorDriver
|
|
8
8
|
from meerk40t.core.spoolers import Spooler
|
9
9
|
from meerk40t.core.units import Angle, Length
|
10
10
|
from meerk40t.core.view import View
|
11
|
+
from meerk40t.device.devicechoices import get_effect_choices
|
11
12
|
from meerk40t.device.mixins import Status
|
12
13
|
from meerk40t.kernel import Service, signal_listener
|
13
|
-
from meerk40t.device.devicechoices import get_effect_choices
|
14
14
|
|
15
15
|
|
16
16
|
class BalorDevice(Service, Status):
|
@@ -258,14 +258,13 @@ class BalorDevice(Service, Status):
|
|
258
258
|
"section": "_00_General",
|
259
259
|
"subsection": "_10_Device Selection",
|
260
260
|
},
|
261
|
-
{
|
261
|
+
{
|
262
|
+
"attr": "serial_enable",
|
262
263
|
"object": self,
|
263
264
|
"default": False,
|
264
265
|
"type": bool,
|
265
266
|
"label": _("Check serial no"),
|
266
|
-
"tip": _(
|
267
|
-
"Does the machine need to have a specific serial number?"
|
268
|
-
),
|
267
|
+
"tip": _("Does the machine need to have a specific serial number?"),
|
269
268
|
"section": "_00_General",
|
270
269
|
"subsection": "_10_Device Selection",
|
271
270
|
},
|
@@ -274,13 +273,11 @@ class BalorDevice(Service, Status):
|
|
274
273
|
"object": self,
|
275
274
|
"default": "",
|
276
275
|
"type": str,
|
277
|
-
"tip": _(
|
278
|
-
"Does the machine need to have a specific serial number?"
|
279
|
-
),
|
276
|
+
"tip": _("Does the machine need to have a specific serial number?"),
|
280
277
|
"label": "",
|
281
278
|
"section": "_00_General",
|
282
279
|
"subsection": "_10_Device Selection",
|
283
|
-
"conditional": (self, "serial_enable")
|
280
|
+
"conditional": (self, "serial_enable"),
|
284
281
|
},
|
285
282
|
{
|
286
283
|
"attr": "footpedal_pin",
|
@@ -964,3 +961,10 @@ class BalorDevice(Service, Status):
|
|
964
961
|
|
965
962
|
def cool_helper(self, choice_dict):
|
966
963
|
self.kernel.root.coolant.coolant_choice_helper(self)(choice_dict)
|
964
|
+
|
965
|
+
def location(self):
|
966
|
+
"""
|
967
|
+
Returns the current connection type for the device.
|
968
|
+
If the device is in mock mode, returns 'mock', otherwise returns 'usb'.
|
969
|
+
"""
|
970
|
+
return "mock" if self.mock else "usb"
|
meerk40t/balormk/driver.py
CHANGED
@@ -4,7 +4,9 @@ Galvo Driver
|
|
4
4
|
The Driver has a set of different commands which are standardly sent and utilizes those which can be performed by this
|
5
5
|
driver.
|
6
6
|
"""
|
7
|
+
|
7
8
|
import time
|
9
|
+
|
8
10
|
from usb.core import NoBackendError
|
9
11
|
|
10
12
|
from meerk40t.balormk.controller import GalvoController
|
@@ -18,8 +20,8 @@ from meerk40t.core.cutcode.outputcut import OutputCut
|
|
18
20
|
from meerk40t.core.cutcode.plotcut import PlotCut
|
19
21
|
from meerk40t.core.cutcode.quadcut import QuadCut
|
20
22
|
from meerk40t.core.cutcode.waitcut import WaitCut
|
21
|
-
from meerk40t.device.basedevice import PLOT_FINISH, PLOT_JOG, PLOT_RAPID, PLOT_SETTING
|
22
23
|
from meerk40t.core.plotplanner import PlotPlanner
|
24
|
+
from meerk40t.device.basedevice import PLOT_FINISH, PLOT_JOG, PLOT_RAPID, PLOT_SETTING
|
23
25
|
from meerk40t.tools.geomstr import Geomstr
|
24
26
|
|
25
27
|
|
@@ -44,7 +46,12 @@ class BalorDriver:
|
|
44
46
|
self._queue_current = 0
|
45
47
|
self._queue_total = 0
|
46
48
|
self.plot_planner = PlotPlanner(
|
47
|
-
dict(),
|
49
|
+
dict(),
|
50
|
+
single=True,
|
51
|
+
ppi=False,
|
52
|
+
shift=False,
|
53
|
+
group=True,
|
54
|
+
require_uniform_movement=False,
|
48
55
|
)
|
49
56
|
self.value_penbox = None
|
50
57
|
self.plot_planner.settings_then_jog = True
|
@@ -4,6 +4,7 @@ import struct
|
|
4
4
|
import time
|
5
5
|
|
6
6
|
from usb.core import NoBackendError
|
7
|
+
|
7
8
|
from meerk40t.balormk.driver import BalorDriver
|
8
9
|
from meerk40t.balormk.livelightjob import LiveLightJob
|
9
10
|
from meerk40t.core.laserjob import LaserJob
|
@@ -375,6 +376,7 @@ def plugin(service, lifecycle):
|
|
375
376
|
)
|
376
377
|
if v[0] == 0x8002:
|
377
378
|
break
|
379
|
+
|
378
380
|
try:
|
379
381
|
driver.connection.connect_if_needed()
|
380
382
|
except (ConnectionRefusedError, NoBackendError):
|
@@ -563,7 +565,7 @@ def plugin(service, lifecycle):
|
|
563
565
|
except (ValueError, struct.error):
|
564
566
|
pass
|
565
567
|
if not isinstance(v, int):
|
566
|
-
channel(f'Compile error. Line #{cmd_i+1} value "{b}"')
|
568
|
+
channel(f'Compile error. Line #{cmd_i + 1} value "{b}"')
|
567
569
|
return
|
568
570
|
values[byte_i] = v
|
569
571
|
byte_i += 1
|
meerk40t/balormk/gui/gui.py
CHANGED
@@ -79,6 +79,7 @@ def plugin(service, lifecycle):
|
|
79
79
|
"icon": icon_balor_full,
|
80
80
|
"help": "devicebalor",
|
81
81
|
"action": lambda e: service("full-light\n"),
|
82
|
+
"multi_autoexec": False,
|
82
83
|
},
|
83
84
|
# {
|
84
85
|
# "identifier": "live-regmark",
|
@@ -93,6 +94,7 @@ def plugin(service, lifecycle):
|
|
93
94
|
"icon": icon_balor_bounds,
|
94
95
|
"help": "devicebalor",
|
95
96
|
"action": lambda e: service("select-light\n"),
|
97
|
+
"multi_autoexec": False,
|
96
98
|
},
|
97
99
|
{
|
98
100
|
"identifier": "live-hull",
|
@@ -100,6 +102,7 @@ def plugin(service, lifecycle):
|
|
100
102
|
"icon": icon_balor_hull,
|
101
103
|
"help": "devicebalor",
|
102
104
|
"action": lambda e: service("hull-light\n"),
|
105
|
+
"multi_autoexec": False,
|
103
106
|
},
|
104
107
|
{
|
105
108
|
"identifier": "hull",
|
@@ -107,6 +110,7 @@ def plugin(service, lifecycle):
|
|
107
110
|
"icon": icon_balor_hull,
|
108
111
|
"help": "devicebalor",
|
109
112
|
"action": lambda e: service("element* geometry hull light\n"),
|
113
|
+
"multi_autoexec": False,
|
110
114
|
},
|
111
115
|
{
|
112
116
|
"identifier": "box",
|
@@ -114,6 +118,7 @@ def plugin(service, lifecycle):
|
|
114
118
|
"icon": icon_balor_bounds,
|
115
119
|
"help": "devicebalor",
|
116
120
|
"action": lambda e: service("box light\n"),
|
121
|
+
"multi_autoexec": False,
|
117
122
|
},
|
118
123
|
# {
|
119
124
|
# "identifier": "ants",
|
@@ -126,6 +131,7 @@ def plugin(service, lifecycle):
|
|
126
131
|
"icon": icon_balor_full,
|
127
132
|
"help": "devicebalor",
|
128
133
|
"action": lambda e: service("element* geometry light\n"),
|
134
|
+
"multi_autoexec": False,
|
129
135
|
},
|
130
136
|
],
|
131
137
|
"toggle": {
|