meerk40t 0.9.3001__py2.py3-none-any.whl → 0.9.7020__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 +1194 -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 +1858 -1507
- meerk40t/core/elements/clipboard.py +229 -219
- meerk40t/core/elements/element_treeops.py +4595 -2837
- meerk40t/core/elements/element_types.py +125 -105
- meerk40t/core/elements/elements.py +4315 -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 +934 -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/testcases.py +105 -0
- 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 +463 -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 +204 -0
- meerk40t/extra/ezd.py +1165 -1165
- meerk40t/extra/hershey.py +834 -340
- meerk40t/extra/imageactions.py +322 -316
- meerk40t/extra/inkscape.py +628 -622
- meerk40t/extra/lbrn.py +424 -424
- meerk40t/extra/outerworld.py +283 -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 +1084 -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 +232 -133
- meerk40t/gui/choicepropertypanel.py +1662 -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 +1440 -846
- meerk40t/gui/icons.py +3422 -2747
- meerk40t/gui/imagesplitter.py +555 -508
- meerk40t/gui/keymap.py +354 -344
- meerk40t/gui/laserpanel.py +897 -806
- meerk40t/gui/laserrender.py +1470 -1232
- meerk40t/gui/lasertoolpanel.py +805 -793
- meerk40t/gui/magnetoptions.py +436 -0
- meerk40t/gui/materialmanager.py +2944 -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 +500 -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 +2471 -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 +592 -346
- meerk40t/gui/scenewidgets/relocatewidget.py +33 -33
- meerk40t/gui/scenewidgets/reticlewidget.py +83 -83
- meerk40t/gui/scenewidgets/selectionwidget.py +2958 -2756
- meerk40t/gui/simpleui.py +362 -333
- meerk40t/gui/simulation.py +2451 -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 +590 -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 +163 -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 +1447 -1169
- meerk40t/gui/wxmmain.py +5644 -4112
- meerk40t/gui/wxmribbon.py +1591 -1076
- meerk40t/gui/wxmscene.py +1631 -1453
- meerk40t/gui/wxmtree.py +2416 -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 +2793 -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 +3828 -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 +140 -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 +404 -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 +676 -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 +941 -940
- meerk40t/tools/rasterplotter.py +1660 -547
- meerk40t/tools/shxparser.py +1047 -901
- meerk40t/tools/ttfparser.py +726 -446
- meerk40t/tools/zinglplotter.py +595 -593
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7020.dist-info}/LICENSE +21 -21
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7020.dist-info}/METADATA +150 -139
- meerk40t-0.9.7020.dist-info/RECORD +446 -0
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7020.dist-info}/WHEEL +1 -1
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7020.dist-info}/top_level.txt +0 -1
- {meerk40t-0.9.3001.dist-info → meerk40t-0.9.7020.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.7020.dist-info}/entry_points.txt +0 -0
meerk40t/newly/driver.py
CHANGED
@@ -1,412 +1,540 @@
|
|
1
|
-
"""
|
2
|
-
Newly Driver
|
3
|
-
|
4
|
-
"""
|
5
|
-
import time
|
6
|
-
|
7
|
-
from meerk40t.core.cutcode.cubiccut import CubicCut
|
8
|
-
from meerk40t.core.cutcode.dwellcut import DwellCut
|
9
|
-
from meerk40t.core.cutcode.gotocut import GotoCut
|
10
|
-
from meerk40t.core.cutcode.homecut import HomeCut
|
11
|
-
from meerk40t.core.cutcode.inputcut import InputCut
|
12
|
-
from meerk40t.core.cutcode.linecut import LineCut
|
13
|
-
from meerk40t.core.cutcode.outputcut import OutputCut
|
14
|
-
from meerk40t.core.cutcode.plotcut import PlotCut
|
15
|
-
from meerk40t.core.cutcode.quadcut import QuadCut
|
16
|
-
from meerk40t.core.cutcode.waitcut import WaitCut
|
17
|
-
from meerk40t.core.plotplanner import PlotPlanner
|
18
|
-
from meerk40t.newly.controller import NewlyController
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
self.
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
self.
|
30
|
-
|
31
|
-
|
32
|
-
self.
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
self.
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
self.
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
def
|
48
|
-
return self.
|
49
|
-
|
50
|
-
@property
|
51
|
-
def
|
52
|
-
return self.connection.
|
53
|
-
|
54
|
-
@property
|
55
|
-
def
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
def
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
def
|
91
|
-
|
92
|
-
if
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
@
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
con = self.connection
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
if
|
146
|
-
con.sync()
|
147
|
-
last_x, last_y = con.get_last_xy()
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
con.
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
if last_x !=
|
158
|
-
con.goto(
|
159
|
-
interp = self.service.
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
p =
|
172
|
-
|
173
|
-
|
174
|
-
con.
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
con.
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
@
|
242
|
-
|
243
|
-
|
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
|
-
|
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
|
-
@param
|
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
|
-
|
390
|
-
|
391
|
-
self.
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
@
|
410
|
-
|
411
|
-
|
412
|
-
|
1
|
+
"""
|
2
|
+
Newly Driver
|
3
|
+
|
4
|
+
"""
|
5
|
+
import time
|
6
|
+
|
7
|
+
from meerk40t.core.cutcode.cubiccut import CubicCut
|
8
|
+
from meerk40t.core.cutcode.dwellcut import DwellCut
|
9
|
+
from meerk40t.core.cutcode.gotocut import GotoCut
|
10
|
+
from meerk40t.core.cutcode.homecut import HomeCut
|
11
|
+
from meerk40t.core.cutcode.inputcut import InputCut
|
12
|
+
from meerk40t.core.cutcode.linecut import LineCut
|
13
|
+
from meerk40t.core.cutcode.outputcut import OutputCut
|
14
|
+
from meerk40t.core.cutcode.plotcut import PlotCut
|
15
|
+
from meerk40t.core.cutcode.quadcut import QuadCut
|
16
|
+
from meerk40t.core.cutcode.waitcut import WaitCut
|
17
|
+
from meerk40t.core.plotplanner import PlotPlanner
|
18
|
+
from meerk40t.newly.controller import NewlyController
|
19
|
+
from meerk40t.tools.geomstr import Geomstr
|
20
|
+
|
21
|
+
|
22
|
+
class NewlyDriver:
|
23
|
+
def __init__(self, service, force_mock=False):
|
24
|
+
self.service = service
|
25
|
+
self.name = str(self.service)
|
26
|
+
|
27
|
+
self.connection = NewlyController(service, force_mock=force_mock)
|
28
|
+
|
29
|
+
self.service.add_service_delegate(self.connection)
|
30
|
+
self.paused = False
|
31
|
+
|
32
|
+
self.is_relative = False
|
33
|
+
self.laser = False
|
34
|
+
|
35
|
+
self._shutdown = False
|
36
|
+
|
37
|
+
self.queue = list()
|
38
|
+
self._queue_current = 0
|
39
|
+
self._queue_total = 0
|
40
|
+
|
41
|
+
self.plot_planner = PlotPlanner(
|
42
|
+
dict(), single=True, ppi=False, shift=False, group=True, require_uniform_movement = False,
|
43
|
+
)
|
44
|
+
self._aborting = False
|
45
|
+
self._list_bits = None
|
46
|
+
|
47
|
+
def __repr__(self):
|
48
|
+
return f"NewlyDriver({self.name})"
|
49
|
+
|
50
|
+
@property
|
51
|
+
def native_x(self):
|
52
|
+
return self.connection._last_x
|
53
|
+
|
54
|
+
@property
|
55
|
+
def native_y(self):
|
56
|
+
return self.connection._last_y
|
57
|
+
|
58
|
+
@property
|
59
|
+
def connected(self):
|
60
|
+
if self.connection is None:
|
61
|
+
return False
|
62
|
+
return self.connection.connected
|
63
|
+
|
64
|
+
def service_attach(self):
|
65
|
+
self._shutdown = False
|
66
|
+
|
67
|
+
def service_detach(self):
|
68
|
+
self._shutdown = True
|
69
|
+
|
70
|
+
def connect(self):
|
71
|
+
self.connection.connect_if_needed()
|
72
|
+
|
73
|
+
def disconnect(self):
|
74
|
+
self.connection.disconnect()
|
75
|
+
|
76
|
+
def abort_retry(self):
|
77
|
+
self.connection.abort_connect()
|
78
|
+
|
79
|
+
def get_internal_queue_status(self):
|
80
|
+
return self._queue_current, self._queue_total
|
81
|
+
|
82
|
+
def _set_queue_status(self, current, total):
|
83
|
+
self._queue_current = current
|
84
|
+
self._queue_total = total
|
85
|
+
|
86
|
+
#############
|
87
|
+
# DRIVER COMMANDS
|
88
|
+
#############
|
89
|
+
|
90
|
+
def hold_work(self, priority):
|
91
|
+
"""
|
92
|
+
This is checked by the spooler to see if we should hold any work from being processed from the work queue.
|
93
|
+
|
94
|
+
For example if we pause, we don't want it trying to call some functions. Only priority jobs will execute if
|
95
|
+
we hold the work queue. This is so that "resume" commands can be processed.
|
96
|
+
|
97
|
+
@return:
|
98
|
+
"""
|
99
|
+
return priority <= 0 and self.paused
|
100
|
+
|
101
|
+
def job_start(self, job):
|
102
|
+
helper = getattr(job, "helper", False)
|
103
|
+
if helper:
|
104
|
+
self.connection.realtime_job(job)
|
105
|
+
else:
|
106
|
+
self.connection.open_job(job)
|
107
|
+
|
108
|
+
def job_finish(self, job):
|
109
|
+
self.connection.close_job(job)
|
110
|
+
|
111
|
+
def laser_off(self, *values):
|
112
|
+
"""
|
113
|
+
This command expects to stop pulsing the laser in place.
|
114
|
+
|
115
|
+
@param values:
|
116
|
+
@return:
|
117
|
+
"""
|
118
|
+
self.laser = False
|
119
|
+
|
120
|
+
def laser_on(self, *values):
|
121
|
+
"""
|
122
|
+
This command expects to start pulsing the laser in place.
|
123
|
+
|
124
|
+
@param values:
|
125
|
+
@return:
|
126
|
+
"""
|
127
|
+
self.laser = True
|
128
|
+
|
129
|
+
def geometry(self, geom):
|
130
|
+
"""
|
131
|
+
Called at the end of plot commands to ensure the driver can deal with them all as a group.
|
132
|
+
|
133
|
+
@return:
|
134
|
+
"""
|
135
|
+
con = self.connection
|
136
|
+
g = Geomstr()
|
137
|
+
for segment_type, start, c1, c2, end, sets in geom.as_lines():
|
138
|
+
con.program_mode()
|
139
|
+
# LOOP CHECKS
|
140
|
+
if self._aborting:
|
141
|
+
con.abort()
|
142
|
+
self._aborting = False
|
143
|
+
return
|
144
|
+
|
145
|
+
if segment_type == "line":
|
146
|
+
con.sync()
|
147
|
+
last_x, last_y = con.get_last_xy()
|
148
|
+
if last_x != start.real or last_y != start.imag:
|
149
|
+
con.goto(start.real, start.imag)
|
150
|
+
con.mark(end.real, end.imag, settings=sets)
|
151
|
+
con.update()
|
152
|
+
elif segment_type == "end":
|
153
|
+
pass
|
154
|
+
elif segment_type == "quad":
|
155
|
+
con.sync()
|
156
|
+
last_x, last_y = con.get_last_xy()
|
157
|
+
if last_x != start.real or last_y != start.imag:
|
158
|
+
con.goto(start.real, start.imag)
|
159
|
+
interp = self.service.interp
|
160
|
+
g.clear()
|
161
|
+
g.quad(start, c1, end)
|
162
|
+
|
163
|
+
for p in list(g.as_equal_interpolated_points(distance=interp))[1:]:
|
164
|
+
# LOOP CHECKS
|
165
|
+
if self._aborting:
|
166
|
+
con.abort()
|
167
|
+
self._aborting = False
|
168
|
+
return
|
169
|
+
while self.paused:
|
170
|
+
time.sleep(0.05)
|
171
|
+
con.mark(p.real, p.imag, settings=sets)
|
172
|
+
con.update()
|
173
|
+
elif segment_type == "cubic":
|
174
|
+
con.sync()
|
175
|
+
last_x, last_y = con.get_last_xy()
|
176
|
+
if last_x != start.real or last_y != start.imag:
|
177
|
+
con.goto(start.real, start.imag)
|
178
|
+
interp = self.service.interp
|
179
|
+
g.clear()
|
180
|
+
g.cubic(start, c1, c2, end)
|
181
|
+
|
182
|
+
for p in list(g.as_equal_interpolated_points(distance=interp))[1:]:
|
183
|
+
# LOOP CHECKS
|
184
|
+
if self._aborting:
|
185
|
+
con.abort()
|
186
|
+
self._aborting = False
|
187
|
+
return
|
188
|
+
while self.paused:
|
189
|
+
time.sleep(0.05)
|
190
|
+
con.mark(p.real, p.imag, settings=sets)
|
191
|
+
con.update()
|
192
|
+
elif segment_type == "arc":
|
193
|
+
con.sync()
|
194
|
+
last_x, last_y = con.get_last_xy()
|
195
|
+
if last_x != start.real or last_y != start.imag:
|
196
|
+
con.goto(start.real, start.imag)
|
197
|
+
interp = self.service.interp
|
198
|
+
g.clear()
|
199
|
+
g.arc(start, c1, end)
|
200
|
+
|
201
|
+
for p in list(g.as_equal_interpolated_points(distance=interp))[1:]:
|
202
|
+
# LOOP CHECKS
|
203
|
+
if self._aborting:
|
204
|
+
con.abort()
|
205
|
+
self._aborting = False
|
206
|
+
return
|
207
|
+
while self.paused:
|
208
|
+
time.sleep(0.05)
|
209
|
+
con.mark(p.real, p.imag, settings=sets)
|
210
|
+
con.update()
|
211
|
+
elif segment_type == "point":
|
212
|
+
function = sets.get("function")
|
213
|
+
if function == "dwell":
|
214
|
+
last_x, last_y = con.get_last_xy()
|
215
|
+
if last_x != start.real or last_y != start.imag:
|
216
|
+
con.goto(start.real, start.imag)
|
217
|
+
con.dwell(sets.get("dwell_time"), settings=sets)
|
218
|
+
elif function == "wait":
|
219
|
+
con.wait(sets.get("dwell_time"))
|
220
|
+
elif function == "home":
|
221
|
+
con.goto(0, 0)
|
222
|
+
elif function == "goto":
|
223
|
+
con.goto(start.real, start.imag)
|
224
|
+
elif function == "input":
|
225
|
+
pass
|
226
|
+
elif function == "output":
|
227
|
+
# Moshi has no core GPIO functionality
|
228
|
+
pass
|
229
|
+
# elif segment_type == "raster":
|
230
|
+
# con.sync()
|
231
|
+
# con.raster(q)
|
232
|
+
# con.update()
|
233
|
+
con.rapid_mode()
|
234
|
+
|
235
|
+
def plot(self, plot):
|
236
|
+
"""
|
237
|
+
This command is called with bits of cutcode as they are processed through the spooler. This should be optimized
|
238
|
+
bits of cutcode data with settings on them from paths etc.
|
239
|
+
|
240
|
+
@param plot:
|
241
|
+
@return:
|
242
|
+
"""
|
243
|
+
self.queue.append(plot)
|
244
|
+
|
245
|
+
def plot_start(self):
|
246
|
+
"""
|
247
|
+
This is called after all the cutcode objects are sent. This says it shouldn't expect more cutcode for a bit.
|
248
|
+
|
249
|
+
@return:
|
250
|
+
"""
|
251
|
+
con = self.connection
|
252
|
+
queue = self.queue
|
253
|
+
self.queue = list()
|
254
|
+
total = len(queue)
|
255
|
+
current = 0
|
256
|
+
for q in queue:
|
257
|
+
current += 1
|
258
|
+
self._set_queue_status(current, total)
|
259
|
+
|
260
|
+
con.program_mode()
|
261
|
+
# LOOP CHECKS
|
262
|
+
if self._aborting:
|
263
|
+
con.abort()
|
264
|
+
self._aborting = False
|
265
|
+
return
|
266
|
+
if isinstance(q, LineCut):
|
267
|
+
con.sync()
|
268
|
+
last_x, last_y = con.get_last_xy()
|
269
|
+
x, y = q.start
|
270
|
+
if last_x != x or last_y != y:
|
271
|
+
con.goto(x, y)
|
272
|
+
con.mark(*q.end, settings=q.settings)
|
273
|
+
con.update()
|
274
|
+
elif isinstance(q, (QuadCut, CubicCut)):
|
275
|
+
con.sync()
|
276
|
+
last_x, last_y = con.get_last_xy()
|
277
|
+
x, y = q.start
|
278
|
+
if last_x != x or last_y != y:
|
279
|
+
con.goto(x, y)
|
280
|
+
interp = self.service.interp
|
281
|
+
g = Geomstr()
|
282
|
+
if isinstance(q, CubicCut):
|
283
|
+
g.cubic(
|
284
|
+
complex(*q.start),
|
285
|
+
complex(*q.c1()),
|
286
|
+
complex(*q.c2()),
|
287
|
+
complex(*q.end),
|
288
|
+
)
|
289
|
+
else:
|
290
|
+
g.quad(complex(*q.start), complex(*q.c()), complex(*q.end))
|
291
|
+
|
292
|
+
for p in list(g.as_equal_interpolated_points(distance=interp))[1:]:
|
293
|
+
# LOOP CHECKS
|
294
|
+
if self._aborting:
|
295
|
+
con.abort()
|
296
|
+
self._aborting = False
|
297
|
+
return
|
298
|
+
while self.paused:
|
299
|
+
time.sleep(0.05)
|
300
|
+
con.mark(p.real, p.imag, settings=q.settings)
|
301
|
+
con.update()
|
302
|
+
elif isinstance(q, PlotCut):
|
303
|
+
con.sync()
|
304
|
+
last_x, last_y = con.get_last_xy()
|
305
|
+
x, y = q.start
|
306
|
+
if last_x != x or last_y != y:
|
307
|
+
con.goto(x, y)
|
308
|
+
|
309
|
+
max_power = float(q.settings.get("power", self.service.default_power))
|
310
|
+
percent_power = max_power / 10.0
|
311
|
+
|
312
|
+
for ox, oy, on, x, y in q.plot:
|
313
|
+
# LOOP CHECKS
|
314
|
+
if self._aborting:
|
315
|
+
con.abort()
|
316
|
+
self._aborting = False
|
317
|
+
return
|
318
|
+
while self.paused:
|
319
|
+
time.sleep(0.05)
|
320
|
+
|
321
|
+
# q.plot can have different on values, these are parsed
|
322
|
+
# Max power is the percent max power, scaled by the pixel power.
|
323
|
+
con.mark(x, y, settings=q.settings, power=percent_power * on)
|
324
|
+
con.update()
|
325
|
+
elif isinstance(q, DwellCut):
|
326
|
+
last_x, last_y = con.get_last_xy()
|
327
|
+
x, y = q.start
|
328
|
+
if last_x != x or last_y != y:
|
329
|
+
con.goto(x, y)
|
330
|
+
con.dwell(q.dwell_time, settings=q.settings)
|
331
|
+
elif isinstance(q, WaitCut):
|
332
|
+
con.wait(q.dwell_time)
|
333
|
+
elif isinstance(q, HomeCut):
|
334
|
+
con.goto(0, 0)
|
335
|
+
elif isinstance(q, GotoCut):
|
336
|
+
con.goto(0, 0)
|
337
|
+
elif isinstance(q, OutputCut):
|
338
|
+
pass
|
339
|
+
elif isinstance(q, InputCut):
|
340
|
+
pass
|
341
|
+
else:
|
342
|
+
# Rastercut
|
343
|
+
con.sync()
|
344
|
+
con.raster(q)
|
345
|
+
con.update()
|
346
|
+
con.rapid_mode()
|
347
|
+
self._set_queue_status(0, 0)
|
348
|
+
|
349
|
+
def move_abs(self, x, y):
|
350
|
+
"""
|
351
|
+
Requests laser move to absolute position x, y in physical units
|
352
|
+
|
353
|
+
@param x:
|
354
|
+
@param y:
|
355
|
+
@return:
|
356
|
+
"""
|
357
|
+
self.connection.sync()
|
358
|
+
try:
|
359
|
+
self.connection.set_xy(*self.service.view.position(x, y))
|
360
|
+
except ConnectionError:
|
361
|
+
# If this triggered the laser movement it might have been force aborted, and crash here in error.
|
362
|
+
pass
|
363
|
+
self.connection.update()
|
364
|
+
|
365
|
+
def move_rel(self, dx, dy):
|
366
|
+
"""
|
367
|
+
Requests laser move relative position dx, dy in physical units
|
368
|
+
|
369
|
+
@param dx:
|
370
|
+
@param dy:
|
371
|
+
@return:
|
372
|
+
"""
|
373
|
+
unit_dx, unit_dy = self.service.view.position(dx, dy, vector=True)
|
374
|
+
|
375
|
+
self.connection.sync()
|
376
|
+
try:
|
377
|
+
self.connection.set_xy(
|
378
|
+
self.connection._last_x + unit_dx, self.connection._last_y + unit_dy
|
379
|
+
)
|
380
|
+
except ConnectionError:
|
381
|
+
# If this triggered the laser movement it might have been force aborted, and crash here in error.
|
382
|
+
pass
|
383
|
+
self.connection.update()
|
384
|
+
|
385
|
+
def home(self):
|
386
|
+
"""
|
387
|
+
This is called home, returns to 0,0.
|
388
|
+
|
389
|
+
@return:
|
390
|
+
"""
|
391
|
+
self.connection.sync()
|
392
|
+
self.connection.home()
|
393
|
+
self.connection.update()
|
394
|
+
|
395
|
+
def origin(self):
|
396
|
+
self.move_abs("0", "0")
|
397
|
+
|
398
|
+
def physical_home(self):
|
399
|
+
""" "
|
400
|
+
This would be the command to go to a real physical home position (i.e. hitting endstops)
|
401
|
+
"""
|
402
|
+
self.connection.sync()
|
403
|
+
self.connection.home()
|
404
|
+
self.connection.update()
|
405
|
+
|
406
|
+
def rapid_mode(self):
|
407
|
+
"""
|
408
|
+
Expects to be in rapid jogging mode.
|
409
|
+
@return:
|
410
|
+
"""
|
411
|
+
self.connection.rapid_mode()
|
412
|
+
|
413
|
+
def program_mode(self):
|
414
|
+
"""
|
415
|
+
Expects to run jobs at a speed in a programmed mode.
|
416
|
+
@return:
|
417
|
+
"""
|
418
|
+
self.connection.program_mode()
|
419
|
+
|
420
|
+
def raster_mode(self, *args):
|
421
|
+
"""
|
422
|
+
Expects to run a raster job. Raster information is set in special modes to stop the laser head from moving
|
423
|
+
too far.
|
424
|
+
|
425
|
+
@return:
|
426
|
+
"""
|
427
|
+
pass
|
428
|
+
|
429
|
+
def wait_finished(self):
|
430
|
+
"""
|
431
|
+
Expects to be caught up such that the next command will happen immediately rather than get queued.
|
432
|
+
|
433
|
+
@return:
|
434
|
+
"""
|
435
|
+
self.connection.wait_finished()
|
436
|
+
|
437
|
+
def function(self, function):
|
438
|
+
"""
|
439
|
+
This command asks that this function be executed at the appropriate time within the spooling cycle.
|
440
|
+
|
441
|
+
@param function:
|
442
|
+
@return:
|
443
|
+
"""
|
444
|
+
function()
|
445
|
+
|
446
|
+
def wait(self, time_in_ms):
|
447
|
+
"""
|
448
|
+
Wait asks that the work be stalled or current process held for the time time_in_ms in ms. If wait_finished is
|
449
|
+
called first this will attempt to stall the machine while performing no work. If the driver in question permits
|
450
|
+
waits to be placed within code this should insert waits into the current job. Returning instantly rather than
|
451
|
+
holding the processes.
|
452
|
+
|
453
|
+
@param time_in_ms:
|
454
|
+
@return:
|
455
|
+
"""
|
456
|
+
self.connection.wait(time_in_ms)
|
457
|
+
|
458
|
+
def console(self, value):
|
459
|
+
"""
|
460
|
+
This asks that the console command be executed at the appropriate time within the spooled cycle.
|
461
|
+
|
462
|
+
@param value: console command
|
463
|
+
@return:
|
464
|
+
"""
|
465
|
+
self.service(value)
|
466
|
+
|
467
|
+
def beep(self):
|
468
|
+
"""
|
469
|
+
Wants a system beep to be issued.
|
470
|
+
This command asks that a beep be executed at the appropriate time within the spooled cycle.
|
471
|
+
|
472
|
+
@return:
|
473
|
+
"""
|
474
|
+
self.service("beep\n")
|
475
|
+
|
476
|
+
def signal(self, signal, *args):
|
477
|
+
"""
|
478
|
+
Wants a system signal to be sent.
|
479
|
+
|
480
|
+
@param signal:
|
481
|
+
@param args:
|
482
|
+
@return:
|
483
|
+
"""
|
484
|
+
self.service.signal(signal, *args)
|
485
|
+
|
486
|
+
def pause(self):
|
487
|
+
"""
|
488
|
+
Wants the driver to pause.
|
489
|
+
@return:
|
490
|
+
"""
|
491
|
+
if self.paused:
|
492
|
+
self.resume()
|
493
|
+
return
|
494
|
+
self.paused = True
|
495
|
+
self.connection.pause()
|
496
|
+
self.service.signal("pause")
|
497
|
+
|
498
|
+
def resume(self):
|
499
|
+
"""
|
500
|
+
Wants the driver to resume.
|
501
|
+
|
502
|
+
This typically issues from the realtime queue which means it will call even if we tell work_hold that we should
|
503
|
+
hold the work.
|
504
|
+
|
505
|
+
@return:
|
506
|
+
"""
|
507
|
+
self.paused = False
|
508
|
+
self.connection.resume()
|
509
|
+
self.service.signal("pause")
|
510
|
+
|
511
|
+
def reset(self):
|
512
|
+
"""
|
513
|
+
Wants the job to be aborted and action to be stopped.
|
514
|
+
|
515
|
+
@return:
|
516
|
+
"""
|
517
|
+
self.paused = False
|
518
|
+
self.connection.abort()
|
519
|
+
self.service.signal("pause")
|
520
|
+
|
521
|
+
def status(self):
|
522
|
+
"""
|
523
|
+
Wants a status report of what the driver is doing.
|
524
|
+
@return:
|
525
|
+
"""
|
526
|
+
pass
|
527
|
+
|
528
|
+
def pulse(self, pulse_time):
|
529
|
+
self.connection.pulse(pulse_time)
|
530
|
+
|
531
|
+
def dwell(self, time_in_ms):
|
532
|
+
"""
|
533
|
+
Requests that the laser fire in place for the given time period. This could be done in a series of commands,
|
534
|
+
move to a location, turn laser on, wait, turn laser off. However, some drivers have specific laser-in-place
|
535
|
+
commands so calling dwell is preferred.
|
536
|
+
|
537
|
+
@param time_in_ms:
|
538
|
+
@return:
|
539
|
+
"""
|
540
|
+
self.connection.dwell(time_in_ms)
|