meerk40t 0.9.3001__py2.py3-none-any.whl → 0.9.7010__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/__init__.py +1 -1
- meerk40t/balormk/balor_params.py +167 -167
- meerk40t/balormk/clone_loader.py +457 -457
- meerk40t/balormk/controller.py +1566 -1512
- meerk40t/balormk/cylindermod.py +64 -0
- meerk40t/balormk/device.py +966 -1959
- meerk40t/balormk/driver.py +778 -591
- meerk40t/balormk/galvo_commands.py +1195 -0
- meerk40t/balormk/gui/balorconfig.py +237 -111
- meerk40t/balormk/gui/balorcontroller.py +191 -184
- meerk40t/balormk/gui/baloroperationproperties.py +116 -115
- meerk40t/balormk/gui/corscene.py +845 -0
- meerk40t/balormk/gui/gui.py +179 -147
- meerk40t/balormk/livelightjob.py +466 -382
- meerk40t/balormk/mock_connection.py +131 -109
- meerk40t/balormk/plugin.py +133 -135
- meerk40t/balormk/usb_connection.py +306 -301
- meerk40t/camera/__init__.py +1 -1
- meerk40t/camera/camera.py +514 -397
- meerk40t/camera/gui/camerapanel.py +1241 -1095
- meerk40t/camera/gui/gui.py +58 -58
- meerk40t/camera/plugin.py +441 -399
- meerk40t/ch341/__init__.py +27 -27
- meerk40t/ch341/ch341device.py +628 -628
- meerk40t/ch341/libusb.py +595 -589
- meerk40t/ch341/mock.py +171 -171
- meerk40t/ch341/windriver.py +157 -157
- meerk40t/constants.py +13 -0
- meerk40t/core/__init__.py +1 -1
- meerk40t/core/bindalias.py +550 -539
- meerk40t/core/core.py +47 -47
- meerk40t/core/cutcode/cubiccut.py +73 -73
- meerk40t/core/cutcode/cutcode.py +315 -312
- meerk40t/core/cutcode/cutgroup.py +141 -137
- meerk40t/core/cutcode/cutobject.py +192 -185
- meerk40t/core/cutcode/dwellcut.py +37 -37
- meerk40t/core/cutcode/gotocut.py +29 -29
- meerk40t/core/cutcode/homecut.py +29 -29
- meerk40t/core/cutcode/inputcut.py +34 -34
- meerk40t/core/cutcode/linecut.py +33 -33
- meerk40t/core/cutcode/outputcut.py +34 -34
- meerk40t/core/cutcode/plotcut.py +335 -335
- meerk40t/core/cutcode/quadcut.py +61 -61
- meerk40t/core/cutcode/rastercut.py +168 -148
- meerk40t/core/cutcode/waitcut.py +34 -34
- meerk40t/core/cutplan.py +1843 -1316
- meerk40t/core/drivers.py +330 -329
- meerk40t/core/elements/align.py +801 -669
- meerk40t/core/elements/branches.py +1844 -1507
- meerk40t/core/elements/clipboard.py +229 -219
- meerk40t/core/elements/element_treeops.py +4561 -2837
- meerk40t/core/elements/element_types.py +125 -105
- meerk40t/core/elements/elements.py +4329 -3617
- meerk40t/core/elements/files.py +117 -64
- meerk40t/core/elements/geometry.py +473 -224
- meerk40t/core/elements/grid.py +467 -316
- meerk40t/core/elements/materials.py +158 -94
- meerk40t/core/elements/notes.py +50 -38
- meerk40t/core/elements/offset_clpr.py +933 -912
- meerk40t/core/elements/offset_mk.py +963 -955
- meerk40t/core/elements/penbox.py +339 -267
- meerk40t/core/elements/placements.py +300 -83
- meerk40t/core/elements/render.py +785 -687
- meerk40t/core/elements/shapes.py +2618 -2092
- meerk40t/core/elements/trace.py +651 -563
- meerk40t/core/elements/tree_commands.py +415 -409
- meerk40t/core/elements/undo_redo.py +116 -58
- meerk40t/core/elements/wordlist.py +319 -200
- meerk40t/core/exceptions.py +9 -9
- meerk40t/core/laserjob.py +220 -220
- meerk40t/core/logging.py +63 -63
- meerk40t/core/node/blobnode.py +83 -86
- meerk40t/core/node/bootstrap.py +105 -103
- meerk40t/core/node/branch_elems.py +40 -31
- meerk40t/core/node/branch_ops.py +45 -38
- meerk40t/core/node/branch_regmark.py +48 -41
- meerk40t/core/node/cutnode.py +29 -32
- meerk40t/core/node/effect_hatch.py +375 -257
- meerk40t/core/node/effect_warp.py +398 -0
- meerk40t/core/node/effect_wobble.py +441 -309
- meerk40t/core/node/elem_ellipse.py +404 -309
- meerk40t/core/node/elem_image.py +1082 -801
- meerk40t/core/node/elem_line.py +358 -292
- meerk40t/core/node/elem_path.py +259 -201
- meerk40t/core/node/elem_point.py +129 -102
- meerk40t/core/node/elem_polyline.py +310 -246
- meerk40t/core/node/elem_rect.py +376 -286
- meerk40t/core/node/elem_text.py +445 -418
- meerk40t/core/node/filenode.py +59 -40
- meerk40t/core/node/groupnode.py +138 -74
- meerk40t/core/node/image_processed.py +777 -766
- meerk40t/core/node/image_raster.py +156 -113
- meerk40t/core/node/layernode.py +31 -31
- meerk40t/core/node/mixins.py +135 -107
- meerk40t/core/node/node.py +1427 -1304
- meerk40t/core/node/nutils.py +117 -114
- meerk40t/core/node/op_cut.py +462 -335
- meerk40t/core/node/op_dots.py +296 -251
- meerk40t/core/node/op_engrave.py +414 -311
- meerk40t/core/node/op_image.py +755 -369
- meerk40t/core/node/op_raster.py +787 -522
- meerk40t/core/node/place_current.py +37 -40
- meerk40t/core/node/place_point.py +329 -126
- meerk40t/core/node/refnode.py +58 -47
- meerk40t/core/node/rootnode.py +225 -219
- meerk40t/core/node/util_console.py +48 -48
- meerk40t/core/node/util_goto.py +84 -65
- meerk40t/core/node/util_home.py +61 -61
- meerk40t/core/node/util_input.py +102 -102
- meerk40t/core/node/util_output.py +102 -102
- meerk40t/core/node/util_wait.py +65 -65
- meerk40t/core/parameters.py +709 -707
- meerk40t/core/planner.py +875 -785
- meerk40t/core/plotplanner.py +656 -652
- meerk40t/core/space.py +120 -113
- meerk40t/core/spoolers.py +706 -705
- meerk40t/core/svg_io.py +1836 -1549
- meerk40t/core/treeop.py +534 -445
- meerk40t/core/undos.py +278 -124
- meerk40t/core/units.py +784 -680
- meerk40t/core/view.py +393 -322
- meerk40t/core/webhelp.py +62 -62
- meerk40t/core/wordlist.py +513 -504
- meerk40t/cylinder/cylinder.py +247 -0
- meerk40t/cylinder/gui/cylindersettings.py +41 -0
- meerk40t/cylinder/gui/gui.py +24 -0
- meerk40t/device/__init__.py +1 -1
- meerk40t/device/basedevice.py +322 -123
- meerk40t/device/devicechoices.py +50 -0
- meerk40t/device/dummydevice.py +163 -128
- meerk40t/device/gui/defaultactions.py +618 -602
- meerk40t/device/gui/effectspanel.py +114 -0
- meerk40t/device/gui/formatterpanel.py +253 -290
- meerk40t/device/gui/warningpanel.py +337 -260
- meerk40t/device/mixins.py +13 -13
- meerk40t/dxf/__init__.py +1 -1
- meerk40t/dxf/dxf_io.py +766 -554
- meerk40t/dxf/plugin.py +47 -35
- meerk40t/external_plugins.py +79 -79
- meerk40t/external_plugins_build.py +28 -28
- meerk40t/extra/cag.py +112 -116
- meerk40t/extra/coolant.py +403 -0
- meerk40t/extra/encode_detect.py +198 -0
- meerk40t/extra/ezd.py +1165 -1165
- meerk40t/extra/hershey.py +835 -340
- meerk40t/extra/imageactions.py +322 -316
- meerk40t/extra/inkscape.py +630 -622
- meerk40t/extra/lbrn.py +424 -424
- meerk40t/extra/outerworld.py +284 -0
- meerk40t/extra/param_functions.py +1542 -1556
- meerk40t/extra/potrace.py +257 -253
- meerk40t/extra/serial_exchange.py +118 -0
- meerk40t/extra/updater.py +602 -453
- meerk40t/extra/vectrace.py +147 -146
- meerk40t/extra/winsleep.py +83 -83
- meerk40t/extra/xcs_reader.py +597 -0
- meerk40t/fill/fills.py +781 -335
- meerk40t/fill/patternfill.py +1061 -1061
- meerk40t/fill/patterns.py +614 -567
- meerk40t/grbl/control.py +87 -87
- meerk40t/grbl/controller.py +990 -903
- meerk40t/grbl/device.py +1081 -768
- meerk40t/grbl/driver.py +989 -771
- meerk40t/grbl/emulator.py +532 -497
- meerk40t/grbl/gcodejob.py +783 -767
- meerk40t/grbl/gui/grblconfiguration.py +373 -298
- meerk40t/grbl/gui/grblcontroller.py +485 -271
- meerk40t/grbl/gui/grblhardwareconfig.py +269 -153
- meerk40t/grbl/gui/grbloperationconfig.py +105 -0
- meerk40t/grbl/gui/gui.py +147 -116
- meerk40t/grbl/interpreter.py +44 -44
- meerk40t/grbl/loader.py +22 -22
- meerk40t/grbl/mock_connection.py +56 -56
- meerk40t/grbl/plugin.py +294 -264
- meerk40t/grbl/serial_connection.py +93 -88
- meerk40t/grbl/tcp_connection.py +81 -79
- meerk40t/grbl/ws_connection.py +112 -0
- meerk40t/gui/__init__.py +1 -1
- meerk40t/gui/about.py +2042 -296
- meerk40t/gui/alignment.py +1644 -1608
- meerk40t/gui/autoexec.py +199 -0
- meerk40t/gui/basicops.py +791 -670
- meerk40t/gui/bufferview.py +77 -71
- meerk40t/gui/busy.py +170 -133
- meerk40t/gui/choicepropertypanel.py +1673 -1469
- meerk40t/gui/consolepanel.py +706 -542
- meerk40t/gui/devicepanel.py +687 -581
- meerk40t/gui/dialogoptions.py +110 -107
- meerk40t/gui/executejob.py +316 -306
- meerk40t/gui/fonts.py +90 -90
- meerk40t/gui/functionwrapper.py +252 -0
- meerk40t/gui/gui_mixins.py +729 -0
- meerk40t/gui/guicolors.py +205 -182
- meerk40t/gui/help_assets/help_assets.py +218 -201
- meerk40t/gui/helper.py +154 -0
- meerk40t/gui/hersheymanager.py +1430 -846
- meerk40t/gui/icons.py +3422 -2747
- meerk40t/gui/imagesplitter.py +555 -508
- meerk40t/gui/keymap.py +354 -344
- meerk40t/gui/laserpanel.py +892 -806
- meerk40t/gui/laserrender.py +1470 -1232
- meerk40t/gui/lasertoolpanel.py +805 -793
- meerk40t/gui/magnetoptions.py +436 -0
- meerk40t/gui/materialmanager.py +2917 -0
- meerk40t/gui/materialtest.py +1722 -1694
- meerk40t/gui/mkdebug.py +646 -359
- meerk40t/gui/mwindow.py +163 -140
- meerk40t/gui/navigationpanels.py +2605 -2467
- meerk40t/gui/notes.py +143 -142
- meerk40t/gui/opassignment.py +414 -410
- meerk40t/gui/operation_info.py +310 -299
- meerk40t/gui/plugin.py +494 -328
- meerk40t/gui/position.py +714 -669
- meerk40t/gui/preferences.py +901 -650
- meerk40t/gui/propertypanels/attributes.py +1461 -1131
- meerk40t/gui/propertypanels/blobproperty.py +117 -114
- meerk40t/gui/propertypanels/consoleproperty.py +83 -80
- meerk40t/gui/propertypanels/gotoproperty.py +77 -0
- meerk40t/gui/propertypanels/groupproperties.py +223 -217
- meerk40t/gui/propertypanels/hatchproperty.py +489 -469
- meerk40t/gui/propertypanels/imageproperty.py +2244 -1384
- meerk40t/gui/propertypanels/inputproperty.py +59 -58
- meerk40t/gui/propertypanels/opbranchproperties.py +82 -80
- meerk40t/gui/propertypanels/operationpropertymain.py +1890 -1638
- meerk40t/gui/propertypanels/outputproperty.py +59 -58
- meerk40t/gui/propertypanels/pathproperty.py +389 -380
- meerk40t/gui/propertypanels/placementproperty.py +1214 -383
- meerk40t/gui/propertypanels/pointproperty.py +140 -136
- meerk40t/gui/propertypanels/propertywindow.py +313 -181
- meerk40t/gui/propertypanels/rasterwizardpanels.py +996 -912
- meerk40t/gui/propertypanels/regbranchproperties.py +76 -0
- meerk40t/gui/propertypanels/textproperty.py +770 -755
- meerk40t/gui/propertypanels/waitproperty.py +56 -55
- meerk40t/gui/propertypanels/warpproperty.py +121 -0
- meerk40t/gui/propertypanels/wobbleproperty.py +255 -204
- meerk40t/gui/ribbon.py +2468 -2210
- meerk40t/gui/scene/scene.py +1100 -1051
- meerk40t/gui/scene/sceneconst.py +22 -22
- meerk40t/gui/scene/scenepanel.py +439 -349
- meerk40t/gui/scene/scenespacewidget.py +365 -365
- meerk40t/gui/scene/widget.py +518 -505
- meerk40t/gui/scenewidgets/affinemover.py +215 -215
- meerk40t/gui/scenewidgets/attractionwidget.py +315 -309
- meerk40t/gui/scenewidgets/bedwidget.py +120 -97
- meerk40t/gui/scenewidgets/elementswidget.py +137 -107
- meerk40t/gui/scenewidgets/gridwidget.py +785 -745
- meerk40t/gui/scenewidgets/guidewidget.py +765 -765
- meerk40t/gui/scenewidgets/laserpathwidget.py +66 -66
- meerk40t/gui/scenewidgets/machineoriginwidget.py +86 -86
- meerk40t/gui/scenewidgets/nodeselector.py +28 -28
- meerk40t/gui/scenewidgets/rectselectwidget.py +589 -346
- meerk40t/gui/scenewidgets/relocatewidget.py +33 -33
- meerk40t/gui/scenewidgets/reticlewidget.py +83 -83
- meerk40t/gui/scenewidgets/selectionwidget.py +2952 -2756
- meerk40t/gui/simpleui.py +357 -333
- meerk40t/gui/simulation.py +2431 -2094
- meerk40t/gui/snapoptions.py +208 -203
- meerk40t/gui/spoolerpanel.py +1227 -1180
- meerk40t/gui/statusbarwidgets/defaultoperations.py +480 -353
- meerk40t/gui/statusbarwidgets/infowidget.py +520 -483
- meerk40t/gui/statusbarwidgets/opassignwidget.py +356 -355
- meerk40t/gui/statusbarwidgets/selectionwidget.py +172 -171
- meerk40t/gui/statusbarwidgets/shapepropwidget.py +754 -236
- meerk40t/gui/statusbarwidgets/statusbar.py +272 -260
- meerk40t/gui/statusbarwidgets/statusbarwidget.py +268 -270
- meerk40t/gui/statusbarwidgets/strokewidget.py +267 -251
- meerk40t/gui/themes.py +200 -78
- meerk40t/gui/tips.py +591 -0
- meerk40t/gui/toolwidgets/circlebrush.py +35 -35
- meerk40t/gui/toolwidgets/toolcircle.py +248 -242
- meerk40t/gui/toolwidgets/toolcontainer.py +82 -77
- meerk40t/gui/toolwidgets/tooldraw.py +97 -90
- meerk40t/gui/toolwidgets/toolellipse.py +219 -212
- meerk40t/gui/toolwidgets/toolimagecut.py +25 -132
- meerk40t/gui/toolwidgets/toolline.py +39 -144
- meerk40t/gui/toolwidgets/toollinetext.py +79 -236
- meerk40t/gui/toolwidgets/toollinetext_inline.py +296 -0
- meerk40t/gui/toolwidgets/toolmeasure.py +160 -216
- meerk40t/gui/toolwidgets/toolnodeedit.py +2088 -2074
- meerk40t/gui/toolwidgets/toolnodemove.py +92 -94
- meerk40t/gui/toolwidgets/toolparameter.py +754 -668
- meerk40t/gui/toolwidgets/toolplacement.py +108 -108
- meerk40t/gui/toolwidgets/toolpoint.py +68 -59
- meerk40t/gui/toolwidgets/toolpointlistbuilder.py +294 -0
- meerk40t/gui/toolwidgets/toolpointmove.py +183 -0
- meerk40t/gui/toolwidgets/toolpolygon.py +288 -403
- meerk40t/gui/toolwidgets/toolpolyline.py +38 -196
- meerk40t/gui/toolwidgets/toolrect.py +211 -207
- meerk40t/gui/toolwidgets/toolrelocate.py +72 -72
- meerk40t/gui/toolwidgets/toolribbon.py +598 -113
- meerk40t/gui/toolwidgets/tooltabedit.py +546 -0
- meerk40t/gui/toolwidgets/tooltext.py +98 -89
- meerk40t/gui/toolwidgets/toolvector.py +213 -204
- meerk40t/gui/toolwidgets/toolwidget.py +39 -39
- meerk40t/gui/usbconnect.py +98 -91
- meerk40t/gui/utilitywidgets/buttonwidget.py +18 -18
- meerk40t/gui/utilitywidgets/checkboxwidget.py +90 -90
- meerk40t/gui/utilitywidgets/controlwidget.py +14 -14
- meerk40t/gui/utilitywidgets/cyclocycloidwidget.py +343 -340
- meerk40t/gui/utilitywidgets/debugwidgets.py +148 -0
- meerk40t/gui/utilitywidgets/handlewidget.py +27 -27
- meerk40t/gui/utilitywidgets/harmonograph.py +450 -447
- meerk40t/gui/utilitywidgets/openclosewidget.py +40 -40
- meerk40t/gui/utilitywidgets/rotationwidget.py +54 -54
- meerk40t/gui/utilitywidgets/scalewidget.py +75 -75
- meerk40t/gui/utilitywidgets/seekbarwidget.py +183 -183
- meerk40t/gui/utilitywidgets/togglewidget.py +142 -142
- meerk40t/gui/utilitywidgets/toolbarwidget.py +8 -8
- meerk40t/gui/wordlisteditor.py +985 -931
- meerk40t/gui/wxmeerk40t.py +1444 -1169
- meerk40t/gui/wxmmain.py +5578 -4112
- meerk40t/gui/wxmribbon.py +1591 -1076
- meerk40t/gui/wxmscene.py +1635 -1453
- meerk40t/gui/wxmtree.py +2410 -2089
- meerk40t/gui/wxutils.py +1769 -1099
- meerk40t/gui/zmatrix.py +102 -102
- meerk40t/image/__init__.py +1 -1
- meerk40t/image/dither.py +429 -0
- meerk40t/image/imagetools.py +2778 -2269
- meerk40t/internal_plugins.py +150 -130
- meerk40t/kernel/__init__.py +63 -12
- meerk40t/kernel/channel.py +259 -212
- meerk40t/kernel/context.py +538 -538
- meerk40t/kernel/exceptions.py +41 -41
- meerk40t/kernel/functions.py +463 -414
- meerk40t/kernel/jobs.py +100 -100
- meerk40t/kernel/kernel.py +3809 -3571
- meerk40t/kernel/lifecycles.py +71 -71
- meerk40t/kernel/module.py +49 -49
- meerk40t/kernel/service.py +147 -147
- meerk40t/kernel/settings.py +383 -343
- meerk40t/lihuiyu/controller.py +883 -876
- meerk40t/lihuiyu/device.py +1181 -1069
- meerk40t/lihuiyu/driver.py +1466 -1372
- meerk40t/lihuiyu/gui/gui.py +127 -106
- meerk40t/lihuiyu/gui/lhyaccelgui.py +377 -363
- meerk40t/lihuiyu/gui/lhycontrollergui.py +741 -651
- meerk40t/lihuiyu/gui/lhydrivergui.py +470 -446
- meerk40t/lihuiyu/gui/lhyoperationproperties.py +238 -237
- meerk40t/lihuiyu/gui/tcpcontroller.py +226 -190
- meerk40t/lihuiyu/interpreter.py +53 -53
- meerk40t/lihuiyu/laserspeed.py +450 -450
- meerk40t/lihuiyu/loader.py +90 -90
- meerk40t/lihuiyu/parser.py +404 -404
- meerk40t/lihuiyu/plugin.py +101 -102
- meerk40t/lihuiyu/tcp_connection.py +111 -109
- meerk40t/main.py +231 -165
- meerk40t/moshi/builder.py +788 -781
- meerk40t/moshi/controller.py +505 -499
- meerk40t/moshi/device.py +495 -442
- meerk40t/moshi/driver.py +862 -696
- meerk40t/moshi/gui/gui.py +78 -76
- meerk40t/moshi/gui/moshicontrollergui.py +538 -522
- meerk40t/moshi/gui/moshidrivergui.py +87 -75
- meerk40t/moshi/plugin.py +43 -43
- meerk40t/network/console_server.py +102 -57
- meerk40t/network/kernelserver.py +10 -9
- meerk40t/network/tcp_server.py +142 -140
- meerk40t/network/udp_server.py +103 -77
- meerk40t/network/web_server.py +390 -0
- meerk40t/newly/controller.py +1158 -1144
- meerk40t/newly/device.py +874 -732
- meerk40t/newly/driver.py +540 -412
- meerk40t/newly/gui/gui.py +219 -188
- meerk40t/newly/gui/newlyconfig.py +116 -101
- meerk40t/newly/gui/newlycontroller.py +193 -186
- meerk40t/newly/gui/operationproperties.py +51 -51
- meerk40t/newly/mock_connection.py +82 -82
- meerk40t/newly/newly_params.py +56 -56
- meerk40t/newly/plugin.py +1214 -1246
- meerk40t/newly/usb_connection.py +322 -322
- meerk40t/rotary/gui/gui.py +52 -46
- meerk40t/rotary/gui/rotarysettings.py +240 -232
- meerk40t/rotary/rotary.py +202 -98
- meerk40t/ruida/control.py +291 -91
- meerk40t/ruida/controller.py +138 -1088
- meerk40t/ruida/device.py +672 -231
- meerk40t/ruida/driver.py +534 -472
- meerk40t/ruida/emulator.py +1494 -1491
- meerk40t/ruida/exceptions.py +4 -4
- meerk40t/ruida/gui/gui.py +71 -76
- meerk40t/ruida/gui/ruidaconfig.py +239 -72
- meerk40t/ruida/gui/ruidacontroller.py +187 -184
- meerk40t/ruida/gui/ruidaoperationproperties.py +48 -47
- meerk40t/ruida/loader.py +54 -52
- meerk40t/ruida/mock_connection.py +57 -109
- meerk40t/ruida/plugin.py +124 -87
- meerk40t/ruida/rdjob.py +2084 -945
- meerk40t/ruida/serial_connection.py +116 -0
- meerk40t/ruida/tcp_connection.py +146 -0
- meerk40t/ruida/udp_connection.py +73 -0
- meerk40t/svgelements.py +9671 -9669
- meerk40t/tools/driver_to_path.py +584 -579
- meerk40t/tools/geomstr.py +5583 -4680
- meerk40t/tools/jhfparser.py +357 -292
- meerk40t/tools/kerftest.py +904 -890
- meerk40t/tools/livinghinges.py +1168 -1033
- meerk40t/tools/pathtools.py +987 -949
- meerk40t/tools/pmatrix.py +234 -0
- meerk40t/tools/pointfinder.py +942 -942
- meerk40t/tools/polybool.py +940 -940
- meerk40t/tools/rasterplotter.py +1660 -547
- meerk40t/tools/shxparser.py +989 -901
- meerk40t/tools/ttfparser.py +726 -446
- meerk40t/tools/zinglplotter.py +595 -593
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/LICENSE +21 -21
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/METADATA +150 -139
- meerk40t-0.9.7010.dist-info/RECORD +445 -0
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/WHEEL +1 -1
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/top_level.txt +0 -1
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/zip-safe +1 -1
- meerk40t/balormk/elementlightjob.py +0 -159
- meerk40t-0.9.3001.dist-info/RECORD +0 -437
- test/bootstrap.py +0 -63
- test/test_cli.py +0 -12
- test/test_core_cutcode.py +0 -418
- test/test_core_elements.py +0 -144
- test/test_core_plotplanner.py +0 -397
- test/test_core_viewports.py +0 -312
- test/test_drivers_grbl.py +0 -108
- test/test_drivers_lihuiyu.py +0 -443
- test/test_drivers_newly.py +0 -113
- test/test_element_degenerate_points.py +0 -43
- test/test_elements_classify.py +0 -97
- test/test_elements_penbox.py +0 -22
- test/test_file_svg.py +0 -176
- test/test_fill.py +0 -155
- test/test_geomstr.py +0 -1523
- test/test_geomstr_nodes.py +0 -18
- test/test_imagetools_actualize.py +0 -306
- test/test_imagetools_wizard.py +0 -258
- test/test_kernel.py +0 -200
- test/test_laser_speeds.py +0 -3303
- test/test_length.py +0 -57
- test/test_lifecycle.py +0 -66
- test/test_operations.py +0 -251
- test/test_operations_hatch.py +0 -57
- test/test_ruida.py +0 -19
- test/test_spooler.py +0 -22
- test/test_tools_rasterplotter.py +0 -29
- test/test_wobble.py +0 -133
- test/test_zingl.py +0 -124
- {test → meerk40t/cylinder}/__init__.py +0 -0
- /meerk40t/{core/element_commands.py → cylinder/gui/__init__.py} +0 -0
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7010.dist-info}/entry_points.txt +0 -0
meerk40t/core/bindalias.py
CHANGED
@@ -1,539 +1,550 @@
|
|
1
|
-
from meerk40t.kernel import CommandMatchRejected, Service
|
2
|
-
|
3
|
-
"""
|
4
|
-
This core class defines two main services: bind and alias. This is a set defined keybinds and alias commands.
|
5
|
-
|
6
|
-
If a keybind commands starts with a "+" then the command is triggered on the down-key and the "-" version of
|
7
|
-
the same command is triggered on the up-key. If the bind is for any other command, it will execute on key-press.
|
8
|
-
If you need this functionality it's best to define these commands as aliases of other commands.
|
9
|
-
"""
|
10
|
-
|
11
|
-
|
12
|
-
"""
|
13
|
-
The following dicts consist of a tuple of values, the first of
|
14
|
-
which is the current default, with any prior defaults following.
|
15
|
-
Prior defaults are used to keep a users keymap / aliases up to date with
|
16
|
-
any changes, unless the user has already changed away from the default.
|
17
|
-
If you want to delete a bind / alias, set the first value to a null string.
|
18
|
-
|
19
|
-
CHOICE OF BINDALIAS vs. MENU
|
20
|
-
These key bindings are in addition to those specified in the menus
|
21
|
-
(like Ctrl+S for File Save). The choice of which of these to use is debatable.
|
22
|
-
On one hand bindalias is a more flexible approach because the user can
|
23
|
-
change keys mappings to whatever they wish whilst menus are fixed.
|
24
|
-
On the other hand, default menu keys can be set per language because the
|
25
|
-
menu strings are translated, whereas bindalias keys are not.
|
26
|
-
|
27
|
-
RESERVED KEYS
|
28
|
-
Regardless of the platform used by individual developers, bindalias needs
|
29
|
-
to conform to BOTH of the following:
|
30
|
-
|
31
|
-
1. Mac - common shortcuts defined in https://support.apple.com/en-us/HT201236
|
32
|
-
should be followed where appropriate and avoided if not. This is important
|
33
|
-
for MK to be accepted into the Apple app store.
|
34
|
-
Where keys defined in other sections on this page make sense for this application,
|
35
|
-
these should also be used by preference.
|
36
|
-
2. Windows - alt-single letter should be avoided as these correspond to menu
|
37
|
-
shortcuts (e.g. in english locale, alt-f should activate the file menu).
|
38
|
-
Common Windows shortcuts can be found at
|
39
|
-
https://support.microsoft.com/en-us/windows/keyboard-shortcuts-in-windows-dcc61a57-8ff0-cffe-9796-cb9706c75eec
|
40
|
-
|
41
|
-
In addition where they do not conflict with the above, any synergy with keys commonly used
|
42
|
-
in popular SVG / image editors (e.g. paint.net, inkscape) may be beneficial.
|
43
|
-
|
44
|
-
To change keymaps / alias insert new alias at the beginning of the tuple
|
45
|
-
Later entries in the tuple are used to identify previous defaults and update them to current,
|
46
|
-
so do not delete these until a version change (like 0.8) results in completely new settings anyway.
|
47
|
-
"""
|
48
|
-
|
49
|
-
DEFAULT_KEYMAP = {
|
50
|
-
"right": ("translate 1mm 0",),
|
51
|
-
"left": ("translate -1mm 0",),
|
52
|
-
"up": ("translate 0 -1mm",),
|
53
|
-
"down": ("translate 0 1mm",),
|
54
|
-
"shift+right": ("translate 10mm 0",),
|
55
|
-
"shift+left": ("translate -10mm 0",),
|
56
|
-
"shift+up": ("translate 0 -10mm",),
|
57
|
-
"shift+down": ("translate 0 10mm",),
|
58
|
-
"alt+shift+right": ("translate 10spx 0",),
|
59
|
-
"alt+shift+left": ("translate -10spx 0",),
|
60
|
-
"alt+shift+up": ("translate 0 -10spx",),
|
61
|
-
"alt+shift+down": ("translate 0 10spx",),
|
62
|
-
"alt+right": ("translate 1spx 0",),
|
63
|
-
"alt+left": ("translate -1spx 0",),
|
64
|
-
"alt+up": ("translate 0 -1spx",),
|
65
|
-
"alt+down": ("translate 0 1spx",),
|
66
|
-
"ctrl+shift+right": ("translate 0.1mm 0",),
|
67
|
-
"ctrl+shift+left": ("translate -0.1mm 0",),
|
68
|
-
"ctrl+shift+up": ("translate 0 -0.1mm",),
|
69
|
-
"ctrl+shift+down": ("translate 0 0.1mm",),
|
70
|
-
"a": ("+left",),
|
71
|
-
"d": ("+right",),
|
72
|
-
"w": ("+up",),
|
73
|
-
"s": ("+down",),
|
74
|
-
"l": ("lock",),
|
75
|
-
"u": ("unlock",),
|
76
|
-
"f4": (
|
77
|
-
"",
|
78
|
-
"window open CameraInterface",
|
79
|
-
),
|
80
|
-
"f5": ("refresh",),
|
81
|
-
"f6": (
|
82
|
-
"",
|
83
|
-
"window open JobSpooler",
|
84
|
-
),
|
85
|
-
"f7": (
|
86
|
-
"",
|
87
|
-
"window open -o Controller",
|
88
|
-
"window controller",
|
89
|
-
"window open Controller",
|
90
|
-
),
|
91
|
-
"f8": ("", "dialog_path"),
|
92
|
-
"f9": (
|
93
|
-
"",
|
94
|
-
"dialog_transform",
|
95
|
-
),
|
96
|
-
"f12": (
|
97
|
-
"",
|
98
|
-
"window open Console",
|
99
|
-
),
|
100
|
-
"ctrl+f6": ("page home",),
|
101
|
-
"ctrl+f7": ("page design",),
|
102
|
-
"ctrl+f8": (
|
103
|
-
"page modify",
|
104
|
-
"dialog_flip",
|
105
|
-
),
|
106
|
-
"ctrl+f9": ("page config",),
|
107
|
-
"delete": (
|
108
|
-
"tree selected delete",
|
109
|
-
"tree emphasized delete",
|
110
|
-
"element delete",
|
111
|
-
),
|
112
|
-
"escape": (
|
113
|
-
"",
|
114
|
-
"pause",
|
115
|
-
),
|
116
|
-
"home": ("home",),
|
117
|
-
"numpad_down": ("+translate_down",),
|
118
|
-
"numpad_up": ("+translate_up",),
|
119
|
-
"numpad_left": ("+translate_left",),
|
120
|
-
"numpad_right": ("+translate_right",),
|
121
|
-
"numpad_multiply": ("+scale_up",),
|
122
|
-
"numpad_divide": ("+scale_down",),
|
123
|
-
"numpad_add": ("+rotate_cw",),
|
124
|
-
"numpad_subtract": ("+rotate_ccw",),
|
125
|
-
"pause": ("pause",),
|
126
|
-
"alt+c": (
|
127
|
-
"",
|
128
|
-
"cut",
|
129
|
-
),
|
130
|
-
"alt+e": (
|
131
|
-
"",
|
132
|
-
"engrave",
|
133
|
-
),
|
134
|
-
"alt+f": (
|
135
|
-
"",
|
136
|
-
"dialog_fill",
|
137
|
-
),
|
138
|
-
"alt+h": (
|
139
|
-
"",
|
140
|
-
"dialog_path",
|
141
|
-
),
|
142
|
-
"alt+p": (
|
143
|
-
"",
|
144
|
-
"dialog_flip",
|
145
|
-
),
|
146
|
-
"alt+r": (
|
147
|
-
"",
|
148
|
-
"raster",
|
149
|
-
),
|
150
|
-
"alt+s": (
|
151
|
-
"",
|
152
|
-
"dialog_stroke",
|
153
|
-
),
|
154
|
-
"alt+t": (
|
155
|
-
"",
|
156
|
-
"dialog_transform",
|
157
|
-
),
|
158
|
-
"alt+f3": (
|
159
|
-
"",
|
160
|
-
"rotaryscale",
|
161
|
-
),
|
162
|
-
"ctrl+a": (
|
163
|
-
"",
|
164
|
-
"element* select",
|
165
|
-
),
|
166
|
-
"ctrl+c": (
|
167
|
-
"",
|
168
|
-
"clipboard copy",
|
169
|
-
),
|
170
|
-
"ctrl+shift+c": ("align bed group xy center center",),
|
171
|
-
"ctrl+e": (
|
172
|
-
"circle 0.5in 0.5in 0.5in stroke red classify",
|
173
|
-
"circle 500 500 500",
|
174
|
-
),
|
175
|
-
"ctrl+f": (
|
176
|
-
"",
|
177
|
-
"dialog_fill",
|
178
|
-
),
|
179
|
-
"ctrl+i": (
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
"",
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
"
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
"",
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
"",
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
"",
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
"",
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
"",
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
"ctrl+
|
218
|
-
"ctrl+
|
219
|
-
"ctrl+
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
"",
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
"ctrl+
|
242
|
-
"ctrl+
|
243
|
-
"ctrl+
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
"+
|
251
|
-
|
252
|
-
"+
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
"+
|
259
|
-
"+
|
260
|
-
"+
|
261
|
-
"+
|
262
|
-
"
|
263
|
-
"
|
264
|
-
"
|
265
|
-
"
|
266
|
-
"
|
267
|
-
"
|
268
|
-
"
|
269
|
-
"
|
270
|
-
"
|
271
|
-
"-
|
272
|
-
"-
|
273
|
-
"-
|
274
|
-
"
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
channel(_("
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
if
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
self.
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
486
|
-
|
487
|
-
|
488
|
-
|
489
|
-
|
490
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
self.aliases
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
self.
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
1
|
+
from meerk40t.kernel import CommandMatchRejected, Service
|
2
|
+
|
3
|
+
"""
|
4
|
+
This core class defines two main services: bind and alias. This is a set defined keybinds and alias commands.
|
5
|
+
|
6
|
+
If a keybind commands starts with a "+" then the command is triggered on the down-key and the "-" version of
|
7
|
+
the same command is triggered on the up-key. If the bind is for any other command, it will execute on key-press.
|
8
|
+
If you need this functionality it's best to define these commands as aliases of other commands.
|
9
|
+
"""
|
10
|
+
|
11
|
+
|
12
|
+
"""
|
13
|
+
The following dicts consist of a tuple of values, the first of
|
14
|
+
which is the current default, with any prior defaults following.
|
15
|
+
Prior defaults are used to keep a users keymap / aliases up to date with
|
16
|
+
any changes, unless the user has already changed away from the default.
|
17
|
+
If you want to delete a bind / alias, set the first value to a null string.
|
18
|
+
|
19
|
+
CHOICE OF BINDALIAS vs. MENU
|
20
|
+
These key bindings are in addition to those specified in the menus
|
21
|
+
(like Ctrl+S for File Save). The choice of which of these to use is debatable.
|
22
|
+
On one hand bindalias is a more flexible approach because the user can
|
23
|
+
change keys mappings to whatever they wish whilst menus are fixed.
|
24
|
+
On the other hand, default menu keys can be set per language because the
|
25
|
+
menu strings are translated, whereas bindalias keys are not.
|
26
|
+
|
27
|
+
RESERVED KEYS
|
28
|
+
Regardless of the platform used by individual developers, bindalias needs
|
29
|
+
to conform to BOTH of the following:
|
30
|
+
|
31
|
+
1. Mac - common shortcuts defined in https://support.apple.com/en-us/HT201236
|
32
|
+
should be followed where appropriate and avoided if not. This is important
|
33
|
+
for MK to be accepted into the Apple app store.
|
34
|
+
Where keys defined in other sections on this page make sense for this application,
|
35
|
+
these should also be used by preference.
|
36
|
+
2. Windows - alt-single letter should be avoided as these correspond to menu
|
37
|
+
shortcuts (e.g. in english locale, alt-f should activate the file menu).
|
38
|
+
Common Windows shortcuts can be found at
|
39
|
+
https://support.microsoft.com/en-us/windows/keyboard-shortcuts-in-windows-dcc61a57-8ff0-cffe-9796-cb9706c75eec
|
40
|
+
|
41
|
+
In addition where they do not conflict with the above, any synergy with keys commonly used
|
42
|
+
in popular SVG / image editors (e.g. paint.net, inkscape) may be beneficial.
|
43
|
+
|
44
|
+
To change keymaps / alias insert new alias at the beginning of the tuple
|
45
|
+
Later entries in the tuple are used to identify previous defaults and update them to current,
|
46
|
+
so do not delete these until a version change (like 0.8) results in completely new settings anyway.
|
47
|
+
"""
|
48
|
+
|
49
|
+
DEFAULT_KEYMAP = {
|
50
|
+
"right": ("translate 1mm 0",),
|
51
|
+
"left": ("translate -1mm 0",),
|
52
|
+
"up": ("translate 0 -1mm",),
|
53
|
+
"down": ("translate 0 1mm",),
|
54
|
+
"shift+right": ("translate 10mm 0",),
|
55
|
+
"shift+left": ("translate -10mm 0",),
|
56
|
+
"shift+up": ("translate 0 -10mm",),
|
57
|
+
"shift+down": ("translate 0 10mm",),
|
58
|
+
"alt+shift+right": ("translate 10spx 0",),
|
59
|
+
"alt+shift+left": ("translate -10spx 0",),
|
60
|
+
"alt+shift+up": ("translate 0 -10spx",),
|
61
|
+
"alt+shift+down": ("translate 0 10spx",),
|
62
|
+
"alt+right": ("translate 1spx 0",),
|
63
|
+
"alt+left": ("translate -1spx 0",),
|
64
|
+
"alt+up": ("translate 0 -1spx",),
|
65
|
+
"alt+down": ("translate 0 1spx",),
|
66
|
+
"ctrl+shift+right": ("translate 0.1mm 0",),
|
67
|
+
"ctrl+shift+left": ("translate -0.1mm 0",),
|
68
|
+
"ctrl+shift+up": ("translate 0 -0.1mm",),
|
69
|
+
"ctrl+shift+down": ("translate 0 0.1mm",),
|
70
|
+
"a": ("+left",),
|
71
|
+
"d": ("+right",),
|
72
|
+
"w": ("+up",),
|
73
|
+
"s": ("+down",),
|
74
|
+
"l": ("lock",),
|
75
|
+
"u": ("unlock",),
|
76
|
+
"f4": (
|
77
|
+
"",
|
78
|
+
"window open CameraInterface",
|
79
|
+
),
|
80
|
+
"f5": ("refresh",),
|
81
|
+
"f6": (
|
82
|
+
"",
|
83
|
+
"window open JobSpooler",
|
84
|
+
),
|
85
|
+
"f7": (
|
86
|
+
"",
|
87
|
+
"window open -o Controller",
|
88
|
+
"window controller",
|
89
|
+
"window open Controller",
|
90
|
+
),
|
91
|
+
"f8": ("", "dialog_path"),
|
92
|
+
"f9": (
|
93
|
+
"",
|
94
|
+
"dialog_transform",
|
95
|
+
),
|
96
|
+
"f12": (
|
97
|
+
"",
|
98
|
+
"window open Console",
|
99
|
+
),
|
100
|
+
"ctrl+f6": ("page home",),
|
101
|
+
"ctrl+f7": ("page design",),
|
102
|
+
"ctrl+f8": (
|
103
|
+
"page modify",
|
104
|
+
"dialog_flip",
|
105
|
+
),
|
106
|
+
"ctrl+f9": ("page config",),
|
107
|
+
"delete": (
|
108
|
+
"tree selected delete",
|
109
|
+
"tree emphasized delete",
|
110
|
+
"element delete",
|
111
|
+
),
|
112
|
+
"escape": (
|
113
|
+
"",
|
114
|
+
"pause",
|
115
|
+
),
|
116
|
+
"home": ("home",),
|
117
|
+
"numpad_down": ("+translate_down",),
|
118
|
+
"numpad_up": ("+translate_up",),
|
119
|
+
"numpad_left": ("+translate_left",),
|
120
|
+
"numpad_right": ("+translate_right",),
|
121
|
+
"numpad_multiply": ("+scale_up",),
|
122
|
+
"numpad_divide": ("+scale_down",),
|
123
|
+
"numpad_add": ("+rotate_cw",),
|
124
|
+
"numpad_subtract": ("+rotate_ccw",),
|
125
|
+
"pause": ("pause",),
|
126
|
+
"alt+c": (
|
127
|
+
"",
|
128
|
+
"cut",
|
129
|
+
),
|
130
|
+
"alt+e": (
|
131
|
+
"",
|
132
|
+
"engrave",
|
133
|
+
),
|
134
|
+
"alt+f": (
|
135
|
+
"",
|
136
|
+
"dialog_fill",
|
137
|
+
),
|
138
|
+
"alt+h": (
|
139
|
+
"",
|
140
|
+
"dialog_path",
|
141
|
+
),
|
142
|
+
"alt+p": (
|
143
|
+
"",
|
144
|
+
"dialog_flip",
|
145
|
+
),
|
146
|
+
"alt+r": (
|
147
|
+
"",
|
148
|
+
"raster",
|
149
|
+
),
|
150
|
+
"alt+s": (
|
151
|
+
"",
|
152
|
+
"dialog_stroke",
|
153
|
+
),
|
154
|
+
"alt+t": (
|
155
|
+
"",
|
156
|
+
"dialog_transform",
|
157
|
+
),
|
158
|
+
"alt+f3": (
|
159
|
+
"",
|
160
|
+
"rotaryscale",
|
161
|
+
),
|
162
|
+
"ctrl+a": (
|
163
|
+
"",
|
164
|
+
"element* select",
|
165
|
+
),
|
166
|
+
"ctrl+c": (
|
167
|
+
"",
|
168
|
+
"clipboard copy",
|
169
|
+
),
|
170
|
+
"ctrl+shift+c": ("align bed group xy center center",),
|
171
|
+
"ctrl+e": (
|
172
|
+
"circle 0.5in 0.5in 0.5in stroke red classify",
|
173
|
+
"circle 500 500 500",
|
174
|
+
),
|
175
|
+
"ctrl+f": (
|
176
|
+
"",
|
177
|
+
"dialog_fill",
|
178
|
+
),
|
179
|
+
"ctrl+i": (
|
180
|
+
"",
|
181
|
+
"element* select^",
|
182
|
+
),
|
183
|
+
"ctrl+d": ("element copy",),
|
184
|
+
"ctrl+g": (
|
185
|
+
"",
|
186
|
+
"planz clear copy preprocess validate blob preopt optimize spool",
|
187
|
+
),
|
188
|
+
"ctrl+o": (
|
189
|
+
"",
|
190
|
+
"outline",
|
191
|
+
),
|
192
|
+
"ctrl+r": (
|
193
|
+
"rect 0 0 1in 1in stroke red classify",
|
194
|
+
"rect 0 0 1000 1000",
|
195
|
+
),
|
196
|
+
"ctrl+s": (
|
197
|
+
"",
|
198
|
+
"dialog_stroke",
|
199
|
+
),
|
200
|
+
"ctrl+v": (
|
201
|
+
"",
|
202
|
+
"clipboard paste",
|
203
|
+
),
|
204
|
+
"ctrl+x": (
|
205
|
+
"",
|
206
|
+
"clipboard cut",
|
207
|
+
),
|
208
|
+
"ctrl+z": (
|
209
|
+
"",
|
210
|
+
"undo",
|
211
|
+
"reset",
|
212
|
+
),
|
213
|
+
"ctrl+shift+z": (
|
214
|
+
"",
|
215
|
+
"redo",
|
216
|
+
),
|
217
|
+
"ctrl+1": ("bind 1 move $x $y",),
|
218
|
+
"ctrl+2": ("bind 2 move $x $y",),
|
219
|
+
"ctrl+3": ("bind 3 move $x $y",),
|
220
|
+
"ctrl+4": ("bind 4 move $x $y",),
|
221
|
+
"ctrl+5": ("bind 5 move $x $y",),
|
222
|
+
"ctrl+f3": (
|
223
|
+
"",
|
224
|
+
"rotaryview",
|
225
|
+
),
|
226
|
+
"ctrl+alt+d": ("image wizard Gold",),
|
227
|
+
"ctrl+alt+e": ("image wizard Simple",),
|
228
|
+
"ctrl+alt+g": (
|
229
|
+
"",
|
230
|
+
"image wizard Gold",
|
231
|
+
),
|
232
|
+
"ctrl+alt+n": ("image wizard Newsy",),
|
233
|
+
"ctrl+alt+o": (
|
234
|
+
"image wizard Stipo",
|
235
|
+
"outline -1mm",
|
236
|
+
),
|
237
|
+
"ctrl+alt+s": (
|
238
|
+
"",
|
239
|
+
"image wizard Stipo",
|
240
|
+
),
|
241
|
+
"ctrl+alt+x": ("image wizard Xin",),
|
242
|
+
"ctrl+alt+y": ("image wizard Gravy",),
|
243
|
+
"ctrl+shift+h": ("scale -1 1",),
|
244
|
+
"ctrl+shift+o": ("outline 1mm",),
|
245
|
+
"ctrl+shift+v": ("scale 1 -1",),
|
246
|
+
"ctrl+alt+shift+escape": (
|
247
|
+
"",
|
248
|
+
"reset_bind_alias",
|
249
|
+
),
|
250
|
+
"ctrl+alt+shift+home": ("bind default;alias default",),
|
251
|
+
# That's not working, so we delete it...
|
252
|
+
"ctrl+shift+l": (
|
253
|
+
"",
|
254
|
+
"signal lock_helper",
|
255
|
+
),
|
256
|
+
}
|
257
|
+
DEFAULT_ALIAS = {
|
258
|
+
"+scale_up": (".timerscale_up 0 0.1 .scale 1.02",),
|
259
|
+
"+scale_down": (".timerscale_down 0 0.1 scale 0.98",),
|
260
|
+
"+rotate_cw": (".timerrotate_cw 0 0.1 rotate 2",),
|
261
|
+
"+rotate_ccw": (".timerrotate_ccw 0 0.1 rotate -2",),
|
262
|
+
"+translate_right": (".timertranslate_right 0 0.1 translate 1mm 0",),
|
263
|
+
"+translate_left": (".timertranslate_left 0 0.1 translate -1mm 0",),
|
264
|
+
"+translate_down": (".timertranslate_down 0 0.1 translate 0 1mm",),
|
265
|
+
"+translate_up": (".timertranslate_up 0 0.1 translate 0 -1mm",),
|
266
|
+
"+right": (".timerright 0 0.1 right 1mm",),
|
267
|
+
"+left": (".timerleft 0 0.1 left 1mm",),
|
268
|
+
"+up": (".timerup 0 0.1 up 1mm",),
|
269
|
+
"+down": (".timerdown 0 0.1 down 1mm",),
|
270
|
+
"burn": ("planz clear copy preprocess validate blob preopt optimize spool", ),
|
271
|
+
"-scale_up": (".timerscale_up off",),
|
272
|
+
"-scale_down": (".timerscale_down off",),
|
273
|
+
"-rotate_cw": (".timerrotate_cw off",),
|
274
|
+
"-rotate_ccw": (".timerrotate_ccw off",),
|
275
|
+
"-translate_right": (".timertranslate_right off",),
|
276
|
+
"-translate_left": (".timertranslate_left off",),
|
277
|
+
"-translate_down": (".timertranslate_down off",),
|
278
|
+
"-translate_up": (".timertranslate_up off",),
|
279
|
+
"-right": (".timerright off",),
|
280
|
+
"-left": (".timerleft off",),
|
281
|
+
"-up": (".timerup off",),
|
282
|
+
"-down": (".timerdown off",),
|
283
|
+
"reset_bind_alias": ("bind default;alias default",),
|
284
|
+
}
|
285
|
+
|
286
|
+
|
287
|
+
def plugin(kernel, lifecycle=None):
|
288
|
+
if lifecycle == "register":
|
289
|
+
kernel.add_service("bind", Bind(kernel))
|
290
|
+
kernel.add_service("alias", Alias(kernel))
|
291
|
+
|
292
|
+
|
293
|
+
class Bind(Service):
|
294
|
+
"""
|
295
|
+
Bind service, establishes keymap
|
296
|
+
"""
|
297
|
+
|
298
|
+
def __init__(self, kernel, *args, **kwargs):
|
299
|
+
Service.__init__(self, kernel, "keymap")
|
300
|
+
self.keymap = {}
|
301
|
+
self.triggered = {}
|
302
|
+
|
303
|
+
_ = self._
|
304
|
+
|
305
|
+
@self.console_command("bind", help=_("bind <key> <console command>"))
|
306
|
+
def bind(command, channel, _, args=tuple(), **kwgs):
|
307
|
+
"""
|
308
|
+
Binds a key to a given keyboard keystroke.
|
309
|
+
"""
|
310
|
+
if len(args) == 0:
|
311
|
+
channel(_("Binds:"))
|
312
|
+
|
313
|
+
def keymap_index(key):
|
314
|
+
mods, key = key.rsplit("+", 1) if "+" in key else ("", key)
|
315
|
+
return (
|
316
|
+
mods,
|
317
|
+
len(key) if len(key) <= 2 else 3,
|
318
|
+
key,
|
319
|
+
)
|
320
|
+
|
321
|
+
channel(_(" Key Command"))
|
322
|
+
for i, key in enumerate(sorted(self.keymap.keys(), key=keymap_index)):
|
323
|
+
value = self.keymap[key]
|
324
|
+
channel(f"{i:2d}: {key.ljust(22)} {value}")
|
325
|
+
channel("----------")
|
326
|
+
return
|
327
|
+
key = args[0].lower()
|
328
|
+
if key == "default":
|
329
|
+
self.default_keymap()
|
330
|
+
channel(_("Keymap set to default."))
|
331
|
+
return
|
332
|
+
command_line = " ".join(args[1:])
|
333
|
+
f = command_line.find("bind")
|
334
|
+
if f == -1: # If bind value has a bind, do not evaluate.
|
335
|
+
if "$x" in command_line:
|
336
|
+
x, y = self.device.current
|
337
|
+
command_line = command_line.replace("$x", str(x))
|
338
|
+
if "$y" in command_line:
|
339
|
+
x, y = self.device.current
|
340
|
+
command_line = command_line.replace("$y", str(y))
|
341
|
+
if len(command_line) != 0:
|
342
|
+
self.keymap[key] = command_line
|
343
|
+
elif key in self.keymap:
|
344
|
+
del self.keymap[key]
|
345
|
+
channel(_("Unbound {key}").format(key=key))
|
346
|
+
return
|
347
|
+
|
348
|
+
self.read_persistent_string_dict(self.keymap, suffix=True)
|
349
|
+
if not len(self.keymap):
|
350
|
+
self.default_keymap()
|
351
|
+
|
352
|
+
# help transition from old definitions of control-key-combinations
|
353
|
+
def is_found(self, keyvalue, target):
|
354
|
+
value = False
|
355
|
+
if keyvalue is not None:
|
356
|
+
s = keyvalue
|
357
|
+
if s in target:
|
358
|
+
value = True
|
359
|
+
else:
|
360
|
+
s = keyvalue.replace("ctrl", "control")
|
361
|
+
if s in target:
|
362
|
+
keyvalue = s
|
363
|
+
value = True
|
364
|
+
return value, keyvalue
|
365
|
+
|
366
|
+
def trigger(self, keyvalue):
|
367
|
+
# print (f"trigger for {keyvalue} started with {self.triggered}")
|
368
|
+
fnd, keyvalue = self.is_found(keyvalue, self.keymap)
|
369
|
+
if fnd:
|
370
|
+
fnd, keyvalue = self.is_found(keyvalue, self.triggered)
|
371
|
+
if not fnd:
|
372
|
+
self.triggered[keyvalue] = 1
|
373
|
+
action = self.keymap[keyvalue]
|
374
|
+
cmds = (action,) if action[0] in "+-" else action.split(";")
|
375
|
+
for cmd in cmds:
|
376
|
+
self(f"{cmd}\n")
|
377
|
+
return True
|
378
|
+
return False
|
379
|
+
|
380
|
+
def untrigger(self, keyvalue):
|
381
|
+
# print (f"untrigger for {keyvalue} started with {self.triggered}")
|
382
|
+
keymap = self.keymap
|
383
|
+
fnd, keyvalue = self.is_found(keyvalue, self.keymap)
|
384
|
+
if fnd:
|
385
|
+
fnd, keyvalue = self.is_found(keyvalue, self.triggered)
|
386
|
+
if fnd:
|
387
|
+
del self.triggered[keyvalue]
|
388
|
+
action = keymap[keyvalue]
|
389
|
+
if action.startswith("+"):
|
390
|
+
# Keyup commands only trigger if the down command started with +
|
391
|
+
action = "-" + action[1:]
|
392
|
+
self(action + "\n")
|
393
|
+
return True
|
394
|
+
return False
|
395
|
+
|
396
|
+
def shutdown(self, *args, **kwargs):
|
397
|
+
self.clear_persistent()
|
398
|
+
|
399
|
+
for key, value in self.keymap.items():
|
400
|
+
if key is None or len(key) == 0:
|
401
|
+
continue
|
402
|
+
self.write_persistent(key, value)
|
403
|
+
|
404
|
+
def default_keymap(self):
|
405
|
+
self.keymap.clear()
|
406
|
+
for key, values in DEFAULT_KEYMAP.items():
|
407
|
+
value = values[0]
|
408
|
+
if value:
|
409
|
+
self.keymap[key] = value
|
410
|
+
|
411
|
+
def service_attach(self, *args, **kwargs):
|
412
|
+
if not len(self.keymap):
|
413
|
+
self.default_keymap()
|
414
|
+
return
|
415
|
+
# Remap "control+" to "ctrl+"
|
416
|
+
for key in list(self.keymap.keys()):
|
417
|
+
if key.startswith("control+"):
|
418
|
+
newkey = "ctrl+" + key[8:]
|
419
|
+
self.keymap[newkey] = self.keymap[key]
|
420
|
+
del self.keymap[key]
|
421
|
+
for key, values in DEFAULT_KEYMAP.items():
|
422
|
+
if key not in self.keymap or self.keymap[key] in values[1:]:
|
423
|
+
value = values[0]
|
424
|
+
if value:
|
425
|
+
self.keymap[key] = value
|
426
|
+
elif key in self.keymap:
|
427
|
+
del self.keymap[key]
|
428
|
+
|
429
|
+
|
430
|
+
class Alias(Service):
|
431
|
+
"""
|
432
|
+
Alias service, establishes command aliases
|
433
|
+
"""
|
434
|
+
|
435
|
+
def __init__(self, kernel, *args, **kwargs):
|
436
|
+
Service.__init__(self, kernel, "alias")
|
437
|
+
self.aliases = {}
|
438
|
+
_ = self._
|
439
|
+
|
440
|
+
@self.console_argument("alias", type=str, help=_("alias command"))
|
441
|
+
@self.console_command(
|
442
|
+
"alias", help=_("alias <alias> <console commands[;console command]*>")
|
443
|
+
)
|
444
|
+
def alias_command(command, channel, _, alias=None, remainder=None, **kwgs):
|
445
|
+
_ = self._
|
446
|
+
if alias is None:
|
447
|
+
reverse_keymap = {v: k for k, v in self.bind.keymap.items()}
|
448
|
+
channel(_("Aliases (keybind)`:"))
|
449
|
+
channel(_(" Alias Command(s)"))
|
450
|
+
last = None
|
451
|
+
i = -1
|
452
|
+
for key in sorted(
|
453
|
+
self.aliases.keys(),
|
454
|
+
key=lambda x: x if x[0] not in "+-" else "+" + x[1:] + x[0],
|
455
|
+
):
|
456
|
+
value = self.aliases[key]
|
457
|
+
keystroke = reverse_keymap[key] if key in reverse_keymap else ""
|
458
|
+
if last is None or last[0] != "+" or key[0] != "-":
|
459
|
+
i += 1
|
460
|
+
if keystroke and len(key) + len(keystroke) < 18:
|
461
|
+
key += f" ({keystroke})"
|
462
|
+
keystroke = ""
|
463
|
+
if keystroke:
|
464
|
+
channel(f"{i:2d}: ({keystroke})")
|
465
|
+
if last and last[0] == "+" and key[0] == "-":
|
466
|
+
channel(f" {key.ljust(22)} {value}")
|
467
|
+
elif keystroke:
|
468
|
+
channel(f" {key.ljust(22)} {value}")
|
469
|
+
else:
|
470
|
+
channel(f"{i:2d}: {key.ljust(22)} {value}")
|
471
|
+
last = key
|
472
|
+
|
473
|
+
channel("----------")
|
474
|
+
return
|
475
|
+
alias = alias.lower()
|
476
|
+
if alias == "default":
|
477
|
+
self.default_alias()
|
478
|
+
channel(_("Aliases set to default."))
|
479
|
+
return
|
480
|
+
if remainder is None:
|
481
|
+
if alias in self.aliases:
|
482
|
+
del self.aliases[alias]
|
483
|
+
channel(_("Alias {alias_name} unset.").format(alias_name=alias))
|
484
|
+
else:
|
485
|
+
channel(
|
486
|
+
_("No alias for {alias_name} was set.").format(alias_name=alias)
|
487
|
+
)
|
488
|
+
else:
|
489
|
+
self.aliases[alias] = remainder
|
490
|
+
|
491
|
+
@self.console_command(".*", regex=True, hidden=True)
|
492
|
+
def alias_execute(command, **kwgs):
|
493
|
+
"""
|
494
|
+
Alias execution code. Checks value for matching alias and utilizes that.
|
495
|
+
|
496
|
+
Aliases with ; delimit multipart commands
|
497
|
+
"""
|
498
|
+
if command in self.aliases:
|
499
|
+
aliased_command = self.aliases[command]
|
500
|
+
for cmd in aliased_command.split(";"):
|
501
|
+
self(f"{cmd}\n")
|
502
|
+
else:
|
503
|
+
raise CommandMatchRejected(_("This is not an alias."))
|
504
|
+
|
505
|
+
self.read_persistent_string_dict(self.aliases, suffix=True)
|
506
|
+
if not len(self.aliases):
|
507
|
+
self.default_alias()
|
508
|
+
|
509
|
+
def shutdown(self, *args, **kwargs):
|
510
|
+
self.clear_persistent()
|
511
|
+
for key in self.aliases:
|
512
|
+
if key is None or len(key) == 0:
|
513
|
+
continue
|
514
|
+
self.write_persistent(key, self.aliases[key])
|
515
|
+
|
516
|
+
def default_alias(self):
|
517
|
+
self.aliases.clear()
|
518
|
+
for key, values in DEFAULT_ALIAS.items():
|
519
|
+
value = values[0]
|
520
|
+
if value:
|
521
|
+
self.aliases[key] = value
|
522
|
+
|
523
|
+
def service_attach(self, *args, **kwargs):
|
524
|
+
if not len(self.aliases):
|
525
|
+
self.default_alias()
|
526
|
+
return
|
527
|
+
for key, values in DEFAULT_ALIAS.items():
|
528
|
+
if key not in self.aliases or self.aliases[key] in values[1:]:
|
529
|
+
value = values[0]
|
530
|
+
if value:
|
531
|
+
self.aliases[key] = value
|
532
|
+
elif key in self.aliases:
|
533
|
+
del self.aliases[key]
|
534
|
+
|
535
|
+
|
536
|
+
def keymap_execute(context, keyvalue, keydown=True):
|
537
|
+
"""
|
538
|
+
Execute keybind accelerator if it exists and return true
|
539
|
+
|
540
|
+
Else return false
|
541
|
+
"""
|
542
|
+
if keyvalue not in context.keymap:
|
543
|
+
return False
|
544
|
+
action = context.keymap[keyvalue]
|
545
|
+
if keydown or action.startswith("+"):
|
546
|
+
if not keydown and action.startswith("+"):
|
547
|
+
action = "-" + action[1:]
|
548
|
+
for cmd in action.split(";"):
|
549
|
+
context(f"{cmd}\n")
|
550
|
+
return True
|