Skip to content

Commit

Permalink
v 3.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
oskay committed Mar 26, 2022
1 parent 9a89028 commit 8afe8fd
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 26 deletions.
6 changes: 4 additions & 2 deletions cli/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ for the AxiDraw writing and drawing machine.
Supported on python 3.6+, Mac, Windows, and Linux.


Copyright 2020 Evil Mad Scientist Laboratories
Copyright 2022 Evil Mad Scientist Laboratories

The AxiDraw writing and drawing machine is a product of Evil Mad Scientist
Laboratories. https://axidraw.com https://shop.evilmadscientist.com
Expand All @@ -24,6 +24,8 @@ axicli.py - One way to invoke the command line interface

axicli/ - The CLI module directory

documentation/ - API documentation in HTML format

pyaxidraw/ - The AxiDraw python module directory

Installation.txt - Installation documentation
Expand Down Expand Up @@ -103,7 +105,7 @@ Some of the underlying libraries that are included with this distribution
are licensed as GPL. Please see the individual files and directories included with
this distribution for additional license information.

API Documentation: Copyright 2020, Windell H. Oskay, Evil Mad Scientist Laboratories.
API Documentation: Copyright 2022, Windell H. Oskay, Evil Mad Scientist Laboratories.



2 changes: 1 addition & 1 deletion cli/axicli/axidraw_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
from plotink.plot_utils_import import from_dependency_import # plotink
exit_status = from_dependency_import("ink_extensions_utils.exit_status")

cli_version = "AxiDraw Command Line Interface 3.2.0"
cli_version = "AxiDraw Command Line Interface 3.2.1"

quick_help = '''
Basic syntax to plot a file: axicli svg_in [OPTIONS]
Expand Down
2 changes: 1 addition & 1 deletion cli/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def replacement_setup(*args, **kwargs):

replacement_setup(
name='axicli',
version='3.2.0',
version='3.2.1',
python_requires='>=3.6.0',
long_description=long_description,
long_description_content_type='text/plain',
Expand Down
2 changes: 1 addition & 1 deletion inkscape driver/axidraw.inx
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ the Return to Home Corner command.

</param>
<_param name="copyright" type="description" indent="5" xml:space="preserve"
>Version 3.2.0 — Copyright 2022 Evil Mad Scientist</_param>
>Version 3.2.1 — Copyright 2022 Evil Mad Scientist</_param>



Expand Down
31 changes: 10 additions & 21 deletions inkscape driver/axidraw.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __init__(self, default_logging=True, user_message_fun=message.emit, params=N
self.OptionParser.add_option_group(
common_options.core_mode_options(self.OptionParser, params.__dict__))

self.version_string = "3.2.0" # Dated 2022-02-17
self.version_string = "3.2.1" # Dated 2022-03-26

self.spew_debugdata = False

Expand All @@ -103,8 +103,7 @@ def __init__(self, default_logging=True, user_message_fun=message.emit, params=N
self.end_y = None
self.pen_lifts = 0

# logging setup
if default_logging:
if default_logging: # logging setup
logger.setLevel(logging.INFO)
logger.addHandler(self.logging_attrs["default_handler"])

Expand Down Expand Up @@ -1038,11 +1037,11 @@ def plot_document(self):
'value3': str(self.options.port),
}
try:
r = requests.post(self.options.webhook_url, data=payload)
# self.user_message_fun("webhook results: " + str(r))
except (RuntimeError, requests.exceptions.ConnectionError) as e:
wh_result = requests.post(self.options.webhook_url, data=payload)
# self.user_message_fun("webhook results: " + str(wh_result))
except (RuntimeError, requests.exceptions.ConnectionError) as wh_err:
raise RuntimeError("An error occurred while posting webhook. " +
"Are you connected to the internet? (Error: {})".format(e))
"Are you connected to the internet? (Error: {})".format(wh_err))

def plot_doc_digest(self, digest):
"""
Expand All @@ -1051,8 +1050,6 @@ def plot_doc_digest(self, digest):
Takes a flattened path_objects.DocDigest object as input. All
selection of elements to plot and their rendering, including
transforms, needs to be handled before this routine.
This routine does support pausing/resuming a paused plot.
"""

if not digest:
Expand Down Expand Up @@ -1101,20 +1098,14 @@ def plot_doc_digest(self, digest):
def eval_layer_properties(self, str_layer_name):
"""
Parse layer name for encoded commands.
Syntax described at: https://wiki.evilmadscientist.com/AxiDraw_Layer_Control
Parse characters following the layer number (if any) to see if there is
a "+H" or "+S" escape code, that indicates that overrides the pen-down
height or speed for a given layer. A "+D" indicates a given time delay.
One additional single-character escape codes is:
"!" (leading character only)-- inserts a programmatic pause.
The escape sequences are described at:
https://wiki.evilmadscientist.com/AxiDraw_Layer_Control
A leading "!" creates a programmatic pause.
"""

# Look at layer name. Sample first character, then first two, and
# so on, until the string ends or the string no longer consists of digit characters only.
temp_num_string = 'x'
string_pos = 1
current_layer_name = str(str_layer_name)
Expand Down Expand Up @@ -1145,6 +1136,8 @@ def eval_layer_properties(self, str_layer_name):
self.force_pause = True
self.pause_res_check() # Carry out the pause, or resume if required.

current_layer_name = current_layer_name[1:] # Remove leading '!'
max_length -= 1
while string_pos <= max_length:
layer_name_fragment = current_layer_name[:string_pos]
if layer_name_fragment.isdigit():
Expand Down Expand Up @@ -1198,23 +1191,19 @@ def eval_layer_properties(self, str_layer_name):
if 0 <= parameter_int <= 100:
self.use_layer_pen_height = True
self.layer_pen_pos_down = parameter_int

if key == "+s":
if 0 < parameter_int <= 110:
self.use_layer_speed = True
self.layer_speed_pendown = parameter_int

string_pos = param_start + len(temp_num_string)
else:
break # exit loop.

if self.layer_speed_pendown != old_speed:
self.enable_motors() # Set speed value variables for this layer.
if self.layer_pen_pos_down != old_pen_down:
self.servo_setup() # Set pen down height for this layer.
# This new value will be used when we next lower the pen. (It's up between layers.)


def plot_polyline(self, vertex_list):
"""
Plot a polyline object; a single pen-down XY movement.
Expand Down

0 comments on commit 8afe8fd

Please sign in to comment.