pygrbl-build 0.0.1__tar.gz

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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 pygrbl_build Beltrán Offerrall Selma
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: pygrbl_build
3
+ Version: 0.0.1
4
+ Summary: G-code generation algorithms for GRBL diode lasers from different sources; raster Line-to-Line (LaserGRBL-faithful) available today
5
+ Author: pygrbl_build developers
6
+ License-Expression: MIT
7
+ Keywords: grbl,gcode,laser,raster,lasergrbl,engraving
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Intended Audience :: Manufacturing
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Programming Language :: C
17
+ Classifier: Topic :: Scientific/Engineering :: Image Processing
18
+ Classifier: Typing :: Typed
19
+ Requires-Python: >=3.10
20
+ Description-Content-Type: text/markdown
21
+ License-File: LICENSE
22
+ Requires-Dist: pillow<12,>=11.3.0
23
+ Dynamic: license-file
24
+
25
+ # PyGrbl_Build 0.0.1
26
+
27
+ [![PyPI](https://img.shields.io/pypi/v/pygrbl_build.svg)](https://pypi.org/project/pygrbl_build/)
28
+
29
+ A collection of algorithms to generate **G-code for GRBL diode lasers**
30
+ from different sources. Two algorithms today:
31
+
32
+ - **Line-to-Line** (`l2l_gcode`) — raster engraving from an image, with
33
+ LaserGRBL fidelity.
34
+ - **SVG vector** (`svg_gcode`) — vector tracing from an SVG (paths,
35
+ basic shapes, groups, transforms), a faithful port of LaserGRBL's SVG
36
+ import. Pure Python, no extra dependency.
37
+
38
+ Part of the **pygrbl** family, a set of libraries to manage GRBL.
39
+ Companion to [`pygrbl_streamer`](https://github.com/offerrall/pygrbl_streamer)
40
+
41
+ ## Speed
42
+
43
+ This is the whole point. A full 300 mm @ 10 lines/mm raster job — nearly
44
+ **4.7 million lines** of G-code — comes out in **~0.34 s**. LaserGRBL can
45
+ take around **2 minutes** to produce the same job: that's roughly a
46
+ **350× speedup**, and byte-for-byte the same output.
47
+
48
+ ## Install
49
+
50
+ ```
51
+ pip install pygrbl_build
52
+ ```
53
+
54
+ **The only requirements are Pillow and a C compiler.** Pillow is the
55
+ single Python dependency (image loading and resizing); the C compiler is
56
+ needed at install time because the raster engine ships as a C extension.
57
+ Nothing else — no numpy, no runtime toolchain.
58
+
59
+ ## Usage
60
+
61
+ Each algorithm pairs a `*_gcode` generator with its own `*Profile`
62
+ config, so adding one never touches the others.
63
+
64
+ Raster Line-to-Line (`l2l_gcode` + `L2LProfile`):
65
+
66
+ ```python
67
+ from pygrbl_build import L2LProfile, l2l_gcode, write_gcode
68
+
69
+ profile = L2LProfile(width_mm=300.0, lines_per_mm=10.0, feed=3000, s_max=100)
70
+ write_gcode(l2l_gcode("shield.png", profile), "shield.nc")
71
+ ```
72
+
73
+ SVG vector (`svg_gcode` + `SvgProfile`):
74
+
75
+ ```python
76
+ from pygrbl_build import SvgProfile, svg_gcode, write_gcode
77
+
78
+ profile = SvgProfile(feed=1000, s_max=255)
79
+ write_gcode(svg_gcode("logo.svg", profile), "logo.nc")
80
+ ```
81
+
82
+ `SvgProfile`'s defaults reproduce LaserGRBL's own SVG-import defaults, so
83
+ the output matches the desktop app for the same drawing. `text` and
84
+ `image` elements are skipped — convert text to paths in your editor
85
+ first.
86
+
87
+ `write_gcode` writes the path verbatim, so you choose the extension
88
+ (`.nc`, `.gcode`, `.g`, ...). It's just a convenience: every `*_gcode`
89
+ generator is a lazy iterator of lines, so anything beyond writing a
90
+ plain file (compression, network shipping, streaming to the machine) is
91
+ the upper layer's job — consume the iterator with whatever sink you need.
92
+
93
+ Public API: `L2LProfile`, `l2l_gcode`, `SvgProfile`, `svg_gcode`,
94
+ `write_gcode`. See the docstrings.
@@ -0,0 +1,70 @@
1
+ # PyGrbl_Build 0.0.1
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/pygrbl_build.svg)](https://pypi.org/project/pygrbl_build/)
4
+
5
+ A collection of algorithms to generate **G-code for GRBL diode lasers**
6
+ from different sources. Two algorithms today:
7
+
8
+ - **Line-to-Line** (`l2l_gcode`) — raster engraving from an image, with
9
+ LaserGRBL fidelity.
10
+ - **SVG vector** (`svg_gcode`) — vector tracing from an SVG (paths,
11
+ basic shapes, groups, transforms), a faithful port of LaserGRBL's SVG
12
+ import. Pure Python, no extra dependency.
13
+
14
+ Part of the **pygrbl** family, a set of libraries to manage GRBL.
15
+ Companion to [`pygrbl_streamer`](https://github.com/offerrall/pygrbl_streamer)
16
+
17
+ ## Speed
18
+
19
+ This is the whole point. A full 300 mm @ 10 lines/mm raster job — nearly
20
+ **4.7 million lines** of G-code — comes out in **~0.34 s**. LaserGRBL can
21
+ take around **2 minutes** to produce the same job: that's roughly a
22
+ **350× speedup**, and byte-for-byte the same output.
23
+
24
+ ## Install
25
+
26
+ ```
27
+ pip install pygrbl_build
28
+ ```
29
+
30
+ **The only requirements are Pillow and a C compiler.** Pillow is the
31
+ single Python dependency (image loading and resizing); the C compiler is
32
+ needed at install time because the raster engine ships as a C extension.
33
+ Nothing else — no numpy, no runtime toolchain.
34
+
35
+ ## Usage
36
+
37
+ Each algorithm pairs a `*_gcode` generator with its own `*Profile`
38
+ config, so adding one never touches the others.
39
+
40
+ Raster Line-to-Line (`l2l_gcode` + `L2LProfile`):
41
+
42
+ ```python
43
+ from pygrbl_build import L2LProfile, l2l_gcode, write_gcode
44
+
45
+ profile = L2LProfile(width_mm=300.0, lines_per_mm=10.0, feed=3000, s_max=100)
46
+ write_gcode(l2l_gcode("shield.png", profile), "shield.nc")
47
+ ```
48
+
49
+ SVG vector (`svg_gcode` + `SvgProfile`):
50
+
51
+ ```python
52
+ from pygrbl_build import SvgProfile, svg_gcode, write_gcode
53
+
54
+ profile = SvgProfile(feed=1000, s_max=255)
55
+ write_gcode(svg_gcode("logo.svg", profile), "logo.nc")
56
+ ```
57
+
58
+ `SvgProfile`'s defaults reproduce LaserGRBL's own SVG-import defaults, so
59
+ the output matches the desktop app for the same drawing. `text` and
60
+ `image` elements are skipped — convert text to paths in your editor
61
+ first.
62
+
63
+ `write_gcode` writes the path verbatim, so you choose the extension
64
+ (`.nc`, `.gcode`, `.g`, ...). It's just a convenience: every `*_gcode`
65
+ generator is a lazy iterator of lines, so anything beyond writing a
66
+ plain file (compression, network shipping, streaming to the machine) is
67
+ the upper layer's job — consume the iterator with whatever sink you need.
68
+
69
+ Public API: `L2LProfile`, `l2l_gcode`, `SvgProfile`, `svg_gcode`,
70
+ `write_gcode`. See the docstrings.
@@ -0,0 +1,43 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pygrbl_build"
7
+ description = "G-code generation algorithms for GRBL diode lasers from different sources; raster Line-to-Line (LaserGRBL-faithful) available today"
8
+ readme = "README.md"
9
+ license = "MIT"
10
+ requires-python = ">=3.10"
11
+ authors = [{ name = "pygrbl_build developers" }]
12
+ keywords = ["grbl", "gcode", "laser", "raster", "lasergrbl", "engraving"]
13
+ classifiers = [
14
+ "Development Status :: 4 - Beta",
15
+ "Intended Audience :: Manufacturing",
16
+ "Operating System :: OS Independent",
17
+ "Programming Language :: Python :: 3",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Programming Language :: C",
23
+ "Topic :: Scientific/Engineering :: Image Processing",
24
+ "Typing :: Typed",
25
+ ]
26
+ dynamic = ["version"]
27
+
28
+ dependencies = [
29
+ "pillow>=11.3.0,<12",
30
+ ]
31
+
32
+ [dependency-groups]
33
+ dev = ["pytest"]
34
+
35
+ [tool.setuptools]
36
+ package-dir = { "" = "src" }
37
+ packages = ["pygrbl_build"]
38
+
39
+ [tool.setuptools.package-data]
40
+ pygrbl_build = ["py.typed"]
41
+
42
+ [tool.setuptools.dynamic]
43
+ version = { attr = "pygrbl_build.__version__" }
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,16 @@
1
+ """Extension build hook for pygrbl_build's C engine.
2
+
3
+ All package metadata lives in pyproject.toml; this file exists only
4
+ because declarative config cannot describe ext_modules.
5
+ """
6
+
7
+ from setuptools import Extension, setup
8
+
9
+ setup(
10
+ ext_modules=[
11
+ Extension(
12
+ "pygrbl_build._l2l_native",
13
+ sources=["src/pygrbl_build/_l2l_native.c"],
14
+ )
15
+ ],
16
+ )