Skip to content

Commit da60f93

Browse files
committed
Remove invert_axis.
Remove reference to invert. Version bump.
1 parent 22f3323 commit da60f93

3 files changed

Lines changed: 1 addition & 26 deletions

File tree

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ Inside the configuration file you can specify a new output profile using the fol
5151
```toml
5252
[gwrite.my_own_plotter]
5353
unit = "mm"
54-
invert_y = true
5554
document_start = "M3 G21\n"
5655
layer_start = "(Start Layer)\n"
5756
line_start = "(Start Block)\n"

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
setup(
88
name="vpype-gcode",
9-
version="0.8.0",
9+
version="0.8.1",
1010
description="vpype gcode plugin",
1111
long_description=readme,
1212
long_description_content_type="text/markdown",

vpype_gcode/gwrite.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,6 @@
99
vp.CONFIG_MANAGER.load_config_file(str(Path(__file__).parent / "bundled_configs.toml"))
1010

1111

12-
def invert_axis(document: vp.Document, invert_x: bool, invert_y: bool):
13-
"""Inverts none, one or both axis of the document.
14-
15-
This applies a relative scale operation with factors of 1 or -1
16-
on the two axis to all layers. The inversion happens relative to
17-
the center of the bounds.
18-
"""
19-
20-
bounds = document.bounds()
21-
if not bounds:
22-
raise ValueError("no geometry available, cannot compute origin")
23-
24-
origin = (
25-
0.5 * (bounds[0] + bounds[2]),
26-
0.5 * (bounds[1] + bounds[3]),
27-
)
28-
29-
document.translate(-origin[0], -origin[1])
30-
document.scale(-1 if invert_x else 1, -1 if invert_y else 1)
31-
document.translate(origin[0], origin[1])
32-
33-
return document
34-
35-
3612
@click.command()
3713
@click.argument("output", type=click.File("w"))
3814
@click.option(

0 commit comments

Comments
 (0)