meerk40t 0.9.2000__py2.py3-none-any.whl → 0.9.3001__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/balor_params.py +1 -43
- meerk40t/balormk/controller.py +1 -41
- meerk40t/balormk/device.py +16 -22
- meerk40t/balormk/driver.py +4 -4
- meerk40t/balormk/gui/balorconfig.py +2 -2
- meerk40t/balormk/gui/balorcontroller.py +13 -5
- meerk40t/balormk/gui/baloroperationproperties.py +0 -46
- meerk40t/balormk/gui/gui.py +17 -17
- meerk40t/camera/gui/camerapanel.py +18 -11
- meerk40t/core/cutcode/rastercut.py +3 -1
- meerk40t/core/cutplan.py +145 -14
- meerk40t/core/elements/clipboard.py +18 -9
- meerk40t/core/elements/element_treeops.py +320 -180
- meerk40t/core/elements/element_types.py +7 -2
- meerk40t/core/elements/elements.py +53 -27
- meerk40t/core/elements/geometry.py +8 -0
- meerk40t/core/elements/offset_clpr.py +129 -4
- meerk40t/core/elements/offset_mk.py +3 -1
- meerk40t/core/elements/shapes.py +28 -25
- meerk40t/core/laserjob.py +7 -0
- meerk40t/core/node/bootstrap.py +4 -0
- meerk40t/core/node/effect_hatch.py +85 -96
- meerk40t/core/node/effect_wobble.py +309 -0
- meerk40t/core/node/elem_image.py +49 -19
- meerk40t/core/node/elem_line.py +60 -0
- meerk40t/core/node/elem_rect.py +5 -3
- meerk40t/core/node/image_processed.py +766 -0
- meerk40t/core/node/image_raster.py +113 -0
- meerk40t/core/node/node.py +120 -1
- meerk40t/core/node/op_cut.py +2 -8
- meerk40t/core/node/op_dots.py +0 -8
- meerk40t/core/node/op_engrave.py +2 -18
- meerk40t/core/node/op_image.py +22 -35
- meerk40t/core/node/op_raster.py +0 -9
- meerk40t/core/planner.py +32 -2
- meerk40t/core/svg_io.py +699 -461
- meerk40t/core/treeop.py +191 -0
- meerk40t/core/undos.py +15 -1
- meerk40t/core/units.py +14 -4
- meerk40t/device/dummydevice.py +3 -2
- meerk40t/device/gui/defaultactions.py +43 -55
- meerk40t/device/gui/formatterpanel.py +58 -49
- meerk40t/device/gui/warningpanel.py +12 -12
- meerk40t/device/mixins.py +13 -0
- meerk40t/dxf/dxf_io.py +9 -5
- meerk40t/extra/ezd.py +28 -26
- meerk40t/extra/imageactions.py +300 -308
- meerk40t/extra/lbrn.py +19 -2
- meerk40t/fill/fills.py +6 -6
- meerk40t/fill/patternfill.py +1061 -1061
- meerk40t/fill/patterns.py +2 -6
- meerk40t/grbl/controller.py +168 -52
- meerk40t/grbl/device.py +23 -18
- meerk40t/grbl/driver.py +39 -0
- meerk40t/grbl/emulator.py +79 -19
- meerk40t/grbl/gcodejob.py +10 -0
- meerk40t/grbl/gui/grblconfiguration.py +2 -2
- meerk40t/grbl/gui/grblcontroller.py +24 -8
- meerk40t/grbl/gui/grblhardwareconfig.py +153 -0
- meerk40t/grbl/gui/gui.py +17 -14
- meerk40t/grbl/mock_connection.py +15 -34
- meerk40t/grbl/plugin.py +0 -4
- meerk40t/grbl/serial_connection.py +2 -1
- meerk40t/gui/about.py +8 -5
- meerk40t/gui/alignment.py +10 -6
- meerk40t/gui/basicops.py +27 -17
- meerk40t/gui/bufferview.py +2 -2
- meerk40t/gui/choicepropertypanel.py +101 -13
- meerk40t/gui/consolepanel.py +12 -9
- meerk40t/gui/devicepanel.py +38 -25
- meerk40t/gui/executejob.py +6 -4
- meerk40t/gui/help_assets/help_assets.py +13 -10
- meerk40t/gui/hersheymanager.py +8 -6
- meerk40t/gui/icons.py +1951 -3065
- meerk40t/gui/imagesplitter.py +14 -7
- meerk40t/gui/keymap.py +3 -3
- meerk40t/gui/laserpanel.py +151 -84
- meerk40t/gui/laserrender.py +61 -70
- meerk40t/gui/lasertoolpanel.py +8 -7
- meerk40t/gui/materialtest.py +3 -3
- meerk40t/gui/mkdebug.py +254 -1
- meerk40t/gui/navigationpanels.py +321 -180
- meerk40t/gui/notes.py +3 -3
- meerk40t/gui/opassignment.py +12 -12
- meerk40t/gui/operation_info.py +13 -13
- meerk40t/gui/plugin.py +5 -0
- meerk40t/gui/position.py +20 -18
- meerk40t/gui/preferences.py +21 -6
- meerk40t/gui/propertypanels/attributes.py +70 -22
- meerk40t/gui/propertypanels/blobproperty.py +2 -2
- meerk40t/gui/propertypanels/consoleproperty.py +2 -2
- meerk40t/gui/propertypanels/groupproperties.py +3 -3
- meerk40t/gui/propertypanels/hatchproperty.py +11 -18
- meerk40t/gui/propertypanels/imageproperty.py +4 -3
- meerk40t/gui/propertypanels/opbranchproperties.py +1 -1
- meerk40t/gui/propertypanels/pathproperty.py +2 -2
- meerk40t/gui/propertypanels/pointproperty.py +2 -2
- meerk40t/gui/propertypanels/propertywindow.py +4 -4
- meerk40t/gui/propertypanels/textproperty.py +3 -3
- meerk40t/gui/propertypanels/wobbleproperty.py +204 -0
- meerk40t/gui/ribbon.py +367 -259
- meerk40t/gui/scene/scene.py +31 -5
- meerk40t/gui/scenewidgets/elementswidget.py +12 -4
- meerk40t/gui/scenewidgets/gridwidget.py +2 -2
- meerk40t/gui/scenewidgets/laserpathwidget.py +7 -2
- meerk40t/gui/scenewidgets/machineoriginwidget.py +6 -2
- meerk40t/gui/scenewidgets/relocatewidget.py +1 -1
- meerk40t/gui/scenewidgets/reticlewidget.py +9 -0
- meerk40t/gui/scenewidgets/selectionwidget.py +12 -7
- meerk40t/gui/simpleui.py +95 -8
- meerk40t/gui/simulation.py +44 -36
- meerk40t/gui/spoolerpanel.py +124 -26
- meerk40t/gui/statusbarwidgets/defaultoperations.py +18 -6
- meerk40t/gui/statusbarwidgets/infowidget.py +2 -2
- meerk40t/gui/statusbarwidgets/opassignwidget.py +12 -12
- meerk40t/gui/statusbarwidgets/shapepropwidget.py +45 -18
- meerk40t/gui/statusbarwidgets/statusbar.py +11 -4
- meerk40t/gui/themes.py +78 -0
- meerk40t/gui/toolwidgets/toolcircle.py +2 -1
- meerk40t/gui/toolwidgets/toolellipse.py +2 -1
- meerk40t/gui/toolwidgets/toolimagecut.py +132 -0
- meerk40t/gui/toolwidgets/toolline.py +144 -0
- meerk40t/gui/toolwidgets/toolnodeedit.py +72 -145
- meerk40t/gui/toolwidgets/toolpoint.py +1 -1
- meerk40t/gui/toolwidgets/toolpolygon.py +8 -55
- meerk40t/gui/toolwidgets/toolrect.py +2 -1
- meerk40t/gui/usbconnect.py +2 -2
- meerk40t/gui/utilitywidgets/cyclocycloidwidget.py +2 -2
- meerk40t/gui/utilitywidgets/harmonograph.py +7 -7
- meerk40t/gui/utilitywidgets/scalewidget.py +1 -1
- meerk40t/gui/wordlisteditor.py +33 -18
- meerk40t/gui/wxmeerk40t.py +166 -66
- meerk40t/gui/wxmmain.py +236 -157
- meerk40t/gui/wxmribbon.py +49 -25
- meerk40t/gui/wxmscene.py +49 -38
- meerk40t/gui/wxmtree.py +216 -85
- meerk40t/gui/wxutils.py +62 -4
- meerk40t/image/imagetools.py +443 -15
- meerk40t/internal_plugins.py +2 -10
- meerk40t/kernel/kernel.py +12 -4
- meerk40t/lihuiyu/controller.py +7 -7
- meerk40t/lihuiyu/device.py +3 -1
- meerk40t/lihuiyu/driver.py +3 -0
- meerk40t/lihuiyu/gui/gui.py +8 -8
- meerk40t/lihuiyu/gui/lhyaccelgui.py +2 -2
- meerk40t/lihuiyu/gui/lhycontrollergui.py +73 -27
- meerk40t/lihuiyu/gui/lhydrivergui.py +2 -2
- meerk40t/lihuiyu/gui/tcpcontroller.py +22 -9
- meerk40t/main.py +6 -1
- meerk40t/moshi/controller.py +5 -5
- meerk40t/moshi/device.py +5 -2
- meerk40t/moshi/driver.py +4 -0
- meerk40t/moshi/gui/gui.py +8 -8
- meerk40t/moshi/gui/moshicontrollergui.py +24 -8
- meerk40t/moshi/gui/moshidrivergui.py +2 -2
- meerk40t/newly/controller.py +2 -0
- meerk40t/newly/device.py +9 -2
- meerk40t/newly/driver.py +4 -0
- meerk40t/newly/gui/gui.py +16 -17
- meerk40t/newly/gui/newlyconfig.py +2 -2
- meerk40t/newly/gui/newlycontroller.py +13 -5
- meerk40t/rotary/gui/gui.py +2 -2
- meerk40t/rotary/gui/rotarysettings.py +2 -2
- meerk40t/ruida/device.py +3 -0
- meerk40t/ruida/driver.py +4 -0
- meerk40t/ruida/gui/gui.py +6 -6
- meerk40t/ruida/gui/ruidaconfig.py +2 -2
- meerk40t/ruida/gui/ruidacontroller.py +13 -5
- meerk40t/svgelements.py +9 -9
- meerk40t/tools/geomstr.py +849 -153
- meerk40t/tools/kerftest.py +8 -4
- meerk40t/tools/livinghinges.py +15 -8
- {meerk40t-0.9.2000.dist-info → meerk40t-0.9.3001.dist-info}/METADATA +21 -16
- {meerk40t-0.9.2000.dist-info → meerk40t-0.9.3001.dist-info}/RECORD +185 -177
- {meerk40t-0.9.2000.dist-info → meerk40t-0.9.3001.dist-info}/entry_points.txt +0 -1
- test/test_core_elements.py +8 -24
- test/test_file_svg.py +88 -0
- test/test_fill.py +9 -9
- test/test_geomstr.py +258 -8
- test/test_kernel.py +4 -0
- test/test_tools_rasterplotter.py +29 -0
- meerk40t/extra/embroider.py +0 -56
- meerk40t/extra/pathoptimize.py +0 -249
- {meerk40t-0.9.2000.dist-info → meerk40t-0.9.3001.dist-info}/LICENSE +0 -0
- {meerk40t-0.9.2000.dist-info → meerk40t-0.9.3001.dist-info}/WHEEL +0 -0
- {meerk40t-0.9.2000.dist-info → meerk40t-0.9.3001.dist-info}/top_level.txt +0 -0
- {meerk40t-0.9.2000.dist-info → meerk40t-0.9.3001.dist-info}/zip-safe +0 -0
meerk40t/gui/notes.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import wx
|
2
2
|
from wx import aui
|
3
3
|
|
4
|
-
from .icons import STD_ICON_SIZE,
|
4
|
+
from .icons import STD_ICON_SIZE, icons8_comments
|
5
5
|
from .mwindow import MWindow
|
6
6
|
|
7
7
|
_ = wx.GetTranslation
|
@@ -115,7 +115,7 @@ class Notes(MWindow):
|
|
115
115
|
self.panel = NotePanel(self, wx.ID_ANY, context=self.context)
|
116
116
|
self.add_module_delegate(self.panel)
|
117
117
|
_icon = wx.NullIcon
|
118
|
-
_icon.CopyFromBitmap(
|
118
|
+
_icon.CopyFromBitmap(icons8_comments.GetBitmap())
|
119
119
|
self.SetIcon(_icon)
|
120
120
|
self.SetTitle(_("Notes"))
|
121
121
|
self.Children[0].SetFocus()
|
@@ -127,7 +127,7 @@ class Notes(MWindow):
|
|
127
127
|
"button/project/Notes",
|
128
128
|
{
|
129
129
|
"label": _("Notes"),
|
130
|
-
"icon":
|
130
|
+
"icon": icons8_comments,
|
131
131
|
"tip": _("Open Notes Window"),
|
132
132
|
"action": lambda v: kernel.console("window toggle Notes\n"),
|
133
133
|
"size": STD_ICON_SIZE,
|
meerk40t/gui/opassignment.py
CHANGED
@@ -3,12 +3,12 @@ from wx import aui
|
|
3
3
|
|
4
4
|
from meerk40t.core.elements.element_types import op_nodes
|
5
5
|
from meerk40t.gui.icons import (
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
6
|
+
icon_effect_hatch,
|
7
|
+
icon_points,
|
8
|
+
icons8_direction,
|
9
|
+
icons8_image,
|
10
|
+
icons8_laser_beam,
|
11
|
+
icons8_laserbeam_weak,
|
12
12
|
)
|
13
13
|
from meerk40t.gui.laserrender import swizzlecolor
|
14
14
|
from meerk40t.gui.wxutils import dip_size
|
@@ -165,7 +165,7 @@ class OperationAssignPanel(wx.Panel):
|
|
165
165
|
d = None
|
166
166
|
if node.type == "op raster":
|
167
167
|
c, d = get_color()
|
168
|
-
result =
|
168
|
+
result = icons8_direction.GetBitmap(
|
169
169
|
color=c,
|
170
170
|
resize=(iconsize, iconsize),
|
171
171
|
noadjustment=True,
|
@@ -173,7 +173,7 @@ class OperationAssignPanel(wx.Panel):
|
|
173
173
|
)
|
174
174
|
elif node.type == "op image":
|
175
175
|
c, d = get_color()
|
176
|
-
result =
|
176
|
+
result = icons8_image.GetBitmap(
|
177
177
|
color=c,
|
178
178
|
resize=(iconsize, iconsize),
|
179
179
|
noadjustment=True,
|
@@ -181,7 +181,7 @@ class OperationAssignPanel(wx.Panel):
|
|
181
181
|
)
|
182
182
|
elif node.type == "op engrave":
|
183
183
|
c, d = get_color()
|
184
|
-
result =
|
184
|
+
result = icons8_laserbeam_weak.GetBitmap(
|
185
185
|
color=c,
|
186
186
|
resize=(iconsize, iconsize),
|
187
187
|
noadjustment=True,
|
@@ -189,7 +189,7 @@ class OperationAssignPanel(wx.Panel):
|
|
189
189
|
)
|
190
190
|
elif node.type == "op cut":
|
191
191
|
c, d = get_color()
|
192
|
-
result =
|
192
|
+
result = icons8_laser_beam.GetBitmap(
|
193
193
|
color=c,
|
194
194
|
resize=(iconsize, iconsize),
|
195
195
|
noadjustment=True,
|
@@ -197,7 +197,7 @@ class OperationAssignPanel(wx.Panel):
|
|
197
197
|
)
|
198
198
|
elif node.type == "op dots":
|
199
199
|
c, d = get_color()
|
200
|
-
result =
|
200
|
+
result = icon_points.GetBitmap(
|
201
201
|
color=c,
|
202
202
|
resize=(iconsize, iconsize),
|
203
203
|
noadjustment=True,
|
@@ -217,7 +217,7 @@ class OperationAssignPanel(wx.Panel):
|
|
217
217
|
self.buttons[myidx].SetBitmap(wx.NullBitmap)
|
218
218
|
else:
|
219
219
|
self.buttons[myidx].SetBitmap(image)
|
220
|
-
# self.buttons[myidx].SetBitmapDisabled(
|
220
|
+
# self.buttons[myidx].SetBitmapDisabled(icons8_unlock.GetBitmap(color=Color("Grey"), resize=(self.iconsize, self.iconsize), noadjustment=True, keepalpha=True))
|
221
221
|
self.buttons[myidx].SetToolTip(
|
222
222
|
str(node)
|
223
223
|
+ "\n"
|
meerk40t/gui/operation_info.py
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
import wx
|
2
2
|
|
3
3
|
from meerk40t.gui.icons import (
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
icon_effect_hatch,
|
5
|
+
icon_points,
|
6
|
+
icons8_computer_support,
|
7
|
+
icons8_direction,
|
8
|
+
icons8_image,
|
9
|
+
icons8_laser_beam,
|
10
|
+
icons8_laserbeam_weak,
|
11
11
|
)
|
12
12
|
from meerk40t.gui.mwindow import MWindow
|
13
13
|
from meerk40t.gui.wxutils import ScrolledPanel
|
@@ -62,11 +62,11 @@ class OpInfoPanel(ScrolledPanel):
|
|
62
62
|
self.Layout()
|
63
63
|
|
64
64
|
self.opinfo = {
|
65
|
-
"op cut": ("Cut",
|
66
|
-
"op raster": ("Raster",
|
67
|
-
"op image": ("Image",
|
68
|
-
"op engrave": ("Engrave",
|
69
|
-
"op dots": ("Dots",
|
65
|
+
"op cut": ("Cut", icons8_laser_beam, 0),
|
66
|
+
"op raster": ("Raster", icons8_direction, 0),
|
67
|
+
"op image": ("Image", icons8_image, 0),
|
68
|
+
"op engrave": ("Engrave", icons8_laserbeam_weak, 0),
|
69
|
+
"op dots": ("Dots", icon_points, 0),
|
70
70
|
}
|
71
71
|
self.state_images = wx.ImageList()
|
72
72
|
self.state_images.Create(width=25, height=25)
|
@@ -284,7 +284,7 @@ class OperationInformation(MWindow):
|
|
284
284
|
self.panel = OpInfoPanel(self, wx.ID_ANY, context=self.context)
|
285
285
|
self.add_module_delegate(self.panel)
|
286
286
|
_icon = wx.NullIcon
|
287
|
-
_icon.CopyFromBitmap(
|
287
|
+
_icon.CopyFromBitmap(icons8_computer_support.GetBitmap())
|
288
288
|
self.SetIcon(_icon)
|
289
289
|
self.SetTitle(_("Operation Information"))
|
290
290
|
|
meerk40t/gui/plugin.py
CHANGED
@@ -78,6 +78,10 @@ and a wxpython version <= 4.1.1."""
|
|
78
78
|
|
79
79
|
kernel.register("module/Scene", Scene)
|
80
80
|
|
81
|
+
from meerk40t.gui.themes import Themes
|
82
|
+
|
83
|
+
kernel.add_service("themes", Themes(kernel))
|
84
|
+
|
81
85
|
elif lifecycle == "boot":
|
82
86
|
kernel_root = kernel.root
|
83
87
|
choices = [
|
@@ -171,6 +175,7 @@ and a wxpython version <= 4.1.1."""
|
|
171
175
|
),
|
172
176
|
"page": "Gui",
|
173
177
|
"section": "General",
|
178
|
+
"signals": "restart",
|
174
179
|
},
|
175
180
|
{
|
176
181
|
"attr": "disable_tree_tool_tips",
|
meerk40t/gui/position.py
CHANGED
@@ -3,7 +3,7 @@ from wx import aui
|
|
3
3
|
|
4
4
|
from meerk40t.core.elements.element_types import elem_nodes
|
5
5
|
from meerk40t.core.units import UNITS_PER_PIXEL, Length
|
6
|
-
from meerk40t.gui.icons import
|
6
|
+
from meerk40t.gui.icons import get_default_icon_size, icons8_compress
|
7
7
|
from meerk40t.gui.wxutils import StaticBoxSizer, TextCtrl, dip_size
|
8
8
|
from meerk40t.kernel import signal_listener
|
9
9
|
|
@@ -67,20 +67,10 @@ class PositionPanel(wx.Panel):
|
|
67
67
|
self.text_h.SetMinSize(dip_size(self, 70, 23))
|
68
68
|
self.chk_individually = wx.CheckBox(self, wx.ID_ANY, _("Individ."))
|
69
69
|
self.chk_lock = wx.CheckBox(self, wx.ID_ANY, _("Keep ratio"))
|
70
|
-
|
71
|
-
resize_param = 32
|
72
|
-
else:
|
73
|
-
resize_param = None
|
70
|
+
resize_param = 0.5 * get_default_icon_size()
|
74
71
|
|
75
|
-
self.button_execute = wx.BitmapButton(
|
76
|
-
|
77
|
-
)
|
78
|
-
w, h = self.button_execute.GetBitmap().Size
|
79
|
-
icon_size = w
|
80
|
-
self.pos_bitmaps = self.calculate_icons(icon_size)
|
81
|
-
self.button_param = wx.BitmapButton(
|
82
|
-
self, wx.ID_ANY, self.pos_bitmaps[self.offset_index]
|
83
|
-
)
|
72
|
+
self.button_execute = wx.BitmapButton(self, wx.ID_ANY)
|
73
|
+
self.button_param = wx.BitmapButton(self, wx.ID_ANY)
|
84
74
|
self.choices = ["mm", "cm", "inch", "mil", "%"]
|
85
75
|
self.combo_box_units = wx.ComboBox(
|
86
76
|
self,
|
@@ -93,6 +83,12 @@ class PositionPanel(wx.Panel):
|
|
93
83
|
self.__set_properties()
|
94
84
|
self.__do_layout()
|
95
85
|
|
86
|
+
self.button_execute.SetBitmap(icons8_compress.GetBitmap(resize=resize_param))
|
87
|
+
w, h = self.button_execute.GetBitmap().Size
|
88
|
+
icon_size = w
|
89
|
+
self.pos_bitmaps = self.calculate_icons(icon_size)
|
90
|
+
self.button_param.SetBitmap(self.pos_bitmaps[self.offset_index])
|
91
|
+
|
96
92
|
self.text_x.SetActionRoutine(self.on_text_x_enter)
|
97
93
|
self.text_y.SetActionRoutine(self.on_text_y_enter)
|
98
94
|
self.text_w.SetActionRoutine(self.on_text_w_enter)
|
@@ -223,6 +219,12 @@ class PositionPanel(wx.Panel):
|
|
223
219
|
self.chk_lock.SetToolTip(
|
224
220
|
_("If checked then the aspect ratio (width / height) will be maintained")
|
225
221
|
)
|
222
|
+
self.button_param.SetToolTip(
|
223
|
+
_(
|
224
|
+
"Set the point of reference for the element,\n"
|
225
|
+
+ "which edge/corner should be put on the given location"
|
226
|
+
)
|
227
|
+
)
|
226
228
|
self.button_execute.SetSize(self.button_execute.GetBestSize())
|
227
229
|
self.combo_box_units.SetSelection(0)
|
228
230
|
# end wxGlade
|
@@ -568,7 +570,7 @@ class PositionPanel(wx.Panel):
|
|
568
570
|
try:
|
569
571
|
w = Length(
|
570
572
|
self.text_w.GetValue(),
|
571
|
-
relative_length=self.context.view.width,
|
573
|
+
relative_length=self.context.device.view.width,
|
572
574
|
unitless=UNITS_PER_PIXEL,
|
573
575
|
preferred_units=self.context.units_name,
|
574
576
|
)
|
@@ -600,7 +602,7 @@ class PositionPanel(wx.Panel):
|
|
600
602
|
try:
|
601
603
|
h = Length(
|
602
604
|
self.text_h.GetValue(),
|
603
|
-
relative_length=self.context.view.height,
|
605
|
+
relative_length=self.context.device.view.height,
|
604
606
|
unitless=UNITS_PER_PIXEL,
|
605
607
|
preferred_units=self.context.units_name,
|
606
608
|
)
|
@@ -631,7 +633,7 @@ class PositionPanel(wx.Panel):
|
|
631
633
|
try:
|
632
634
|
pos_x = Length(
|
633
635
|
self.text_h.GetValue(),
|
634
|
-
relative_length=self.context.view.height,
|
636
|
+
relative_length=self.context.device.view.height,
|
635
637
|
unitless=UNITS_PER_PIXEL,
|
636
638
|
preferred_units=self.context.units_name,
|
637
639
|
)
|
@@ -649,7 +651,7 @@ class PositionPanel(wx.Panel):
|
|
649
651
|
try:
|
650
652
|
pos_y = Length(
|
651
653
|
self.text_h.GetValue(),
|
652
|
-
relative_length=self.context.view.width,
|
654
|
+
relative_length=self.context.device.view.width,
|
653
655
|
unitless=UNITS_PER_PIXEL,
|
654
656
|
preferred_units=self.context.units_name,
|
655
657
|
)
|
meerk40t/gui/preferences.py
CHANGED
@@ -5,8 +5,10 @@ import platform
|
|
5
5
|
|
6
6
|
import wx
|
7
7
|
|
8
|
+
from meerk40t.kernel.kernel import signal_listener
|
9
|
+
|
8
10
|
from .choicepropertypanel import ChoicePropertyPanel
|
9
|
-
from .icons import
|
11
|
+
from .icons import icons8_administrative_tools
|
10
12
|
from .mwindow import MWindow
|
11
13
|
from .wxmribbon import RibbonEditor
|
12
14
|
from .wxutils import StaticBoxSizer, TextCtrl
|
@@ -125,6 +127,7 @@ class PreferencesLanguagePanel(wx.Panel):
|
|
125
127
|
lang = self.combo_language.GetSelection()
|
126
128
|
if lang != -1 and self.context.app is not None:
|
127
129
|
self.context.app.update_language(lang)
|
130
|
+
self.context.signal("restart")
|
128
131
|
|
129
132
|
|
130
133
|
# end of class PreferencesLanguagePanel
|
@@ -525,11 +528,14 @@ class Preferences(MWindow):
|
|
525
528
|
)
|
526
529
|
self.panel_color.SetupScrolling()
|
527
530
|
|
531
|
+
self.panel_ribbon = RibbonEditor(self, wx.ID_ANY, context=self.context)
|
532
|
+
|
528
533
|
self.notebook_main.AddPage(self.panel_main, _("General"))
|
529
534
|
self.notebook_main.AddPage(self.panel_classification, _("Classification"))
|
530
535
|
self.notebook_main.AddPage(self.panel_gui, _("GUI"))
|
531
536
|
self.notebook_main.AddPage(self.panel_scene, _("Scene"))
|
532
537
|
self.notebook_main.AddPage(self.panel_color, _("Colors"))
|
538
|
+
self.notebook_main.AddPage(self.panel_ribbon, _("Ribbon"))
|
533
539
|
|
534
540
|
self.panels = [
|
535
541
|
self.panel_main,
|
@@ -537,10 +543,9 @@ class Preferences(MWindow):
|
|
537
543
|
self.panel_gui,
|
538
544
|
self.panel_scene,
|
539
545
|
self.panel_color,
|
546
|
+
self.panel_ribbon,
|
540
547
|
]
|
541
|
-
self.
|
542
|
-
self.notebook_main.AddPage(self.panel_ribbon, _("Ribbon"))
|
543
|
-
self.panels.append(self.panel_ribbon)
|
548
|
+
self.panel_ids = ["main", "classification", "gui", "scene", "color", "ribbon"]
|
544
549
|
self.context.setting(bool, "developer_mode", False)
|
545
550
|
if self.context.developer_mode:
|
546
551
|
panel_space = ChoicePropertyPanel(
|
@@ -548,13 +553,23 @@ class Preferences(MWindow):
|
|
548
553
|
)
|
549
554
|
self.notebook_main.AddPage(panel_space, _("Coordinate Space"))
|
550
555
|
self.panels.append(panel_space)
|
556
|
+
self.panel_ids.append("space")
|
551
557
|
self.Layout()
|
552
558
|
|
553
559
|
_icon = wx.NullIcon
|
554
|
-
_icon.CopyFromBitmap(
|
560
|
+
_icon.CopyFromBitmap(icons8_administrative_tools.GetBitmap())
|
555
561
|
self.SetIcon(_icon)
|
556
562
|
self.SetTitle(_("Preferences"))
|
557
563
|
|
564
|
+
@signal_listener("preferences")
|
565
|
+
def on_pref_signal(self, origin, *args):
|
566
|
+
if not args:
|
567
|
+
return
|
568
|
+
panel = args[0]
|
569
|
+
if panel and panel in self.panel_ids:
|
570
|
+
self.Show()
|
571
|
+
self.notebook_main.SetSelection(self.panel_ids.index(panel))
|
572
|
+
|
558
573
|
@property
|
559
574
|
def color_reset(self):
|
560
575
|
# Not relevant
|
@@ -605,7 +620,7 @@ class Preferences(MWindow):
|
|
605
620
|
"button/config/Preferences",
|
606
621
|
{
|
607
622
|
"label": _("Preferences"),
|
608
|
-
"icon":
|
623
|
+
"icon": icons8_administrative_tools,
|
609
624
|
"tip": _("Opens Preferences Window"),
|
610
625
|
"action": lambda v: kernel.console("window toggle Preferences\n"),
|
611
626
|
},
|
@@ -2,8 +2,8 @@ from math import sqrt
|
|
2
2
|
|
3
3
|
import wx
|
4
4
|
|
5
|
+
import meerk40t.gui.icons as mkicons
|
5
6
|
from meerk40t.core.units import Length
|
6
|
-
from meerk40t.gui.icons import STD_ICON_SIZE, icons8_lock_50, icons8_padlock_50
|
7
7
|
from meerk40t.gui.laserrender import swizzlecolor
|
8
8
|
from meerk40t.gui.wxutils import CheckBox, StaticBoxSizer, TextCtrl, dip_size
|
9
9
|
from meerk40t.svgelements import Color
|
@@ -248,6 +248,9 @@ class IdPanel(wx.Panel):
|
|
248
248
|
self.sizer_label.Add(self.text_label, 1, wx.EXPAND, 0)
|
249
249
|
sizer_id_label.Add(self.sizer_id, 1, wx.EXPAND, 0)
|
250
250
|
sizer_id_label.Add(self.sizer_label, 1, wx.EXPAND, 0)
|
251
|
+
self.icon_display = wx.StaticBitmap(self, wx.ID_ANY)
|
252
|
+
self.icon_display.SetSize(wx.Size(mkicons.STD_ICON_SIZE, mkicons.STD_ICON_SIZE))
|
253
|
+
sizer_id_label.Add(self.icon_display, 0, wx.EXPAND, 0)
|
251
254
|
|
252
255
|
main_sizer.Add(sizer_id_label, 0, wx.EXPAND, 0)
|
253
256
|
|
@@ -308,6 +311,48 @@ class IdPanel(wx.Panel):
|
|
308
311
|
# Could happen if the propertypanel has been destroyed
|
309
312
|
pass
|
310
313
|
|
314
|
+
bmp = None
|
315
|
+
type_patterns = {
|
316
|
+
"util wait": mkicons.icon_timer,
|
317
|
+
"util home": mkicons.icons8_home_filled,
|
318
|
+
"util goto": mkicons.icon_return,
|
319
|
+
"util output": mkicons.icon_external,
|
320
|
+
"util input": mkicons.icon_internal,
|
321
|
+
"util console": mkicons.icon_console,
|
322
|
+
"op engrave": mkicons.icons8_laserbeam_weak,
|
323
|
+
"op cut": mkicons.icons8_laser_beam,
|
324
|
+
"op image": mkicons.icons8_image,
|
325
|
+
"op raster": mkicons.icons8_direction,
|
326
|
+
"op dots": mkicons.icon_points,
|
327
|
+
"effect hatch": mkicons.icon_effect_hatch,
|
328
|
+
"effect wobble": mkicons.icon_effect_wobble,
|
329
|
+
"place current": mkicons.icons8_home_filled,
|
330
|
+
"place point": mkicons.icons8_home_filled,
|
331
|
+
"elem point": mkicons.icon_points,
|
332
|
+
"file": mkicons.icons8_file,
|
333
|
+
"group": mkicons.icons8_group_objects,
|
334
|
+
"elem rect": mkicons.icon_mk_rectangular,
|
335
|
+
"elem ellipse": mkicons.icon_mk_ellipse,
|
336
|
+
"elem image": mkicons.icons8_image,
|
337
|
+
"elem path": mkicons.icon_path,
|
338
|
+
"elem line": mkicons.icon_line,
|
339
|
+
"elem polyline": mkicons.icon_mk_polyline,
|
340
|
+
"elem text": mkicons.icon_bmap_text,
|
341
|
+
"blob": mkicons.icons8_file,
|
342
|
+
}
|
343
|
+
if hasattr(self.node, "type"):
|
344
|
+
if node.type in type_patterns:
|
345
|
+
icon = type_patterns[node.type]
|
346
|
+
bmp = icon.GetBitmap(resize=mkicons.STD_ICON_SIZE, buffer=2)
|
347
|
+
if bmp is None:
|
348
|
+
self.icon_display.Show(False)
|
349
|
+
else:
|
350
|
+
try:
|
351
|
+
self.icon_display.SetBitmap(bmp)
|
352
|
+
self.icon_display.Show(True)
|
353
|
+
except RuntimeError:
|
354
|
+
pass
|
355
|
+
|
311
356
|
if vis1 or vis2:
|
312
357
|
self.Show()
|
313
358
|
else:
|
@@ -476,7 +521,7 @@ class StrokeWidthPanel(wx.Panel):
|
|
476
521
|
s_sizer.Add(self.text_width, 1, wx.EXPAND, 0)
|
477
522
|
s_sizer.Add(self.combo_units, 1, wx.EXPAND, 0)
|
478
523
|
s_sizer.Add(self.chk_scale, 0, wx.ALIGN_CENTER_VERTICAL, 0)
|
479
|
-
self.Bind(wx.EVT_COMBOBOX, self.
|
524
|
+
self.Bind(wx.EVT_COMBOBOX, self.on_stroke_width_combo, self.combo_units)
|
480
525
|
self.Bind(wx.EVT_CHECKBOX, self.on_chk_scale, self.chk_scale)
|
481
526
|
self.text_width.SetActionRoutine(self.on_stroke_width)
|
482
527
|
self.SetSizer(main_sizer)
|
@@ -496,6 +541,9 @@ class StrokeWidthPanel(wx.Panel):
|
|
496
541
|
except (ValueError, AttributeError):
|
497
542
|
pass
|
498
543
|
|
544
|
+
def on_stroke_width_combo(self, event):
|
545
|
+
self.on_stroke_width()
|
546
|
+
|
499
547
|
def on_stroke_width(self):
|
500
548
|
if self.node is None or self.node.lock:
|
501
549
|
return
|
@@ -636,11 +684,11 @@ class PositionSizePanel(wx.Panel):
|
|
636
684
|
)
|
637
685
|
self.btn_lock_ratio = wx.ToggleButton(self, wx.ID_ANY, "")
|
638
686
|
self.btn_lock_ratio.SetValue(True)
|
639
|
-
self.bitmap_locked =
|
640
|
-
resize=STD_ICON_SIZE / 2, use_theme=False
|
687
|
+
self.bitmap_locked = mkicons.icons8_lock.GetBitmap(
|
688
|
+
resize=mkicons.STD_ICON_SIZE / 2, use_theme=False
|
641
689
|
)
|
642
|
-
self.bitmap_unlocked =
|
643
|
-
resize=STD_ICON_SIZE / 2, use_theme=False
|
690
|
+
self.bitmap_unlocked = mkicons.icons8_unlock.GetBitmap(
|
691
|
+
resize=mkicons.STD_ICON_SIZE / 2, use_theme=False
|
644
692
|
)
|
645
693
|
self.__set_properties()
|
646
694
|
self.__do_layout()
|
@@ -967,11 +1015,11 @@ class RoundedRectPanel(wx.Panel):
|
|
967
1015
|
self.btn_lock_ratio.SetMinSize(dip_size(self, 32, 32))
|
968
1016
|
self.btn_lock_ratio.SetToolTip(_("Lock the radii of X- and Y-axis"))
|
969
1017
|
# Set Bitmap
|
970
|
-
self.bitmap_locked =
|
971
|
-
resize=STD_ICON_SIZE / 2, use_theme=False
|
1018
|
+
self.bitmap_locked = mkicons.icons8_lock.GetBitmap(
|
1019
|
+
resize=mkicons.STD_ICON_SIZE / 2, use_theme=False
|
972
1020
|
)
|
973
|
-
self.bitmap_unlocked =
|
974
|
-
resize=STD_ICON_SIZE / 2, use_theme=False
|
1021
|
+
self.bitmap_unlocked = mkicons.icons8_unlock.GetBitmap(
|
1022
|
+
resize=mkicons.STD_ICON_SIZE / 2, use_theme=False
|
975
1023
|
)
|
976
1024
|
|
977
1025
|
sizer_x.Add(self.slider_x, 1, wx.EXPAND, 0)
|
@@ -1008,16 +1056,16 @@ class RoundedRectPanel(wx.Panel):
|
|
1008
1056
|
return
|
1009
1057
|
# Set values for rx and ry
|
1010
1058
|
bb = self.node.bbox()
|
1011
|
-
width = self.node.
|
1012
|
-
height = self.node.
|
1013
|
-
if self.node.
|
1059
|
+
width = self.node.width
|
1060
|
+
height = self.node.height
|
1061
|
+
if self.node.rx is None:
|
1014
1062
|
rx = 0
|
1015
1063
|
else:
|
1016
|
-
rx = self.node.
|
1017
|
-
if self.node.
|
1064
|
+
rx = self.node.rx
|
1065
|
+
if self.node.ry is None:
|
1018
1066
|
ry = 0
|
1019
1067
|
else:
|
1020
|
-
ry = self.node.
|
1068
|
+
ry = self.node.ry
|
1021
1069
|
flag = bool(rx == ry)
|
1022
1070
|
self.btn_lock_ratio.SetValue(flag)
|
1023
1071
|
self.on_toggle_ratio(None)
|
@@ -1039,21 +1087,21 @@ class RoundedRectPanel(wx.Panel):
|
|
1039
1087
|
|
1040
1088
|
def set_values(self, axis, value):
|
1041
1089
|
sync = self.btn_lock_ratio.GetValue()
|
1042
|
-
width = self.node.
|
1043
|
-
height = self.node.
|
1090
|
+
width = self.node.width
|
1091
|
+
height = self.node.height
|
1044
1092
|
if axis == 0: # x
|
1045
1093
|
rx = value / 100 * width
|
1046
|
-
self.node.
|
1094
|
+
self.node.rx = rx
|
1047
1095
|
if sync:
|
1048
|
-
self.node.
|
1096
|
+
self.node.ry = rx
|
1049
1097
|
max_val_y = self.slider_x.GetMax()
|
1050
1098
|
int_ry = int(100.0 * rx / height)
|
1051
1099
|
self.slider_y.SetValue(min(max_val_y, int_ry))
|
1052
1100
|
else:
|
1053
1101
|
ry = value / 100 * height
|
1054
|
-
self.node.
|
1102
|
+
self.node.ry = ry
|
1055
1103
|
if sync:
|
1056
|
-
self.node.
|
1104
|
+
self.node.rx = ry
|
1057
1105
|
max_val_x = self.slider_x.GetMax()
|
1058
1106
|
int_rx = int(100.0 * ry / width)
|
1059
1107
|
self.slider_x.SetValue(min(max_val_x, int_rx))
|
@@ -3,7 +3,7 @@ import wx
|
|
3
3
|
from meerk40t.gui.wxutils import ScrolledPanel
|
4
4
|
|
5
5
|
from ...core.node.blobnode import BlobNode
|
6
|
-
from ..icons import
|
6
|
+
from ..icons import icons8_vector
|
7
7
|
from ..mwindow import MWindow
|
8
8
|
from .attributes import IdPanel
|
9
9
|
|
@@ -100,7 +100,7 @@ class BlobProperty(MWindow):
|
|
100
100
|
self.panel = BlobPropertyPanel(self, wx.ID_ANY, context=self.context, node=node)
|
101
101
|
self.add_module_delegate(self.panel)
|
102
102
|
_icon = wx.NullIcon
|
103
|
-
_icon.CopyFromBitmap(
|
103
|
+
_icon.CopyFromBitmap(icons8_vector.GetBitmap())
|
104
104
|
self.SetIcon(_icon)
|
105
105
|
self.SetTitle(_("Blob Properties"))
|
106
106
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import wx
|
2
2
|
|
3
|
-
from ..icons import
|
3
|
+
from ..icons import icons8_comments
|
4
4
|
from ..mwindow import MWindow
|
5
5
|
|
6
6
|
_ = wx.GetTranslation
|
@@ -14,7 +14,7 @@ class ConsoleProperty(MWindow):
|
|
14
14
|
self, wx.ID_ANY, context=self.context, node=node
|
15
15
|
)
|
16
16
|
_icon = wx.NullIcon
|
17
|
-
_icon.CopyFromBitmap(
|
17
|
+
_icon.CopyFromBitmap(icons8_comments.GetBitmap())
|
18
18
|
self.SetIcon(_icon)
|
19
19
|
self.SetTitle(_("Console Properties"))
|
20
20
|
self.Children[0].SetFocus()
|
@@ -6,7 +6,7 @@ import wx
|
|
6
6
|
from meerk40t.gui.wxutils import ScrolledPanel
|
7
7
|
|
8
8
|
# from ...svgelements import SVG_ATTR_ID
|
9
|
-
from ..icons import
|
9
|
+
from ..icons import icons8_group_objects
|
10
10
|
from ..mwindow import MWindow
|
11
11
|
from ..wxutils import StaticBoxSizer
|
12
12
|
from .attributes import IdPanel
|
@@ -100,7 +100,7 @@ class GroupProperty(MWindow):
|
|
100
100
|
)
|
101
101
|
self.add_module_delegate(self.panel)
|
102
102
|
_icon = wx.NullIcon
|
103
|
-
_icon.CopyFromBitmap(
|
103
|
+
_icon.CopyFromBitmap(icons8_group_objects.GetBitmap())
|
104
104
|
self.SetIcon(_icon)
|
105
105
|
self.SetTitle(_("Group Properties"))
|
106
106
|
|
@@ -203,7 +203,7 @@ class FileProperty(MWindow):
|
|
203
203
|
)
|
204
204
|
self.add_module_delegate(self.panel)
|
205
205
|
_icon = wx.NullIcon
|
206
|
-
_icon.CopyFromBitmap(
|
206
|
+
_icon.CopyFromBitmap(icons8_group_objects.GetBitmap())
|
207
207
|
self.SetIcon(_icon)
|
208
208
|
self.SetTitle(_("File Properties"))
|
209
209
|
|
@@ -2,8 +2,8 @@ import wx
|
|
2
2
|
|
3
3
|
from meerk40t.gui.wxutils import ScrolledPanel, StaticBoxSizer
|
4
4
|
|
5
|
-
from ...core.units import Length
|
6
|
-
from ...svgelements import
|
5
|
+
from ...core.units import Angle, Length
|
6
|
+
from ...svgelements import Matrix
|
7
7
|
from ..wxutils import TextCtrl, set_ctrl_value
|
8
8
|
from .attributes import ColorPanel, IdPanel
|
9
9
|
|
@@ -28,8 +28,6 @@ class HatchPropertyPanel(ScrolledPanel):
|
|
28
28
|
# `Id` at top in all cases...
|
29
29
|
panel_id = IdPanel(self, id=wx.ID_ANY, context=self.context, node=self.node)
|
30
30
|
main_sizer.Add(panel_id, 1, wx.EXPAND, 0)
|
31
|
-
self.check_active = wx.CheckBox(self, wx.ID_ANY, _("Active"))
|
32
|
-
main_sizer.Add(self.check_active, 0, wx.EXPAND, 0)
|
33
31
|
|
34
32
|
panel_stroke = ColorPanel(
|
35
33
|
self,
|
@@ -135,7 +133,6 @@ class HatchPropertyPanel(ScrolledPanel):
|
|
135
133
|
self.text_distance.SetActionRoutine(self.on_text_distance)
|
136
134
|
self.text_angle.SetActionRoutine(self.on_text_angle)
|
137
135
|
self.text_angle_delta.SetActionRoutine(self.on_text_angle_delta)
|
138
|
-
self.check_active.Bind(wx.EVT_CHECKBOX, self.on_check_active)
|
139
136
|
self.check_classify.Bind(wx.EVT_CHECKBOX, self.on_check_classify)
|
140
137
|
self.Bind(wx.EVT_COMMAND_SCROLL, self.on_slider_loops, self.slider_loops)
|
141
138
|
self.Bind(wx.EVT_COMMAND_SCROLL, self.on_slider_angle, self.slider_angle)
|
@@ -193,23 +190,17 @@ class HatchPropertyPanel(ScrolledPanel):
|
|
193
190
|
set_ctrl_value(self.text_angle_delta, str(self.node.hatch_angle_delta))
|
194
191
|
set_ctrl_value(self.text_distance, str(self.node.hatch_distance))
|
195
192
|
try:
|
196
|
-
h_angle = float(Angle
|
193
|
+
h_angle = float(Angle(self.node.hatch_angle).degrees)
|
197
194
|
self.slider_angle.SetValue(int(h_angle))
|
198
195
|
except ValueError:
|
199
196
|
pass
|
200
197
|
try:
|
201
|
-
h_angle = float(Angle
|
198
|
+
h_angle = float(Angle(self.node.hatch_angle_delta).degrees)
|
202
199
|
self.slider_angle_delta.SetValue(int(h_angle))
|
203
200
|
except ValueError:
|
204
201
|
pass
|
205
|
-
self.check_active.SetValue(self.node.effect)
|
206
202
|
self.Show()
|
207
203
|
|
208
|
-
def on_check_active(self, event):
|
209
|
-
value = self.check_active.GetValue()
|
210
|
-
self.node.effect = value
|
211
|
-
self.context.signal("refresh_scene", "Scene")
|
212
|
-
|
213
204
|
def on_check_classify(self, event):
|
214
205
|
self.context._auto_classify = self.check_classify.GetValue()
|
215
206
|
|
@@ -223,7 +214,9 @@ class HatchPropertyPanel(ScrolledPanel):
|
|
223
214
|
if self.check_classify.GetValue():
|
224
215
|
mynode = self.node
|
225
216
|
wasemph = self.node.emphasized
|
226
|
-
self.
|
217
|
+
data = [self.node]
|
218
|
+
self.context.elements.remove_elements_from_operations(data)
|
219
|
+
self.context.elements.classify(data)
|
227
220
|
self.context.elements.signal("tree_changed")
|
228
221
|
self.context.elements.signal("element_property_update", self.node)
|
229
222
|
mynode.emphasized = wasemph
|
@@ -268,7 +261,7 @@ class HatchPropertyPanel(ScrolledPanel):
|
|
268
261
|
|
269
262
|
def on_text_angle(self):
|
270
263
|
try:
|
271
|
-
angle =
|
264
|
+
angle = Angle(self.text_angle.GetValue()).angle_degrees
|
272
265
|
if angle == self.node.hatch_angle:
|
273
266
|
return
|
274
267
|
self.node.hatch_angle = angle
|
@@ -278,7 +271,7 @@ class HatchPropertyPanel(ScrolledPanel):
|
|
278
271
|
except ValueError:
|
279
272
|
return
|
280
273
|
try:
|
281
|
-
h_angle = float(Angle
|
274
|
+
h_angle = float(Angle(self.node.angle).degrees)
|
282
275
|
while h_angle > self.slider_angle.GetMax():
|
283
276
|
h_angle -= 360
|
284
277
|
while h_angle < self.slider_angle.GetMin():
|
@@ -297,7 +290,7 @@ class HatchPropertyPanel(ScrolledPanel):
|
|
297
290
|
|
298
291
|
def on_text_angle_delta(self):
|
299
292
|
try:
|
300
|
-
angle =
|
293
|
+
angle = Angle(self.text_angle_delta.GetValue()).angle_degrees
|
301
294
|
if angle == self.node.hatch_angle_delta:
|
302
295
|
return
|
303
296
|
self.node.hatch_angle_delta = angle
|
@@ -306,7 +299,7 @@ class HatchPropertyPanel(ScrolledPanel):
|
|
306
299
|
except ValueError:
|
307
300
|
return
|
308
301
|
try:
|
309
|
-
h_angle_delta = float(Angle
|
302
|
+
h_angle_delta = float(Angle(self.node.delta).degrees)
|
310
303
|
while h_angle_delta > self.slider_angle_delta.GetMax():
|
311
304
|
h_angle_delta -= 360
|
312
305
|
while h_angle_delta < self.slider_angle_delta.GetMin():
|